All Products
Search
Document Center

Alibaba Cloud DNS:OperateBatchDomain

Last Updated:Dec 03, 2025

Performs batch operations to add or delete domain names and DNS records.

Operation description

You can use this operation to perform multiple DNS tasks when immediate execution is not required.

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 language of the response. Valid values:

  • zh: Chinese

  • en: English

Default value: zh

en

Type

string

Yes

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 records that match the N.RR, N.VALUE, or both N.RR and N.VALUE conditions. If you do not specify N.RR and N.VALUE, all DNS records for the domain specified in DomainRecordInfo.N.Domain are deleted.

RR_ADD

DomainRecordInfo

array<object>

Yes

The data to submit. You can submit a maximum of 1,000 entries.

object

No

Type

string

No

The record type, such as A, AAAA, TXT, MX, and CNAME.

Note

This parameter is required if the Type parameter is set to RR_ADD or RR_DEL.

MX

Value

string

No

The record value.

Note

This parameter is required if the Type parameter is set to RR_ADD or RR_DEL.

fd87da3c4528844d45af39200155a905

Ttl

integer

No

The time to live (TTL) in seconds. The default value is 600.

600

Domain

string

Yes

The domain name.

Note

You can submit up to 1,000 data entries, where N starts from 1. Due to limitations on HTTP request header size, entries that exceed the 1,000 limit are ignored. Do not submit more than 1,000 entries.

example.com

Line

string

No

The DNS resolution line. The default value is default.

default

NewRr

string

No

The new host record. This parameter is used only for modification operations and is not available to external users.

mail

Rr

string

No

The host record.

Note

This parameter is required if the Type parameter is set to RR_ADD or RR_DEL.

zhaohui

Priority

integer

No

The priority of the MX record.

This parameter is required if the record type is MX. The default value is 10.

5

NewType

string

No

The new record type. This parameter is used only for modification operations and is not available to external users.

AAAA

NewValue

string

No

The new record value. This parameter is used only for modification operations and is not available to external users.

114.92.XX.XX

Response elements

Element

Type

Description

Example

object

TaskId

integer

The task ID.

34****

RequestId

string

The unique ID of the request.

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.