All Products
Search
Document Center

Global Accelerator:CreateCustomRoutingEndpointGroupDestinations

Last Updated:Jun 30, 2026

Invokes the CreateCustomRoutingEndpointGroupDestinations operation to create mapping configurations for an endpoint group that is associated with a custom route listener.

Operation description

An Alibaba Cloud Global Accelerator (GA) instance can generate a port mapping table based on the configured listener port range, the mapping configurations (protocols and port ranges) of the destination endpoint group, and the IP address information of the endpoints (vSwitches). This enables deterministic routing of traffic to specific IP addresses and ports within the vSwitches.

This operation creates mapping configurations for an endpoint group that is associated with a custom route listener. When you invoke this operation, take note of the following items:

  • CreateCustomRoutingEndpointGroupDestinations is an asynchronous operation. After you send a request, the system returns a request ID, but the mapping configurations for the endpoint group are not yet created. The creation node continues to run in the background. You can invoke the DescribeCustomRoutingEndpointGroup operation to query the status of the endpoint group and confirm whether the mapping configurations are created:
    • If the endpoint group is in the updating state, the mapping configurations are being created. In this state, you can only execute query operations.

    • If the endpoint group is in the active state, the mapping configurations are created.

  • CreateCustomRoutingEndpointGroupDestinations does not support concurrent creation of mapping configurations for endpoint groups associated with custom route listeners within the same Alibaba Cloud Global Accelerator (GA) instance.

Before you begin

Before you create mapping configurations for an endpoint group associated with a custom route listener, make sure that you have completed the following operations:

  • A standard Alibaba Cloud Global Accelerator (GA) instance is created. For more information, see CreateAccelerator.

  • A bandwidth plan is attached to the standard Global Accelerator instance. For more information, see BandwidthPackageAddAccelerator.

  • You have completed the deployment of the required applications as backend services to accept forwarded requests from Global Accelerator. Custom route listeners support only vSwitches as backend service types.

  • You have obtained the permissions to use custom route listeners and created a custom route listener. The custom route listener type is in invitational preview. To use this feature, contact your account manager. To create a custom route listener, see CreateListener.

  • You have created an endpoint group for the custom route listener. For more information, see CreateCustomRoutingEndpointGroups.

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 supports 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:CreateCustomRoutingEndpointGroupDestinations

create

*CustomRoutingEndpointGroupDestination

acs:ga:{#regionId}:{#accountId}:customroutingendpointgroup/{#customroutingendpointgroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID of the Alibaba Cloud Global Accelerator (GA) instance. Set the value to ap-southeast-1.

cn-hangzhou

ClientToken

string

No

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The client token can contain only ASCII characters.

Note

If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request.

123e4567-e89b-12d3-a456-426655440000

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run. The system checks the required parameters, request syntax, and business limitations without actually creating the mapping configurations create an endpoint group. If the request fails the dry run, the corresponding error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.

  • false (default): performs a dry run and sends the request. If the request passes the dry run, an HTTP 2xx status code is returned and the mapping configurations create an endpoint group are created.

false

EndpointGroupId

string

Yes

The endpoint group ID.

epg-bp14sz7ftcwwjgrdm****

DestinationConfigurations

array<object>

Yes

The mapping configurations of the endpoint group.

Specify the service port ranges and protocol types of the backend services for the endpoint group. The specified information is mapped to the associated listener port ranges.

You can specify up to 20 port ranges and protocol types in a single invoke of this operation.

object

No

The mapping configurations of the endpoint group.

Specify the service port ranges and protocol types of the backend services for the endpoint group. The specified information is mapped to the associated listener port ranges.

You can specify up to 20 port ranges and protocol types in a single invoke of this operation.

Protocols

array

Yes

The protocol types of the backend services for the endpoint group. Valid values:

  • TCP: TCP protocol.

  • UDP: UDP protocol.

  • TCP,UDP: TCP and UDP protocols.

The Terms of Service apply to the selected protocols.

string

Yes

The protocol types of the backend services for the endpoint group. Valid values:

  • TCP: TCP protocol.

  • UDP: UDP protocol.

  • TCP,UDP: TCP and UDP protocols.

The Terms of Service apply to the selected protocols.

TCP

FromPort

integer

Yes

The start port of the backend service port range for the endpoint group.

Valid values: 1 to 65499. The value of FromPort must be less than or equal to the value of ToPort.

You can specify up to 20 start ports in a single request.

80

ToPort

integer

Yes

The end port of the backend service port range for the endpoint group.

Valid values: 1 to 65499. The value of FromPort must be less than or equal to the value of ToPort.

You can specify up to 20 end ports in a single request.

80

Response elements

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The request ID.

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

DestinationIds

array

The list of mapping configuration IDs for the endpoint group.

string

The list of mapping configuration IDs for the endpoint group.

dst-abc123****

Examples

Success response

JSON format

{
  "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  "DestinationIds": [
    "dst-abc123****"
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 StateError.EndPointGroup endpoint group state %s is illegal The endpoint group is in an invalid state.
400 NotExist.EndPointGroup endpoint group %s is not exist The endpoint group %s does not exist.
400 StateError.Accelerator accelerator state %s is illegal The GA instance is in an invalid state %s.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.