You can call this operation to start an execution.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | StartExecution | The operation that you want to perform. Set this parameter to StartExecution. |
TemplateName | String | Yes | MyTemplate | The name of the template. The template name can be up to 200 characters in length. The name can contain letters, digits, hyphens (-), and underscores (_). It cannot start with ALIYUN, ACS, or ALIBABA. |
TemplateVersion | String | No | v1 | The version of the template. The default value is the latest version. |
Parameters | String | No | {“Status”:”Running”} | A JSON string consisting of a collection of parameters. Default value: {}. |
Mode | String | No | Automatic | The mode of the execution. Valid values: Debug and Automatic. Default value: Automatic. |
SafetyCheck | String | No | ConfirmEveryHighRiskAction | Specifies whether to enable the safety check mode. Valid values: ConfirmEveryHighRiskAction and Skip. Default value: ConfirmEveryHighRiskAction. ConfirmEveryHighRiskAction requires you to confirm or cancel every high-risk action by calling the NotifyExecution operation. Skip indicates that you understand the risks and OOS executes all actions without confirmations. |
This parameter is only valid when you set Mode to Automatic. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 14A07460-EBE7-47CA-9757-12CC4761D47A | The ID of the request. |
Execution | List | - | The information of the execution. |
└ TemplateName | String | MyTemplate | The name of the template. |
└ TemplateVersion | String | v1 | The version of the template. |
└CurrentTasks | String | [ { “TaskAction”: “ACS::Template”, “TaskExecutionId”: “task-exec-44d32b45d2a449e49899#1”, “TaskName”: “installSLSILogtail” } ] |
The details of the running tasks. |
└ CreatedDate | String | 2019-05-16T10:26:14Z | The time when the execution is created. |
└ ExecutedBy | String | root(13092080) | The user who runs the template. |
└ ExecutionId | String | Exec-44d32b45d2a449e49899 | The unique identifier of the execution. |
└ Mode | String | Automatic | The mode of the execution. |
└ Outputs | String | { “InstanceId”:”i-xxx” } |
The output of the execution. |
└ Parameters | String | { “Status”:”Running” } |
The input parameters of the execution. |
└ Status | String | Success | The status of the execution. Valid values: Started, Queued, Running, Waiting, Success, Failed, and Cancelled. |
└ SafetyCheck | String | Skip | The safety check mode. Valid values: ConfirmEveryHighRiskAction and Skip. |
└ StartDate | String | 2019-05-16T10:26:14Z | The start time of the execution. |
└ EndDate | String | 2019-05-16T10:26:14Z | The end time of the execution. |
└ RamRole | String | OOSServiceRole | The RAM role that OOS assumes to start the execution. |
└ UpdateDate | String | 2019-05-16T10:26:14Z | The update time of the execution. |
└ IsParent | Boolean | false | Indicates whether subtasks are included. |
Examples
Sample request
https://oos.cn-hangzhou.aliyuncs.com/?Action=StartExecution
&TemplateName=MyTemplate
&<Common request parameters>
Sample success response JSON
format
{
"Execution": {
"CurrentTasks": [],
"ExecutedBy": "root(13092000)",
"ExecutionId": "exec-4f5cd1b9042ac8832",
"Mode": "Automatic",
"Outputs": {},
"Parameters": {
"LogTailUserDefinedId": "logtaildemo",
"TagKey": "oostest",
"TagValue": "installlogtail"
},
"RamRole": "OOSServiceRole",
"SafetyCheck": "Skip",
"StartDate": "2019-05-27T09:29:18Z",
"Status": "Started",
"TemplateId": "t-1bd341007f",
"TemplateName": "loop-echo",
"TemplateVersion": "v1"
},
"RequestId": "491F8C2-34C9-4679-9DB3-4C0F4929AC"
}
Error codes
Error code | HTTP status code | Error message | Description |
---|---|---|---|
InvalidVersion | 400 | Specified parameter Version is not valid. | The error message returned because the specified version is invalid. Specify a valid version in the URL and try again. |
InvalidAction.NotFound | 400 | Specified api is not found, please check your url and method. | The error message returned because the specified operation does not exist. Enter the correct Action in the URL. |
User.NoPermission | 401 | User has no permission to do the action: ({api_name}) | The error message returned because the user does not have the permission to call this operation. Check whether the current user has the permission to call the OOS API in the RAM console. |
InvalidStsToken | 400 | Invalid STS token to do the action: ({api_name}) | The error message returned because the specified STS token is invalid. |
ExpiredStsToken | 400 | Expired STS token to do the action: ({api_name}) | The error message returned because the specified STS token has expired. |
QuotaExceed | 403 | The Quota ({key}) exceeded ({value}). | The error message returned because an upper limit is reached, such as the maximum number of templates and running executions. |
InvalidAccountType | 400 | The account type ({account_type}) was not supported. | The error message returned because the specified account type is not supported. |
TemplateValidationError | 400 | {reason} | The error message returned because the template failed the validation due to violations of data type, value range, or other constraints. |
AssumeRoleFailed | 400 | Assume role failed {reason}. | The error message returned because OOS fails to assume the RAM role. |
MissingExecutionParameter | 400 | The parameter {{key}} was not provided in template. | The error message returned because required parameters are missing in the template. |
UnknownExecutionParameter | 400 | The parameter {{key}} was not defined in template. | The error message returned because the specified parameters are not found in the template. |
EntityNotExists.Template | 404 | The specified template {name} does not exist. | The error message returned because the specified template does not exist. |