全部產品
Search
文件中心

CloudOps Orchestration Service:ListExecutions - 查詢執行

更新時間:Mar 27, 2026

查詢執行,支援多種過濾方式。

調試

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

調試

授權資訊

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

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

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

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

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

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

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

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

操作

存取層級

資源類型

條件關鍵字

關聯操作

oos:ListExecutions

list

*Execution

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

*Execution

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

  • oos:tag
  • oos:TLSVersion

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

地區 ID

cn-hangzhou

TemplateName

string

模板名稱。名稱未內含項目關聯性,最終列出包含所填模板名稱的所有模板。

MyTemplate

Status

string

執行狀態,取值範圍:Running, Started, Success, Failed, Waiting, Cancelled, Pending, Skipped。

Running

ExecutionId

string

執行 ID

exec-xxx

StartDateBefore

string

開始時間小於等於指定時間的執行

2019-05-16T10:26:14Z

StartDateAfter

string

開始時間大於等於指定時間的執行

2019-05-16T10:26:14Z

EndDateBefore

string

結束時間小於等於指定時間的執行

2019-05-16T10:26:14Z

EndDateAfter

string

結束時間大於等於指定時間的執行

2019-05-16T10:26:14Z

Mode

string

執行模式。取值範圍:

  • Automatic

  • Debug

Automatic

ExecutedBy

string

執行者

vme

ParentExecutionId

string

父執行 ID

exec-xxx

RamRole

string

RAM 角色

OOSServiceRole

IncludeChildExecution

boolean

是否包含子執行。預設為 False。

true

Category

string

執行的模版類型。可分為 Other、TimerTrigger、EventTrigger、AlarmTrigger。

Other

Tags

object

執行的標籤

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

MaxResults

integer

分頁大小。取值範圍:10-100。預設為 50。

50

NextToken

string

翻頁標記的 Token

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ

SortField

string

排序欄位。取值範圍:

  • StartDate(預設值):建立時間

  • EndDate:結束時間

  • Status:狀態

StartDate

SortOrder

string

排序方向。取值範圍:

  • Ascending:升序

  • Descending(預設值):降序

Ascending

ResourceId

string

ECS 資源 ID

i-xxx

ResourceTemplateName

string

資源的模板名稱

ACS-ECS-TEST

ResourceGroupId

string

資源群組 ID。

rg-acfmxsn4m4******

Description

string

執行的描述。

MyDescription

Depth

string

執行的深度,可分為 RootDepth、FirstChildDepth RootDepth 只返回主執行,FirstChildDepth 只返回第一層的子執行。此參數和 IncludeChildExecution 參數只能同時傳入一個,推薦使用 Depth。

RootDepth

Categories

string

執行的模板類型列表。可分為 Other、TimerTrigger、EventTrigger、AlarmTrigger。此參數和 Category 參數只能同時傳入一個,推薦使用 Categories。

["TimerTrigger"、"EventTrigger"]

RdFolderIds

array

string

rd-xxx

AccountId

string

123456789

返回參數

名稱

類型

描述

樣本值

object

NextToken

string

翻頁標記的 Token

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ

RequestId

string

請求 ID

14A074-47CA-9757-12CC4761D47A

MaxResults

integer

分頁大小

50

Executions

array<object>

執行資料

array<object>

Status

string

執行狀態。取值範圍為 Started, Queued, Running, Waiting, Success, Failed, Cancelled。

Success

WaitingStatus

string

等待狀態

""

Targets

string

目標資源

"{"ResourceType": "ALIYUN::ECS::Instance", "Filters": [{"ResourceIds": ["i-bp14z07dg3464980x72o"], "RegionId": "cn-hangzhou", "Type": "ResourceIds"}]}"

StatusReason

string

狀態原因

""

Tags

object

執行的標籤

{}

LastSuccessfulTriggerTime

string

最近一次成功觸發模板的時間

2019-05-27T09:29:18Z

Mode

string

執行模式

Automatic

SafetyCheck

string

安全檢查模式。取值範圍為 Skip, ConfirmEveryHighRiskAction。

Skip

TemplateName

string

模板名稱

MyTemplate

TemplateVersion

string

模板版本號碼

v1

CreateDate

string

執行建立時間

2019-05-16T10:26:14Z

UpdateDate

string

執行更新時間

2019-05-16T10:26:14Z

Description

string

執行描述

MyDescription

LastTriggerTime

string

最近一次觸發模板的時間

2019-05-27T09:29:18Z

ParentExecutionId

string

父執行 ID

exec-xxx

LastTriggerStatus

string

