调用DescribePublicIpAddress查询指定地域中位于专有网络的公网IP地址的范围。
API描述
您不能通过DescribePublicIpAddress接口查询位于经典网络中的公网IP的范围。
注意 目前,本API仅供白名单中的阿里云合作伙伴调用。调用本API前,请联系您的阿里云销售经理或商业经理将您的帐户加入到白名单中。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribePublicIpAddress | 要执行的操作,取值:DescribePublicIpAddress。 |
RegionId | String | 是 | cn-qingdao-cm5-a01 | 指定查询的地域,取值:
|
PageNumber | Integer | 否 | 1 | 列表的页码,默认值为1。 |
PageSize | Integer | 否 | 10 | 分页查询时每页的行数,默认值为100。 |
返回参数
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
PublicIpAddress | String | 110.11.1.0/24 | 指定地域的公网IP地址范围。 |
TotalCount | String | 100 | 列表条目数。 |
PageNumber | Integer | 1 | 当前页码。 |
PageSize | Integer | 10 | 分页包含的条目数。 |
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 | 请求ID。 |
示例
请求示例
https://vpc.aliyuncs.com/?Action=DescribePublicIpAddress
&RegionId=cn-qingdao-cm5-a01
&<公共请求参数>
正常返回示例
XML
格式
<DescribePublicIpAddressResponse>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<PublicIpAddress>110.11.1.0/24</PublicIpAddress>
<PageNumber>1</PageNumber>
<PageSize>100</PageSize>
<TotalCount>100</TotalCount>
</DescribePublicIpAddressResponse>
JSON
格式
{
"RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
"PublicIpAddress":[
"110.11.1.0/24"
],
"PageNumber":"1",
"PageSize":"100",
"TotalCount":"100"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | Forbidden. | User not authorized to operate on the specified resource. | 指定的地域不存在。 |
404 | Forbidden.RegionNotFound | Specified region is not found during access authentication. | 您没有操作指定资源的权限。获取权限,请参见使用RAM对VPC进行权限管理。 |