All Products
Search
Document Center

Elastic IP Address:DescribePublicIpAddress

Last Updated:Nov 14, 2024

Queries the public IP address range of a virtual private cloud (VPC) in a region.

Operation description

You cannot query the range of public IP addresses of a classic network by calling the DescribePublicIpAddress operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page.

Valid values: 1 to 100. Default value: 100.

100
RegionIdstringYes

The region that you want to query. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

54B48E3D-DF70-471B-AA93-08E683A1B45
Successboolean

Indicates whether the call is successful. Valid values:

  • true
  • false
true
Codestring

The HTTP status codes returned.

200
Messagestring

The response messages.

test
PageSizeinteger

The number of entries per page.

100
PageNumberinteger

The page number.

1
TotalCountinteger

The number of returned entries.

1
RegionIdstring

The ID of the region to which the public IP addresses belong.

cn-hangzhou
PublicIpAddressarray

The range of the public IP addresses of the VPC in the region.

ipAddressstring

The range of the public IP addresses of the VPC in the region.

101.37.XX.XX/24

Examples

Sample success responses

JSONformat

{
  "RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
  "Success": true,
  "Code": "200",
  "Message": "test",
  "PageSize": 100,
  "PageNumber": 1,
  "TotalCount": 1,
  "RegionId": "cn-hangzhou",
  "PublicIpAddress": [
    "101.37.XX.XX/24"
  ]
}

Error codes

HTTP status codeError codeError messageDescription
403ForbiddenUser not authorized to operate on the specified resource.You do not have the permissions to manage the specified resource. Apply for the permissions and try again.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-07-24The Error code has changed. The request parameters of the API has changedView Change Details
2024-03-12The Error code has changedView Change Details
2024-02-26API Description Update. The Error code has changedView Change Details
2023-05-15The Error code has changedView Change Details