All Products
Search
Document Center

Global Accelerator:CreateCustomRoutingEndpoints

Last Updated:Apr 10, 2024

Creates endpoints for a custom routing listener.

Operation description

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

This operation is used to create endpoints for custom routing listeners. When you call this operation, take note of the following items:

  • CreateCustomRoutingEndpoints 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 endpoints are created in the endpoint group.

    • If the endpoint group is in the updating state, it indicates that endpoints are being created. In this case, you can perform only query operations.
    • If the endpoint group is in the active state, it indicates that endpoints are created.
  • The CreateCustomRoutingEndpoints 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 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 permissions to use custom routing listeners and create a custom routing listener for the standard 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 .
  • Create an endpoint group 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.

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:CreateCustomRoutingEndpointsWrite
  • CustomRoutingEndpointGroup
    acs:ga:{#regionId}:{#accountId}:customroutingendpointgroup/{#customroutingendpointgroupId}
    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
EndpointGroupIdstringYes

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

epg-bp1bpn0kn908w4nb****
EndpointConfigurationsobject []Yes

The information about the endpoints.

You can specify information for up to 20 endpoints.

TypestringNo

The type of endpoint.

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

PrivateSubNet
EndpointstringNo

The ID 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:

  • DenyAll (default): denies all traffic to the endpoint.
  • AllowAll: allows 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 up to 20 destinations for each endpoint.

AddressstringYes

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 up to 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 up to 20 destinations for each endpoint and specify up to 20 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 up to 20 destinations for each endpoint and specify up to 20 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 up to 20 destinations for each endpoint and specify up to 20 last ports for each destination.

80

Response parameters

ParameterTypeDescriptionExample
object

The returned information.

RequestIdstring

The ID of the request.

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

The IDs of the endpoints.

string

The IDs of the endpoints.

epg-bp1dmlohjjz4kqaun****

Examples

Sample success responses

JSONformat

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

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.