获取一个执行所使用的模板,包括内容。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
oos:GetExecutionTemplate |
get |
*Execution
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
否 |
地域 ID |
cn-hangzhou |
| ExecutionId |
string |
是 |
执行 ID |
exec-046490ff88f242 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Content |
string |
模板内容 |
"{\n \"FormatVersion\": \"OOS-2019-06-01\",\n \"Parameters\": {\n \"Status\": {\n \"Type\": \"String\",\n \"Description\": \"(Required) The ID of the ECS instance.\"\n }\n },\n \"Tasks\": [\n {\n \"Name\": \"bar\",\n \"Properties\": {\n \"Parameters\": {\n \"Status\": \"{{ Status }}\"\n },\n \"API\": \"DescribeInstances\",\n \"Service\": \"Ecs\"\n },\n \"Action\": \"acs::ExecuteAPI\",\n \"Outputs\": {\n \"InstanceIds\", {\n \"ValueSelector\": \".Instances.Instance[].InstanceId\",\n \"Type\": \"List\"\n }\n }\n }\n ],\n \"Outputs\": {\n \"InstanceIds\": {\n \"Value\": \" {{ bar.InstanceIds }} \",\n \"Type\": \"List\"\n }\n }\n}\n" |
| RequestId |
string |
请求 ID |
14A60-EBE7-47CA-9757-12C1D47A |
| Template |
object |
模板元信息 |
|
| Hash |
string |
模板内容的 SHA256 |
4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4 |
| UpdatedDate |
string |
模板更新时间 |
2019-05-16T10:26:14Z |
| UpdatedBy |
string |
模板更新者 |
root(13090000) |
| Tags |
object |
标签键及值,键值对数量限制为 1 至 20。 |
{"k1":"k2","k2":"v2"} |
| TemplateName |
string |
模板名称 |
MyTemplate |
| TemplateVersion |
string |
模板版本。以“v”+数字的形式,数字从 1 开始。 |
v1 |
| TemplateFormat |
string |
模板格式。系统字段判断,为 JSON 或 YAML。 |
JSON |
| Description |
string |
模板说明 |
Descirbe instances of given status |
| CreatedBy |
string |
模板创建者 |
root(13090000) |
| CreatedDate |
string |
模板创建时间 |
2019-05-16T10:26:14Z |
| TemplateId |
string |
模板 ID |
t-94753d4d828d38 |
| ShareType |
string |
模板共享类型。目前用户创建的模板的共享类型均为 Private。 |
Private |
示例
正常返回示例
JSON格式
{
"Content": "\"{\\n \\\"FormatVersion\\\": \\\"OOS-2019-06-01\\\",\\n \\\"Parameters\\\": {\\n \\\"Status\\\": {\\n \\\"Type\\\": \\\"String\\\",\\n \\\"Description\\\": \\\"(Required) The ID of the ECS instance.\\\"\\n }\\n },\\n \\\"Tasks\\\": [\\n {\\n \\\"Name\\\": \\\"bar\\\",\\n \\\"Properties\\\": {\\n \\\"Parameters\\\": {\\n \\\"Status\\\": \\\"{{ Status }}\\\"\\n },\\n \\\"API\\\": \\\"DescribeInstances\\\",\\n \\\"Service\\\": \\\"Ecs\\\"\\n },\\n \\\"Action\\\": \\\"acs::ExecuteAPI\\\",\\n \\\"Outputs\\\": {\\n \\\"InstanceIds\\\", {\\n \\\"ValueSelector\\\": \\\".Instances.Instance[].InstanceId\\\",\\n \\\"Type\\\": \\\"List\\\"\\n }\\n }\\n }\\n ],\\n \\\"Outputs\\\": {\\n \\\"InstanceIds\\\": {\\n \\\"Value\\\": \\\" {{ bar.InstanceIds }} \\\",\\n \\\"Type\\\": \\\"List\\\"\\n }\\n }\\n}\\n\"",
"RequestId": "14A60-EBE7-47CA-9757-12C1D47A",
"Template": {
"Hash": "4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4",
"UpdatedDate": "2019-05-16T10:26:14Z",
"UpdatedBy": "root(13090000)",
"Tags": {
"k1": "k2",
"k2": "v2"
},
"TemplateName": "MyTemplate",
"TemplateVersion": "v1",
"TemplateFormat": "JSON",
"Description": "Descirbe instances of given status",
"CreatedBy": "root(13090000)",
"CreatedDate": "2019-05-16T10:26:14Z",
"TemplateId": "t-94753d4d828d38",
"ShareType": "Private"
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。