Change the internal IP address of the cloud host - ModifyUHostIP
Overview
Change the internal IP address of the cloud host
💡 The modified IP address must be in the same VPC and subnet as the original IP address.
ℹ️ Before performing this operation, please modify the configuration file inside the host and shut down your host.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is ModifyUHostIP . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
Zone | string | Availability Zone. See Availability Zone List | Yes |
ProjectId | string | Project ID. When not filled in, it defaults to the default project. Please refer to the GetProjectList interface. | No |
PresentIpAddress | string | The IP address that needs to be changed. The new IP address and the old IP address must belong to the same subnet, and be consistent with the configuration file inside the host. | Yes |
UHostId | string | Specify the cloud host ID. | Yes |
PreviousIpAddress | string | The original IP address that needs to be modified. This parameter is not required when the cloud host only has one IP address. | No |
Response Field
Field Name | Type | Description Information | Required |
---|---|---|---|
RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
Action | string | Operation command name. | Yes |
Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
UHostId | string | Target UHost ID | No |
Example
Request Example
https://api.surfercloud.com/?Action=ModifyUHostIP
&Region=cn-bj2
&Zone=cn-bj2-04
&PresentIpAddress=192.168.0.77
&UHostId=uhost-xxxxx
Response Example
{
"Action": "ModifyUHostIPResponse",
"RetCode": 0,
"UHostId": "uhost-xxxxx"
}