Mengonfigurasi pemicu untuk aplikasi kluster agar melakukan redeploy Pod ketika kondisi tertentu terpenuhi.
Deskripsi operasi
Membuat pemicu hanya mendukung redeploy Pod.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:CreateTrigger |
create |
*全部资源
|
None | None |
Sintaks permintaan
POST /clusters/{cluster_id}/triggers HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| cluster_id |
string |
Yes |
ID kluster. |
c68deb844dc6d480eb775be611fdf**** |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Parameter badan permintaan. |
|
| cluster_id |
string |
Yes |
ID kluster. |
c5cdf7e3938bc4f8eb0e44b21a80f**** |
| project_id |
string |
Yes |
Nama proyek pemicu. Terdiri dari namespace dan nama aplikasi tempat aplikasi berada, dalam format Nilai contoh: |
default/test-app |
| action |
string |
Yes |
Aksi pemicu. Nilai valid:
|
redeploy |
| type |
string |
No |
Tipe pemicu. Nilai valid:
Nilai default: |
deployment |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Badan respons. |
||
| id |
string |
ID pemicu. |
75973497486****** |
| cluster_id |
string |
ID kluster. |
c93095129fc41463aa455d89444fd**** |
| project_id |
string |
Nama proyek pemicu. |
default/test-app |
| type |
string |
Tipe pemicu. |
deployment |
| action |
string |
Aksi pemicu. |
redeploy |
Contoh
Respons sukses
JSONformat
{
"id": "75973497486******",
"cluster_id": "c93095129fc41463aa455d89444fd****",
"project_id": "default/test-app",
"type": "deployment",
"action": "redeploy"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.