Creates a trigger for an application to redeploy the application pods when specific conditions are met.
Operation description
创建触发器仅支持 Pod 的重新部署。
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
cs:CreateTrigger |
create |
*All Resource
|
None | None |
Request syntax
POST /clusters/{cluster_id}/triggers HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| cluster_id |
string |
Yes |
The cluster ID. |
c68deb844dc6d480eb775be611fdf**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| cluster_id |
string |
Yes |
The cluster ID. |
c5cdf7e3938bc4f8eb0e44b21a80f**** |
| project_id |
string |
Yes |
The name of the trigger project. The name consists of the namespace where the application is deployed and the name of the application. The format is Example: |
default/test-app |
| action |
string |
Yes |
The action that the trigger performs. Set the value to redeploy.
|
redeploy |
| type |
string |
No |
The type of trigger. Valid values:
Default value: |
deployment |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| id |
string |
The trigger ID. |
75973497486****** |
| cluster_id |
string |
The ID of the cluster. |
c93095129fc41463aa455d89444fd**** |
| project_id |
string |
The name of the trigger project. |
default/test-app |
| type |
string |
The trigger type. |
deployment |
| action |
string |
The actions performed by the trigger. |
redeploy |
Examples
Success response
JSON format
{
"id": "75973497486******",
"cluster_id": "c93095129fc41463aa455d89444fd****",
"project_id": "default/test-app",
"type": "deployment",
"action": "redeploy"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.