Add an IP-Domain Mapping
Function
This API is used to add an IP-domain mapping for a specified cluster.
URI
- URI format
POST /v1.0/{project_id}/reserved_cluster/{cluster_id}/hosts
- Parameter description
Table 1 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
- Example request
{ "hosts_info": [ { "hostname": "test.cs.com", "ip": "10.113.27.138" } ] }
- Parameter description
Table 2 Request parameters Parameter
Mandatory
Type
Description
hosts_info
Yes
Array
Information about the IP-domain mapping to be added.
hostname
Yes
String
Domain name to be added.
ip
Yes
String
IP address to be added.
Response
- Example response
[ { "message_id": "CS.22018", "message": "Host information is added successfully.", "payload": { "host_id": 5 }, "current_time": 1550210121485 } ] - Parameter description
Table 3 Response parameters Parameter
Mandatory
Type
Description
message_id
No
String
Message type ID.
message
No
String
Message content.
host_id
No
Long
Domain name ID.
current_time
No
Int
Current time, expressed by milliseconds.
Status Code
Table 4 describes the status code.
Error Code
For details, see Error Codes.
Last Article: Querying the List of Jobs Running in an Exclusive Cluster
Next Article: Updating the IP-Domain Mapping
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.