All Products
Search
Document Center

Global Accelerator:CreateCustomRoutingEndpointGroups

Last Updated:Apr 10, 2024

Creates endpoint groups for a custom routing listener.

Operation description

Global Accelerator (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.

You can call this operation 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

Make sure that the following requirements are met 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 .

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ga:CreateCustomRoutingEndpointGroupsWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
ClientTokenstringNo

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 all requests. The token can contain only ASCII characters.

Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId for each API request is different.
123e4567-e89b-12d3-a456-426655440000
DryRunbooleanNo

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.
false
AcceleratorIdstringYes

The ID of the GA instance.

ga-bp1odcab8tmno0hdq****
ListenerIdstringYes

The ID of the custom routing listener.

lsr-bp1bpn0kn908w4nbw****
EndpointGroupConfigurationsobject []Yes

The information about the endpoint groups.

You can specify at most five endpoint groups.

EndpointGroupRegionstringYes

The ID of the region in which the endpoint group resides.

You can specify at most five region IDs.

cn-hangzhou
NamestringNo

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 at most five endpoint group names.

test
DescriptionstringNo

The description of the endpoint group.

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

You can specify at most five endpoint group descriptions.

test
DestinationConfigurationsobject []No

The mapping configuration of the endpoint group.

You need to specify the backend service ports and protocols for the endpoint group. The ports are mapped to listener ports.

You can specify at most 20 mapping configurations for each endpoint group.

ProtocolsarrayNo

The backend service protocol.

You can specify up to four backend service protocols in each mapping configuration.

stringNo

The backend service protocol. Valid values:

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

You can specify up to four backend service protocols in each mapping configuration.

TCP
FromPortintegerNo

The first backend service port for the endpoint group.

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

You can specify at most 20 first backend service ports for each endpoint group.

80
ToPortintegerNo

The last backend service port for the endpoint group.

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

You can specify at most 20 last backend service ports for each endpoint group.

80
EndpointConfigurationsobject []No

The information about the endpoints.

You can specify at most 10 endpoints for each endpoint group.

TypestringNo

The type of endpoint.

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

PrivateSubNet
EndpointstringNo

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

vsw-test01
TrafficToEndpointPolicystringNo

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 traffic is distributed. If you specify only IP addresses and do not specify port ranges, GA can forward traffic to the specified IP addresses over all destination ports.

DenyAll
PolicyConfigurationsobject []No

The destination to which traffic is forwarded.

You can specify at most 20 destinations for each endpoint.

AddressstringNo

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

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

You can specify at most 20 destination IP addresses for each endpoint.

10.0.XX.XX
PortRangesobject []No

The port range of the destination to which traffic is forwarded. The value of this parameter must fall within the port range of the endpoint group.

If you leave this parameter empty, traffic is forwarded to all destination ports.

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

You can specify port ranges for at most 20 destinations in each endpoint and specify at most five port ranges for each destination.

FromPortintegerNo

The first port of the destination port range. 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 port ranges for at most 20 destinations in each endpoint and specify at most five first ports for each destination.

80
ToPortintegerNo

The last port of the destination port range. 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 port ranges for at most 20 destinations in each endpoint and specify at most five last ports for each destination.

80

Response parameters

ParameterTypeDescriptionExample
object

The returned information.

RequestIdstring

The ID of the request.

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

The IDs of the endpoint groups.

string

The IDs of the endpoint groups.

epg-bp1dmlohjjz4kqaua****

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-04-20The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.