All Products
Search
Document Center

CloudOps Orchestration Service:StartExecution

Last Updated:Nov 10, 2025

Starts an execution.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

oos:StartExecution

update

*Execution

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

  • oos:tag
  • oos:IsOOSAssumeRole
  • oos:TLSVersion
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The ID of the region.

cn-hangzhou

TemplateName

string

No

The name of the template. The name can contain letters, digits, hyphens (-), and underscores (_). The name can be up to 200 characters in length.

vmeixme

TemplateVersion

string

No

The version number of the template. If you do not specify this parameter, the latest version is used.

v1

Mode

string

No

The execution mode. Valid values:

  • Automatic (default): The execution is automatically run.

  • FailurePause: The execution is paused if a task fails.

  • Debug: The execution is run in single-step mode.

Automatic

LoopMode

string

No

The loop mode. Valid values:

  • Automatic (default): The execution is not paused.

  • FirstBatchPause: The execution is paused after the first batch of tasks is completed.

  • EveryBatchPause: The execution is paused after each batch of tasks is completed.

Automatic

ParentExecutionId

string

No

The ID of the parent execution.

exec-xxx

SafetyCheck

string

No

The security check mode. Valid values:

  • Skip (default): This option indicates that you are aware of the risks. The system performs all actions without asking for confirmation, regardless of the risk level. This mode is valid only when Mode is set to Automatic.

  • ConfirmEveryHighRiskAction: This option requires you to confirm every high-risk action. You can call the NotifyExecution operation to confirm or cancel an action.

Skip

Parameters

string

No

The JSON string that consists of a collection of parameters. The default value is {}.

{"Status":"Running"}

ClientToken

string

No

The client token that is used to ensure the idempotency of the request.

123e56767-e89b-12d3-a456-426655440000

Tags

object

No

The tags to add to the execution.

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

Description

string

No

The description of the execution.

test execution.

TemplateContent

string

No

The content of the template, which must be in the JSON or YAML format. This parameter is the same as the Content request parameter of the CreateTemplate operation. You can specify this parameter to run the tasks in the template content without the need to create a template. You do not need to specify this parameter if you use an existing template to create an execution.

{ "Description": "Example template, describe instances in some status", "FormatVersion": "OOS-2019-06-01", "Parameters": {}, "Tasks": [ { "Name": "describeInstances", "Action": "ACS::ExecuteAPI", "Description": "desc-en", "Properties": { "Service": "ECS", "API": "DescribeInstances", "Parameters": { "Status": "Running" } } } ] }

ResourceGroupId

string

No

The ID of the resource group.

rg-acfmxsn4m4******

TemplateURL

string

No

The URL of the Object Storage Service (OSS) object that stores the OOS template content. The URL must be a public-read URL. You can specify this parameter to run the tasks in the template content that is stored in the OSS object without the need to create a template. You do not need to specify this parameter if you use an existing template to create an execution.

http://oos-template.cn-hangzhou.oss.aliyun-inc.com/oos-test-template.json

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

14A07460-EBE7-47CA-9757-12CC4761D47A

Execution

object

The data of the execution.

Outputs

string

The outputs of the execution.

{ "InstanceId":"i-xxx" }

Status

string

The status of the execution.

Success

EndDate

string

The time when the execution ended.

2019-05-16T10:26:14Z

ExecutedBy

string

The user who started the execution.

root(13092080xx12344)

IsParent

boolean

Indicates whether the execution contains child tasks.

false

Tags

object

The tags of the execution.

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

StartDate

string

The time when the execution started.

2019-05-16T10:26:14Z

SafetyCheck

string

The security check mode.

Skip

Mode

string

The execution mode.

Automatic

TemplateName

string

The name of the template.

MyTemplate

CreateDate

string

The time when the execution was created.

2019-05-16T10:26:14Z

TemplateVersion

string

The version number of the template.

v1

ExecutionId

string

The unique ID of the execution.

exec-xxxyyy

Parameters

string

The input parameters of the execution.

{ "Status":"Running" }

Description

string

The description of the execution.

test execution.

Counters

object

The number of executions.

1

UpdateDate

string

The time when the execution was last updated.

2019-05-16T10:26:14Z

ResourceGroupId

string

The ID of the resource group.

rg-acfmxsn4m4******

ParentExecutionId

string

The ID of the parent execution.

exec-xxxx

RamRole

string

The RAM role that is used to run the template.

OOSServiceRole

TemplateId

string

The ID of the template.

t-1bd341007f

StatusMessage

string

The status message.

""

LoopMode

string

The loop mode.

Automatic

CurrentTasks

array<object>

The tasks that are running.

object

TaskExecutionId

string

The ID of the task execution.

exec-dsadasdawq

TaskName

string

The name of the task.

testTask

TaskAction

string

The action of the task.

ACS::TimerTrigger

Examples

Success response

JSON format

{
  "RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
  "Execution": {
    "Outputs": "{ \"InstanceId\":\"i-xxx\" }",
    "Status": "Success",
    "EndDate": "2019-05-16T10:26:14Z",
    "ExecutedBy": "root(13092080xx12344)",
    "IsParent": false,
    "Tags": {
      "k1": "v2",
      "k2": "v2"
    },
    "StartDate": "2019-05-16T10:26:14Z",
    "SafetyCheck": "Skip",
    "Mode": "Automatic",
    "TemplateName": "MyTemplate",
    "CreateDate": "2019-05-16T10:26:14Z",
    "TemplateVersion": "v1",
    "ExecutionId": "exec-xxxyyy",
    "Parameters": "{ \"Status\":\"Running\" }",
    "Description": "test execution.",
    "Counters": 1,
    "UpdateDate": "2019-05-16T10:26:14Z",
    "ResourceGroupId": "rg-acfmxsn4m4******",
    "ParentExecutionId": "exec-xxxx",
    "RamRole": "OOSServiceRole",
    "TemplateId": "t-1bd341007f",
    "StatusMessage": "\"\"",
    "LoopMode": "Automatic",
    "CurrentTasks": [
      {
        "TaskExecutionId": "exec-dsadasdawq",
        "TaskName": "testTask",
        "TaskAction": "ACS::TimerTrigger"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.