Modifies the /etc/hosts file.
Try it now
Test
RAM authorization
Request syntax
POST /webapi/network/modifyHostAlias HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Request parameter information. |
|
| hostAliases |
array<object> |
No |
Host alias list. |
|
|
object |
No |
|||
| hostnames |
array |
No |
Host alias. |
|
|
string |
No |
Domain name |
abc.122.com |
|
| ip |
string |
No |
IP address |
26.15.54.221 |
| InstanceId |
string |
No |
Instance ID. |
c-b25e21e24388**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| HttpStatusCode |
integer |
HTTP request status code. |
200 |
| RequestId |
string |
Request ID. |
32A44F0D-BFF6-5664-999A-218BBDE7**** |
| Success |
boolean |
Is the request successful. |
false |
| ErrCode |
string |
Error code. |
InvalidParams |
| ErrMessage |
string |
Error message. |
Invalid params: [instance not exists]. |
| Data |
boolean |
Order ID. |
24151320976**** |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "32A44F0D-BFF6-5664-999A-218BBDE7****",
"Success": false,
"ErrCode": "InvalidParams",
"ErrMessage": "Invalid params: [instance not exists].",
"Data": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.