Adds or deletes domain names and Domain Name System (DNS) records in batches.
Operation description
Scenario: You need to execute a large number of tasks related to DNS resolution and you do not have high requirements for efficiency.
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:
- For mandatory resource types, indicate with a prefix of * .
- 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 |
---|---|---|---|---|
alidns:OperateBatchDomain | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language of the response. Valid values:
Default value: zh | en |
Type | string | Yes | The type of the batch operation. Valid values:
| RR_ADD |
DomainRecordInfo | array<object> | Yes | The DNS records. You can submit up to 1,000 DNS records. | |
object | Yes | |||
Type | string | No | The type of the DNS record. Valid values: A, AAAA, TXT, MX, and CNAME. Note
This parameter is required if you set Type to RR_ADD or RR_DEL.
| MX |
Value | string | No | The value of the DNS record. Note
This parameter is required if you set Type to RR_ADD or RR_DEL.
| fd87da3c4528844d45af39200155a905 |
Ttl | integer | No | The time-to-live (TTL) value of the cached DNS record. Unit: seconds. Default value: 600. | 600 |
Domain | string | Yes | The domain name. Note
You can submit 1 to 1,000 domain names. Due to the limit on the length of HTTP request headers, excessive domain names are ignored. Do not enter more than 1,000 domain names.
| example.com |
Line | string | No | The DNS request source. Default value: default. | default |
NewRr | string | No | The new hostname (used only for modification operations, not for external users). | |
Rr | string | No | The hostname. Note
This parameter is required if you set Type to RR_ADD or RR_DEL.
| zhaohui |
Priority | integer | No | The priority of the mail exchanger (MX) record. This parameter is required if the type of the DNS record is MX. Default value: 10. | 5 |
NewType | string | No | The new type of the DNS record (used only for modification operations, not for external users). | AAAA |
NewValue | string | No | The new value of the DNS record (used only for modification operations, not for external users). | 114.92.XX.XX |
Response parameters
Examples
Sample success responses
JSON
format
{
"TaskId": 345345,
"RequestId": "75446CC1-FC9A-4595-8D96-089D73D7A63D"
}
Error codes
For a list of error codes, visit the Service error codes.