describe_maintenance_windows

describe_maintenance_windows(**kwargs)

Retrieves the maintenance windows in an Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

response = client.describe_maintenance_windows(
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
Parameters
  • Filters (list) --

    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 .

    • (dict) --

      Filter used in the request. Supported filter keys depend on the API operation that includes the filter. API operations that use MaintenanceWindowFilter> include the following:

      • DescribeMaintenanceWindowExecutions
      • DescribeMaintenanceWindowExecutionTaskInvocations
      • DescribeMaintenanceWindowExecutionTasks
      • DescribeMaintenanceWindows
      • DescribeMaintenanceWindowTargets
      • DescribeMaintenanceWindowTasks
      • Key (string) --

        The name of the filter.

      • Values (list) --

        The filter values.

        • (string) --
  • MaxResults (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.
  • NextToken (string) -- The token for the next set of items to return. (You received this token from a previous call.)
Return type

dict

Returns

Response Syntax

{
    'WindowIdentities': [
        {
            'WindowId': 'string',
            'Name': 'string',
            'Description': 'string',
            'Enabled': True|False,
            'Duration': 123,
            'Cutoff': 123,
            'Schedule': 'string',
            'ScheduleTimezone': 'string',
            'ScheduleOffset': 123,
            'EndDate': 'string',
            'StartDate': 'string',
            'NextExecutionTime': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • WindowIdentities (list) --

      Information about the maintenance windows.

      • (dict) --

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

          Indicates 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 Amazon Web Services Systems Manager stops scheduling new tasks for execution.

        • Schedule (string) --

          The schedule of the maintenance window in the form of a cron or rate expression.

        • ScheduleTimezone (string) --

          The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format.

        • ScheduleOffset (integer) --

          The number of days to wait to run a maintenance window after the scheduled cron expression date and time.

        • EndDate (string) --

          The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive.

        • StartDate (string) --

          The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active.

        • NextExecutionTime (string) --

          The next time the maintenance window will actually run, taking into account any specified times for the maintenance window to become active or inactive.

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

Exceptions

  • SSM.Client.exceptions.InternalServerError