Queries the port mapping table of a custom routing listener.

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, the backend service protocols and port ranges of the associated endpoint groups, and the 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. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListCustomRoutingPortMappings

The operation that you want to perform. Set the value to ListCustomRoutingPortMappings.

RegionId String Yes cn-hangzhou

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

PageNumber String No 1

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

PageSize String No 10

The number of entries returned per page. Maximum value: 50. Default value: 10.

AcceleratorId String Yes ga-bp1odcab8tmno0hdq****

The ID of the GA instance.

ListenerId String No lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

EndpointGroupId String No epg-bp16jdc00bhe97sr5****

The ID of the endpoint group.

Response parameters

Parameter Type Example Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The request ID.

TotalCount Integer 1

The total number of entries returned.

PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

PortMappings Array of portMappings

Details about the port mapping table.

AcceleratorId String ga-bp1odcab8tmno0hdq****

The ID of the GA instance.

ListenerId String lsr-bp1bpn0kn908w4nbw****

The ID of the listener.

EndpointGroupId String epg-bp14sz7ftcwwjgrdm****

The ID of the endpoint group.

EndpointId String ep-bp14sz7ftcwwjgrdm****

The ID of the endpoint.

EndpointGroupRegion String us-west-1

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

Vswitch String vsw-test01

The name of the endpoint (vSwitch).

AcceleratorPort Integer 3000

The acceleration port.

Protocols Array of String TCP

The protocol of the backend service.

  • TCP
  • UDP
DestinationTrafficState String allow

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

  • allow: allows traffic to the backend server.
  • deny: denies traffic to the backend server.
DestinationSocketAddress Object

The service IP address and port of the backend server.

IpAddress String 10.0.XX.XX

The service IP address of the backend server.

Port Integer 443

The service port of the backend server.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListCustomRoutingPortMappings
&RegionId=cn-hangzhou
&PageNumber=1
&PageSize=10
&AcceleratorId=ga-bp1odcab8tmno0hdq****
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&EndpointGroupId=epg-bp16jdc00bhe97sr5****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListCustomRoutingPortMappingsResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
    <TotalCount>1</TotalCount>
    <PageSize>10</PageSize>
    <PageNumber>1</PageNumber>
    <PortMappings>
        <AcceleratorId>ga-bp1odcab8tmno0hdq****</AcceleratorId>
        <ListenerId>lsr-bp1bpn0kn908w4nbw****</ListenerId>
        <EndpointGroupId>epg-bp14sz7ftcwwjgrdm****</EndpointGroupId>
        <EndpointId>ep-bp14sz7ftcwwjgrdm****</EndpointId>
        <EndpointGroupRegion>us-west-1</EndpointGroupRegion>
        <Vswitch>vsw-test01</Vswitch>
        <AcceleratorPort>3000</AcceleratorPort>
        <Protocols>TCP</Protocols>
        <DestinationTrafficState>allow</DestinationTrafficState>
        <DestinationSocketAddress>
            <IpAddress>10.0.XX.XX</IpAddress>
            <Port>443</Port>
        </DestinationSocketAddress>
    </PortMappings>
</ListCustomRoutingPortMappingsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "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, see Service error codes.