阿里云专有网络 VPCDescribeVpcAttribute

.icms-tree-table-trigger {
display: inline-block;
width: 17px;
height: 17px;
margin-right: 3px;
line-height: 14px;
text-align: center;
background: #fff;
border: 1px solid #e8e8e8;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.icms-tree-table-trigger::after {
content: ‘+’;
}

.icms-tree-table-trigger-expanded::after {
content: ‘-‘
}

调用DescribeVpcAttribute接口查询指定VPC的配置信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeVpcAttribute

要执行的操作,取值:DescribeVpcAttribute。

RegionId String cn-hangzhou

VPC所属的地域ID。

VpcId String vpc-bp18sth14qii3pnv****

要查询的VPC的ID。

DryRun Boolean false

是否只预检此次请求。

  • true:发送检查请求,不会查询资源状况。检查项包括AccessKey是否有效、RAM用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DryRunOperation
  • false(默认值):发送正常请求,通过检查后返回2XX HTTP状态码并直接查询资源状况。
IsDefault Boolean false

是否为默认VPC,取值:

  • false:不是默认VPC。
  • true:是默认VPC。

返回数据

名称 类型 示例值 描述
AssociatedCens Array

绑定的云企业网列表。

如果VPC未绑定云企业网,则不返回该参数。

AssociatedCen

绑定的云企业网列表。

如果VPC未绑定云企业网,则不返回该参数。

CenId String cen-7qthudw0ll6jmc****

VPC绑定的云企业网实例ID。

CenOwnerId Long 111111111111

云企业网所属账号的ID。

CenStatus String Attached

VPC绑定云企业网的状态。

仅VPC绑定了云企业网时返回Attached。

CidrBlock String 192.168.0.0/16

VPC的IPv4网段。

ClassicLinkEnabled Boolean false

是否开启了ClassicLink功能。

  • true:已开启。
  • false:未开启。
CloudResources Array

VPC下的资源列表。

CloudResourceSetType

VPC下的资源列表。

ResourceCount Integer 1

VPC下的资源数量。

ResourceType String VSwitch

VPC下的资源类型。

  • VSwitch:交换机。
  • VRouter:路由器。
  • RouteTable:路由表。
CreationTime String 2018-10-16T07:31:09Z

VPC的创建时间。

Description String VPC

VPC的描述。

Ipv6CidrBlock String 2408:4004:0:a600::/56

VPC的IPv6网段。

IsDefault Boolean false

是否是默认VPC。

  • true:是默认VPC。
  • false:非默认VPC。
RegionId String cn-hangzhou

VPC所在的地域。

RequestId String 7486AE4A-129D-43DB-A714-2432C074BA04

请求ID。

ResourceGroupId String rg-acfmxazbvgb4ph****

资源组ID。

Status String Available

VPC的状态。

  • Available:可用。
  • Pending:配置中。
UserCidrs List 172.16.0.1/24

用户侧网络的网段,如需定义多个网段请使用半角逗号隔开,最多支持3个网段。

UserCidr

用户侧网络的网段,如需定义多个网段请使用半角逗号隔开,最多支持3个网段。

VRouterId String vrt-bp1jso6ng1at0ajsc****

VPC的路由器ID。

VSwitchIds List {“VSwitchId”: [ “vsw-bp14cagpfysr29feg****” ]}

VPC下的交换机列表。

VSwitchId

VPC下的交换机列表。

VpcId String vpc-bp18sth14qii3pnvo****

VPC的ID。

VpcName String doctest2

VPC的名称。

示例

请求示例


http(s)://vpc.aliyuncs.com/?Action=DescribeVpcAttribute
&RegionId=cn-hangzhou
&VpcId=vpc-bp18sth14qii3pnv****
&<公共请求参数>

正常返回示例

XML 格式

