You can call the CreateCustomRoutingEndpointGroupDestinations operation to create mappings for an endpoint group that is associated with a custom routing listener.
Operation description
A Global Accelerator instance can generate a port mapping table based on the listener port range, the mappings of the destination endpoint group (protocol and port range), and the IP addresses of the endpoints (vSwitches). This allows GA to deterministically route traffic to a specific IP address and port of a vSwitch.
Use this operation to create mappings for an endpoint group that is associated with a custom routing listener. Before you call this operation, note the following:
- CreateCustomRoutingEndpointGroupDestinations is an asynchronous operation. After a request is sent, the system returns a request ID. However, the mappings for the endpoint group are not created immediately. The system creates the mappings in the background. You can call the DescribeCustomRoutingEndpointGroup operation to query the status of an endpoint group to check whether its mappings are created:
If the endpoint group is in the updating state, its mappings are being created. In this case, you can perform only query operations.
If the endpoint group is in the active state, its mappings are created.
You cannot call the CreateCustomRoutingEndpointGroupDestinations operation to concurrently create mappings for multiple endpoint groups in the same Global Accelerator instance.
Prerequisites
Before you create mappings for an endpoint group, make sure that the following requirements are met:
A standard Global Accelerator instance is created. For more information, see CreateAccelerator.
A bandwidth plan is associated with the standard Global Accelerator instance. For more information, see BandwidthPackageAddAccelerator.
The required applications are deployed on the backend servers to receive forwarded requests. The backend service of a custom routing listener must be a vSwitch.
You have requested permissions to use custom routing listeners and created a custom routing listener. The custom routing listener feature is in invitational preview. To use this feature, contact your account manager. For more information about how to create a custom routing listener, see CreateListener.
An endpoint group is created for the custom routing 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 ID of the region where the Global Accelerator instance is deployed. Set the value to cn-hangzhou. |
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 token can contain only ASCII characters. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request. |
123e4567-e89b-12d3-a456-426655440000 |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run. Valid values:
|
false |
| EndpointGroupId |
string |
Yes |
The ID of the endpoint group. |
epg-bp14sz7ftcwwjgrdm**** |
| DestinationConfigurations |
array<object> |
Yes |
The configurations of the mappings for the endpoint group. You can specify the port ranges and protocols for the backend service, and the information is mapped to the listener port range. You can specify up to 20 mappings in each call. |
|
|
object |
No |
The configurations of the mappings for the endpoint group. You can specify the port ranges and protocols for the backend service, and the information is mapped to the listener port range. You can specify up to 20 mappings in each call. |
||
| Protocols |
array |
Yes |
The protocols of the backend service. Valid values:
|
|
|
string |
Yes |
The protocols of the backend service. Valid values:
|
TCP |
|
| FromPort |
integer |
Yes |
The start port of the backend service. The value of this parameter must be in the range of 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 each call. |
80 |
| ToPort |
integer |
Yes |
The end port of the backend service. The value of this parameter must be in the range of 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 each call. |
80 |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The response. |
||
| RequestId |
string |
The request ID. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| DestinationIds |
array |
The IDs of the mappings for the endpoint group. |
|
|
string |
The IDs of the mappings 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.