2020/06/18 - Amazon Simple Systems Manager (SSM) - 4 updated api methods
Changes Update ssm client to latest version
{'ScheduleOffset': 'integer'}
Creates a new maintenance window.
See also: AWS API Documentation
Request Syntax
client.create_maintenance_window( Name='string', Description='string', StartDate='string', EndDate='string', Schedule='string', ScheduleTimezone='string', ScheduleOffset=123, Duration=123, Cutoff=123, AllowUnassociatedTargets=True|False, ClientToken='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The name of the maintenance window.
string
An optional description for the maintenance window. We recommend specifying a description to help you organize your maintenance windows.
string
The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active. StartDate allows you to delay activation of the maintenance window until the specified future date.
string
The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.
string
[REQUIRED]
The schedule of the maintenance window in the form of a cron or rate expression.
string
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.
integer
The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
For example, the following cron expression schedules a maintenance window to run on the third Tuesday of every month at 11:30 PM.
cron(0 30 23 ? * TUE#3 *)
If the schedule offset is 2, the maintenance window won't run until two days later.
integer
[REQUIRED]
The duration of the maintenance window in hours.
integer
[REQUIRED]
The number of hours before the end of the maintenance window that Systems Manager stops scheduling new tasks for execution.
boolean
[REQUIRED]
Enables a maintenance window task to run 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.
string
User-provided idempotency token.
This field is autopopulated if not provided.
list
Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a maintenance window to identify the type of tasks it will run, the types of targets, and the environment it will run in. In this case, you could specify the following key name/value pairs:
Key=TaskType,Value=AgentUpdate
Key=OS,Value=Windows
Key=Environment,Value=Production
(dict) --
Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, maintenance windows, Parameter Store parameters, and patch baselines.
Key (string) -- [REQUIRED]
The name of the tag.
Value (string) -- [REQUIRED]
The value of the tag.
dict
Response Syntax
{ 'WindowId': 'string' }
Response Structure
(dict) --
WindowId (string) --
The ID of the created maintenance window.
{'WindowIdentities': {'ScheduleOffset': 'integer'}}
Retrieves the maintenance windows in an AWS account.
See also: AWS API Documentation
Request Syntax
client.describe_maintenance_windows( Filters=[ { 'Key': 'string', 'Values': [ 'string', ] }, ], MaxResults=123, NextToken='string' )
list
Optional filters used to narrow down the scope of the returned maintenance windows. Supported filter keys are Name and Enabled.
(dict) --
Filter used in the request. Supported filter keys are Name and Enabled.
Key (string) --
The name of the filter.
Values (list) --
The filter values.
(string) --
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.
string
The token for the next set of items to return. (You received this token from a previous call.)
dict
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 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.
{'ScheduleOffset': 'integer'}
Retrieves a maintenance window.
See also: AWS API Documentation
Request Syntax
client.get_maintenance_window( WindowId='string' )
string
[REQUIRED]
The ID of the maintenance window for which you want to retrieve information.
dict
Response Syntax
{ 'WindowId': 'string', 'Name': 'string', 'Description': 'string', 'StartDate': 'string', 'EndDate': 'string', 'Schedule': 'string', 'ScheduleTimezone': 'string', 'ScheduleOffset': 123, 'NextExecutionTime': 'string', 'Duration': 123, 'Cutoff': 123, 'AllowUnassociatedTargets': True|False, 'Enabled': True|False, 'CreatedDate': datetime(2015, 1, 1), 'ModifiedDate': datetime(2015, 1, 1) }
Response Structure
(dict) --
WindowId (string) --
The ID of the created maintenance window.
Name (string) --
The name of the maintenance window.
Description (string) --
The description of the maintenance window.
StartDate (string) --
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active. The maintenance window will not run before this specified time.
EndDate (string) --
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive. The maintenance window will not run after this specified time.
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. For example: "America/Los_Angeles", "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.
ScheduleOffset (integer) --
The number of days to wait to run a maintenance window after the scheduled CRON expression date and time.
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.
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.
AllowUnassociatedTargets (boolean) --
Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
Enabled (boolean) --
Indicates whether the maintenance window is enabled.
CreatedDate (datetime) --
The date the maintenance window was created.
ModifiedDate (datetime) --
The date the maintenance window was last modified.
{'ScheduleOffset': 'integer'}
Updates an existing maintenance window. Only specified parameters are modified.
See also: AWS API Documentation
Request Syntax
client.update_maintenance_window( WindowId='string', Name='string', Description='string', StartDate='string', EndDate='string', Schedule='string', ScheduleTimezone='string', ScheduleOffset=123, Duration=123, Cutoff=123, AllowUnassociatedTargets=True|False, Enabled=True|False, Replace=True|False )
string
[REQUIRED]
The ID of the maintenance window to update.
string
The name of the maintenance window.
string
An optional description for the update request.
string
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.
string
The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive. EndDate allows you to set a date and time in the future when the maintenance window will no longer run.
string
The schedule of the maintenance window in the form of a cron or rate expression.
string
The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.
integer
The number of days to wait after the date and time specified by a CRON expression before running the maintenance window.
For example, the following cron expression schedules a maintenance window to run the third Tuesday of every month at 11:30 PM.
cron(0 30 23 ? * TUE#3 *)
If the schedule offset is 2, the maintenance window won't run until two days later.
integer
The duration of the maintenance window in hours.
integer
The number of hours before the end of the maintenance window that Systems Manager stops scheduling new tasks for execution.
boolean
Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
boolean
Whether the maintenance window is enabled.
boolean
If True, then all fields that are required by the CreateMaintenanceWindow action are also required for this API request. Optional fields that are not specified are set to null.
dict
Response Syntax
{ 'WindowId': 'string', 'Name': 'string', 'Description': 'string', 'StartDate': 'string', 'EndDate': 'string', 'Schedule': 'string', 'ScheduleTimezone': 'string', 'ScheduleOffset': 123, 'Duration': 123, 'Cutoff': 123, 'AllowUnassociatedTargets': True|False, 'Enabled': True|False }
Response Structure
(dict) --
WindowId (string) --
The ID of the created maintenance window.
Name (string) --
The name of the maintenance window.
Description (string) --
An optional description of the update.
StartDate (string) --
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become active. The maintenance window will not run before this specified time.
EndDate (string) --
The date and time, in ISO-8601 Extended format, for when the maintenance window is scheduled to become inactive. The maintenance window will not run after this specified time.
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. For example: "America/Los_Angeles", "etc/UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.
ScheduleOffset (integer) --
The number of days to wait to run a maintenance window after the scheduled CRON expression date and time.
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.
AllowUnassociatedTargets (boolean) --
Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
Enabled (boolean) --
Whether the maintenance window is enabled.