Modifies a Domain Name System (DNS) record of a zone, including the hostname, record value, and weight value of the DNS record.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
pvtz:UpdateZoneRecord | update | *Zone acs:pvtz::{#accountId}:zone/{#ZoneId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Rr | string | Yes | The hostname. The hostname is the prefix of the subdomain name for zone. Example: www, @, * (used for wildcard DNS resolution), and mail (used for specifying the mail server that receives emails). For example, if you want to resolve the domain name @.exmaple.com, you must set Rr to @ instead of leaving Rr empty. | www |
Lang | string | No | The language of the response. Valid values:
Default value: en. | en |
RecordId | long | Yes | The ID of the DNS record. You can call the DescribeZoneRecords operation to query a list of DNS records. | 172223**** |
Line | string | No | The resolution line. Default value: default. | default |
Weight | integer | No | The weight value of the address. You can set a different weight value for each address. This way, addresses are returned based on the weight values for DNS requests. A weight value must be an integer that ranges from 1 to 100. | 1 |
Type | string | Yes | The type of the DNS record. Valid values:
Note
Before you add a PTR record, you must configure a reverse lookup zone. For more information, see Add PTR records.
| A |
Ttl | integer | No | The TTL period. Valid values: 5, 30, 60, 3600, 43200, and 86400. Unit: seconds. | 60 |
Priority | integer | No | The priority of the MX record. You can set priorities for different email servers. Valid values: 1 to 99. A smaller value indicates a higher priority. Note
This parameter is required if the type of the DNS record is MX.
| 60 |
Value | string | Yes | The record value. You need to enter the record value based on the DNS record type. | 192.16.XX.XX |
UserClientIp | string | No | The IP address of the client. | 127.0.XX.XX |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. | 6447728c8578e66aacf062d2df4446dc |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "250E2C38-D0AD-4518-851D-1C1055805F82",
"RecordId": 0
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|