attach_image_watermark
¶
attach_image_watermark(
*,
config_overrides: Optional[EC2ClientConfig] = None,
image_id: Optional[ImageId] = None,
watermark_name: Optional[ImageWatermarkNameRequest] = None,
dry_run: Optional[Boolean] = None,
) -> AttachImageWatermarkResult
Attaches a watermark to a non-public AMI. The watermark is a structured identifier that automatically propagates to all derivative images created through CreateImage, and CopyImage.
Only the AMI owner can attach watermarks. Watermarks cannot be added to public AMIs.
Parameters:
-
image_id(Optional[ImageId], default:None) –The ID of the AMI.
-
watermark_name(Optional[ImageWatermarkNameRequest], default:None) –The name for the watermark. Combined with the caller's account ID to form the
WatermarkKey(accountId:watermarkName).Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)
-
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.