Usage
Use this action for Operations and Maintenance (O&M) scenarios that require a waiting period. For example, an ECS instance for a new application may need to prefetch data. This action pauses the task to allow the prefetch to complete before subsequent operations can run.
Syntax
YAML format
Tasks:
- Name: sleepTask # The name of the task.
Action: ACS::Sleep
Properties:
Duration: PT15M # Optional. The sleep duration in the ISO 8601 format. Specify either Duration or EndDate.
EndDate: '2025-01-01T00:00:00Z' # Optional. The absolute time when the sleep ends, in the ISO 8601 format. Specify either Duration or EndDate.JSON format (See the YAML example for comments.)
{
"Tasks": [
{
"Name": "sleepTask",
"Action": "ACS::Sleep",
"Properties": {
"Duration": "PT15M", // Optional. The sleep duration in the ISO 8601 format. Specify either Duration or EndDate.
"EndDate": "2025-01-01T00:00:00Z" // Optional. The absolute time when the sleep ends, in the ISO 8601 format. Specify either Duration or EndDate.
}
}
]
}Notes
Duration
The ISO 8601 standard defines time durations.
The minimum duration is 1 second.
Case-insensitive.
Examples:
1S or 1s: A simplified format for 1 second.
1M or 1m: A simplified format for 1 minute.
1H or 1h: A simplified format for 1 hour.
1H2M: A simplified format for 1 hour and 2 minutes.
PT1H2M: The standard format for 1 hour and 2 minutes.
EndDate
The ISO 8601 standard defines absolute time points.
The time must be in Coordinated Universal Time (UTC) and end with
Z.Case-insensitive.
Example:
2025-01-01T00:00:00Z: The standard format for 00:00:00 on January 1, 2025 (UTC).