Creating a PTR Record for an EIP
Function
This API is used to create a PTR record for an EIP.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
dns:ptr:create
Write
ptr *
-
- dns:ptr:set
- dns:tag:set
- eip:publicIps:get
- dns:quota:list
-
-
g:RequestTag/<tag-key>
-
g:TagKeys
-
g:EnterpriseProjectId
URI
PATCH /v2/reverse/floatingips/{region}:{floatingip_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
region |
Yes |
String |
Region of the tenant. |
|
floatingip_id |
Yes |
String |
EIP ID. |
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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
ptrdname |
Yes |
String |
The zone of the PTR record |
|
description |
No |
String |
Descriptions about the PTR record |
|
ttl |
No |
Integer |
PTR record caching duration (in seconds) on a local DNS server. The longer the duration is, the slower the update takes effect. The value ranges from 1 to 2147483647. |
|
enterprise_project_id |
No |
String |
ID of the enterprise project associated with the PTR record. The value contains a maximum of 36 characters. The default value is 0. |
|
tags |
No |
Array of tag objects |
Resource tag. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
key |
Yes |
String |
Definition The tag key. Range
|
|
value |
No |
String |
Definition The tag value. Range
|
Response Parameters
Status code: 202
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
PTR record ID, which is in {region}:{floatingip_id} format |
|
ptrdname |
String |
The zone of the PTR record |
|
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. |
|
address |
String |
EIP address. |
|
status |
String |
Resource status. |
|
action |
String |
Requested operation on the resource. The value can be CREATE, UPDATE, DELETE, or NONE. NONE indicates that no operation will be performed. |
|
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 contains a maximum of 36 characters. |
Example Requests
Creating a PTR record for an EIP and setting its TTL to 300s
PATCH https://{endpoint}/v2/reverse/floatingips/{region}:{floatingip_id}
{
"ptrdname" : "www.example.com",
"description" : "Description for this PTR record",
"ttl" : 300,
"tags" : [ {
"key" : "key1",
"value" : "value1"
} ]
}
Example Responses
Status code: 202
Request accepted
{
"id" : "region_id:c5504932-bf23-4171-b655-b87a6bc59334",
"ptrdname" : "www.example.com.",
"description" : "Description for this PTR record",
"address" : "10.154.52.138",
"action" : "CREATE",
"ttl" : 300,
"status" : "PENDING_CREATE",
"links" : {
"self" : "https://Endpoint/v2/reverse/floatingips/region_id:c5504932-bf23-4171-b655-b87a6bc59334"
},
"enterprise_project_id" : 0
}
Status Codes
|
Status Code |
Description |
|---|---|
|
202 |
Request accepted |
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.