Table Of Contents


User Guide

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

[ aws . ssm ]



Retrieves the Maintenance Windows in an AWS account.

See also: AWS API Documentation


[--filters <value>]
[--max-results <value>]
[--next-token <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--filters (list)

Optional filters used to narrow down the scope of the returned Maintenance Windows. Supported filter keys are Name and Enabled.

Shorthand Syntax:

Key=string,Values=string,string ...

JSON Syntax:

    "Key": "string",
    "Values": ["string", ...]

--max-results (integer)

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

--next-token (string)

The token for the next set of items to return. (You received this token from a previous call.)

--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.

--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.


To list all maintenance windows

This example lists all maintenance windows on your account.


aws ssm describe-maintenance-windows


  "WindowIdentities": [
          "Duration": 2,
          "Cutoff": 1,
          "WindowId": "mw-03eb9db42890fb82d",
          "Enabled": true,
          "Name": "TestMaintWin"

To list all enabled maintenance windows

This example lists all enabled maintenance windows.


aws ssm describe-maintenance-windows --filters "Key=Enabled,Values=true"


WindowIdentities -> (list)

Information about the Maintenance Windows.


Information about the Maintenance Window.

WindowId -> (string)

The ID of the Maintenance Window.

Name -> (string)

The name of the Maintenance Window.

Description -> (string)

A description of the Maintenance Window.

Enabled -> (boolean)

Whether the Maintenance Window is enabled.

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.

NextToken -> (string)

The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.