Submits a batch operation task to add or delete multiple domain names or multiple Domain Name System (DNS) records at a time.
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:
- 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 |
---|---|---|---|---|
alidns:OperateBatchDomain |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Lang | string | No | The language. | en |
Type | string | Yes | The type of the batch operation. Valid values:
| RR_ADD |
DomainRecordInfo | array<object> | Yes | The Domain Name System (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 record value. 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 |
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 |
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.