获取VPC信息-DescribeVPC

获取VPC信息

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目ID。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口Yes
VPCIds.nstringVPCIdNo
Tagstring业务组名称No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
DataSetarrayvpc信息,具体结构见下方VPCInfoNo

VPCInfo

Parameter nameTypeDescriptionRequired
NetworkarrayVPC网段Yes
SubnetCountstring子网数量Yes
CreateTimeint创建时间Yes
UpdateTimeint修改时间Yes
VPCIdstringVPCIdNo

Request Example

https://api.ucloud.cn/?Action=DescribeVPC
&ProjectId=org-xxx
&Region=cn-sh2
&VPCIds.0=uvnet-xxx

Response Example

{
    "Action": "DescribeVPCResponse",
    "DataSet": [
        {
            "CreateTime": 1514313728,
            "Name": "DefaultVPC",
            "Network": [
                "10.44.x.0/16"
            ],
            "NetworkInfo": [
                {
                    "Network": "10.44.x.0/16",
                    "SubnetCount": 1
                }
            ],
            "SubnetCount": 1,
            "Tag": "Default",
            "UpdateTime": 1514313728,
            "VPCId": "uvnet-xxx"
        },
        {
            "CreateTime": 1533891436,
            "Name": "testabc",
            "Network": [
                "192.168.x.0/16",
                "10.0.0.0/8"
            ],
            "NetworkInfo": [
                {
                    "Network": "192.168.x.0/16",
                    "SubnetCount": 1
                },
                {
                    "Network": "10.0.0.0/8",
                    "SubnetCount": 1
                }
            ],
            "Remark": "",
            "SubnetCount": 2,
            "Tag": "Default",
            "UpdateTime": 1533891438,
            "VPCId": "uvnet-xxxxx"
        }
    ],
    "RetCode": 0
}