All Products
Search
Document Center

Alibaba Cloud DNS:OperateBatchDomain

Last Updated:Apr 21, 2025

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

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
alidns:OperateBatchDomain
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
LangstringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English

Default value: zh

en
TypestringYes

The type of the batch operation. Valid values:

  • DOMAIN_ADD: adds domain names in batches.
  • DOMAIN_DEL: deletes domain names in batches.
  • RR_ADD: adds DNS records in batches.
  • RR_DEL: deletes DNS records in batches. This operation deletes the DNS records with the specified hostname or record value. If you do not specify the Rr and Value parameters, this operation deletes the DNS records that are added for the specified domain names.
RR_ADD
DomainRecordInfoarray<object>Yes

The DNS records. You can submit up to 1,000 DNS records.

objectYes
TypestringNo

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
ValuestringNo

The value of the DNS record.

Note This parameter is required if you set Type to RR_ADD or RR_DEL.
fd87da3c4528844d45af39200155a905
TtlintegerNo

The time-to-live (TTL) value of the cached DNS record. Unit: seconds. Default value: 600.

600
DomainstringYes

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
LinestringNo

The DNS request source. Default value: default.

default
NewRrstringNo

The new hostname (used only for modification operations, not for external users).

mail
RrstringNo

The hostname.

Note This parameter is required if you set Type to RR_ADD or RR_DEL.
zhaohui
PriorityintegerNo

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
NewTypestringNo

The new type of the DNS record (used only for modification operations, not for external users).

AAAA
NewValuestringNo

The new value of the DNS record (used only for modification operations, not for external users).

114.92.XX.XX

Response parameters

ParameterTypeDescriptionExample
object
TaskIdlong

The task ID.

345345
RequestIdstring

The request ID.

75446CC1-FC9A-4595-8D96-089D73D7A63D

Examples

Sample success responses

JSONformat

{
  "TaskId": 345345,
  "RequestId": "75446CC1-FC9A-4595-8D96-089D73D7A63D"
}

Error codes

For a list of error codes, visit the Service error codes.