edit-icon download-icon

DescribePublicIpAddress

Last Updated: Apr 09, 2018

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.

Description

Query the public IP address range in a specified region.

Request parameters

Name Name Required Description
Action String Yes

The action to perform.

Valid value: DescribePublicIpAddress

RegionId String Yes The ID of the region to query.
PageNumber Integer No The number of pages to return. The default value is 1.
PageSize Integer No The number of rows per page. The default value is 10.

Response parameters

Name Type Description
PublicIpAddress String The public IP address range of the specified region.
TotalCount String The number of queried entries.
PageNumber Integer The current page number.
PageSize Integer The number of entries on the current page.

Error codes

Error code Error message Http status code Description
Forbidden.RegionNotFound Specified region is not found during access authentication. 404 The 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. 403 You are not authorized to operate on the specified resource. See API authorization on how to authorize the API.

Examples

Request example

  1. https://vpc.aliyuncs.com/?Action=DescribePublicIpAddress
  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”:[
  6. 110.11.1.0/24
  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. }

authorize

Thank you! We've received your feedback.