Starts an execution.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:StartExecution |
update |
*Execution
|
|
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 |
| LoopMode |
string |
No |
The loop mode. Valid values:
|
Automatic |
| ParentExecutionId |
string |
No |
The ID of the parent execution. |
exec-xxx |
| SafetyCheck |
string |
No |
The security check mode. Valid values:
|
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.