Queries the information about the template of an execution, including the content of the template.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:GetExecutionTemplate |
get |
*Execution
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The ID of the region. |
cn-hangzhou |
| ExecutionId |
string |
Yes |
The ID of the execution. |
exec-046490ff88f242 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Content |
string |
The content of the template. |
"{\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 |
The ID of the request. |
14A60-EBE7-47CA-9757-12C1D47A |
| Template |
object |
The metadata of the template. |
|
| Hash |
string |
The SHA-256 value of the template content. |
4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4 |
| UpdatedDate |
string |
The time when the template was last updated. |
2019-05-16T10:26:14Z |
| UpdatedBy |
string |
The user who last updated the template. |
root(13090000) |
| Tags |
object |
The tag keys and values. The number of key-value pairs ranges from 1 to 20. |
{"k1":"k2","k2":"v2"} |
| TemplateName |
string |
The name of the template. |
MyTemplate |
| TemplateVersion |
string |
The version of the template. The name of the version consists of the letter v and a number. The number starts from 1. |
v1 |
| TemplateFormat |
string |
The format of the template. The system automatically determines whether the format is JSON or YAML. |
JSON |
| Description |
string |
The description of the template. |
Descirbe instances of given status |
| CreatedBy |
string |
The creator of the template. |
root(13090000) |
| CreatedDate |
string |
The time when the template was created. |
2019-05-16T10:26:14Z |
| TemplateId |
string |
The ID of the template. |
t-94753d4d828d38 |
| ShareType |
string |
The share type of the template. The share type of a user-created template is Private. |
Private |
Examples
Success response
JSON format
{
"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"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.