Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . ssm ]



Creates a new Maintenance Window.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--name <value>
[--description <value>]
--schedule <value>
--duration <value>
--cutoff <value>
--allow-unassociated-targets | --no-allow-unassociated-targets
[--client-token <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--name (string)

The name of the Maintenance Window.

--description (string)

An optional description for the Maintenance Window. We recommend specifying a description to help you organize your Maintenance Windows.

--schedule (string)

The schedule of the Maintenance Window in the form of a cron or rate expression.

--duration (integer)

The duration of the Maintenance Window in hours.

--cutoff (integer)

The number of hours before the end of the Maintenance Window that Systems Manager stops scheduling new tasks for execution.

--allow-unassociated-targets | --no-allow-unassociated-targets (boolean)

Enables a Maintenance Window task to execute on managed instances, even if you have not registered those instances as targets. If enabled, then you must specify the unregistered instances (by instance ID) when you register a task with the Maintenance Window

If you don't enable this option, then you must specify previously-registered targets when you register a task with the Maintenance Window.

--client-token (string)

User-provided idempotency token.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


To create a maintenance window

This example creates a new maintenance window with the specified name that runs at 4 PM on every Tuesday for 4 hours, with a 1 hour cutoff, and that allows unassociated targets.


aws ssm create-maintenance-window --name "My-First-Maintenance-Window" --schedule "cron(0 16 ? * TUE *)" --duration 4 --cutoff 1 --allow-unassociated-targets


      "WindowId": "mw-ab12cd34ef56gh78"


WindowId -> (string)

The ID of the created Maintenance Window.