ALIYUN::OOS::Execution is used to start an execution.

Syntax

{
  "Type": "ALIYUN::OOS::Execution",
  "Properties": {
    "ResourceOptions": Map,
    "Parameters": Map,
    "TemplateName": String,
    "ParentExecutionId": String,
    "SafetyCheck": String,
    "Mode": String,
    "TemplateVersion": String
  }
}

Properties

Name Type Required Editable Description Validity
ResourceOptions Map No No The resource options used by ROS. None.
Parameters Map No No The JSON-formatted strings consisting of parameters. Example: {"Status": "Running"}. Default value: {}. None.
TemplateName String Yes No The name of the template. The template name can be up to 200 characters in length and can contain letters, digits, hyphens (-), and underscores (_). It cannot start with ALIYUN, ACS, or ALIBABA.
ParentExecutionId String No No The ID of the parent execution. None.
SafetyCheck String No No The safety check mode. Valid values:
  • Skip: indicates that you are aware of the risks. The system executes all actions in the execution without manual confirmation, regardless of the risk level. This parameter takes effect only when Mode is set to Automatic.
  • ConfirmEveryHighRiskAction: requires you to confirm every high-risk action. You can call the NotifyExecution operation to confirm or cancel an action.

Default value: ConfirmEveryHighRiskAction.

Mode String No No The execution mode. Valid values:
  • Debug
  • Automatic

Default value: Automatic.

TemplateVersion String No No The version number. If this parameter is not specified, the latest version number is used by default. None.

ResourceOptions syntax

"ResourceOptions": {
  "SuccessStatuses": List,
  "Timeout": Number,
  "CancelOnDelete": Boolean,
  "FailureStatuses": List
}

ResourceOptions properties

Name Type Required Editable Description Validity
SuccessStatuses List No No ROS uses this attribute to determine whether resources are created. If the Status value is included in the FailureStatuses value, the creation is considered as failed. If the Status value is included in the SuccessStatuses value, the creation is considered as successful. If neither of the preceding conditions is met, the system will wait until the stack creation request times out. Valid values:
  • Started
  • Queued
  • Running
  • Waiting
  • Success
  • Failed
  • Cancelled

Default value: Success.

Timeout Number No No The timeout period. Unit: seconds. Default value: 1800. None.
CancelOnDelete Boolean No No Specifies whether to cancel the execution that has not been completed when the resource is being deleted. Default value: false. None.
FailureStatuses List No No ROS uses this attribute to determine whether resources failed to be created. FailureStatuses takes precedence over SuccessStatuses. Valid values:
  • Started
  • Queued
  • Running
  • Waiting
  • Success
  • Failed
  • Cancelled

Default value: ["Failed", "Cancelled"].

Response parameters

Fn::GetAtt

  • Status: the execution status.
  • WindowsCurlCli: provides Windows with cURL CLI command prefixes and sends a message indicating that the execution is completed or failed. For more information, see NotifyExecution.
  • PowerShellCurlCli: provides PowerShell with cURL CLI command prefixes and sends a message indicating that the execution is completed or failed.
  • Outputs: the output of the execution.
  • ExecutionId: the unique ID of the execution.
  • CurlCli: the cURL command.
  • StatusMessage: the status information.
  • Counters: the number of executions.

Examples

JSON format
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "Execution": {
      "Type": "ALIYUN::OOS::Execution",
      "Properties": {
        "ResourceOptions": {
          "Ref": "ResourceOptions"
        },
        "Parameters": {
          "Ref": "Parameters"
        },
        "TemplateName": {
          "Ref": "TemplateName"
        },
        "ParentExecutionId": {
          "Ref": "ParentExecutionId"
        },
        "SafetyCheck": {
          "Ref": "SafetyCheck"
        },
        "Mode": {
          "Ref": "Mode"
        },
        "TemplateVersion": {
          "Ref": "TemplateVersion"
        }
      }
    }
  },
  "Parameters": {
    "ResourceOptions": {
      "Type": "Json",
      "Description": "Resource options user by ROS."
    },
    "Parameters": {
      "Type": "Json",
      "Description": "Parameters for the execution of template."
    },
    "TemplateName": {
      "Type": "String",
      "Description": "Template name. Content is limited to letters, numbers, underlined, underline, the length of 200 characters, and can not begin to ALIYUN, ACS, ALIBABA.",
      "MaxLength": 200
    },
    "ParentExecutionId": {
      "Type": "String",
      "Description": "Parent execution ID."
    },
    "SafetyCheck": {
      "Default": "ConfirmEveryHighRiskAction",
      "Type": "String",
      "Description": "Security check mode. Allowed values:- Skip: This option means that customers understand the risks, you can do anything without confirmation Action, no matter what the level of risk. It takes effect only if Mode is Automatic. - ConfirmEveryHighRiskAction (default): This option would require customers to confirm each Action a high risk. NotifyExecution by calling customer interface to confirm or cancel.",
      "AllowedValues": [
        "ConfirmEveryHighRiskAction",
        "Skip"
      ]
    },
    "Mode": {
      "Default": "Automatic",
      "Type": "String",
      "Description": "Execution mode.",
      "AllowedValues": [
        "Automatic",
        "Debug"
      ]
    },
    "TemplateVersion": {
      "Type": "String",
      "Description": "Version number of template. Default to the latest version."
    }
  },
  "Outputs": {
    "Status": {
      "Description": "Execution status.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "Status"
        ]
      }
    },
    "WindowsCurlCli": {
      "Description": "Convenience attribute, provides curl CLI command prefix for Windows, which can be used to notify oos execution instead of OOS API NotifyExecution. You can notify approve to oos execution by adding --data-binary \"{\\\"data\\\": {\\\"NotifyType\\\": \\\"Approve\\\"}}\" You can also notify execution via ROS API SignalResource. API parameters Status and UniqueId are ignored. Use API parameter Data to pass data.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "WindowsCurlCli"
        ]
      }
    },
    "PowerShellCurlCli": {
      "Description": "Convenience attribute, provides curl CLI command prefix for PowerShell, which can be used to notify oos execution instead of OOS API NotifyExecution. You can notify approve to oos execution by adding -Body '{\"data\": {\"NotifyType\": \"Approve\"}}' You can also notify execution via ROS API SignalResource. API parameters Status and UniqueId are ignored. Use API parameter Data to pass data.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "PowerShellCurlCli"
        ]
      }
    },
    "Outputs": {
      "Description": "Execution output.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "Outputs"
        ]
      }
    },
    "ExecutionId": {
      "Description": "Execution ID.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "ExecutionId"
        ]
      }
    },
    "CurlCli": {
      "Description": "Convenience attribute, provides curl CLI command prefix, which can be used to notify oos execution instead of OOS API NotifyExecution. You can notify approve to oos execution by adding --data-binary '{\"data\": {\"NotifyType\": \"Approve\"}}'  You can also notify execution via ROS API SignalResource. API parameters Status and UniqueId are ignored. Use API parameter Data to pass data.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "CurlCli"
        ]
      }
    },
    "StatusMessage": {
      "Description": "Execution status information.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "StatusMessage"
        ]
      }
    },
    "Counters": {
      "Description": "Task statistics: FailedTasks, SuccessTasks, TotalTasks.",
      "Value": {
        "Fn::GetAtt": [
          "Execution",
          "Counters"
        ]
      }
    }
  }
}
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Resources:
  Execution:
    Type: ALIYUN::OOS::Execution
    Properties:
      ResourceOptions:
        Ref: ResourceOptions
      Parameters:
        Ref: Parameters
      TemplateName:
        Ref: TemplateName
      ParentExecutionId:
        Ref: ParentExecutionId
      SafetyCheck:
        Ref: SafetyCheck
      Mode:
        Ref: Mode
      TemplateVersion:
        Ref: TemplateVersion
