All Products
Search
Document Center

CloudOps Orchestration Service:GetExecutionTemplate

Last Updated:Mar 03, 2024

Queries the information about the template of an execution, including the content of the template.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
oos:GetExecutionTemplateREAD
  • Execution
    acs:oos:{#regionId}:{#accountId}:execution/{#executionId}
  • oos:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

cn-hangzhou
ExecutionIdstringYes

The ID of the execution.

exec-046490ff88f242

Response parameters

ParameterTypeDescriptionExample
object
Contentstring

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"
RequestIdstring

The ID of the request.

14A60-EBE7-47CA-9757-12C1D47A
Templateobject

The metadata of the template.

Hashstring

The SHA-256 value of the template content.

4bc7d7a21b3e003434b9c223f6e6d2578b5ebfeb5be28c1fcf8a8a1b11907bb4
UpdatedDatestring

The time when the template was last updated.

2019-05-16T10:26:14Z
UpdatedBystring

The user who last updated the template.

root(13090000)
Tagsobject

The tag keys and values. The number of key-value pairs ranges from 1 to 20.

{"k1":"k2","k2":"v2"}
TemplateNamestring

The name of the template.

MyTemplate
TemplateVersionstring

The version of the template. The name of the version consists of the letter v and a number. The number starts from 1.

v1
TemplateFormatstring

The format of the template. The system automatically determines whether the format is JSON or YAML.

JSON
Descriptionstring

The description of the template.

Get status of instances
CreatedBystring

The creator of the template.

root(13090000)
CreatedDatestring

The time when the template was created.

2019-05-16T10:26:14Z
TemplateIdstring

The ID of the template.

t-94753d4d828d38
ShareTypestring

The share type of the template. The share type of a user-created template is Private.

Private

Examples

Sample success responses

JSONformat

{
  "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": "Get status of instances",
    "CreatedBy": "root(13090000)",
    "CreatedDate": "2019-05-16T10:26:14Z",
    "TemplateId": "t-94753d4d828d38",
    "ShareType": "Private"
  }
}

Error codes

For a list of error codes, visit the Service error codes.