ListCustomRoutingPortMappingsByDestination - AWS Global Accelerator

ListCustomRoutingPortMappingsByDestination

List the port mappings for a specific EC2 instance (destination) in a VPC subnet endpoint. The response is the mappings for one destination IP address. This is useful when your subnet endpoint has mappings that span multiple custom routing accelerators in your account, or for scenarios where you only want to list the port mappings for a specific destination instance.

Request Syntax

{ "DestinationAddress": "string", "EndpointId": "string", "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

DestinationAddress

The endpoint IP address in a virtual private cloud (VPC) subnet for which you want to receive back port mappings.

Type: String

Length Constraints: Maximum length of 255.

Required: Yes

EndpointId

The ID for the virtual private cloud (VPC) subnet.

Type: String

Length Constraints: Maximum length of 255.

Required: Yes

MaxResults

The number of destination port mappings that you want to return with this call. The default value is 10.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 20000.

Required: No

NextToken

The token for the next set of results. You receive this token from a previous call.

Type: String

Length Constraints: Maximum length of 255.

Required: No

Response Syntax

{ "DestinationPortMappings": [ { "AcceleratorArn": "string", "AcceleratorSocketAddresses": [ { "IpAddress": "string", "Port": number } ], "DestinationSocketAddress": { "IpAddress": "string", "Port": number }, "DestinationTrafficState": "string", "EndpointGroupArn": "string", "EndpointGroupRegion": "string", "EndpointId": "string", "IpAddressType": "string" } ], "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.

DestinationPortMappings

The port mappings for the endpoint IP address that you specified in the request.

Type: Array of DestinationPortMapping objects

NextToken

The token for the next set of results. You receive this token from a previous call.

Type: String

Length Constraints: Maximum length of 255.

Errors

For information about the errors that are common to all actions, see Common Errors.

EndpointNotFoundException

The endpoint that you specified doesn't exist.

HTTP Status Code: 400

InternalServiceErrorException

There was an internal error for AWS Global Accelerator.

HTTP Status Code: 400

InvalidArgumentException

An argument that you specified is invalid.

HTTP Status Code: 400

InvalidNextTokenException

There isn't another item to return.

HTTP Status Code: 400

Examples

List the port mappings for an EC2 instance destination

The following is an example of listing the port mappings for an EC2 instance destination for a custom routing accelerator.

aws --region us-west-2 globalaccelerator list-custom-routing-port-mappings-by-destination --endpoint-id subnet-abcd123example --destination-address "198.51.100.52"
{ "DestinationPortMappings": [ { "AcceleratorArn": "arn:aws:globalaccelerator::402092451327:accelerator/24ea29b8-d750-4489-8919-3095f3c4b0a7", "AcceleratorSocketAddresses": [ { "IpAddress": "192.0.2.250", "Port": 65514 }, { "IpAddress": "198.51.100.52", "Port": 65514 } ], "EndpointGroupArn": "arn:aws:globalaccelerator::012345678901:accelerator/1234abcd-abcd-1234-abcd-1234abcdefgh/listener/0123vxyz/endpoint-group/ab88888example", "EndpointId": "subnet-abcd123example", "EndpointGroupRegion": "us-west-2", "DestinationSocketAddress": { "IpAddress": "198.51.100.52", "Port": 80 }, "IpAddressType": "IPv4", "DestinationTrafficState": "DENY" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: