Panggil operasi SetDcdnDomainStagingConfig untuk mengatur atau memodifikasi konfigurasi domain di lingkungan staging.
Deskripsi operasi
Frekuensi panggilan untuk satu pengguna dibatasi hingga 30 panggilan per detik.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dcdn:SetDcdnDomainStagingConfig |
update |
*domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DomainName |
string |
Yes |
Nama domain yang dipercepat. Pisahkan beberapa nama domain dengan koma (,). |
example.com |
| Functions |
string |
Yes |
Daftar fitur. Formatnya sebagai berikut:
Jika Anda mengatur parentId ke -1, aturan kondisional yang ada dalam konfigurasi akan dihapus.
"functionName": "Feature Name", "parentId": Opsional. Sesuai dengan configid dari aturan kondisional yang direferensikan. }] Contoh konfigurasi tanpa menggunakan parentId: Parameter permintaan berikut menunjukkan cara menggunakan fungsi origin_request_header untuk menambahkan header ke Permintaan asal:
Contoh konfigurasi menggunakan parentId: Parameter permintaan berikut menunjukkan cara menggunakan fungsi origin_request_header untuk menambahkan header ke Permintaan asal dengan mereferensikan aturan kondisional yang memiliki configid=222728944812032:
Contoh penghapusan referensi parentId dari konfigurasi fitur: Fungsi origin_request_header sudah mereferensikan aturan kondisional dengan configid=222728944812032. Untuk menghapus referensi tersebut, gunakan parameter permintaan berikut: |
[{"functionArgs": [{"argName": "key","argValue": "Content-Encoding"},{"argName": "value","argValue": "gzip"}],"functionName": "set_resp_header"} ] |
Beberapa fitur, seperti edge_function, memungkinkan Anda mengonfigurasi beberapa catatan. Untuk memperbarui catatan tertentu, gunakan ConfigId-nya (bertipe Long) untuk menentukan konfigurasi yang ingin dimodifikasi. Formatnya sebagai berikut:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}]
Deskripsi fitur: Semua nilai parameter diproses sebagai string.
Nama fitur | Parameter |
edge_function: Edge Routine | Parameter wajib: |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
04F0F334-1335-436C-A1D7-6C044FE73368 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidFunctionName.ValueNotSupported | %s | %s |
| 400 | InvalidArgName.ValueNotSupported | %s | The name of the %s parameter is invalid. |
| 400 | InvalidArgValue.Malformed | %s | %s |
| 400 | InvalidRule.Malformed | %s | %s |
| 400 | ConfigurationConflicts | The staging environment has a configuration in effect. You cannot modify the production environment configuration. | The configuration exists in the staging environment. You cannot modify the configuration in the production environment. |
| 400 | GrayConfigExist | A canary configuration already exists under the domain. | The domain name already has configurations in canary release. |
| 400 | InvalidDomain.BelongToConfigGroup | The domain is bound to a configuration group. Modify the domain in the configuration group. | The domain name is associated with a configuration group. To modify the configuration of the domain name, you must modify the configuration group. |
| 400 | EdgeScriptCountExceedLimit | The number of rules exceeds the default limit. | The number of rules exceeds the limit. To increase the limit, submit a ticket. |
| 400 | EdgeScripOptionsHasInnerConfig | The extension has a background configuration or a parameter of this configuration is invalid. For more information, submit a ticket. | The extension has a background configuration or a configured parameter is invalid. For more information, submit a ticket. |
| 400 | EdgeScriptGrammarNotSupport | A background customization rule exists or a parameter of this configuration is invalid. For more information, submit a ticket. | A background custom rule exists or a configured parameter is invalid. For more information, submit a ticket. |
| 400 | EdgeScriptNotSupportJs | JavaScript rules are not supported. For more information, submit a ticket. | JavaScript rules are not supported. For more information, submit a ticket. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.