Adding an Endpoint
Function
This API is used to add an endpoint.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
ga:endpoint:create
Write
endpoint *
-
-
-
-
-
ga:RequestResourceType
-
ga:RequestResourceId
-
ga:RequestIpAddress
-
ga:RequestDomainName
-
URI
POST /v1/endpoint-groups/{endpoint_group_id}/endpoints
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
endpoint_group_id |
Yes |
String |
Specifies the endpoint group ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Specifies the user token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
endpoint |
Yes |
CreateEndpointOption object |
Specifies the detailed information about adding an endpoint. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
resource_id |
Yes |
String |
Specifies the endpoint ID, for example, EIP ID. |
|
resource_type |
Yes |
String |
The endpoint type. Value range:
|
|
weight |
No |
Integer |
Specifies the weight of the endpoint based on which the listener distributes traffic. |
|
ip_address |
Yes |
String |
Specifies the IP address of the endpoint. |
Response Parameters
Status code: 201
|
Parameter |
Type |
Description |
|---|---|---|
|
endpoint |
EndpointDetail object |
Specifies the detail of the endpoint. |
|
request_id |
String |
Specifies the request ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Specifies the endpoint ID. |
|
resource_id |
String |
Specifies the endpoint ID. |
|
endpoint_group_id |
String |
Specifies the endpoint group ID. |
|
resource_type |
String |
The endpoint type. Value range:
|
|
status |
String |
Specifies the provisioning status. The value can be one of the following:
|
|
weight |
Integer |
Specifies the weight of the endpoint based on which the listener distributes traffic. |
|
health_state |
String |
Specifies the health check result of the endpoint. The value can be one of the following:
|
|
created_at |
String |
Specifies when the endpoint was added. |
|
updated_at |
String |
Specifies when the endpoint was updated. |
|
domain_id |
String |
Specifies the tenant ID. |
|
ip_address |
String |
Specifies the IP address of the endpoint. |
|
frozen_info |
FrozenInfo object |
Specifies the frozen details of cloud services or resources. |
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
Integer |
Specifies the status of a cloud service or resource. The value can be one of the following:
|
|
effect |
Integer |
Specifies the status of the resource after being frozen. The value can be one of the following:
|
|
scene |
Array of strings |
Specifies the service scenario. The value can be one of the following:
|
Example Requests
Creating an endpoint whose type is EIP, weight is 10, and IP address is 208.182.11.121
POST https://{ga_endpoint}/v1/endpoint-groups/3a9f50bb-f041-4eac-a117-82472d8a0007/endpoints
{
"endpoint" : {
"resource_id" : "08155cd2-5897-49be-933f-eec757fd4010",
"resource_type" : "EIP",
"weight" : 10,
"ip_address" : "208.182.11.121"
}
}
Example Responses
Status code: 201
Endpoint added.
{
"endpoint" : {
"id" : "0aa23a52-1ac2-4a2d-8dfa-1e11cb26079d",
"resource_id" : "08155cd2-5897-49be-933f-eec757fd4010",
"endpoint_group_id" : "3a9f50bb-f041-4eac-a117-82472d8a0007",
"resource_type" : "EIP",
"status" : "ACTIVE",
"weight" : 10,
"health_state" : "HEALTHY",
"created_at" : "2019-01-08T01:21:37.151Z",
"updated_at" : "2019-01-08T01:21:37.151Z",
"domain_id" : "99a3fff0d03c428eac3678da6a7d0f24",
"ip_address" : "208.182.11.121",
"frozen_info" : {
"status" : 2,
"effect" : 1,
"scene" : [ "ARREAR", "POLICE" ]
}
},
"request_id" : "915a14a6-867b-4af7-83d1-70efceb146f9"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
201 |
Endpoint added. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot