Mengambil konfigurasi nama domain yang dipercepat. Anda dapat mengkueri konfigurasi beberapa fitur dalam satu panggilan.
Deskripsi operasi
The throttling limit for a single user is 100 calls per second.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cdn:DescribeCdnDomainConfigs |
get |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
Yes |
Nama domain yang dipercepat. Anda hanya dapat mengkueri satu nama domain pada satu pengatur waktu. |
example.com |
| FunctionNames |
string |
No |
Nama fitur. Pisahkan beberapa nama fitur dengan koma (,). Untuk informasi selengkapnya tentang nama fitur, lihat Parameter untuk konfigurasi nama domain. |
aliauth |
| ConfigId |
string |
No |
ID konfigurasi fitur. Untuk informasi selengkapnya tentang cara mengkueri dan menggunakan ConfigId, lihat Penggunaan ConfigId. |
6295 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
C80705BF-0F76-41FA-BAD1-5B59296A4E59 |
| DomainConfigs |
object |
||
| DomainConfig |
array<object> |
The domain name configurations. |
|
|
array<object> |
|||
| Status |
string |
The status of the configuration. Valid values:
|
success |
| ParentId |
string |
The ID of the rule condition. This parameter is optional. You can create a rule condition by configuring the condition feature (rules engine) in Parameters for domain name configurations. A rule condition can match and filter user requests by detecting various parameters in the requests. After a rule condition is created, a corresponding ConfigId is generated. The ConfigId can be referenced by other features as the ParentId parameter. This way, you can combine rule conditions and feature configurations to create more flexible configurations. For more information about the configuration procedure, see Configure domain names in batches or the ParentId configuration example in this topic. |
222728944812032 |
| ConfigId |
string |
The configuration ID. |
6295 |
| FunctionName |
string |
The name of the feature. |
aliauth |
| FunctionArgs |
object |
||
| FunctionArg |
array<object> |
The parameter settings for each feature. |
|
|
object |
|||
| ArgName |
string |
The parameter name. This is a configuration item of functionName. You can configure multiple configuration items. |
auth_type |
| ArgValue |
string |
The parameter value. This is the value of the configuration item for functionName. |
req_auth |
Contoh konfigurasi ParentId
Jika parentId disetel ke -1, kondisi aturan yang ada dalam konfigurasi akan dihapus.
"functionArgs": [{
"argName": "Parameter fitur A",
"argValue": "Nilai parameter fitur A"
},
{
"argName": "Parameter fitur B",
"argValue": "Nilai parameter fitur B"
}],
"functionName": "Nama fitur",
"parentId": "Opsional. configid dari kondisi aturan yang dirujuk."
}]
Contoh berikut menunjukkan cara menggunakan fitur origin_request_header untuk menambahkan header permintaan HTTP origin fetch tanpa menggunakan parentId. Parameter permintaan adalah sebagai berikut:
"functionArgs": [{
"argName": "header_operation_type",
"argValue": "add"
}, {
"argName": "header_name",
"argValue": "Accept-Encoding"
}, {
"argName": "header_value",
"argValue": "gzip"
}, {
"argName": "duplicate",
"argValue": "off"
}],
"functionName": "origin_request_header"
}]
Contoh berikut menunjukkan konfigurasi yang menggunakan parentId. Dalam contoh ini, fitur origin_request_header digunakan untuk menambahkan header permintaan HTTP origin fetch dan merujuk kondisi aturan dengan configid 222728944812032. Parameter permintaan adalah sebagai berikut:
"functionArgs": [{
"argName": "header_operation_type",
"argValue": "add"
}, {
"argName": "header_name",
"argValue": "Accept-Encoding"
}, {
"argName": "header_value",
"argValue": "gzip"
}, {
"argName": "duplicate",
"argValue": "off"
}],
"functionName": "origin_request_header",
"parentId": "222728944812032"
}]
```.
Contoh
Respons sukses
JSONformat
{
"RequestId": "C80705BF-0F76-41FA-BAD1-5B59296A4E59",
"DomainConfigs": {
"DomainConfig": [
{
"Status": "success",
"ParentId": "222728944812032",
"ConfigId": "6295",
"FunctionName": "aliauth",
"FunctionArgs": {
"FunctionArg": [
{
"ArgName": "auth_type",
"ArgValue": "req_auth"
}
]
}
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Invalid%s.ValueNotSupported | FunctionName [%s] is not supported. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.