update_maintenance_window
¶
update_maintenance_window(
window_id: MaintenanceWindowId,
*,
config_overrides: Optional[SSMClientConfig] = 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/ssm.py
11503 11504 11505 11506 11507 11508 11509 11510 11511 11512 11513 11514 11515 11516 11517 11518 11519 11520 11521 11522 11523 11524 11525 11526 11527 11528 11529 11530 11531 11532 11533 11534 11535 11536 11537 11538 11539 11540 11541 11542 11543 11544 11545 11546 11547 11548 11549 11550 11551 11552 11553 11554 11555 11556 11557 11558 11559 11560 11561 11562 11563 11564 11565 11566 11567 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 11584 11585 11586 11587 11588 11589 11590 11591 11592 11593 11594 11595 11596 11597 11598 11599 11600 11601 11602 11603 11604 11605 11606 11607 11608 11609 11610 11611 11612 11613 11614 11615 11616 11617 11618 11619 11620 11621 11622 11623 11624 11625 11626 11627 11628 11629 11630 11631 11632 11633 11634 11635 11636 11637 11638 11639 11640 11641 11642 | |