update_maintenance_window
async
¶
update_maintenance_window(
window_id: MaintenanceWindowId,
*,
config_overrides: Optional[AsyncSSMClientConfig] = None,
name: Optional[MaintenanceWindowName] = None,
description: Optional[MaintenanceWindowDescription] = None,
start_date: Optional[MaintenanceWindowStringDateTime] = None,
end_date: Optional[MaintenanceWindowStringDateTime] = None,
schedule: Optional[MaintenanceWindowSchedule] = None,
schedule_timezone: Optional[MaintenanceWindowTimezone] = None,
schedule_offset: Optional[MaintenanceWindowOffset] = None,
duration: Optional[MaintenanceWindowDurationHours] = None,
cutoff: Optional[MaintenanceWindowCutoff] = None,
allow_unassociated_targets: Optional[
MaintenanceWindowAllowUnassociatedTargets
] = None,
enabled: Optional[MaintenanceWindowEnabled] = None,
replace: Optional[Boolean] = None,
) -> UpdateMaintenanceWindowResult
Updates an existing maintenance window. Only specified parameters are modified.
The value you specify for Duration determines the specific end time for the maintenance window based on the time it begins. No maintenance window tasks are permitted to start after the resulting endtime minus the number of hours you specify for Cutoff. For example, if the maintenance window starts at 3 PM, the duration is three hours, and the value you specify for Cutoff is one hour, no maintenance window tasks can start after 5 PM.
Parameters:
-
window_id(MaintenanceWindowId) –The ID of the maintenance window to update.
-
name(Optional[MaintenanceWindowName], default:None) –The name of the maintenance window.
-
description(Optional[MaintenanceWindowDescription], default:None) –An optional description for the update request.
-
start_date(Optional[MaintenanceWindowStringDateTime], default:None) –The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become active.
StartDateallows you to delay activation of the maintenance window until the specified future date.When using a rate schedule, if you provide a start date that occurs in the past, the current date and time are used as the start date.
-
end_date(Optional[MaintenanceWindowStringDateTime], default:None) –The date and time, in ISO-8601 Extended format, for when you want the maintenance window to become inactive.
EndDateallows you to set a date and time in the future when the maintenance window will no longer run. -
schedule(Optional[MaintenanceWindowSchedule], default:None) –The schedule of the maintenance window in the form of a cron or rate expression.
-
schedule_timezone(Optional[MaintenanceWindowTimezone], default:None) –The time zone that the scheduled maintenance window executions are based on, in Internet Assigned Numbers Authority (IANA) format. For example: "America/Los_Angeles", "UTC", or "Asia/Seoul". For more information, see the Time Zone Database on the IANA website.
-
schedule_offset(Optional[MaintenanceWindowOffset], default:None) –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(30 23 ? * TUE#3 *)If the schedule offset is
2, the maintenance window won't run until two days later. -
duration(Optional[MaintenanceWindowDurationHours], default:None) –The duration of the maintenance window in hours.
-
cutoff(Optional[MaintenanceWindowCutoff], default:None) –The number of hours before the end of the maintenance window that Amazon Web Services Systems Manager stops scheduling new tasks for execution.
-
allow_unassociated_targets(Optional[MaintenanceWindowAllowUnassociatedTargets], default:None) –Whether targets must be registered with the maintenance window before tasks can be defined for those targets.
-
enabled(Optional[MaintenanceWindowEnabled], default:None) –Whether the maintenance window is enabled.
-
replace(Optional[Boolean], default:None) –If
True, then all fields that are required by the CreateMaintenanceWindow operation are also required for this API request. Optional fields that aren't specified are set to null.
Raises:
-
DoesNotExistException–Error returned when the ID specified for a resource, such as a maintenance window or patch baseline, doesn't exist.
For information about resource quotas in Amazon Web Services Systems Manager, see Systems Manager service quotas in the Amazon Web Services General Reference.
-
InternalServerError–An error occurred on the server side.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ssm/_services/async_ssm.py
11651 11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 11681 11682 11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 11712 11713 11714 11715 11716 11717 11718 11719 11720 11721 11722 11723 11724 11725 11726 11727 11728 11729 11730 11731 11732 11733 11734 11735 11736 11737 11738 11739 11740 11741 11742 11743 11744 11745 11746 11747 11748 11749 11750 11751 11752 11753 11754 11755 11756 11757 11758 11759 11760 11761 11762 11763 11764 11765 11766 11767 11768 11769 11770 11771 11772 11773 11774 11775 11776 11777 11778 11779 11780 11781 11782 11783 11784 11785 11786 11787 11788 11789 11790 11791 | |