Creating an Endpoint
Function
This API is used to create an endpoint.
URI
POST /v1/{project_id}/endpoints
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Tenant resource space ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
Yes |
String |
Name of the endpoint. The value must be unique under a tenant. Only letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. It must start with a letter or digit. |
|
vpc_id |
Yes |
String |
ID of the VPC to which the endpoint belongs. |
|
subnet_id |
Yes |
String |
ID of the subnet to which the endpoint belongs. |
|
description |
No |
String |
Description. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
X-Request-Id |
String |
This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
ID of the endpoint. |
|
name |
String |
Name of the endpoint. |
|
vpc_id |
String |
ID of the VPC to which the endpoint belongs. |
|
subnet_id |
String |
ID of the subnet to which the endpoint belongs. |
|
domain |
String |
Access domain name. |
|
description |
String |
Description. |
|
status |
String |
Status of the endpoint. |
|
error_info |
ErrorInfo object |
Error message. |
|
type |
String |
Type of the endpoint. |
|
scalable |
Boolean |
Whether the endpoint is accessible. |
|
created_time |
String |
UTC time when the endpoint is created. |
|
updated_time |
String |
UTC time when the endpoint is updated. |
|
endpoints |
Array of EndpointConnection objects |
List of endpoints. |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_detail |
String |
Error details. |
|
error_msg |
String |
Error message. |
|
Parameter |
Type |
Description |
|---|---|---|
|
endpoint_service_id |
String |
Service ID of the endpoint. |
|
endpoint_service_name |
String |
Service name of the endpoint. |
|
marker_id |
String |
Packet ID of the endpoint. |
|
id |
String |
Node ID of the endpoint. |
|
ip |
String |
Node IP address of the endpoint. |
|
created_time |
String |
Time when the endpoint is created. |
Example Requests
Create an endpoint.
GET https://{eg_endpoint}/v1/{project_id}/endpoints
{
"name" : "endpoint",
"vpc_id" : "68bfbcc1-dff2-47e4-a9d4-332b9bc1b8de",
"subnet_id" : "84758cf5-9c62-43ae-a778-3dbd8370c0a4",
"description" : "string"
}
Example Responses
Status code: 200
Operation successful.
{
"id" : "23709d68-54d5-423b-a6be-03302e893152",
"name" : "endpoint",
"vpc_id" : "68bfbcc1-dff2-47e4-a9d4-332b9bc1b8de",
"subnet_id" : "84758cf5-9c62-43ae-a778-3dbd8370c0a4",
"domain" : "events.cn-north-4.myhuaweicloud.com",
"description" : "Endpoint.",
"status" : "CREATED",
"error_info" : { },
"type" : "PRIVATE",
"scalable" : false,
"created_time" : "2021-12-09 09:00:00",
"updated_time" : "2021-12-09 09:00:00",
"endpoints" : [ { } ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Operation successful. |
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.