Batch Application for Auxiliary IP of Virtual Network Card - AllocateBatchSecondaryIp
Overview
Batch Application for Auxiliary IP of Virtual Network Card
💡 Only one of IP and Count is allowed to have parameters at the same time.
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is AllocateBatchSecondaryIp . | 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, sub-accounts 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.N | string | [arry] Supports applying in the following ways: ① By subnet: such as 192.168.1.32/27, the smallest mask number is 27 ② Specify IP address, such as 192.168.1.3 | No |
Count | int | Number of Intranet IPs applied | 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 |
IpsInfo | array[IpsInfo] | See IpsInfo | Yes |
Data Model
IpsInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
Ip | string | Private IP Address | No |
Mask | string | Mask | No |
Gateway | string | UGW | No |
Mac | string | MAC Address | No |
SubnetId | string | Subnet Resource ID | No |
VPCId | string | VPC Resource ID | No |
Status | StatusInfo | IP allocation result, see StatusInfo | No |
StatusInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
StatusCode | string | Enumeration values: Succeeded, Failed | No |
Message | string | Reason for IP Assignment Failure | No |
Example
Request Example
https://api.ucloud-global.com/?Action=AllocateBatchSecondaryIp
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=XgPNpstA
&Mac=HHbZOKcj
&ObjectId=OidCZWsV
&SubnetId=XFAATutN
&VPCId=ZlXtGxKD
&Ip.N=ZhaZYRqX
&Count=7
Response Example
{
"Action": "AllocateBatchSecondaryIpResponse",
"IpInfo": [
{
"Gateway": "pSmgKDHW",
"Ip": "kfVBsTcw",
"Mac": "MPJCarZQ",
"Mask": "HbZJCMWG",
"Status": [
{
"Message": "CIEfBloY",
"StatusCode": "vvInRaak"
}
],
"SubnetId": "dnSKxsEH",
"VPCId": "jfctXBmr"
}
],
"RetCode": 0
}