Creates an endpoint for a specified basic Global Accelerator (GA) instance.
Description
- CreateBasicEndpoint 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 ListBasicEndpoints API operation to query the status of an endpoint.
- If the endpoint is in the init state, the endpoint is being created. In this case, you can perform only query operations.
- If the endpoint is in the active state, the endpoint is created.
- The CreateBasicEndpoint API operation cannot be repeatedly called for the same basic GA instance within a period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateBasicEndpoint | The operation that you want to perform. Set the value to CreateBasicEndpoint. |
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 make sure that it is unique among different 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 may be different for each API request. |
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. |
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. |
EndpointType | String | Yes | ENI | The type of endpoint. Valid values:
|
EndpointAddress | String | Yes | eni-bp1a05txelswuj8g**** | The address of the endpoint. |
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.
|
EndpointSubAddressType | String | No | primary | The type of the secondary address 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. |
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. |
EndpointId | String | ep-bp14sz7ftcwwjgrdm**** | The ID of the endpoint that is associated with the basic GA instance. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateBasicEndpoint
&RegionId=cn-hangzhou
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&AcceleratorId=ga-bp17frjjh0udz4qz****
&EndpointGroupId=epg-bp1dmlohjjz4kqaun****
&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
<CreateBasicEndpointResponse>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<EndpointGroupId>epg-bp1dmlohjjz4kqaun****</EndpointGroupId>
<EndpointId>ep-bp14sz7ftcwwjgrdm****</EndpointId>
</CreateBasicEndpointResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE73368",
"EndpointGroupId" : "epg-bp1dmlohjjz4kqaun****",
"EndpointId" : "ep-bp14sz7ftcwwjgrdm****"
}
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.