ListAttachmentNatConfigurations
Returns the NAT configurations of core network attachments. You must specify either a core network ID or an attachment ID. Only the core network owner can list NAT configurations.
Request Syntax
POST /nat-configurations HTTP/1.1
Content-type: application/json
{
"AttachmentId": "string",
"CoreNetworkId": "string",
"Filters": {
"string" : [ "string" ]
},
"MaxResults": number,
"NextToken": "string"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- AttachmentId
-
The ID of an attachment. Returns the NAT configuration of the specified attachment. If you specify both an attachment ID and a core network ID, the attachment ID is used.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 50.
Pattern:
^attachment-([0-9a-f]{8,17})$Required: No
- CoreNetworkId
-
The ID of a core network. Returns the NAT configurations of attachments in the core network that support NAT.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 50.
Pattern:
^core-network-([0-9a-f]{8,17})$Required: No
- Filters
-
The filters to apply to the results. Values for the same filter are joined with OR, and different filters are joined with AND. You can specify up to 10 filter values in total. The following filters are supported:
-
nat-gateway-support: The state of NAT gateway support on the attachment, for exampleENABLED. -
nat-system-route-support: Whether system routes are installed for the attachment,trueorfalse. -
rule-number: The rule number of a NAT rule. -
match-source-cidr: The source CIDR block of a NAT rule. The value must exactly match the CIDR block of the rule. -
nat-cidr: The NAT CIDR block of a NAT rule. The value must exactly match the CIDR block of the rule. -
nat-rule-state: The state of a NAT rule, for exampleACTIVATED.
Type: String to array of strings map
Key Length Constraints: Maximum length of 128.
Key Pattern:
^[0-9a-zA-Z\.-]*$Length Constraints: Maximum length of 255.
Pattern:
^[0-9a-zA-Z\*\.\\/\?-]*$Required: No
-
- MaxResults
-
The maximum number of results to return.
Type: Integer
Valid Range: Minimum value of 1. Maximum value of 500.
Required: No
- NextToken
-
The token for the next page of results.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 2048.
Pattern:
[\s\S]*Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"AttachmentNatConfigurations": [
{
"AttachmentId": "string",
"NatGatewayRules": [
{
"MatchSourceCidr": "string",
"NatCidr": "string",
"RuleNumber": number,
"State": "string"
}
],
"NatGatewaySupport": "string",
"NatSystemRouteSupport": boolean
}
],
"NextToken": "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.
- AttachmentNatConfigurations
-
The NAT configurations of the attachments.
Type: Array of AttachmentNatConfiguration objects
Array Members: Minimum number of 0 items. Maximum number of 500 items.
- NextToken
-
The token for the next page of results.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 2048.
Pattern:
[\s\S]*
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You do not have sufficient access to perform this action.
HTTP Status Code: 403
- InternalServerException
-
The request has failed due to an internal error.
- RetryAfterSeconds
-
Indicates when to retry the request.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource could not be found.
- Context
-
The specified resource could not be found.
- ResourceId
-
The ID of the resource.
- ResourceType
-
The resource type.
HTTP Status Code: 404
- ThrottlingException
-
The request was denied due to request throttling.
- RetryAfterSeconds
-
Indicates when to retry the request.
HTTP Status Code: 429
- ValidationException
-
The input fails to satisfy the constraints.
- Fields
-
The fields that caused the error, if applicable.
- Reason
-
The reason for the error.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: