Mengatur atau mengubah konfigurasi domain di lingkungan rilis canary.
Deskripsi operasi
Usage notes
Obtain an accelerated domain name. You can then call this operation to set or modify domain name configurations in the staging environment. For more information, see Functions format description.
QPS limit
This operation is limited to 30 queries per second (QPS) per user. API calls that exceed this limit are throttled, which may affect your business. For more information, see QPS limits.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
live:SetLiveDomainStagingConfig |
update |
*Domain
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah. |
cn-shanghai |
| DomainName |
string |
Yes |
Nama domain yang dipercepat. |
developer.aliyundoc.com |
| Functions |
string |
Yes |
Daftar fitur. Tentukan ConfigId hanya saat Anda mengubah konfigurasi. Untuk informasi lebih lanjut, lihat Deskripsi format Functions. |
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}] |
Deskripsi format Functions
-
Untuk mengatur konfigurasi, lihat contoh berikut:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"xxx"}],"functionName":"edge_function"}] -
Untuk mengubah konfigurasi, tentukan item konfigurasi menggunakan parameter ConfigId, yang bertipe data Long. Lihat contoh berikut:
[{"functionArgs":[{"argName":"enable","argValue":"on"},{"argName":"pri","argValue":"1"},{"argName":"rule","argValue":"yyy"}],"ConfigId":123456,"functionName":"edge_function"}]
Catatan: Semua nilai parameter berupa string.
| Nama fitur | Parameter wajib | Parameter opsional |
| edge_function: Edge Routine. | - rule: Aturan DSL. - pri: Prioritas. - enable: Apakah akan mengaktifkan aturan. Nilai valid: on dan off. | - name: Nama aturan. - pos: Posisi tempat aturan dieksekusi. - brk: Apakah akan melewatkan aturan yang tersisa di posisi eksekusi saat ini setelah aturan saat ini terpicu. - option: Kontrol opsi. - grammar: Kontrol tata bahasa. Nilai valid: empty, es2, dan js. - jsmode: Kontrol daftar putih Nama domain JavaScript. Nilai valid: redirect dan bypass. |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
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 | ConfigurationConflicts | The staging environment has a configuration in effect. You cannot modify the production environment configuration. | |
| 400 | InvalidDomain.BelongToConfigGroup | The domain is bound to a configuration group. Modify the domain in the configuration group. | |
| 400 | InvalidFunctionName.ValueNotSupported | %s, please check and try again later. | |
| 400 | InvalidArgName.ValueNotSupported | %s, please check and try again later. | |
| 400 | InvalidArgValue.Malformed | %s, please check and try again later. | |
| 400 | InvalidRule.Malformed | %s, please check and try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.