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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:CreateCustomRoutingEndpointGroupDestinations |
create |
*CustomRoutingEndpointGroupDestination
|
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:
|
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:
The Terms of Service apply to the selected protocols. |
|
|
string |
Yes |
The protocol types of the backend services for the endpoint group. Valid values:
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.