ALIYUN::ROS::WaitCondition类型用于创建处理UserData消息的实例。
语法
{
"Type": "ALIYUN::ROS::WaitCondition",
"Properties": {
"Count": Number,
"Handle": String,
"Timeout": Number
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Handle | String | 是 | 否 | 引用ALIYUN::ROS::WaitConditionHandle创建的实例。 | 无 |
Timeout | Number | 是 | 否 | 接收UserData消息的超时时间。 | 取值范围:1~43,200。
单位:秒。 |
Count | Number | 否 | 是 | 接收UserData消息的总数。 | 无 |
返回值
Fn::GetAtt
- Data:JSON格式字符串,最近一次创建或更新后的信号数据。
- JoinedErrorData:字符串,ErrorData信号内容的拼接。
- ErrorData:JSON格式字符串,最近一次创建或更新后的错误信号数据。
示例
JSON
格式
{
"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
格式
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