Creates endpoint groups for a specific custom routing listener of a Global Accelerator (GA) instance.

Usage notes

GA forwards client requests to endpoints in an endpoint group based on the routing type of the listener that is associated with the endpoint group.

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

This operation is used to create endpoint groups for custom routing listeners. For information about how to create endpoint groups for intelligent routing listeners, see CreateEndpointGroup.

When you call this operation, take note of the following items:

  • CreateCustomRoutingEndpointGroups 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 or ListCustomRoutingEndpointGroups operation to query the status of the endpoint groups that are associated with custom routing listeners.
    • If one or more endpoint groups are in the init state, it indicates that the endpoint groups are being created. In this case, you can perform only query operations.
    • If all endpoint groups are in the active state, it indicates that the endpoint groups are created.
  • The CreateCustomRoutingEndpointGroups operation cannot be called repeatedly for the same GA instance within a specific period of time.

Prerequisites

The following operations are complete before you call this operation:

  • Create a standard GA instance. For more information, see CreateAccelerator.
  • Associate a bandwidth plan with the standard GA instance. For more information, see BandwidthPackageAddAccelerator.
  • Deploy an application that serves as the endpoint of the standard GA instance. The application is used to receive requests that are forwarded from GA. You can specify only vSwitches as endpoints for custom routing listeners.
  • Apply for the permissions to use custom routing listeners, and create a custom routing listener 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.

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 CreateCustomRoutingEndpointGroups

The operation that you want to perform. Set the value to CreateCustomRoutingEndpointGroups.

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.
AcceleratorId String Yes ga-bp1odcab8tmno0hdq****

The ID of the GA instance.

ListenerId String Yes lsr-bp1bpn0kn908w4nbw****

The ID of the custom routing listener.

EndpointGroupConfigurations.N.EndpointGroupRegion String Yes cn-hangzhou

The ID of the region in which to create the endpoint group.

You can specify up to five region IDs.

EndpointGroupConfigurations.N.Name String No test

The name of the endpoint group.

The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter.

You can specify up to five endpoint group names.

EndpointGroupConfigurations.N.Description String No test

The description of the endpoint group.

The description cannot exceed 256 characters in length and cannot contain http:// or https://.

You can specify up to five endpoint group descriptions.

EndpointGroupConfigurations.N.DestinationConfigurations.N.Protocols.N String No TCP

The protocol used by the endpoint group. Valid values:

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

You can specify up to four protocols for each mapping configuration.

EndpointGroupConfigurations.N.DestinationConfigurations.N.FromPort Integer No 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 for each endpoint group.

EndpointGroupConfigurations.N.DestinationConfigurations.N.ToPort Integer No 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 for each endpoint group.

EndpointGroupConfigurations.N.EndpointConfigurations.N.Type String No PrivateSubNet

The type of endpoint. Set the value to

PrivateSubNet, which specifies a private CIDR block. This is the default value.

EndpointGroupConfigurations.N.EndpointConfigurations.N.Endpoint String No vsw-test01

The name of the vSwitch that is specified as an endpoint.

EndpointGroupConfigurations.N.EndpointConfigurations.N.TrafficToEndpointPolicy String No DenyAll

The traffic policy that is used to process traffic to the endpoint. Valid values:

  • AllowAll: allows all traffic to the endpoint.
  • DenyAll (default): denies all traffic to the endpoint.
  • AllowCustom: allows traffic only to specified destinations in the endpoint.

    If you set this parameter to AllowCustom, you must specify IP addresses and port ranges as the destinations to which you want to distribute traffic. If you specify only IP addresses and do not specify port ranges, GA forwards traffic to the specified IP addresses over all destination ports.

EndpointGroupConfigurations.N.EndpointConfigurations.N.PolicyConfigurations.N.Address String No 10.0.XX.XX

The IP address of the destination to which traffic is distributed.

This parameter takes effect only when TrafficToEndpointPolicy is set to AllowCustom.

You can specify up to 20 destination IP addresses for each endpoint.

EndpointGroupConfigurations.N.EndpointConfigurations.N.PolicyConfigurations.N.PortRanges.N.FromPort Integer No 80

The first port of the port range of the destination. The value of this parameter must fall within the port range of the endpoint group.

This parameter takes effect only when TrafficToEndpointPolicy is set to AllowCustom.

You can specify at most 20 destination port ranges for each endpoint and specify at most five first ports for each destination.

EndpointGroupConfigurations.N.EndpointConfigurations.N.PolicyConfigurations.N.PortRanges.N.ToPort Integer No 80

The last port of the port range of the destination. The value of this parameter must fall within the port range of the endpoint group.

This parameter takes effect only when TrafficToEndpointPolicy is set to AllowCustom.

You can specify at most 20 destination port ranges for each endpoint and specify at most five last ports for each destination.

Response parameters

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

The ID of the request.

EndpointGroupIds Array of String epg-bp1dmlohjjz4kqaua****

The IDs of the endpoint groups.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateCustomRoutingEndpointGroups
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&DryRun=false
&AcceleratorId=ga-bp1odcab8tmno0hdq****
&ListenerId=lsr-bp1bpn0kn908w4nbw****
&EndpointGroupConfigurations=[{"EndpointGroupRegion":"cn-hangzhou","Name":"test","Description":"test","DestinationConfigurations":[{"Protocols":["TCP"],"FromPort":80,"ToPort":80}],"EndpointConfigurations":[{"Type":"PrivateSubNet","Endpoint":"vsw-test01","TrafficToEndpointPolicy":"DenyAll","PolicyConfigurations":[{"Address":"10.0.XX.XX","PortRanges":[{"FromPort":80,"ToPort":80}]}]}]}]
&Common request parameters

Sample success responses

XML format

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

<CreateCustomRoutingEndpointGroupsResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
    <EndpointGroupIds>epg-bp1dmlohjjz4kqaua****</EndpointGroupIds>
</CreateCustomRoutingEndpointGroupsResponse>

JSON format

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

{
  "RequestId" : "04F0F334-1335-436C-A1D7-6C044FE73368",
  "EndpointGroupIds" : [ "epg-bp1dmlohjjz4kqaua****" ]
}

Error codes

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