全部产品
Search
文档中心

Edge Security Acceleration:AddDcdnDomain

更新时间:Dec 14, 2025

Menambahkan nama domain ke DCDN.

Deskripsi operasi

  • Sebelum menambahkan nama domain, Anda harus mengaktifkan layanan DCDN. Untuk informasi selengkapnya, lihat OpenDcdnService.

  • Nama domain harus memiliki Pendaftaran ICP.

  • Saat pertama kali menambahkan nama domain ke Alibaba Cloud DCDN, Anda harus memverifikasi kepemilikannya. Untuk informasi selengkapnya, lihat VerifyDcdnDomainOwner.

  • Anda hanya dapat menambahkan satu nama domain yang dipercepat per permintaan. Setiap akun dapat memiliki maksimal 50 nama domain.

  • Jika server origin Anda tidak di-hosting di Alibaba Cloud, kontennya akan ditinjau. Proses peninjauan biasanya selesai dalam satu hari kerja.

  • Batas throttling untuk satu akun adalah 30 transaksi per detik (TPS).

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

dcdn:AddDcdnDomain

create

*Domain

acs:dcdn:*:{#accountId}:domain/{#DomainName}

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DomainName

string

Yes

Nama domain yang dipercepat yang ingin Anda tambahkan. Anda hanya dapat menambahkan satu nama domain per permintaan.

Nama domain wildcard didukung. Nama domain wildcard harus diawali dengan titik (.), misalnya .example.com.

example.com

ResourceGroupId

string

No

ID kelompok sumber daya. Jika Anda tidak menentukan parameter ini, sistem akan menggunakan ID kelompok sumber daya default.

rg-acfmyuji4b6r4**

Sources

string

No

Daftar alamat origin.

[{"content":"10.10.10.10","type":"ipaddr","priority":"20","port":80}]

CheckUrl

string

No

URL Pemeriksaan kesehatan.

www.example.com/test.html

Scope

string

No

Wilayah akselerasi. Nilai yang valid:

  • domestic: hanya Daratan Tiongkok.

  • overseas: global (tidak termasuk Daratan Tiongkok).

  • global: global.

Nilai default: domestic.

domestic

TopLevelDomain

string

No

Domain tingkat atas.

yourTopLevelDomain

Tag

array<object>

No

Tag. Anda dapat menentukan maksimal 20 tag.

object

No

Key

string

No

Kunci tag.

env

Value

string

No

Nilai tag.

value

Scene

string

No

Skenario akselerasi. Nilai yang valid:

  • apiscene: akselerasi API.

  • webservicescene: akselerasi website.

  • staticscene: akselerasi untuk file video, citra, dan teks.

  • (empty): tanpa skenario.

apiscene

FunctionType

string

No

Jenis layanan komputasi. Nilai yang valid:

  • routine: program.

  • image: citra.

  • cloudFunction: fungsi.

routine

Tabel berikut menjelaskan bidang-bidang dalam parameter Sources.

ParameterTypeRequiredDescription
typeStringYesJenis server origin. Nilai yang valid: ipaddr untuk alamat IP, domain untuk nama domain, dan oss untuk Bucket OSS.
contentStringYesAlamat server origin. Ini bisa berupa alamat IP atau nama domain.
portIntegerNoPort. Anda dapat menentukan port 443 atau 80, atau port kustom. Nilai default adalah 80. Port 443 digunakan untuk pengambilan asal HTTPS.
priorityStringNoPrioritas server origin. Nilai yang valid adalah 20 dan 30. Nilai default adalah 20. Nilai 20 menunjukkan server asal utama, dan nilai 30 menunjukkan server asal sekunder.
weightStringNoBobot untuk pengambilan asal. Nilainya harus kurang dari 100. Nilai default adalah 10.

Elemen respons

Element

Type

Description

Example

object

RequestId

string

ID permintaan.

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 The specified DomainName is invalid. The specified domain name is invalid.
400 InvalidSource.Content.Malformed The specified Source Content is invalid. The information about the origin server is invalid.
400 MissingSource.Content The Source Content must be specified. No value is specified for the content field in the Sources parameter.
400 MissingSource.Type The Source Type must be specified. No value is specified for the type field in the Sources parameter.
400 InvalidSource.Type.Malformed The specified Source Type is invalid. The value specified for the type field in the Sources parameter is invalid.
400 InvalidSource.Priority.Malformed The specified Source Priority is invalid. The value specified for the priority field in the Sources parameter is invalid.
400 InvalidScope.Malformed The specified Scope is invalid. The value specified for the Scope parameter is invalid.
400 SourceIp.Exceed The maximum number of back-to-origin IP addresses is exceeded. The number of origin IP addresses exceeds the upper limit.
400 InvalidCertificate The specified certificate format is invalid. The format of the specified certificate is invalid.
400 InvalidCertificate.TooLong The maximum length of the certificate is exceeded. The maximum length of the specified certificate content has been reached.
400 CheckSourceHealthFailed Error checking the security. Provide the valid origin site information. The origin check failed. Please provide the correct origin information.
400 ExtensiveAndAllBothExist A wildcard domain name and a domain name with an all. prefix cannot be both specified. Wildcard domain names and domain names that start with "all." cannot both exist.
400 CdnTypeNotSupportExtensiveDomain Wildcard domain names are not supported. Wildcard domain names are not supported.
400 ExtensiveAndSpecificDomainConflict The wildcard domain name overlaps a domain name at the same level. Wildcard domain names and specific domain names of the same level as the wildcard domain names are mutually exclusive. Enter another domain name.
400 InvalidResourceGroupId.Malformed The specified ResourceGroupId is invalid. The value specified for the ResourceGroupId parameter is invalid. Specify a valid value and try again.
400 DomainReserved The root domain of your domain is reserved by another account. Submit a ticket to contact customer support. The root domain name of this domain name is used by another account. Submit a ticket to apply for new domain names.
400 InvalidDomainNameLevel The alicdn.com domain supports a maximum of three levels of domain. alicdn.com supports up to three domain levels for wildcard domain names.
400 EntityNotExists.ResourceGroup The resource group does not exist. The specified resource group does not exist.
400 InvalidStatus.ResourceGroup The current status of the resource group does not support this operation. This operation is not supported while the resource group is in the current state.
400 NotInternationRealIdentity Real-name registration is required for services offered in Mainland China. You have not passed real-name verification. According to the regulations issued by MIIT, you must pass real-name verification if you want to purchase information services in the Chinese mainland.
400 TopLevelDomain.NotFound The specified TopLevelDomain does not exist. The specified top-level domain name does not exist.
400 RecordCheckNotAvailable The ICP filing interface is unavailable. Please try again later. The operation for ICP filing is unavailable. Try again later.
400 IcpBlack The domain is on the ICP blacklist. The domain name is on the blacklist of the MIIT.
400 IspBlack The domain is on the ISP blacklist. The domain name is on the blacklist of Alibaba Cloud.
400 InvalidCheckUrl.Malformed The specified CheckUrl is invalid. The CheckUrl parameter is set to an invalid value.
400 DomainOwnerVerifyFail Owner verification of the root domain failed. The first time a domain name is added to DCDN, you must prove the ownership of the domain name. You must add a DNS record or upload a verification file for the domain name before it can be added to DCDN.
400 TopLevelDomain.Mismatch The specified TopLevelDomain does not match webSiteType. The top-level domain name does not match the domain name type.
400 DomainInBlacklist The domain is in the blacklist. The domain name is in the blacklist.
400 DomainOverLimit The maximum number of domains is exceeded. The maximum number of domain names has been reached.
400 SourceInBlacklist Source is in the blacklist. The origin server is in the blacklist.
400 InvalidTagKey The key should not be null, start with "acs:" or "aliyun", contain "http://" or "https://" or have special symbols:.!@#$%?/^&*)(+={}[]",'<>~·`?;.
400 InvalidTagValue The tag value cannot contain these special symbols:http://, https://
400 ReservedTagKey The tag key is used internally as a reserved field and is not allowed to be used.
400 InvalidFunctionType.Malformed The specified FunctionType is invalid.
400 InvalidfunctionType.Malformed FunctionType is malformed.
400 DomainInRiskList The domain you added may be at risk. If you have any questions, please submit a ticket. The domain name you added may be at risk. If you have any questions, please submit a work order.
400 RegionNoResource Resource allocation failed. Please submit a work order to contact customer service. Resource allocation failed. Please submit a work order to contact customer service.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.