All Products
Search
Document Center

CDN:BatchAddCdnDomain

Last Updated:Jun 10, 2026

Menambahkan hingga 50 nama domain yang dipercepat dalam satu permintaan dengan memanggil operasi BatchAddCdnDomain.

Deskripsi operasi

  • You must enable the CDN service before adding an accelerated domain name. For details, see Enable CDN service.

  • If you select Chinese mainland or Global as the acceleration region, the accelerated domain name must have an ICP filing.

  • You can query up to 50 domain names per call. To query multiple domain names, separate them with a comma (,).

  • Each user can call this operation up to 100 times per hour.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

cdn:BatchAddCdnDomain

create

*Domain

acs:cdn:*:{#accountId}:domain/*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

CdnType

string

Yes

Tipe layanan dari domain yang dipercepat. Nilai valid:

  • web: file kecil dan gambar.

  • download: unduhan file Tingkat Tinggi.

  • video: akselerasi video on demand (VOD).

web

DomainName

string

Yes

Nama domain yang akan ditambahkan ke CDN. Pisahkan beberapa nama domain dengan koma (,).

example.com,aliyundoc.com

ResourceGroupId

string

No

ID kelompok sumber daya. Jika Anda mengosongkan parameter ini, sistem akan secara otomatis menggunakan ID kelompok sumber daya default.

rg-acfmyuji4b6r4**

Sources

string

Yes

Daftar server origin.

[ { "content": "192.0.2.0", "type": "ipaddr", "priority": "20", "port": 80, "weight": "15" } ]

CheckUrl

string

No

URL Pemeriksaan kesehatan.

url

Scope

string

No

Area layanan. Nilai valid:

  • domestic: hanya Tiongkok daratan.

  • overseas: global (tidak termasuk Tiongkok daratan).

  • global: global.

domestic

TopLevelDomain

string

No

Nama domain root, seperti example.com.

example.com

Tabel berikut menjelaskan field di Sources.

ParameterTipeWajibDeskripsi
typeStringYaTipe origin. Nilai valid:
ipaddr: origin alamat IP.
domain: origin nama domain.
oss: origin bucket OSS.
fc_domain: origin Function Compute.
contentStringYaAlamat IP atau nama domain origin.
portIntegerTidakPort origin. Nilai valid: 443 untuk pengambilan origin HTTPS, 80 (default), atau nomor port kustom.
priorityStringTidakPrioritas origin. Nilai valid: 20 untuk origin primer (default) dan 30 untuk origin sekunder.
weightStringTidakBobot origin. Nilai valid: 1 hingga 100. Nilai default: 10.

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The unique request ID.

15C66C7B-671A-4297-9187-2C4477247A74

Contoh

Respons sukses

JSONformat

{
  "RequestId": "15C66C7B-671A-4297-9187-2C4477247A74"
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidDomainName.Malformed Specified DomainName is malformed.
400 MissingParameter The input parameter cdnType that is mandatory for processing this request is not supplied.
400 InvalidCdnType.Malformed Specified CdnType is malformed.
400 InvalidSources.Malformed Specified Sources is malformed.
400 InvalidSourceType.Malformed Specified CdnType is malformed.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid.
400 InvalidTypeAndContent.MissMatch InvalidTypeAndContent.MissMatch
400 InvalidScope.Malformed Specified Scope is malformed.
400 SourceIp.Exceed The Certificate you provided is malformed
400 InvalidCertificate The Certificate you provided is malformed
400 InvalidCertificate.TooLong The Certificate you provided is over the max length
400 InnerAddDomainDenied Your account has not bind aoneId, can not add domain.
400 CheckSourceHealthFailed sources ip or source domain check health failed,please input right source.
400 ExtensiveAndAllBothExist Extensive domain and the domain begins with all. can not exist at the same time.
400 CdnTypeNotSupportExtensiveDomain Extensive domain not supported for this cdn type.
400 ExtensiveAndSpecificDomainConflict The number of wildcard domain names exceeds the limit.
400 InvalidResourceGroupId.Malformed Specified ResourceGroupId is malformed.
400 DomainReserved The root domain of your domain is reserved by another account. Submit a ticket to contact customer support.
400 InvalidDomainNameLevel Domain name suffixed with alicdn.com only support third level.
400 InvalidTopLevelDomain.Malformed Specified TopLevelDomain is malformed.
400 TopLevelDomain.NotFound TopLevelDomain is not exist.
400 EntityNotExists.ResourceGroup The resource group does not exist.
400 EntityNotExist.ResourceGroup The resource group does not exist.
400 InvalidStatus.ResourceGroup It is not allowed to do this operation because of the current status of resource-group.
400 NotInternationRealIdentity You need to do real name authentication when you use Chinese mainland resources.
400 RecordCheckNotAvailable The ICP filing interface is unavailable. Please try again later.
400 IcpBlack The domain is on the ICP blacklist.
400 IspBlack The domain is on the ISP blacklist.
400 DomainOwnerVerifyFail Owner verification of the root domain failed.
400 TopLevelDomain.Mismatch The specified TopLevelDomain does not match webSiteType.
400 DomainOverLimit The maximum number of domains is exceeded.
400 DomainInRiskList The domain you added may be at risk. If you have any questions, please submit a ticket.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.