All Products
Search
Document Center

Alibaba Cloud DNS:OperateBatchDomain

Last Updated:Jun 03, 2026

Adds or deletes domain names and DNS records in batches.

Operation description

Use this operation for batch DNS tasks that do not require immediate execution.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

alidns:OperateBatchDomain

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Lang

string

No

The response language. Valid values:

  • zh: Chinese

  • en: English

Default value: zh

en

Type

string

Yes

The batch operation type. 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 DNS records that match the conditions specified by Rr, Value, or both. If you do not specify Rr and Value, all DNS records for the specified domain name are deleted.

RR_ADD

DomainRecordInfo

array<object>

Yes

The data for the batch operation.

object

No

Type

string

No

The record type. Examples: A, AAAA, TXT, MX, and CNAME.

Note

This parameter is required when Type is RR_ADD or RR_DEL.

MX

Value

string

No

The record value.

Note

This parameter is required when Type is RR_ADD or RR_DEL.

fd87da3c4528844d45af39200155a905

Ttl

integer

No

The TTL, in seconds. Default value: 600.

600

Domain

string

Yes

The domain name.

Note

A single request can contain up to 200 entries. Exceeding this limit may cause the request to fail due to the HTTP request header size limit.

example.com

Line

string

No

The resolution line. Default value: default.

default

NewRr

string

No

The new host record. This parameter is used only for modification operations and is for internal use only.

mail

Rr

string

No

The host record.

Note

This parameter is required when Type is RR_ADD or RR_DEL.

zhaohui

Priority

integer

No

The MX priority.

This parameter is required if the record type is MX. Default value: 10.

5

NewType

string

No

The new record type. This parameter is used only for modification operations and is for internal use only.

AAAA

NewValue

string

No

The new record value. This parameter is used only for modification operations and is for internal use only.

114.92.XX.XX

Response elements

Element

Type

Description

Example

object

TaskId

integer

The task ID.

34****

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.