最近一次觸發模版後的執行狀態

Success

StatusMessage

string

任務執行狀態

“”

Outputs

string

執行輸出結果

{ "InstanceId":"i-xxx" }

ExecutedBy

string

執行模板者

1309252800

EndDate

string

執行結束時間

2019-05-16T10:26:14Z

IsParent

boolean

標記是否包含子任務

false

StartDate

string

執行開始時間

2019-05-16T10:26:14Z

ExecutionId

string

執行的唯一標識

exec-44d32b45d2a449e

Parameters

object

執行的輸入參數

{ "Status":"Running" }

Counters

object

任務按執行狀態計數

{"Failed": 0,"Success": 1,"Total": 2}

ResourceGroupId

string

資源群組 ID

rg-acfmxsn4m4******

Category

string

執行的模版類型。可分為 Other、TimerTrigger、EventTrigger、AlarmTrigger。

Other

TemplateId

string

模板 ID

123

RamRole

string

執行當前模板的角色

OOSServiceRole

ResourceStatus

string

資源狀態

{ "Success": 1 }

CurrentTasks

array<object>

當前正在啟動並執行 Tasks

object

TaskExecutionId

string

Task 執行 ID

task-exec-44d32b45d2a49899#1

TaskName

string

Task 名稱

installSLSILogtail

TaskAction

string

Task 執行模板

acs::Template

LastTriggerStatusMessage

string

最近一次任務執行狀態(定時、事件、警示類執行表示的是最近一次觸發的執行狀態,非觸發類執行此欄位與 StatusMessage 欄位內容一致)

""

LastTriggerOutputs

string

最近一次執行輸出結果(定時、事件、警示類執行表示的是最近一次觸發的輸出結果,非觸發類執行此欄位與 Outputs 欄位內容一致)

{ "InstanceId": "i-xxx" }

NextScheduleTime

string

定時觸發類執行下一次觸發時間

2019-05-16T10:26:14Z

AccountId

string

123456789

TotalCount

integer

執行任務總數

30

樣本

正常返回樣本

JSON格式

{
  "NextToken": "MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ",
  "RequestId": "14A074-47CA-9757-12CC4761D47A",
  "MaxResults": 50,
  "Executions": [
    {
      "Status": "Success",
      "WaitingStatus": "\"\"",
      "Targets": "\"{\"ResourceType\": \"ALIYUN::ECS::Instance\", \"Filters\": [{\"ResourceIds\": [\"i-bp14z07dg3464980x72o\"], \"RegionId\": \"cn-hangzhou\", \"Type\": \"ResourceIds\"}]}\"",
      "StatusReason": "\"\"",
      "Tags": {},
      "LastSuccessfulTriggerTime": "2019-05-27T09:29:18Z",
      "Mode": "Automatic",
      "SafetyCheck": "Skip",
      "TemplateName": "MyTemplate",
      "TemplateVersion": "v1",
      "CreateDate": "2019-05-16T10:26:14Z",
      "UpdateDate": "2019-05-16T10:26:14Z",
      "Description": "MyDescription",
      "LastTriggerTime": "2019-05-27T09:29:18Z",
      "ParentExecutionId": "exec-xxx",
      "LastTriggerStatus": "Success",
      "StatusMessage": "“”",
      "Outputs": "{ \"InstanceId\":\"i-xxx\" }",
      "ExecutedBy": "1309252800",
      "EndDate": "2019-05-16T10:26:14Z",
      "IsParent": false,
      "StartDate": "2019-05-16T10:26:14Z",
      "ExecutionId": "exec-44d32b45d2a449e",
      "Parameters": {
        "Status": "Running"
      },
      "Counters": {
        "Failed": 0,
        "Success": 1,
        "Total": 2
      },
      "ResourceGroupId": "rg-acfmxsn4m4******",
      "Category": "Other",
      "TemplateId": "123",
      "RamRole": "OOSServiceRole",
      "ResourceStatus": "{ \t\t\t\"Success\": 1 \t\t}",
      "CurrentTasks": [
        {
          "TaskExecutionId": "task-exec-44d32b45d2a49899#1",
          "TaskName": "installSLSILogtail",
          "TaskAction": "acs::Template"
        }
      ],
      "LastTriggerStatusMessage": "\"\"",
      "LastTriggerOutputs": "{\n      \"InstanceId\": \"i-xxx\"\n}",
      "NextScheduleTime": "2019-05-16T10:26:14Z",
      "AccountId": "123456789"
    }
  ],
  "TotalCount": 30
}

錯誤碼

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

變更歷史

更多資訊,參考變更詳情