Creates endpoint group mappings for custom routing listeners.

Usage notes

After you configure a custom routing listener for a Global Accelerator (GA) instance, the GA instance generates a port mapping table based on the listener port range, mapping information (protocols and port ranges) of the associated endpoint groups, and IP addresses of endpoints (vSwitches), and forwards client requests to the specified IP addresses and ports in the vSwitches.

You can call this operation to create endpoint group mappings for custom routing listeners. When you call this operation, take note of the following items:

  • The CreateCustomRoutingEndpointGroupDestinations operation is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the DescribeCustomRoutingEndpointGroup operation to query the status of an endpoint group and determine whether mappings are created for the endpoint group.
    • If the endpoint group is in the updating state, it indicates that mappings are being created for the endpoint group. In this case, you can perform only query operations.
    • If the endpoint group is in the active state, it indicates that mappings are created for the endpoint group.
  • The CreateCustomRoutingEndpointGroupDestinations operation cannot be called repeatedly for the same GA instance within a specific period of time.

Prerequisites

Make sure that the following operations are performed before you call this operation:

  • A standard GA instance is created. For more information, see CreateAccelerator.
  • A bandwidth plan is associated with the standard GA instance. For more information, see BandwidthPackageAddAccelerator.
  • An application is deployed to receive requests that are forwarded from GA. You can specify only vSwitches as endpoints for custom routing listeners.
  • The permissions to use custom routing listeners are acquired and a custom routing listener is created for the GA instance. Custom routing listeners are in invitational preview. To use custom routing listeners, 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.

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 CreateCustomRoutingEndpointGroupDestinations

The action that you want to perform. Set the value to CreateCustomRoutingEndpointGroupDestinations.

RegionId String Yes cn-hangzhou

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

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

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

You can use the client to generate the value, but you must ensure that it is unique among all requests. The token can contain only ASCII characters.

Note If you do not set this parameter, the system sets ClientToken to the value of RequestId. The value of RequestId for each API request may be different.
DryRun Boolean No false

Specifies whether to perform a dry run. Valid values:

  • true: performs a dry run. The system checks the required parameters, request syntax, and limits. If the request fails the dry run, an 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, a 2xx HTTP status code is returned and the operation is performed.
EndpointGroupId String Yes epg-bp14sz7ftcwwjgrdm****

The ID of the endpoint group.

DestinationConfigurations.N.Protocols.N String Yes TCP

The protocol used by the endpoint group. Valid values:

  • TCP: TCP
  • UDP: UDP
  • TCP,UDP: TCP and UDP

You can specify up at most four protocols for each endpoint group mapping.

Note This parameter is required.
DestinationConfigurations.N.FromPort Integer Yes 80

The first backend service port of the endpoint group.

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

You can specify at most 20 first backend service ports in each request.

Note This parameter is required.
DestinationConfigurations.N.ToPort Integer Yes 80

The last backend service port of the endpoint group.

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

You can specify at most 20 last backend service ports in each request.

Note This parameter is required.

Response parameters

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

The request ID.

DestinationIds Array of String dst-abc123****

The IDs of the endpoint group mappings.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateCustomRoutingEndpointGroupDestinations
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&DryRun=false
&EndpointGroupId=epg-bp14sz7ftcwwjgrdm****
&DestinationConfigurations=[{"Protocols":["TCP"],"FromPort":80,"ToPort":80}]
&Common request parameters

Sample success responses

XML format

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

<CreateCustomRoutingEndpointGroupDestinationsResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
    <DestinationIds>dst-abc123****</DestinationIds>
</CreateCustomRoutingEndpointGroupDestinationsResponse>

JSON format

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

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

Error codes

For a list of error codes, see Service error codes.