Parameters:
  ResourceOptions:
    Type: Json
    Description: Resource options user by ROS.
  Parameters:
    Type: Json
    Description: Parameters for the execution of template.
  TemplateName:
    Type: String
    Description: Template name. Content is limited to letters, numbers, underlined,
      underline, the length of 200 characters, and can not begin to ALIYUN, ACS, ALIBABA.
    MaxLength: 200
  ParentExecutionId:
    Type: String
    Description: Parent execution ID.
  SafetyCheck:
    Default: ConfirmEveryHighRiskAction
    Type: String
    Description: 'Security check mode. Allowed values:- Skip: This option means that
      customers understand the risks, you can do anything without confirmation Action,
      no matter what the level of risk. It takes effect only if Mode is Automatic.
      - ConfirmEveryHighRiskAction (default): This option would require customers
      to confirm each Action a high risk. NotifyExecution by calling customer interface
      to confirm or cancel.'
    AllowedValues:
    - ConfirmEveryHighRiskAction
    - Skip
  Mode:
    Default: Automatic
    Type: String
    Description: Execution mode.
    AllowedValues:
    - Automatic
    - Debug
  TemplateVersion:
    Type: String
    Description: Version number of template. Default to the latest version.
Outputs:
  Status:
    Description: Execution status.
    Value:
      Fn::GetAtt:
      - Execution
      - Status
  WindowsCurlCli:
    Description: 'Convenience attribute, provides curl CLI command prefix for Windows,
      which can be used to notify oos execution instead of OOS API NotifyExecution.
      You can notify approve to oos execution by adding --data-binary "{\"data\":
      {\"NotifyType\": \"Approve\"}}"  
      You can also notify execution via ROS API SignalResource. API parameters Status
      and UniqueId are ignored. Use API parameter Data to pass data.'
    Value:
      Fn::GetAtt:
      - Execution
      - WindowsCurlCli
  PowerShellCurlCli:
    Description: 'Convenience attribute, provides curl CLI command prefix for PowerShell,
      which can be used to notify oos execution instead of OOS API NotifyExecution.
      You can notify approve to oos execution by adding -Body ''{"data": {"NotifyType":
      "Approve"}}'' 
      You can also notify execution via ROS API SignalResource. API parameters Status
      and UniqueId are ignored. Use API parameter Data to pass data.'
    Value:
      Fn::GetAtt:
      - Execution
      - PowerShellCurlCli
  Outputs:
    Description: Execution output.
    Value:
      Fn::GetAtt:
      - Execution
      - Outputs
  ExecutionId:
    Description: Execution ID.
    Value:
      Fn::GetAtt:
      - Execution
      - ExecutionId
  CurlCli:
    Description: 'Convenience attribute, provides curl CLI command prefix, which can
      be used to notify oos execution instead of OOS API NotifyExecution. You can
      notify approve to oos execution by adding --data-binary ''{"data": {"NotifyType":
      "Approve"}}''  
      You can also notify execution via ROS API SignalResource. API parameters Status
      and UniqueId are ignored. Use API parameter Data to pass data.'
    Value:
      Fn::GetAtt:
      - Execution
      - CurlCli
  StatusMessage:
    Description: Execution status information.
    Value:
      Fn::GetAtt:
      - Execution
      - StatusMessage
  Counters:
    Description: 'Task statistics: FailedTasks, SuccessTasks, TotalTasks.'
    Value:
      Fn::GetAtt:
      - Execution
      - Counters