全部產品
Search
文件中心

CloudOps Orchestration Service:GetExecutionTemplate - 擷取一個執行所使用的模板

更新時間:Apr 21, 2026

擷取一個執行所使用的模板,包括內容。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

oos:GetExecutionTemplate

get

*Execution

acs:oos:{#regionId}:{#accountId}:execution/{#executionId}

  • oos:tag
  • oos:TLSVersion

請求參數

名稱

類型

必填

描述

樣本值

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

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情