enable_image_deregistration_protection
async
¶
enable_image_deregistration_protection(
*,
config_overrides: Optional[AsyncEC2ClientConfig] = None,
image_id: Optional[ImageId] = None,
with_cooldown: Optional[Boolean] = None,
dry_run: Optional[Boolean] = None,
) -> EnableImageDeregistrationProtectionResult
Enables deregistration protection for an AMI. When deregistration protection is enabled, the AMI can't be deregistered.
To allow the AMI to be deregistered, you must first disable deregistration protection.
For more information, see Protect an Amazon EC2 AMI from deregistration in the Amazon EC2 User Guide.
Parameters:
-
image_id(Optional[ImageId], default:None) –The ID of the AMI.
-
with_cooldown(Optional[Boolean], default:None) –If
true, enforces deregistration protection for 24 hours after deregistration protection is disabled. -
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
41933 41934 41935 41936 41937 41938 41939 41940 41941 41942 41943 41944 41945 41946 41947 41948 41949 41950 41951 41952 41953 41954 41955 41956 41957 41958 41959 41960 41961 41962 41963 41964 41965 41966 41967 41968 41969 41970 41971 41972 41973 41974 41975 41976 41977 41978 41979 41980 41981 41982 41983 41984 | |