Menambahkan nama domain yang dipercepat. Untuk menambahkan nama domain yang dipercepat, panggil operasi `AddCdnDomain`.
Deskripsi operasi
-
Before adding an accelerated domain name, activate the CDN service. For details, see Activate CDN service.
-
If the acceleration region is set to Chinese mainland only or global, the accelerated domain name must have a valid ICP filing.
-
You can add only one accelerated domain name at a time. By default, each user can add up to 50 accelerated domain names. To add more, submit a request in Quota Center.
-
Each user can call this API up to 100 times per hour.
Notes
After adding a domain name using the API, allow 3 to 5 minutes for it to take effect. Wait until the domain status is
onlinebefore applying any further configurations.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cdn:AddCdnDomain |
create |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| CdnType |
string |
Yes |
Tipe bisnis nama domain. Nilai valid:
Valid values:
|
web |
| DomainName |
string |
Yes |
Nama domain yang ingin Anda tambahkan ke CDN. Nama domain wildcard didukung. Nama domain wildcard harus diawali dengan tanda periode (.), misalnya, .example.com. |
.example.com |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. Jika Anda tidak menentukan parameter ini, sistem akan otomatis menggunakan ID kelompok sumber daya default. |
rg-acfmyuji4b6r4** |
| Sources |
string |
Yes |
Alamat server asal. |
[ { "content": "192.0.2.0", "type": "ipaddr", "priority": "20", "port": 80, "weight": "15" } ] |
| CheckUrl |
string |
No |
URL Pemeriksaan kesehatan. |
www.example.com/test.html |
| Scope |
string |
No |
Wilayah akselerasi. Nilai valid:
|
domestic |
| TopLevelDomain |
string |
No |
Domain tingkat atas. |
example.com |
| Tag |
array<object> |
No |
Tag. Anda dapat menentukan hingga 20 tag. |
|
|
object |
No |
|||
| Key |
string |
No |
The key of the tag. |
env |
| Value |
string |
No |
The value of the tag. |
value |
Tabel berikut menjelaskan bidang untuk parameter Sources.
| Parameter | Tipe | Wajib | Deskripsi |
| type | String | Ya | Tipe asal. Nilai valid:ipaddr: alamat IP.domain: nama domain.oss: bucket OSS.fc_domain: layanan Function Compute. |
| content | String | Ya | Alamat asal. Dapat berupa alamat IP atau nama domain. |
| port | Integer | Tidak | Port server asal. Anda dapat menentukan port 80, port kustom, atau port 443 untuk back-to-origin HTTPS. Nilai default adalah 80. |
| priority | String | Tidak | Prioritas asal. Nilai valid adalah 20 (asal primer) dan 30 (asal sekunder). Nilai default adalah 20. |
| weight | String | Tidak | Bobot back-to-origin. Nilainya harus berupa integer dari 1 hingga 100. Nilai default adalah 10. |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The 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 | The specified source type does not match the specified source content. | |
| 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 | Abs.CheckUrl.Malformed | The CheckUrl you provided is malformed. | |
| 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 | DomainInBlacklist | The domain is in the blacklist. | |
| 400 | InvalidTagKey | The specified TagKey is invalid. | |
| 400 | InvalidTagValue | The specified TagValue is invalid. | |
| 400 | InvalidTagKey.Repeated | The specified TagKey is duplicated. | |
| 400 | InvalidTag | The specified Tag is Invalid. | |
| 400 | InvalidTagKey.OverLimit | The number of Tag can not over limit 20. | |
| 400 | SourceInBlacklist | Source is in the blacklist. | |
| 400 | ReservedTagKey | The tag key is used internally as a reserved field and is not allowed to be used. | |
| 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. | |
| 400 | RegionNoResource | Resource allocation failed. Please submit a work order to contact customer service. | |
| 403 | AccountException | Account exception. Please open ticket to make an appeal. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.