Queries the detailed information about a virtual private cloud (VPC).
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeVpcAttribute | The operation that you want to perform. Set the value to DescribeVpcAttribute. |
VpcId | String | Yes | vpc-bp18sth14qii3pnv**** | The ID of the VPC that you want to query. |
RegionId | String | Yes | cn-hangzhou | The region ID of the VPC. You can call the DescribeRegions operation to query the most recent region list. |
DryRun | Boolean | No | false | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
|
IsDefault | Boolean | No | false | Specifies whether the VPC is the default VPC. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
CreationTime | String | 2021-10-16T07:31:09Z | The time when the VPC was created. |
Status | String | Available | The status of the VPC. Valid values:
|
VpcId | String | vpc-bp18sth14qii3pnvo**** | The ID of the VPC. |
IsDefault | Boolean | false | Indicates whether the VPC is the default VPC. Valid values:
|
ClassicLinkEnabled | Boolean | false | Indicates whether the ClassicLink feature is enabled. Valid values:
|
OwnerId | Long | 283117732402483989 | The ID of the Alibaba Cloud account to which the VPC belongs. |
RegionId | String | cn-hangzhou | The region ID of the VPC. |
VpcName | String | doctest2 | The name of the VPC. |
VRouterId | String | vrt-bp1jso6ng1at0ajsc**** | The ID of the vRouter that belongs to the VPC. |
DhcpOptionsSetStatus | String | Available | The status of the DHCP options set. Valid values:
|
CidrBlock | String | 192.168.0.0/16 | The IPv4 CIDR block of the VPC. |
RequestId | String | 7486AE4A-129D-43DB-A714-2432C074BA04 | The request ID. |
Description | String | VPC | The description of the VPC. |
ResourceGroupId | String | rg-acfmxazbvgb4ph**** | The ID of the resource group. |
DhcpOptionsSetId | String | dopt-o6w0df4epg9zo8isy**** | The ID of the DHCP options set. |
Ipv6CidrBlock | String | 2408:XXXX:0:a600::/56 | The IPv6 CIDR block of the VPC. |
VSwitchIds | Array of String | {"VSwitchId": [ "vsw-bp14cagpfysr29feg****" ]} | The list of vSwitches deployed in the VPC. |
UserCidrs | Array of String | 172.16.0.1/24 | The user CIDR block. Multiple CIDR blocks are separated by commas (,). At most three CIDR blocks are returned. |
SecondaryCidrBlocks | Array of String | 192.168.0.0/16 | The secondary IPv4 CIDR block of the VPC. |
AssociatedCens | Array of AssociatedCen | The list of Cloud Enterprise Network (CEN) instances to which the VPC is attached. If the VPC is not attached to a CEN instance, the parameter is not returned. |
|
AssociatedCen | |||
CenOwnerId | Long | 283117732402483989 | The ID of the Alibaba Cloud account to which the CEN instance belongs. |
CenId | String | cen-7qthudw0ll6jmc**** | The ID of the CEN instance to which the VPC is attached. |
CenStatus | String | Attached | The status of the CEN instance to which the VPC is attached. Attached is returned only if the VPC is attached to a CEN instance. |
CloudResources | Array of CloudResourceSetType | The list of resources deployed in the VPC. |
|
CloudResourceSetType | |||
ResourceCount | Integer | 1 | The number of resources deployed in the VPC. |
ResourceType | String | VSwitch | The type of resources deployed in the VPC. Valid values:
|
Ipv6CidrBlocks | Array of Ipv6CidrBlock | The IPv6 CIDR block of the VPC. |
|
Ipv6CidrBlock | |||
Ipv6Isp | String | BGP | The Internet service provider (ISP) for IPv6 addresses of the VPC. Valid values:
Note If your Alibaba Cloud account is allowed to use single-ISP bandwidth, valid values are: ChinaTelecom, ChinaUnicom, and ChinaMobile. |
Ipv6CidrBlock | String | 2408:XXXX:0:6a::/56 | The IPv6 CIDR block of the VPC. |
SupportIpv4Gateway | Boolean | true | Indicates whether the VPC supports IPv4 gateways.
|
Ipv4GatewayId | String | ipv4gw-5tsnc6s4ogsedtp3k**** | The ID of the IPv4 gateway. |
Tags | Array of Tag | The tag list. |
|
Tag | |||
Key | String | FinanceDept | The tag key. |
Value | String | FinanceJoshua | The tag value. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeVpcAttribute
&VpcId=vpc-bp18sth14qii3pnv****
&RegionId=cn-hangzhou
&DryRun=false
&IsDefault=false
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeVpcAttributeResponse>
<CreationTime>2021-10-16T07:31:09Z</CreationTime>
<Status>Available</Status>
<VpcId>vpc-bp18sth14qii3pnvo****</VpcId>
<IsDefault>false</IsDefault>
<ClassicLinkEnabled>false</ClassicLinkEnabled>
<OwnerId>283117732402484000</OwnerId>
<RegionId>cn-hangzhou</RegionId>
<VpcName>doctest2</VpcName>
<VRouterId>vrt-bp1jso6ng1at0ajsc****</VRouterId>
<DhcpOptionsSetStatus>Available</DhcpOptionsSetStatus>
<CidrBlock>192.168.0.0/16</CidrBlock>
<RequestId>7486AE4A-129D-43DB-A714-2432C074BA04</RequestId>
<Description>VPC</Description>
<ResourceGroupId>rg-acfmxazbvgb4ph****</ResourceGroupId>
<DhcpOptionsSetId>dopt-o6w0df4epg9zo8isy****</DhcpOptionsSetId>
<Ipv6CidrBlock>2408:XXXX:0:a600::/56</Ipv6CidrBlock>
<VSwitchIds>{"VSwitchId": [ "vsw-bp14cagpfysr29feg****" ]}</VSwitchIds>
<UserCidrs>172.16.0.1/24</UserCidrs>
<SecondaryCidrBlocks>192.168.0.0/16</SecondaryCidrBlocks>
<AssociatedCens>
<CenOwnerId>283117732402484000</CenOwnerId>
<CenId>cen-7qthudw0ll6jmc****</CenId>
<CenStatus>Attached</CenStatus>
</AssociatedCens>
<CloudResources>
<ResourceCount>1</ResourceCount>
<ResourceType>VSwitch</ResourceType>
</CloudResources>
<Ipv6CidrBlocks>
<Ipv6Isp>BGP</Ipv6Isp>
<Ipv6CidrBlock>2408:XXXX:0:6a::/56</Ipv6CidrBlock>
</Ipv6CidrBlocks>
<SupportIpv4Gateway>true</SupportIpv4Gateway>
<Ipv4GatewayId>ipv4gw-5tsnc6s4ogsedtp3k****</Ipv4GatewayId>
<Tags>
<Key>FinanceDept</Key>
<Value>FinanceJoshua</Value>
</Tags>
</DescribeVpcAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"CreationTime" : "2021-10-16T07:31:09Z",
"Status" : "Available",
"VpcId" : "vpc-bp18sth14qii3pnvo****",
"IsDefault" : false,
"ClassicLinkEnabled" : false,
"OwnerId" : 283117732402484000,
"RegionId" : "cn-hangzhou",
"VpcName" : "doctest2",
"VRouterId" : "vrt-bp1jso6ng1at0ajsc****",
"DhcpOptionsSetStatus" : "Available",
"CidrBlock" : "192.168.0.0/16",
"RequestId" : "7486AE4A-129D-43DB-A714-2432C074BA04",
"Description" : "VPC",
"ResourceGroupId" : "rg-acfmxazbvgb4ph****",
"DhcpOptionsSetId" : "dopt-o6w0df4epg9zo8isy****",
"Ipv6CidrBlock" : "2408:XXXX:0:a600::/56",
"VSwitchIds" : [ "{\"VSwitchId\": [ \"vsw-bp14cagpfysr29feg****\" ]}" ],
"UserCidrs" : [ "172.16.0.1/24" ],
"SecondaryCidrBlocks" : [ "192.168.0.0/16" ],
"AssociatedCens" : [ {
"CenOwnerId" : 283117732402484000,
"CenId" : "cen-7qthudw0ll6jmc****",
"CenStatus" : "Attached"
} ],
"CloudResources" : [ {
"ResourceCount" : 1,
"ResourceType" : "VSwitch"
} ],
"Ipv6CidrBlocks" : [ {
"Ipv6Isp" : "BGP",
"Ipv6CidrBlock" : "2408:XXXX:0:6a::/56"
} ],
"SupportIpv4Gateway" : true,
"Ipv4GatewayId" : "ipv4gw-5tsnc6s4ogsedtp3k****",
"Tags" : [ {
"Key" : "FinanceDept",
"Value" : "FinanceJoshua"
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectVpcStatus | Current VPC status does not support this operation. | This operation cannot be performed when the VPC is in the current state. |
404 | InvalidVpcId.NotFound | Specified VPC does not exist. | The VPC does not exist. |
500 | InternalError | The request processing has failed due to some unknown error. | Some unknown errors occurred. |
For a list of error codes, see Service error codes.