Adding the hosts File
Function
This API is used to add an IP-domain mapping for a specified cluster through file uploading. The hosts_file parameter is involved in this API, and the parameter must be in the "form-data" format.
URI
- URI format
POST /v1.0/{project_id}/reserved_cluster/{cluster_id}/hosts_file
- Parameter description
Table 2 URI parameter description Parameter
Mandatory
Description
project_id
Yes
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.
cluster_id
Yes
Cluster ID.
Request
The request format is form-data. For details about the parameter configuration, see Table 1.
Response
- Example response
[ { "message_id":"CS.22018", "message":"Host information is added successfully.", "current_time":1533686888000, "payload":{ "host_id":1 } } ] - Parameter description
Table 3 Response parameters Parameter
Mandatory
Type
Description
message_id
No
String
Message type ID.
message
No
String
Message content.
current_time
No
Int
Current time, expressed by milliseconds.
host_id
No
Long
Domain name ID.
Status Code
Table 4 describes the status code.
Error Code
For details, see Error Codes.
Last Article: Deleting an IP-Domain Mapping
Next Article: Obtaining User Quota Information About a Tenant
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.