| Server IP : 167.99.254.82 / Your IP : 216.73.216.188 Web Server : Apache System : Linux host.techisquad.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : pawluxera ( 1011) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/awscli/examples/ssm/ |
Upload File : |
**Example 1: To create a maintenance window**
The following ``create-maintenance-window`` example creates a new maintenance window that every five minutes for up to two hours (as needed), prevents new tasks from starting within one hour of the end of the maintenance window execution, allows unassociated targets (instances that you haven't registered with the maintenance window), and indicates through the use of custom tags that its creator intends to use it in a tutorial. ::
aws ssm create-maintenance-window \
--name "My-Tutorial-Maintenance-Window" \
--schedule "rate(5 minutes)" \
--duration 2 --cutoff 1 \
--allow-unassociated-targets \
--tags "Key=Purpose,Value=Tutorial"
Output::
{
"WindowId": "mw-0c50858d01EXAMPLE"
}
**Example 2: To create a maintenance window that runs only once**
The following ``create-maintenance-window`` example creates a new maintenance window that only runs one time on the specified date and time. ::
aws ssm create-maintenance-window \
--name My-One-Time-Maintenance-Window \
--schedule "at(2020-05-14T15:55:00)" \
--duration 5 \
--cutoff 2 \
--allow-unassociated-targets \
--tags "Key=Environment,Value=Production"
Output::
{
"WindowId": "mw-01234567890abcdef"
}
For more information, see `Maintenance Windows <https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-maintenance.html>`_ in the *AWS Systems Manager User Guide*.