Assign IP - AllocateSecondaryIp
Overview
Assign IP (for UK8S use)
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AllocateSecondaryIp . | 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. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface. | Yes |
Mac | string | Node mac | Yes |
ObjectId | string | Resource Id | Yes |
SubnetId | string | Subnet Id (If not specified, the default subnet will be created based on the zone) | No |
VPCId | string | vpcId | No |
Ip | string | Designated IP Allocation | 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 |
IpInfo | IpInfo | Yes |
Data Model
IpInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
Ip | string | No | |
Mask | string | No | |
Gateway | string | No | |
Mac | string | No | |
SubnetId | string | No | |
VPCId | string | No |
Example
Request Example
https://api.ucloud-global.com/?Action=AllocateSecondaryIp
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=rvlPceNj
&ObjectId=ttFJuSUK
&Mac=hYZEoFAm
&SubnetId=ZFUgcsnL
Response Example
{
"Action": "AllocateSecondaryIpResponse",
"IpInfo": {
"AccountId": 0,
"AzId": 0,
"Gateway": "XXX.XXX.XX.X",
"Ip": "XX.XX.XX.XXX",
"IpType": 0,
"Mac": "XX:XX:XX:XX:XX:XX",
"Mask": "255.255.XXX.X",
"ObjectId": "",
"OperatorId": 0,
"OtherIp": "",
"OtherIpMask": "",
"PipId": "",
"SubnetworkId": "subnet-XXXX",
"SubnetworkType": 0,
"VIP": null,
"VPCId": "uvnet-XXXX",
"ZoneId": 0
},
"RetCode": 0
}