All Products
Search
Document Center

Global Accelerator:ListCustomRoutingPortMappings

Last Updated:Jul 31, 2024

Queries the port mapping table of a custom routing listener.

Operation description

After you configure a custom routing listener for a Global Accelerator (GA) instance, the instance generates a port mapping table based on the listener port range, backend service protocols and port ranges of the associated endpoint groups, and IP addresses of endpoints (vSwitches). The custom routing listener forwards client requests to specified IP addresses and ports in the vSwitches based on the port mapping table. This operation is used to query the generated port mapping table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ga:ListCustomRoutingPortMappingslist
  • CustomRoutingPortMapping
    acs:ga:*:{#accountId}:ga/{#gaId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the GA instance is deployed. Set the value to cn-hangzhou.

cn-hangzhou
PageNumberstringNo

The number of the page to return. Default value: 1.

1
PageSizestringNo

The number of entries to return on each page. Maximum value: 50. Default value: 10.

10
AcceleratorIdstringYes

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
ListenerIdstringNo

The ID of the listener.

lsr-bp1bpn0kn908w4nbw****
EndpointGroupIdstringNo

The ID of the endpoint group.

epg-bp16jdc00bhe97sr5****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

04F0F334-1335-436C-A1D7-6C044FE73368
TotalCountinteger

The number of entries returned.

1
PageSizeinteger

The number of entries returned on each page.

10
PageNumberinteger

The page number of the returned page.

1
PortMappingsarray<object>

Details about the port mapping table.

object
AcceleratorIdstring

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
ListenerIdstring

The ID of the listener.

lsr-bp1bpn0kn908w4nbw****
EndpointGroupIdstring

The ID of the endpoint group.

epg-bp14sz7ftcwwjgrdm****
EndpointIdstring

The ID of the endpoint.

ep-bp14sz7ftcwwjgrdm****
EndpointGroupRegionstring

The ID of the region in which the endpoint group resides.

us-west-1
Vswitchstring

The name of the endpoint (vSwitch).

vsw-test01
AcceleratorPortinteger

The acceleration port.

3000
Protocolsarray

The protocol of the backend service.

  • tcp: TCP
  • udp: UDP
string
tcp
DestinationTrafficStatestring

The access policy of traffic for the backend instance. Valid values:

  • allow: allows traffic to the backend instance.
  • deny: denies traffic to the backend instance.
allow
DestinationSocketAddressobject

The service IP address and port of the backend instance.

IpAddressstring

The service IP address of the backend instance.

10.0.XX.XX
Portinteger

The service port of the backend instance.

443

Examples

Sample success responses

JSONformat

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "TotalCount": 1,
  "PageSize": 10,
  "PageNumber": 1,
  "PortMappings": [
    {
      "AcceleratorId": "ga-bp1odcab8tmno0hdq****",
      "ListenerId": "lsr-bp1bpn0kn908w4nbw****",
      "EndpointGroupId": "epg-bp14sz7ftcwwjgrdm****",
      "EndpointId": "ep-bp14sz7ftcwwjgrdm****",
      "EndpointGroupRegion": "us-west-1",
      "Vswitch": "vsw-test01",
      "AcceleratorPort": 3000,
      "Protocols": [
        "tcp"
      ],
      "DestinationTrafficState": "allow",
      "DestinationSocketAddress": {
        "IpAddress": "10.0.XX.XX",
        "Port": 443
      }
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-11The Error code has changedView Change Details
2023-07-20The internal configuration of the API is changed, but the call is not affectedView Change Details