Creating a PTR Record
Function
Create a PTR record for an elastic IP address (EIP).
Request
- Parameter description
Table 2 Parameters in the request Parameter
Mandatory
Type
Description
ptrdname
Yes
String
Domain name of the PTR record
A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
description
No
String
PTR record description
The value is left blank by default.
ttl
No
Integer
PTR record cache duration (in seconds) on a local DNS server. The longer the duration is, the slower the update takes effect.
If your service address is frequently changed, set TTL to a smaller value.
The value ranges from 1 to 2147483647.
The default value is 300.
tags
No
Array of object
Resource tag. For details, see Table 3.
The value is left blank by default.
Table 3 Description of the tags field Parameter
Mandatory
Type
Description
key
Yes
String
Tag key
A key can contain up to 36 Unicode characters. key must be specified. Equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (\), commas (,), vertical bars (|), and slashes (/) are not allowed. The first and last characters cannot be spaces.
value
No
String
Tag value
Each value can contain a maximum of 43 Unicode characters and can be an empty string. Equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (\), commas (,), vertical bars (|), and slashes (/) are not allowed. The first and last characters cannot be spaces.
- Example request
Create a PTR record for the EIP whose ID is c5504932-bf23-4171-b655-b87a6bc59334:
PATCH https://{DNS_Endpoint}/v2/reverse/floatingips/region_id:c5504932-bf23-4171-b655-b87a6bc59334
{ "ptrdname": "www.example.com", "description": "Description for this PTR record", "ttl": 300, "tags": [ { "key": "key1", "value": "value1" } ] }
Response
- Parameter description
Table 4 Parameters in the response Parameter
Type
Description
id
String
PTR record ID, which is in {region}:{floatingip_id} format
ptrdname
String
Domain name of the PTR record
description
String
PTR record description
ttl
Integer
PTR record cache duration (in seconds) on a local DNS server. The longer the duration is, the slower the update takes effect.
If your service address is frequently changed, set TTL to a smaller value.
The value ranges from 1 to 2147483647.
The default value is 300.
address
String
EIP
status
String
Resource status
For details, see 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
Object
Link to the current resource or other related resources.
When a response is broken into pages, a next link is provided to retrieve all results. For details, see Table 5.
- Example response
{ "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" } }
Returned Value
If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.
For details, see Status Code.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot