modify_instance_event_window
async
¶
modify_instance_event_window(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
51231 51232 51233 51234 51235 51236 51237 51238 51239 51240 51241 51242 51243 51244 51245 51246 51247 51248 51249 51250 51251 51252 51253 51254 51255 51256 51257 51258 51259 51260 51261 51262 51263 51264 51265 51266 51267 51268 51269 51270 51271 51272 51273 51274 51275 51276 51277 51278 51279 51280 51281 51282 51283 51284 51285 51286 51287 51288 51289 51290 51291 51292 51293 51294 51295 51296 | |