All Products
Search
Document Center

GetExecutionTemplate

Last Updated: Sep 02, 2019

You can call this operation to query the template of an execution.

Request parameters

Parameter Type Required Example Description
Action String Yes GetExecutionTemplate The operation that you want to perform. Set this parameter to GetExecutionTemplate.
ExecutionId String Yes exec-046490ff88f242 The ID of the execution.

Response parameters

Parameter Type Example Description
RequestId String 14A60-EBE7-47CA-9757-12C1D47A The ID of the request.
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” The content of the template.
Template N/A N/A The metadata of the template.
└ CreatedBy String root(13090000) The user who created the template.
└ CreatedDate String 2019-05-16T10:26:14Z The time when the template was created.
└ UpdatedBy String root(13090000) The user who updated the template.
└ UpdatedDate String 2019-05-16T10:26:14Z The time when the template was updated.
└ Description String Describe instances of given status The description of the template.
└ Hash String 4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4 The encrypted SHA-256 hash code of the template content.
└ ShareType String Private The sharing mode of the template. The sharing mode of templates created by users is set to Private.
└ TemplateFormat String JSON The format of the template. The format can be JSON or YAML. The system automatically identifies the format.
└ TemplateName String MyTemplate The name of the template.
└ TemplateId String t-94753d4d828d38 The ID of the template.
└ TemplateVersion String v1 The version of the template. The version name consists of the letter v and a digit. The digit starts from 1.

Examples

Sample request

  1. https://oos.cn-hangzhou.aliyuncs.com/?Action=GetExecutionTemplate
  2. &ExecutionId=exec-046490ff88f24240b41a
  3. &<Common request parameters>

Sample success response
JSON format

  1. {
  2. "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<String>\"\n }\n }\n }\n ],\n \"Outputs\": {\n \"InstanceIds\": {\n \"Value\": \" {{ bar.InstanceIds }} \",\n \"Type\": \"List<String>\"\n }\n }\n}\n",
  3. "RequestId": "FAAFA45-AB65-4049-BFE0-868E1C80AF",
  4. "Template": {
  5. "CreatedBy": "root(13092000)",
  6. "CreatedDate": "2019-05-27T10:32:52Z",
  7. "UpdatedBy": "root(13092000)",
  8. "UpdatedDate": "2019-05-27T08:46:33Z",
  9. "Description": "",
  10. "Hash": "62eac5c64b9dae5c41e1e8b648baad95f812cab4f9221a5283edb882b5f8d712",
  11. "ShareType": "Private",
  12. "TemplateFormat": "JSON",
  13. "TemplateName": "MyTemplate",
  14. "TemplateId": "t-94753deea28d38",
  15. "TemplateVersion": "v1"
  16. }
  17. }

Error codes

Error code HTTP status code Error message Description
InvalidVersion 400 The specified Version is invalid. The error message returned because the specified version is invalid. Specify a valid version in the URL and try again.
InvalidAction.NotFound 400 Specified api is not found, please check your url and method. The error message returned because the specified operation does not exist. Specify a valid value for the Action parameter.
Throttling.User 400 Your request was denied due to instance flow control. The error message returned because too many requests have been sent over a short period of time. Try again later.
User.NoPermission 401 User has no permission to do the action: ({api_name}) The error message returned because the user is not authorized to call this operation. Check whether the current user has the permission to call the OOS API in the RAM console.
InvalidStsToken 400 Invalid STS token to do the action: ({api_name}) The error message returned because the specified STS token is invalid.
ExpiredStsToken 400 Expired STS token to do the action: ({api_name}) The error message returned because the specified STS token has expired.
InvalidAccountType 400 The account type ({account_type}) was not supported. The error message returned because the specified account type is not supported.
EntityNotExists.Execution 404 The specified security group does not exist. The error message returned because the specified execution does not exist.