enable_image_deprecation
¶
enable_image_deprecation(
*,
config_overrides: Optional[EC2ClientConfig] = None,
image_id: Optional[ImageId] = None,
deprecate_at: Optional[MillisecondDateTime] = None,
dry_run: Optional[Boolean] = None,
) -> EnableImageDeprecationResult
Enables deprecation of the specified AMI at the specified date and time.
For more information, see Deprecate an AMI in the Amazon EC2 User Guide.
Parameters:
-
image_id(Optional[ImageId], default:None) –The ID of the AMI.
-
deprecate_at(Optional[MillisecondDateTime], default:None) –The date and time to deprecate the AMI, in UTC, in the following format: YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute.
You can’t specify a date in the past. The upper limit for
DeprecateAtis 10 years from now, except for public AMIs, where the upper limit is 2 years from the creation date. -
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.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
41315 41316 41317 41318 41319 41320 41321 41322 41323 41324 41325 41326 41327 41328 41329 41330 41331 41332 41333 41334 41335 41336 41337 41338 41339 41340 41341 41342 41343 41344 41345 41346 41347 41348 41349 41350 41351 41352 41353 41354 41355 41356 41357 41358 41359 41360 41361 41362 41363 41364 41365 41366 41367 | |