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
  }
}

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 length of time to wait for UserData messages to arrive. Valid values: 1 to 43200.

Unit: seconds.

Count Number No Yes The total number of UserData messages to be received. None.

Response parameters

Fn::GetAtt

  • Data: a JSON string that contains the signal data sent to the handle after the most recent 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 most recent stack creation or update.

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "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": {
        "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:
  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:
      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