All Products
Search
Document Center

Global Accelerator:ListCustomRoutingPortMappings

Last Updated:Jul 29, 2025

This operation queries the port mapping table of a custom routing listener.

Operation description

After you configure a custom routing listener and an endpoint group, the Global Accelerator instance generates a port mapping table. This table is based on the listener port range, the protocols and port ranges of the destination endpoint group, and the IP addresses of the endpoints (vSwitches). A custom routing listener uses this port mapping table to deterministically route traffic to specific IP addresses and ports in a vSwitch. You can call this operation to query the generated port mapping table.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ga:ListCustomRoutingPortMappings

list

*CustomRoutingPortMapping

acs:ga:*:{#accountId}:ga/{#gaId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

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

cn-hangzhou

PageNumber

integer

No

The page number. Default value: 1.

1

PageSize

integer

No

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

10

AcceleratorId

string

Yes

The ID of the Global Accelerator instance whose port mapping table you want to query.

ga-bp1odcab8tmno0hdq****

ListenerId

string

No

The ID of the listener whose port mapping table you want to query.

lsr-bp1bpn0kn908w4nbw****

EndpointGroupId

string

No

The ID of the endpoint group whose port mapping table you want to query.

epg-bp16jdc00bhe97sr5****

Response parameters

Parameter

Type

Description

Example

object

The list of returned information.

RequestId

string

The request ID.

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

TotalCount

integer

The total number of entries returned.

1

PageSize

integer

The number of entries returned per page.

10

PageNumber

integer

The page number.

1

PortMappings

array<object>

The information about the port mappings.

object

The information about the port mapping.

AcceleratorId

string

The ID of the Global Accelerator instance to which the port mapping belongs.

ga-bp1odcab8tmno0hdq****

ListenerId

string

The ID of the custom routing listener to which the port mapping belongs.

lsr-bp1bpn0kn908w4nbw****

EndpointGroupId

string

The ID of the endpoint group.

epg-bp14sz7ftcwwjgrdm****

EndpointId

string

The ID of the endpoint.

ep-bp14sz7ftcwwjgrdm****

EndpointGroupRegion

string

The ID of the region to which the endpoint group belongs.

us-west-1

Vswitch

string

The name of the vSwitch of the endpoint.

vsw-test01

AcceleratorPort

integer

The acceleration port.

3000

Protocols

array

The protocol of the backend service.

  • TCP: the TCP protocol.

  • UDP: the UDP protocol.

string

The protocol of the backend service.

  • TCP: the TCP protocol.

  • UDP: the UDP protocol.

tcp

DestinationTrafficState

string

The traffic policy for the backend instance.

  • allow: allows the backend instance to receive traffic.

  • deny: denies the backend instance from receiving traffic.

allow

DestinationSocketAddress

object

The IP address and port of the backend service.

IpAddress

string

The IP address of the backend service.

10.0.XX.XX

Port

integer

The port of the backend service.

443

Examples

Success response

JSON format

{
  "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

HTTP status code

Error code

Error message

Description

400 NoPermission No permissions. No permissions.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.