调用DescribeTrigger查询指定的触发器。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求语法
GET /clusters/[cluster_id]/triggers?Namespace=String&Type=String&Name=String&action=String HTTP/1.1
Content-Type:application/json
请求参数
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
cluster_id | String | 是 | c5cdf7e3938bc4f8eb0e44b21a80f**** |
集群ID。 |
参数名称 | 类型 | 是否必选 | 示例 | 说明 |
---|---|---|---|---|
Namespace | String | 是 | default |
应用所属命名空间。 |
Type | String | 否 | deployment |
触发器类型。取值:
默认值: 当不指定触发器类型时,查询结果将不过滤触发器类型。 |
Name | String | 是 | web-server |
应用名称。 |
action | String | 否 | redeploy |
触发器行为,取值:
当不指定触发器行为时,查询结果将不过滤触发器行为。 |
响应体语法
HTTP/1.1 200 OK
Content-Type:application/json
[ {
"id" : "String",
"name" : "String",
"cluster_id" : "String",
"project_id" : "String",
"type" : "String",
"action" : "String",
"token" : "String"
} ]
响应参数
参数名称 | 类型 | 示例 | 说明 |
---|---|---|---|
Array of trigger_info |
触发器查询结果详情列表。 |
||
id | String | 1234 |
触发器ID。 |
name | String | test |
触发器名称。 |
cluster_id | String | c259f563386444ebb8d7**** |
集群ID。 |
project_id | String | default/test-app |
触发器项目名称。 由应用所在命名空间及应用名称组成,格式为 |
type | String | deployment |
触发器类型。 取值:
默认值: |
action | String | redeploy |
触发器行为,取值:
|
token | String | eyJhbGci*** |
Token信息。 |
查询触发器示例
请求示例
GET /clusters/[cluster_id]/triggers?Namespace=default&Type=deployment&Name=web-server&action=redeploy HTTP/1.1
Host:cs.aliyuncs.com
Content-Type:application/json
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeTriggerResponse>
<id>1234</id>
<name>test</name>
<cluster_id>c259f563386444ebb8d7****</cluster_id>
<project_id>default/test-app</project_id>
<type>deployment</type>
<action>redeploy</action>
<token>eyJhbGci***</token>
</DescribeTriggerResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
[ {
"id" : "1234",
"name" : "test",
"cluster_id" : "c259f563386444ebb8d7****",
"project_id" : "default/test-app",
"type" : "deployment",
"action" : "redeploy",
"token" : "eyJhbGci***"
} ]
错误码
访问错误中心查看更多错误码。