DescribeMaintenanceWindows - AWS Systems Manager


Retrieves the maintenance windows in an AWS account.

Request Syntax

{ "Filters": [ { "Key": "string", "Values": [ "string" ] } ], "MaxResults": number, "NextToken": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


Optional filters used to narrow down the scope of the returned maintenance windows. Supported filter keys are Name and Enabled. For example, Name=MyMaintenanceWindow and Enabled=True.

Type: Array of MaintenanceWindowFilter objects

Array Members: Minimum number of 0 items. Maximum number of 5 items.

Required: No


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.

Type: Integer

Valid Range: Minimum value of 10. Maximum value of 100.

Required: No


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

Type: String

Required: No

Response Syntax

{ "NextToken": "string", "WindowIdentities": [ { "Cutoff": number, "Description": "string", "Duration": number, "Enabled": boolean, "EndDate": "string", "Name": "string", "NextExecutionTime": "string", "Schedule": "string", "ScheduleOffset": number, "ScheduleTimezone": "string", "StartDate": "string", "WindowId": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


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

Type: String


Information about the maintenance windows.

Type: Array of MaintenanceWindowIdentity objects


For information about the errors that are common to all actions, see Common Errors.


An error occurred on the server side.

HTTP Status Code: 500



This example illustrates one usage of DescribeMaintenanceWindows.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity Content-Length: 2 X-Amz-Target: AmazonSSM.DescribeMaintenanceWindows X-Amz-Date: 20180312T202609Z User-Agent: aws-cli/1.11.180 Python/2.7.9 Windows/8 botocore/1.7.38 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20180312/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE { "Filters": [ { "Values": [ "true" ], "Key": "Enabled" } ] }

Sample Response

{ "WindowIdentities": [ { "WindowId": "mw-0c5ed765acEXAMPLE", "Name": "Windows-Testing-Maintenance-Window", "Description": "Standard maintenance windows for Test Servers", "Enabled": true, "Duration": 6, "Cutoff": 2, "Schedule": "rate(2 weeks)", "NextExecutionTime": "2020-02-24T23:52:15.099Z" }, { "WindowId": "mw-0c50858d01EXAMPLE", "Name": "Windows-Staging-Maintenance-Window", "Description": "Standard maintenance windows for Staging Servers", "Enabled": true, "Duration": 10, "Cutoff": 4, "Schedule": "cron(0 0 6 ? * MON *)", "NextExecutionTime": "2020-03-02T06:00:00.099Z" }, { "WindowId": "mw-07f80c1841EXAMPLE", "Cutoff": 4, "Name": "Windows-Production-Maintenance-Window", "Description": "Standard maintenance windows for Production Servers", "Enabled": true, "Duration": 10, "Schedule": "cron(0 0 6 ? * WED *)", "NextExecutionTime": "2020-03-05T06:00:00.099Z" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: