DescribeSubnetGroups
Returns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.
Request Syntax
{
"MaxResults": number
,
"NextToken": "string
",
"SubnetGroupNames": [ "string
" ]
}
Request Parameters
The request accepts the following data in JSON format.
Note
In the following list, the required parameters are described first.
- MaxResults
-
The maximum number of results to include in the response. If more results exist than the specified
MaxResults
value, a token is included in the response so that the remaining results can be retrieved.The value for
MaxResults
must be between 20 and 100.Type: Integer
Required: No
- NextToken
-
An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by
MaxResults
.Type: String
Required: No
- SubnetGroupNames
-
The name of the subnet group.
Type: Array of strings
Required: No
Response Syntax
{
"NextToken": "string",
"SubnetGroups": [
{
"Description": "string",
"SubnetGroupName": "string",
"Subnets": [
{
"SubnetAvailabilityZone": "string",
"SubnetIdentifier": "string"
}
],
"VpcId": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- NextToken
-
Provides an identifier to allow retrieval of paginated results.
Type: String
- SubnetGroups
-
An array of subnet groups. Each element in the array represents a single subnet group.
Type: Array of SubnetGroup objects
Errors
For information about the errors that are common to all actions, see Common Errors.
- ServiceLinkedRoleNotFoundFault
-
The specified service linked role (SLR) was not found.
HTTP Status Code: 400
- SubnetGroupNotFoundFault
-
The requested subnet group name does not refer to an existing subnet group.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: