All Products
Search
Document Center

CloudOps Orchestration Service:StartExecution

Last Updated:Sep 21, 2026

Starts a task 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 region ID.

cn-hangzhou

TemplateName

string

No

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

vmeixme

TemplateVersion

string

No

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

v1

Mode

string

No

The execution mode. Valid values:

  • Automatic (default): automatic execution

  • FailurePause: pauses on failure

  • Debug: step-by-step execution

Automatic

LoopMode

string

No

The loop mode. Valid values:

  • Automatic (default): no pause

  • FirstBatchPause: pauses after the first batch

  • EveryBatchPause: pauses after each batch

Automatic

ParentExecutionId deprecated

string

No

The parent execution ID.

exec-xxx

SafetyCheck

string

No

The safety check mode. Valid values:

  • Skip (default): This option indicates that the customer is aware of the risks and any action can be executed without confirmation, regardless of the risk level. This option is valid only when Mode=Automatic.

  • ConfirmEveryHighRiskAction: This option requires the customer to confirm each high-risk action. The customer can confirm or cancel by calling the NotifyExecution operation.

Skip

Parameters

string

No

A JSON string that consists of a set of parameters. Default value: {}.

{"Status":"Running"}

ClientToken

string

No

The access token.

123e56767-e89b-12d3-a456-426655440000

Tags

object

No

The tags to add to the task execution.

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

Description

string

No

The description to add to the task execution.

test execution.

TemplateContent

string

No

The template content in JSON or YAML format. This is the same as the Content field in the CreateTemplate request parameters. If you specify this parameter, the tasks in TemplateContent are directly executed without the need to create a template first. You do not need to specify this parameter if you use an existing template to create a task 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 resource group ID.

rg-acfmxsn4m4******

TemplateURL

string

No

The URL of the OOS template content stored in Alibaba Cloud Object Storage Service (OSS). Only publicly readable URLs are supported. If you specify this parameter, a task execution is created based on the template content stored at the TemplateURL without the need to create a template first. You do not need to specify this parameter if you use an existing template to create a task execution.

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

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Execution

object

The task execution data.

Outputs

string

The output of the task execution.

{ "InstanceId":"i-xxx" }

Status

string

The task execution status.

Success

EndDate

string

The end time in ISO 8601 format (UTC).

2019-05-16T10:26:14Z

ExecutedBy

string

The user who executed the template.

root(13092080xx12344)

IsParent

boolean

Indicates whether the task execution contains child tasks.

false

Tags

object

The tags of the task execution.

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

StartDate

string

The start time in ISO 8601 format (UTC).

2019-05-16T10:26:14Z

SafetyCheck

string

The safety check mode.

Skip

Mode

string

The execution mode.

Automatic

TemplateName

string

The template name.

MyTemplate

CreateDate

string

The time when the task execution was created, in ISO 8601 format (UTC).

2019-05-16T10:26:14Z

TemplateVersion

string

The template version number.

v1

ExecutionId

string

The unique identifier of the task execution.

exec-xxxyyy

Parameters

string

The input parameters of the task execution.

{ "Status":"Running" }

Description

string

The description of the task execution.

test execution.

Counters

object

The number of executions.

1

UpdateDate

string

The update time in ISO 8601 format (UTC).

2019-05-16T10:26:14Z

ResourceGroupId

string

The resource group ID.

rg-acfmxsn4m4******

ParentExecutionId

string

The parent execution ID.

exec-xxxx

RamRole

string

The RAM role used to execute the template.

OOSServiceRole

TemplateId

string

The template ID.

t-1bd341007f

StatusMessage

string

The status message.

""

LoopMode

string

The loop mode.

Automatic

CurrentTasks

array<object>

The tasks that are currently running.

object

TaskExecutionId

string

The task execution ID.

exec-dsadasdawq

TaskName

string

The task name.

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.