ALIYUN::ROS::WaitCondition is used to create an instance to process UserData messages.

Syntax

{
  "Type": "ALIYUN::ROS::WaitCondition",
  "Properties": {
    "Count": Number,
    "Handle": String,
    "Timeout": Number,
    "ShowProgressEvent": String
  }
}

Properties

Property Type Required Editable Description Constraint
Handle String Yes No The instance created by calling ALIYUN::ROS::WaitConditionHandle. None
Timeout Number Yes No The timeout period for receiving UserData messages. Valid values: 1 to 43200.

Unit: seconds.

Count Number No Yes The total number of received UserData messages. None
ShowProgressEvent String No No Specifies whether to display progress events for receiving UserData messages. Valid values:
  • EnabledIfCreateStack: Progress events are displayed if you create stacks.
  • Disabled: Progress events are not displayed.

Response parameters

Fn::GetAtt

  • Data: a JSON string that contains the signal data sent to the handle after the latest stack creation or update.
  • JoinedErrorData: a string that contains data associated with wait condition error signals sent to the handle.
  • ErrorData: a JSON string that contains the error signal data sent to the handle after the latest stack creation or update.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ShowProgressEvent": {
      "Type": "String",
      "Description": "Whether to generate progress changed event. Default to Disabled.",
      "AllowedValues": [
        "EnabledIfCreateStack",
        "Disabled"
      ]
    },
    "Timeout": {
      "Type": "Number",
      "Description": "The number of seconds to wait for the correct number of signals to arrive.",
      "MinValue": 1,
      "MaxValue": 43200
    },
    "Count": {
      "Type": "Number",
      "Description": "The number of success signals that must be received before the stack creation process continues.",
      "Default": 1
    },
    "Handle": {
      "Type": "String",
      "Description": "A reference to the wait condition handle used to signal this wait condition."
    }
  },
  "Resources": {
    "WaitCondition": {
      "Type": "ALIYUN::ROS::WaitCondition",
      "Properties": {
        "ShowProgressEvent": {
          "Ref": "ShowProgressEvent"
        },
        "Timeout": {
          "Ref": "Timeout"
        },
        "Count": {
          "Ref": "Count"
        },
        "Handle": {
          "Ref": "Handle"
        }
      }
    }
  },
  "Outputs": {
    "LastErrorData": {
      "Description": "JSON serialized dict containing data associated with wait condition error signals sent to the handle backup by update last time.",
      "Value": {
        "Fn::GetAtt": [
          "WaitCondition",
          "LastErrorData"
        ]
      }
    },
    "JoinedLastErrorData": {
      "Description": "String containing data associated with wait condition error signals sent to the handle backup by update last time.",
      "Value": {
        "Fn::GetAtt": [
          "WaitCondition",
          "JoinedLastErrorData"
        ]
      }
    },
    "LastData": {
      "Description": "JSON serialized dict containing data associated with wait condition signals sent to the handle backup by update last time.",
      "Value": {
        "Fn::GetAtt": [
          "WaitCondition",
          "LastData"
        ]
      }
    },
    "JoinedErrorData": {
      "Description": "String containing data associated with wait condition error signals sent to the handle.",
      "Value": {
        "Fn::GetAtt": [
          "WaitCondition",
          "JoinedErrorData"
        ]
      }
    },
    "Data": {
      "Description": "JSON serialized dict containing data associated with wait condition signals sent to the handle.",
      "Value": {
        "Fn::GetAtt": [
          "WaitCondition",
          "Data"
        ]
      }
    },
    "ErrorData": {
      "Description": "JSON serialized dict containing data associated with wait condition error signals sent to the handle.",
      "Value": {
        "Fn::GetAtt": [
          "WaitCondition",
          "ErrorData"
        ]
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Count:
    Default: 1
    Description: The number of success signals that must be received before the stack
      creation process continues.
    Type: Number
  Handle:
    Description: A reference to the wait condition handle used to signal this wait
      condition.
    Type: String
  ShowProgressEvent:
    AllowedValues:
    - EnabledIfCreateStack
    - Disabled
    Description: Whether to generate progress changed event. Default to Disabled.
    Type: String
  Timeout:
    Description: The number of seconds to wait for the correct number of signals to
      arrive.
    MaxValue: 43200
    MinValue: 1
    Type: Number
Resources:
  WaitCondition:
    Properties:
      Count:
        Ref: Count
      Handle:
        Ref: Handle
      ShowProgressEvent:
        Ref: ShowProgressEvent
      Timeout:
        Ref: Timeout
    Type: ALIYUN::ROS::WaitCondition
Outputs:
  Data:
    Description: JSON serialized dict containing data associated with wait condition
      signals sent to the handle.
    Value:
      Fn::GetAtt:
      - WaitCondition
      - Data
  ErrorData:
    Description: JSON serialized dict containing data associated with wait condition
      error signals sent to the handle.
    Value:
      Fn::GetAtt:
      - WaitCondition
      - ErrorData
  JoinedErrorData:
    Description: String containing data associated with wait condition error signals
      sent to the handle.
    Value:
      Fn::GetAtt:
      - WaitCondition
      - JoinedErrorData
  JoinedLastErrorData:
    Description: String containing data associated with wait condition error signals
      sent to the handle backup by update last time.
    Value:
      Fn::GetAtt:
      - WaitCondition
      - JoinedLastErrorData
  LastData:
    Description: JSON serialized dict containing data associated with wait condition
      signals sent to the handle backup by update last time.
    Value:
      Fn::GetAtt:
      - WaitCondition
      - LastData
  LastErrorData:
    Description: JSON serialized dict containing data associated with wait condition
      error signals sent to the handle backup by update last time.
    Value:
      Fn::GetAtt:
      - WaitCondition
      - LastErrorData