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.
Creates 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.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ga:CreateCustomRoutingEndpoints |
create |
*CustomRoutingEndpointGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region where the GA 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 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 |
| EndpointGroupId |
string |
Yes |
The ID of the endpoint group in which to create endpoints. |
epg-bp1bpn0kn908w4nb**** |
| EndpointConfigurations |
array<object> |
Yes |
The information about the endpoints. You can specify information for up to 20 endpoints. |
|
|
array<object> |
No |
The information about the endpoints. You can specify information for up to 20 endpoints. |
||
| Type |
string |
No |
The type of endpoint. Set the value to PrivateSubNet, which specifies a private CIDR block. This is the default value. |
PrivateSubNet |
| Endpoint |
string |
No |
The ID of the vSwitch that is specified as an endpoint. |
vsw-test01 |
| TrafficToEndpointPolicy |
string |
No |
The traffic policy that is used to process traffic to the endpoint. Valid values:
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 |
| PolicyConfigurations |
array<object> |
No |
The destination to which traffic is forwarded. You can specify up to 20 destinations for each endpoint. |
|
|
array<object> |
Yes |
The destination to which traffic is forwarded. You can specify up to 20 destinations for each endpoint. |
||
| Address |
string |
Yes |
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 |
| PortRanges |
array<object> |
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. |
|
|
object |
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. |
||
| FromPort |
integer |
No |
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 |
| ToPort |
integer |
No |
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 elements
|
Element |
Type |
Description |
Example |
|
object |
The returned information. |
||
| RequestId |
string |
The ID of the request. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| EndpointIds |
array |
The IDs of the endpoints. |
|
|
string |
The IDs of the endpoints. |
epg-bp1dmlohjjz4kqaun**** |
Examples
Success response
JSON format
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"EndpointIds": [
"epg-bp1dmlohjjz4kqaun****"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. |
| 400 | StateError.EndPointGroup | endpoint group state %s is illegal | The endpoint group is in an invalid state. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.