The UpdateZoneRecord operation modifies a DNS record for a zone. You can change properties such as the host record, record type, and weight.
Operation description
Notes
Modifications to DNS records in standard zones take effect after the Time to Live (TTL) expires. Modifications to DNS records in acceleration regions take effect immediately and are not affected by the TTL.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
pvtz:UpdateZoneRecord |
update |
*Zone
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Rr |
string |
Yes |
The host record. This is the prefix of a domain name. Common examples include www, @, * (for wildcard DNS), and mail (for mailboxes). For example, to resolve @.example.com, set the host record to "@", not an empty string. |
www |
| Lang |
string |
No |
The language of the response. Valid values:
Default value: en |
en |
| RecordId |
integer |
Yes |
The ID of the DNS record. To obtain the ID, call the DescribeZoneRecords operation to query a list of DNS records. |
172223**** |
| Line |
string |
No |
The DNS resolution line. The default value is default. |
default |
| Weight |
integer |
No |
The weight of the record. Valid values are integers from 1 to 100. The default value is 1. You can set different weights for records to return IP addresses in proportion to their weights. |
1 |
| Type |
string |
Yes |
The type of the DNS record. The following types are supported:
Note
Before adding a PTR record, configure a reverse lookup zone. For more information, see Reverse DNS lookup and PTR records |
A |
| Ttl |
integer |
No |
The time to live (TTL) in seconds (s). Valid values: 5, 30, 60, 3600 (1 hour), 43200 (12 hours), and 86400 (1 day). |
60 |
| Priority |
integer |
No |
The priority of the MX record. You can set different priorities for mail servers. Valid values: 1 to 99. A smaller value indicates a higher priority. Note
This parameter is required if the record type is MX. |
1 |
| Value |
string |
Yes |
The record value. Enter a value that corresponds to the record type. |
192.16.XX.XX |
| UserClientIp |
string |
No |
The IP address of the client. |
127.0.XX.XX |
| ClientToken |
string |
No |
A client token that is used to ensure the idempotence of the request. The client generates the value, which must be unique among different requests. The token can contain a maximum of 64 ASCII characters. |
6447728c8578e66aacf062d2df4446dc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The unique ID of the request. |
250E2C38-D0AD-4518-851D-1C1055805F82 |
| RecordId |
integer |
The ID of the DNS record. |
172223**** |
Examples
Success response
JSON format
{
"RequestId": "250E2C38-D0AD-4518-851D-1C1055805F82",
"RecordId": 0
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.