enable_image_deprecation
async
¶
enable_image_deprecation(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = 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/async_ec2.py
41878 41879 41880 41881 41882 41883 41884 41885 41886 41887 41888 41889 41890 41891 41892 41893 41894 41895 41896 41897 41898 41899 41900 41901 41902 41903 41904 41905 41906 41907 41908 41909 41910 41911 41912 41913 41914 41915 41916 41917 41918 41919 41920 41921 41922 41923 41924 41925 41926 41927 41928 41929 41930 41931 | |