Docs
api
Private Network(UVPC)
AllocateVIP

Apply for Private Network Virtual IP - AllocateVIP

Overview

Based on the provided information, apply for an internal network VIP (Virtual IP), which is often used as a floating IP for high-availability applications.

Definition

Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is AllocateVIP.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
RegionstringRegionYes
ZonestringAvailability ZoneNo
ProjectIdstringProject ID. If not filled in, the default project is used, and the sub-account must be filled in. Please refer to the GetProjectList interface.No
VPCIdstringSpecify the VPC to which the VIP belongsYes
SubnetIdstringSubnet IDYes
IpstringSpecify IPNo
CountintQuantity applied, default: 1No
NamestringVIP name, default: VIPNo
TagstringBusiness group name, default is DefaultNo
RemarkstringNoteNo
BusinessIdstringBusiness GroupNo

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
VIPSetarray[VIPSet]Information related to the VIP resources applied forNo
DataSetarray[string]Applied VIP AddressNo

Data Model

VIPSet

Field NameTypeDescription InformationRequired
VIPstringVirtual IPNo
VIPIdstringVirtual IP IDNo
VPCIdstringVPC idNo

Example

Request Example

https://api.ucloud-global.com/?Action=AllocateVIP
&Region=cn-bj2
&ProjectId=org-XXXX
&Zone=cn-bj2-04
&VPCId=vnet-XXXXXX
&SubnetId=subnet-XXX
&Ip=ccjyLEtQ

Response Example

{
  "Action": "AllocateVIPResponse",
  "DataSet": [
    "10.25.XX.111"
  ],
  "RetCode": 0,
  "VIPSet": [
    {
      "VIP": "10.25.XX.111",
      "VIPId": "vip-XXXXXX",
      "VPCId": "uvnet-XXXXX"
    }
  ]
}