modify_instance_event_window
¶
modify_instance_event_window(
*,
config_overrides: Optional[EC2ClientConfig] = None,
dry_run: Optional[Boolean] = None,
name: Optional[String] = None,
instance_event_window_id: Optional[InstanceEventWindowId] = None,
time_ranges: Optional[InstanceEventWindowTimeRangeRequestSet] = None,
cron_expression: Optional[InstanceEventWindowCronExpression] = None,
) -> ModifyInstanceEventWindowResult
Modifies the specified event window.
You can define either a set of time ranges or a cron expression when modifying the event window, but not both.
To modify the targets associated with the event window, use the AssociateInstanceEventWindow and DisassociateInstanceEventWindow API.
If Amazon Web Services has already scheduled an event, modifying an event window won't change the time of the scheduled event.
For more information, see Define event windows for scheduled events in the Amazon EC2 User Guide.
Parameters:
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
name(Optional[String], default:None) –The name of the event window.
-
instance_event_window_id(Optional[InstanceEventWindowId], default:None) –The ID of the event window.
-
time_ranges(Optional[InstanceEventWindowTimeRangeRequestSet], default:None) –The time ranges of the event window.
-
cron_expression(Optional[InstanceEventWindowCronExpression], default:None) –The cron expression of the event window, for example,
* 0-4,20-23 * * 1,5.Constraints:
-
Only hour and day of the week values are supported.
-
For day of the week values, you can specify either integers
0through6, or alternative single valuesSUNthroughSAT. -
The minute, month, and year must be specified by
*. -
The hour value must be one or a multiple range, for example,
0-4or0-4,20-23. -
Each hour range must be >= 2 hours, for example,
0-2or20-23. -
The event window must be >= 4 hours. The combined total time ranges in the event window must be >= 4 hours.
For more information about cron expressions, see cron on the Wikipedia website.
-
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
50530 50531 50532 50533 50534 50535 50536 50537 50538 50539 50540 50541 50542 50543 50544 50545 50546 50547 50548 50549 50550 50551 50552 50553 50554 50555 50556 50557 50558 50559 50560 50561 50562 50563 50564 50565 50566 50567 50568 50569 50570 50571 50572 50573 50574 50575 50576 50577 50578 50579 50580 50581 50582 50583 50584 50585 50586 50587 50588 50589 50590 50591 50592 50593 50594 | |