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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesCreateBasicEndpoint

The operation that you want to perform. Set the value to CreateBasicEndpoint.

RegionIdStringYescn-hangzhou

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

ClientTokenStringNo123e4567-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.
AcceleratorIdStringYesga-bp17frjjh0udz4qz****

The ID of the basic GA instance.

EndpointGroupIdStringYesepg-bp1dmlohjjz4kqaun****

The ID of the endpoint group that is associated with the basic GA instance.

NameStringNoep01

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.

EndpointTypeStringYesENI

The type of endpoint. Valid values:

  • ENI: elastic network interface (ENI)
  • SLB: Classic Load Balancer (CLB) instance
  • ECS: Elastic Compute Service (ECS) instance
  • NLB: Network Load Balancer (NLB) instance
EndpointAddressStringYeseni-bp1a05txelswuj8g****

The address of the endpoint.

EndpointSubAddressStringNo172.16.XX.XX

The secondary address of the endpoint.

This parameter is required if the endpoint type is ECS, ENI, or NLB.

  • If the endpoint type is ECS, you can set EndpointSubAddress to the secondary private IP address of the primary ENI. If the parameter is left empty, the primary private IP address of the primary ENI is used.
  • If the endpoint type is ENI, you can set EndpointSubAddress to the secondary private IP address of the secondary ENI. If the parameter is left empty, the primary private IP address of the secondary ENI is used.
  • This parameter is required if the endpoint type is NLB. EndpointSubAddress is the primary private IP address of the NLB backend server.
EndpointSubAddressTypeStringNoprimary

The type of the secondary address of the endpoint. Valid values:

  • primary: a primary private IP address.
  • secondary: a secondary private IP address.

This parameter is required if the endpoint type is ECS, ENI, or NLB. If the endpoint type is NLB, only primary is supported.

EndpointZoneIdStringNocn-hangzhou-g

The ID of the zone where the endpoint resides.

This parameter is required only when the endpoint type is NLB.

Response parameters

ParameterTypeExampleDescription
RequestIdString04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

EndpointGroupIdStringepg-bp1dmlohjjz4kqaun****

The ID of the endpoint group that is associated with the basic GA instance.

EndpointIdStringep-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

HttpCodeError codeError messageDescription
400NotExist.AcceleratorThe 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.