启动一个执行。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
oos:StartExecution |
update |
*Execution
|
|
无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
RegionId |
string |
否 |
地域 ID |
cn-hangzhou |
TemplateName |
string |
否 |
模板名称。内容限制为字母、数字、中划线、下划线,长度 200 字符。 |
vmeixme |
TemplateVersion |
string |
否 |
版本号,如不填默认为最新的版本号。 |
v1 |
Mode |
string |
否 |
执行模式。取值:
|
Automatic |
LoopMode |
string |
否 |
循环模式。取值:
|
Automatic |
ParentExecutionId |
string |
否 |
父执行 ID |
exec-xxx |
SafetyCheck |
string |
否 |
安全检查模式。取值:
|
Skip |
Parameters |
string |
否 |
由参数集合组成的 Json 字符串,默认为{}。 |
{"Status":"Running"} |
ClientToken |
string |
否 |
访问令牌 |
123e56767-e89b-12d3-a456-426655440000 |
Tags |
object |
否 |
要给执行打的标签 |
{ "k1": "v1", "k2": "v2" } |
Description |
string |
否 |
要给执行添加的描述信息 |
test execution. |
TemplateContent |
string |
否 |
模板内容,JSON 或 YAML 格式(同 CreateTemplate API 请求参数中的 Content 字段)。用户传入此字段可直接执行 TemplateContent 中的任务,而无需提前创建模板再创建执行任务(当用户选择已有的 Template 创建执行任务时不需传入此字段)。 |
{ "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 |
否 |
资源组 ID |
rg-acfmxsn4m4****** |
TemplateURL |
string |
否 |
阿里云对象存储 OSS 中存放 OOS 模板内容的 URL(只支持公共读的 URL)。用户传入此字段可直接根据行 TemplateURL 中存储的模板内容创建执行任务,无需提前创建模板再创建执行任务(当用户选择已有的 Template 创建执行任务时不需传入此字段)。 |
http://oos-template.cn-hangzhou.oss.aliyun-inc.com/oos-test-template.json |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
RequestId |
string |
请求 ID |
14A07460-EBE7-47CA-9757-12CC4761D47A |
Execution |
object |
执行数据 |
|
Outputs |
string |
执行输出结果 |
{ "InstanceId":"i-xxx" } |
Status |
string |
执行状态 |
Success |
EndDate |
string |
结束时间 |
2019-05-16T10:26:14Z |
ExecutedBy |
string |
执行模板者 |
root(13092080xx12344) |
IsParent |
boolean |
是否包含子任务 |
false |
Tags |
object |
执行的标签 |
{"k1":"v2","k2":"v2"} |
StartDate |
string |
开始时间 |
2019-05-16T10:26:14Z |
SafetyCheck |
string |
安全检查模式 |
Skip |
Mode |
string |
执行模式 |
Automatic |
TemplateName |
string |
模板名称 |
MyTemplate |
CreateDate |
string |
执行创建时间 |
2019-05-16T10:26:14Z |
TemplateVersion |
string |
模板版本号 |
v1 |
ExecutionId |
string |
执行的唯一标识 |
exec-xxxyyy |
Parameters |
string |
执行的输入参数 |
{ "Status":"Running" } |
Description |
string |
执行的描述信息 |
test execution. |
Counters |
object |
执行数 |
1 |
UpdateDate |
string |
更新时间 |
2019-05-16T10:26:14Z |
ResourceGroupId |
string |
资源组 ID |
rg-acfmxsn4m4****** |
ParentExecutionId |
string |
父执行 ID |
exec-xxxx |
RamRole |
string |
执行当前模板的角色 |
OOSServiceRole |
TemplateId |
string |
模板 ID |
t-1bd341007f |
StatusMessage |
string |
状态信息 |
"" |
LoopMode |
string |
循环模式 |
Automatic |
CurrentTasks |
array<object> |
当前正在运行的 Tasks |
|
object |
|||
TaskExecutionId |
string |
任务执行 ID |
exec-dsadasdawq |
TaskName |
string |
任务名称 |
testTask |
TaskAction |
string |
任务的动作 |
ACS::TimerTrigger |
示例
正常返回示例
JSON
格式
{
"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"
}
]
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。