ALIYUN::ROS::WaitConditionHandle receives signals and works with ALIYUN::ROS::WaitCondition to control stack execution flow. For example, when you create an ECS instance, a signal is sent during user data execution.
Syntax
{
"Type": "ALIYUN::ROS::WaitConditionHandle",
"Properties": {
"Mode": String,
"Count": Integer
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
Mode |
String |
No |
Yes |
The signal deletion mode used before resource updates. |
Valid values:
|
|
Count |
Integer |
No |
Yes |
When Mode is set to Full, signals with integer IDs greater than the Count value are deleted before the resource update. |
Default value: -1. Count takes effect when:
When Count takes effect, signals with integer IDs greater than the Count value are deleted before the update. If any signal IDs are non-integers, the update fails. Note
For elastic scaling via stack updates, set Count in ALIYUN::ROS::WaitConditionHandle to match the Count value in ALIYUN::ROS::WaitCondition. |
Return values
Fn::GetAtt
-
CurlCli: the cURL command generated by ALIYUN::ROS::WaitConditionHandle. Run this command to send user data execution results to ROS.
-
WindowsCurlCli: the cURL command prefix for Windows. Install curl.exe and add it to PATH before use. Append
-d "{\"status\": \" SUCCESS \"}for success or-d "{\"status\": \" FAILURE \"}for failure. -
PowerShellCurlCli: the cURL command prefix for PowerShell 3.0 or later. Check your version with
$PSVersionTable.PSVersion. Append-Body '{"status": " SUCCESS "}for success or-Body '{"status": " FAILURE "}for failure. -
Headers: the HTTP POST request header for sending execution status signals to your program.
-
URL: the HTTP POST request URL for sending execution status signals to your program.
-
Use the id parameter (STRING) in the request body of CurlCli, WindowsCurlCli, or PowerShellCurlCli to specify a signal ID.
Example:
-d "{\"status\": \" SUCCESS \", \"id\": \"test\".Signals with the same ID overwrite previous ones.
If no signal ID is specified, ROS auto-assigns an integer ID equal to the existing signal count + 1.
-
Use the
reasonparameter (STRING) to specify why execution succeeded or failed. The value appears in the stack event that records the signal notification.Example:
-d "{\"status\": \" SUCCESS \", \"reason\": \"nginx is installed successfully.\"}".The
reasonvalue is recorded in the corresponding stack event. -
Use the
dataparameter (STRING) to attach data to the signal. Retrieve this data through the Data, ErrorData, or JoinedErrorData return values of ALIYUN::ROS::WaitCondition.Example:
-d "{\"id\" : \"ssh_pub_key\", \"data\" : \"$pub_key\"}". -
The
statusparameter specifies the signal type:SUCCESS,FAILURE, orWARNING. Signal types determine the resource operation result, in descending priority:-
A
FAILUREsignal causes the resource operation to fail. -
If fewer signals than the Count value are received within the timeout period, the operation times out.
-
If the signal count meets or exceeds Count but all signals are
WARNING, the operation fails. -
Otherwise, the operation succeeds.
-