All Products
Search
Document Center

Virtual Private Cloud:DescribePublicIpAddress

Last Updated:Dec 02, 2023

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.

debugging

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.

string

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
2023-05-15The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 403 change