Querying PTR Records of an EIP
Function
This API is used to query PTR records of an EIP.
Calling Method
For details, see Calling APIs.
URI
GET /v2.1/ptrs
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
marker |
No |
String |
Start resource ID at the beginning for paginagtion query. If the parameter is left blank, only resources on the first page are queried. It is left blank by default. |
|
limit |
No |
Integer |
The number of records returned on each page during pagination query. The value ranges from 0 to 500. Commonly used values are 10, 20, and 50. The default value is 500. |
|
offset |
No |
Integer |
The offset of pagination query. It specifies the number of rows or records to skip from the beginning of the result set before retrieving the desired data. Range: 0 to 2147483647 Default value: 0 If marker is not left blank, the query starts from the resource specified by marker and the offset does not take effect. |
|
enterprise_project_id |
No |
String |
ID of the enterprise project associated with the PTR record. The value can contain a maximum of 36 characters. |
|
tags |
No |
String |
Resource tag. The format is as follows: key1,value1|key2,value2. Multiple tags are separated by vertical bar (|). The key and value of each tag are separated by comma (,). |
|
status |
No |
String |
Resource status |
|
resource_type |
No |
String |
EIP type. Value options: publicip: EIP |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition The user token. The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. For details about how to obtain a user token, seeObtaining a User Token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
floatingips |
Array of FloatingIpsPtr objects |
PTR record list |
|
links |
pageLink object |
Definition The link to the current page or other pages. When a response is broken into pages, a next link is provided to point to the next page. Range N/A |
|
metadata |
metadata object |
Number of resources that meet the query condition. |
|
Parameter |
Type |
Description |
|---|---|---|
|
ptrdnames |
Array of strings |
List of domain names of the PTR record. A maximum of 10 domain names are allowed. |
|
id |
String |
PTR record ID |
|
publicip |
PublicIpRes object |
EIP |
|
description |
String |
Descriptions about the PTR record |
|
ttl |
Integer |
PTR record caching duration (in seconds) on a local DNS server. The longer the duration is, the slower the update takes effect. |
|
status |
String |
Resource status |
|
links |
pageLink object |
Definition The link to the current page or other pages. When a response is broken into pages, a next link is provided to point to the next page. Range N/A |
|
enterprise_project_id |
String |
ID of the enterprise project associated with the PTR record. The value can contain a maximum of 36 characters. |
|
tags |
Array of tag objects |
Resource tag |
|
Parameter |
Type |
Description |
|---|---|---|
|
region |
String |
Region to which the EIP belongs |
|
id |
String |
EIP ID |
|
address |
String |
EIP |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Definition The tag key. Range
|
|
value |
String |
Definition The tag value. Range
|
|
Parameter |
Type |
Description |
|---|---|---|
|
self |
String |
Definition The link to the current page. Range N/A |
|
next |
String |
Definition The link to the next page. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
total_count |
Integer |
Definition Number of resources that meet the filter criteria. The number is irrelevant to limit or offset. Range N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code Range N/A |
|
message |
String |
Definition Error description Range N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code Range N/A |
|
message |
String |
Definition Error description Range N/A |
Example Requests
Querying PTR records of an EIP
GET https://{endpoint}/v2.1/ptrs
Example Responses
Status code: 200
Successful request
{
"floatingips" : [ {
"ptrdnames" : [ "www.example.com.", "mail.example.com." ],
"id" : "9a175b97889f2f3501889fa3a8a66ed0",
"publicip" : {
"region" : "xxx",
"id" : "a1645603-9814-44f9-ba19-1c565af9eb81",
"address" : "215.255.1.80"
},
"ttl" : 300,
"status" : "ACTIVE",
"links" : {
"self" : "https://Endpoint/v2.1/ptrs/9a175b97889f2f3501889fa3a8a66ed0"
},
"enterprise_project_id" : 0,
"tags" : [ {
"key" : "key1",
"value" : "value1"
} ]
} ],
"links" : {
"self" : "https://Endpoint/v2.1/ptrs"
},
"metadata" : {
"total_count" : 1
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful request |
|
400 |
Request error |
|
500 |
Request error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.