Creates multiple endpoints for a basic Global Accelerator (GA) instance.
Description
- CreateBasicEndpoints is an asynchronous operation. After you call this operation, the system returns a request ID and runs the task in the background. You can call the ListBasicEndpoints operation to query the status of endpoints.
- If the endpoints are in the init state, it indicates that the endpoints are being created. In this case, you can perform only query operations.
- If all endpoints are in the active state, it indicates that the endpoints are created.
- The CreateBasicEndpoints operation cannot be repeatedly called for the same GA instance within a specific period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateBasicEndpoints | The operation that you want to perform. Set the value to CreateBasicEndpoints. |
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 ClientToken value contain only ASCII characters.
Note If you do not specify this parameter, the system automatically sets
ClientToken to the value of
RequestId. The value of
RequestId of each API request may be different.
|
AcceleratorId | String | Yes | ga-bp17frjjh0udz4qz**** | The ID of the basic GA instance. |
EndpointGroupId | String | Yes | epg-bp1dmlohjjz4kqaun**** | The ID of the endpoint group that is associated with the basic GA instance. |
Endpoints.N.Name | String | No | ep01 | The name of the endpoint that is associated with the basic GA instance. The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), and hyphens (-). The name must start with a letter. |
Endpoints.N.EndpointType | String | No | ENI | The type of endpoint. Valid values:
Note This parameter is required.
|
Endpoints.N.EndpointAddress | String | No | eni-bp1a05txelswuj8g**** | The address of the endpoint. |
Endpoints.N.EndpointSubAddress | String | No | 172.16.XX.XX | The secondary address of the endpoint. This parameter is required if the endpoint type is ECS, ENI, or NLB.
|
Endpoints.N.EndpointSubAddressType | String | No | primary | The secondary address type of the endpoint. Valid values:
This parameter is required if the endpoint type is ECS, ENI, or NLB. If the endpoint type is NLB, only primary is supported. |
Endpoints.N.EndpointZoneId | String | No | cn-hangzhou-g | The ID of the zone where the endpoint resides. This parameter is required only when the endpoint type is NLB. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE73368 | The ID of the request. |
EndpointGroupId | String | epg-bp1dmlohjjz4kqaun**** | The ID of the endpoint group that is associated with the basic GA instance. |
Endpoints | Array of endpoints | The endpoints that are associated with the basic GA instance. |
|
EndpointId | String | ep-bp14sz7ftcwwjgrdm**** | The ID of the endpoint that is associated with the basic GA instance. |
EndpointType | String | ENI | The type of endpoint. Valid values:
|
EndpointAddress | String | eni-bp1a05txelswuj8g**** | The address of the endpoint. |
EndpointSubAddress | String | 172.16.XX.XX | The secondary address of the endpoint. This parameter is returned if the endpoint type is ECS, ENI, or NLB.
|
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateBasicEndpoints
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&AcceleratorId=ga-bp17frjjh0udz4qz****
&EndpointGroupId=epg-bp1dmlohjjz4kqaun****
&Endpoints=[{"Name":"ep01","EndpointType":"ENI","EndpointAddress":"eni-bp1a05txelswuj8g****","EndpointSubAddress":"172.16.XX.XX","EndpointSubAddressType":"primary","EndpointZoneId":"cn-hangzhou-g"}]
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateBasicEndpointsResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<EndpointGroupId>epg-bp1dmlohjjz4kqaun****</EndpointGroupId>
<Endpoints>
<EndpointId>ep-bp14sz7ftcwwjgrdm****</EndpointId>
<EndpointType>ENI</EndpointType>
<EndpointAddress>eni-bp1a05txelswuj8g****</EndpointAddress>
<EndpointSubAddress>172.16.XX.XX</EndpointSubAddress>
</Endpoints>
</CreateBasicEndpointsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE73368",
"EndpointGroupId" : "epg-bp1dmlohjjz4kqaun****",
"Endpoints" : [ {
"EndpointId" : "ep-bp14sz7ftcwwjgrdm****",
"EndpointType" : "ENI",
"EndpointAddress" : "eni-bp1a05txelswuj8g****",
"EndpointSubAddress" : "172.16.XX.XX"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | NotExist.Accelerator | The accelerated instance does not exist. | The error message returned because the GA instance does not exist. |
For a list of error codes, see Service error codes.