Describing an Amazon DocumentDB Subnet Group

You can use the AWS Management Console or the AWS CLI to get the details of an Amazon DocumentDB subnet group.

Using the AWS Management Console

The following procedure shows you how to get the details of an Amazon DocumentDB subnet group.

To find the details of a subnet group

  1. Sign in to the AWS Management Console, and open the Amazon DocumentDB console at https://console.aws.amazon.com/docdb.

  2. In the navigation pane, choose Subnet groups.

    Tip

    If you don’t see the navigation pane on the left side of your screen, choose the menu icon (Describing a Subnet Group - 图1) in the upper-left corner of the page.

  3. To see the details of a subnet group, choose the name of that subnet group.

    ![

    1. Screenshot: Showing the details of a subnet group.
    2. ](https://docs.aws.amazon.com/documentdb/latest/developerguide/images/docdb-subnet-group-details.png)

Using the AWS CLI

To find the details of an Amazon DocumentDB subnet group, use the describe-db-subnet-groups operation with the following parameter.

Parameter

  • --db-subnet=group-name—Optional. If included, details for the named subnet group are listed. If omitted, details for up to 100 subnet groups are listed.

The following code lists details for the sample-subnet-group subnet group that we created in the Creating an Amazon DocumentDB Subnet Group section.

For Linux, macOS, or Unix:

  1. aws docdb describe-db-subnet-groups \
  2. --db-subnet-group-name sample-subnet-group

For Windows:

  1. aws docdb describe-db-subnet-groups ^
  2. --db-subnet-group-name sample-subnet-group

Output from this operation looks something like the following (JSON format).

  1. {
  2. "DBSubnetGroup": {
  3. "DBSubnetGroupArn": "arn:aws:rds:us-east-1:123SAMPLE012:subgrp:sample-subnet-group",
  4. "VpcId": "vpc-91280df6",
  5. "SubnetGroupStatus": "Complete",
  6. "DBSubnetGroupName": "sample-subnet-group",
  7. "Subnets": [
  8. {
  9. "SubnetAvailabilityZone": {
  10. "Name": "us-east-1a"
  11. },
  12. "SubnetStatus": "Active",
  13. "SubnetIdentifier": "subnet-4e26d263"
  14. },
  15. {
  16. "SubnetAvailabilityZone": {
  17. "Name": "us-east-1c"
  18. },
  19. "SubnetStatus": "Active",
  20. "SubnetIdentifier": "subnet-afc329f4"
  21. },
  22. {
  23. "SubnetAvailabilityZone": {
  24. "Name": "us-east-1e"
  25. },
  26. "SubnetStatus": "Active",
  27. "SubnetIdentifier": "subnet-b3806e8f"
  28. }
  29. ],
  30. "DBSubnetGroupDescription": "A sample subnet group"
  31. }
  32. }