<DescribeVpcAttributeResponse>
	  <VpcName>doctest2</VpcName>
	  <Description></Description>
	  <IsDefault>false</IsDefault>
	  <ResourceGroupId>rg-acfmxazb4ph****</ResourceGroupId>
	  <UserCidrs></UserCidrs>
	  <ClassicLinkEnabled>false</ClassicLinkEnabled>
	  <AssociatedCens>
		    <AssociatedCen>
			      <CenStatus>Attached</CenStatus>
			      <CenOwnerId>12315790855****</CenOwnerId>
			      <CenId>cen-7qthudw0ll6jmc****</CenId>
		    </AssociatedCen>
	  </AssociatedCens>
	  <VRouterId>vrt-bp1jso6ng1at0ajs****</VRouterId>
	  <VpcId>vpc-bp18sth14qii3pnvo****</VpcId>
	  <CreationTime>2018-10-16T07:31:09Z</CreationTime>
	  <CidrBlock>192.168.0.0/16</CidrBlock>
	  <Status>Available</Status>
	  <VSwitchIds>
		    <VSwitchId>vsw-bp14cagpfysr29fe****</VSwitchId>
	  </VSwitchIds>
	  <RequestId>7486AE4A-129D-43DB-A714-2432C074BA04</RequestId>
	  <RegionId>cn-hangzhou</RegionId>
	  <CloudResources>
		    <CloudResourceSetType>
			      <ResourceType>VSwitch</ResourceType>
			      <ResourceCount>1</ResourceCount>
		    </CloudResourceSetType>
		    <CloudResourceSetType>
			      <ResourceType>VRouter</ResourceType>
			      <ResourceCount>1</ResourceCount>
		    </CloudResourceSetType>
		    <CloudResourceSetType>
			      <ResourceType>RouteTable</ResourceType>
			      <ResourceCount>1</ResourceCount>
		    </CloudResourceSetType>
	  </CloudResources>
</DescribeVpcAttributeResponse>

JSON 格式

{
	"VpcName":"doctest2",
	"Description":"",
	"IsDefault":false,
	"ResourceGroupId":"rg-acfmxazb4ph****",
	"UserCidrs":{
		"UserCidr":[]
	},
	"ClassicLinkEnabled":false,
	"AssociatedCens":{
		"AssociatedCen":[
			{
				"CenStatus":"Attached",
				"CenOwnerId":"123157908552****",
				"CenId":"cen-7qthudw0ll6jmc****"
			}
		]
	},
	"VRouterId":"vrt-bp1jso6ng1at0ajs****",
	"VpcId":"vpc-bp18sth14qii3pnvo****",
	"CreationTime":"2018-10-16T07:31:09Z",
	"CidrBlock":"192.168.0.0/16",
	"Status":"Available",
	"VSwitchIds":{
		"VSwitchId":[
			"vsw-bp14cagpfysr29feg****"
		]
	},
	"RegionId":"cn-hangzhou",
	"RequestId":"7486AE4A-129D-43DB-A714-2432C074BA04",
	"CloudResources":{
		"CloudResourceSetType":[
			{
				"ResourceType":"VSwitch",
				"ResourceCount":1
			},
			{
				"ResourceType":"VRouter",
				"ResourceCount":1
			},
			{
				"ResourceType":"RouteTable",
				"ResourceCount":1
			}
		]
	}
}

错误码

HttpCode 错误码 错误信息 描述
500 InternalError The request processing has failed due to some unknown error. 请求处理由于某些未知错误失败。
400 IncorrectVpcStatus Current VPC status does not support this operation. 当前VPC的状态无法支持这个操作。
404 InvalidVpcId.NotFound Specified VPC does not exist. 该VPC不存在。

访问错误中心查看更多错误码。

注明:本文为星速云原创版权所有,禁止转载,一经发现将追究版权责任!

(0)
上一篇 2019年8月21日 下午12:09
下一篇 2019年8月21日 下午12:13

相关推荐

发表评论

登录后才能评论
问答社区 QQ客服
微信客服
微信客服
分享本页
返回顶部