Queries the configuration of a virtual private cloud (VPC).
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
VpcId | string | Yes | The ID of the VPC that you want to query. | vpc-bp18sth14qii3pnv**** |
RegionId | string | Yes | The ID of the region where the VPC is deployed. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
DryRun | boolean | No | Specifies whether to perform only a dry run, without performing the actual request. Valid values:
| false |
IsDefault | boolean | No | Specifies whether the VPC is the default VPC. Valid values:
| false |
Response parameters
Examples
Sample success responses
JSON
format
{
"CreationTime": "2021-10-16T07:31:09Z",
"Status": "Available",
"VpcId": "vpc-bp18sth14qii3pnvo****",
"IsDefault": false,
"ClassicLinkEnabled": false,
"OwnerId": 0,
"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": [
"{\"VSwitchId\": [ \"vsw-bp14cagpfysr29feg****\" ]}"
]
},
"UserCidrs": {
"UserCidr": [
"172.16.0.1/24"
]
},
"SecondaryCidrBlocks": {
"SecondaryCidrBlock": [
"192.168.0.0/16"
]
},
"AssociatedCens": {
"AssociatedCen": [
{
"CenOwnerId": 0,
"CenId": "cen-7qthudw0ll6jmc****",
"CenStatus": "Attached"
}
]
},
"CloudResources": {
"CloudResourceSetType": [
{
"ResourceCount": 1,
"ResourceType": "VSwitch"
}
]
},
"Ipv6CidrBlocks": {
"Ipv6CidrBlock": [
{
"Ipv6Isp": "BGP",
"Ipv6CidrBlock": "2408:XXXX:0:6a::/56"
}
]
},
"SupportIpv4Gateway": true,
"Ipv4GatewayId": "ipv4gw-5tsnc6s4ogsedtp3k****",
"Tags": {
"Tag": [
{
"Key": "FinanceDept",
"Value": "FinanceJoshua"
}
]
},
"AssociatedPropagationSources": {
"AssociatedPropagationSources": [
{
"SourceType": "CEN",
"SourceOwnerId": 0,
"SourceInstanceId": "cen-dc4vwznpwbobrl****",
"Status": "Attaching",
"RoutePropagated": true
}
]
},
"EnabledIpv6": false
}
Error codes
HTTP status code | 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. |
500 | InternalError | The request processing has failed due to some unknown error. | An unknown error occurred. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-24 | The Error code has changed | View Change Details |
2024-04-09 | The Error code has changed. The response structure of the API has changed | View Change Details |
2024-01-05 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |
2023-05-17 | The Error code has changed. The response structure of the API has changed | View Change Details |