All Products
Document Center


Last Updated: Sep 10, 2019

Note: This API is currently only available to Alibaba Cloud partners. Contact your Alibaba Cloud sales manager or business manager to add your account to the whitelist before using this API.


Query the public IP address range in a specified region.

Request parameters


The action to perform.

Valid value: DescribePublicIpAddress

RegionIdStringYesThe ID of the region to query.
PageNumberIntegerNoThe number of pages to return. The default value is 1.
PageSizeIntegerNoThe number of rows per page. The default value is 10.

Response parameters

PublicIpAddressStringThe public IP address range of the specified region.
TotalCountStringThe number of queried entries.
PageNumberIntegerThe current page number.
PageSizeIntegerThe number of entries on the current page.

Error codes

Error codeError messageHttp status codeDescription
Forbidden.RegionNotFoundSpecified region is not found during access authentication.404The specified region does not exist. See Regions and zones to find the region ID of each region.
Forbidden.User not authorized to operate on the specified resource.403You are not authorized to operate on the specified resource. See API authorization on how to authorize the API.


Request example

  2. &RegionId=cn-beijing
  3. &<CommonParameters>

Response example

  1. {
  2. RequestId”:” 365F4154-92F6-4AE4-92F8-7FF34B540710”,
  3. Code”:200,
  4. Success”:”true/false”,
  5. PublicIpAddress”:[
  7. ],
  8. RegionId”:”cn-beijing”,
  9. PageNumber”:1,
  10. PageSize”:100,
  11. TotalCount”:1000
  12. }

API authorization

When calling this API, make sure that you are authorized to operate this resource.

The authorization can be done either by using the API or on the RAM console. The following policy must be added. For more information, see Authorization policies.

  1. {
  2. “Version”: “1”,
  3. “Statement”: [
  4. {
  5. “Action”: [
  6. “vpc:DescribePublicIpAddress,
  7. ],
  8. “Resource”: ,
  9. “Effect”: “Allow”
  10. }
  11. ]
  12. }