Attaches an annotation to an Amazon S3 object¶
Description¶
Attaches an annotation to an Amazon S3 object. An annotation is a named payload of 1 byte to 1 MiB that you can associate with a specific object or object version. Each object can have up to 1,000 annotations.
For annotation naming rules and restrictions, see Annotation naming guidelines in the Amazon S3 User Guide.
Annotations inherit the encryption of their parent object. For objects without server-side encryption, annotations are encrypted with SSE-S3 (the default for new objects). Objects encrypted with SSE-C cannot have annotations.
To use this operation, you must have the s3:PutObjectAnnotation permission. If the bucket has Requester Pays enabled, you must include the x-amz-request-payer header.
Annotations are not supported by the following features: S3 Inventory Reports, API Gateway, S3 Storage Lens, Amazon S3 File Gateway, Amazon FSx, S3 on Outposts, and S3 Express One Zone (directory buckets).
The following operations are related to put_object_annotation:
Usage¶
s3_put_object_annotation(Bucket, Key, VersionId, AnnotationName,
AnnotationPayload, ObjectIfMatch, ChecksumAlgorithm, ChecksumCRC32,
ChecksumCRC32C, ChecksumCRC64NVME, ChecksumSHA1, ChecksumSHA256,
ChecksumSHA512, ChecksumMD5, ChecksumXXHASH64, ChecksumXXHASH3,
ChecksumXXHASH128, ContentMD5, RequestPayer, ExpectedBucketOwner)
Arguments¶
Bucket
[required] The name of the bucket that contains the object.
Key
[required] The object key.
VersionId
The version ID of the object to attach the annotation to.
AnnotationName
[required] The name of the annotation.
Length Constraints: Minimum length of 1. Maximum length of 512 bytes.
AnnotationPayload
[required] The annotation payload. Must be between 1 byte and 1 MiB in size, and must be valid UTF-8 encoded text. If the payload contains invalid UTF-8 bytes, the request fails with HTTP 415 (Unsupported Media Type). To store binary data, encode the payload using Base64 before uploading.
ObjectIfMatch
If specified, the operation only succeeds if the object's ETag matches the provided value.
ChecksumAlgorithm
The checksum algorithm to use. Supported values: CRC32, CRC32C, CRC64NVME, SHA1, SHA256, SHA512, MD5, XXHASH64, XXHASH3, XXHASH128.
ChecksumCRC32
Base64-encoded CRC32 checksum of the annotation payload.
ChecksumCRC32C
Base64-encoded CRC32C checksum of the annotation payload.
ChecksumCRC64NVME
Base64-encoded CRC64NVME checksum of the annotation payload.
ChecksumSHA1
Base64-encoded SHA1 checksum of the annotation payload.
ChecksumSHA256
Base64-encoded SHA256 checksum of the annotation payload.
ChecksumSHA512
Base64-encoded SHA512 checksum of the annotation payload.
ChecksumMD5
Base64-encoded MD5 checksum of the annotation payload.
ChecksumXXHASH64
Base64-encoded XXHASH64 checksum of the annotation payload.
ChecksumXXHASH3
Base64-encoded XXHASH3 checksum of the annotation payload.
ChecksumXXHASH128
Base64-encoded XXHASH128 checksum of the annotation payload.
ContentMD5
Base64-encoded MD5 digest of the message.
RequestPayer
Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.
This functionality is not supported for directory buckets.
ExpectedBucketOwner
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.
Value¶
A list with the following syntax:
list(
Key = "string",
AnnotationName = "string",
ObjectVersionId = "string",
ETag = "string",
ChecksumCRC32 = "string",
ChecksumCRC32C = "string",
ChecksumCRC64NVME = "string",
ChecksumSHA1 = "string",
ChecksumSHA256 = "string",
ChecksumSHA512 = "string",
ChecksumMD5 = "string",
ChecksumXXHASH64 = "string",
ChecksumXXHASH3 = "string",
ChecksumXXHASH128 = "string",
ChecksumType = "COMPOSITE"|"FULL_OBJECT",
ServerSideEncryption = "AES256"|"aws:fsx"|"aws:backup"|"aws:kms"|"aws:kms:dsse",
RequestCharged = "requester"
)
Request syntax¶
svc$put_object_annotation(
Bucket = "string",
Key = "string",
VersionId = "string",
AnnotationName = "string",
AnnotationPayload = raw,
ObjectIfMatch = "string",
ChecksumAlgorithm = "CRC32"|"CRC32C"|"SHA1"|"SHA256"|"CRC64NVME"|"SHA512"|"MD5"|"XXHASH64"|"XXHASH3"|"XXHASH128",
ChecksumCRC32 = "string",
ChecksumCRC32C = "string",
ChecksumCRC64NVME = "string",
ChecksumSHA1 = "string",
ChecksumSHA256 = "string",
ChecksumSHA512 = "string",
ChecksumMD5 = "string",
ChecksumXXHASH64 = "string",
ChecksumXXHASH3 = "string",
ChecksumXXHASH128 = "string",
ContentMD5 = "string",
RequestPayer = "requester",
ExpectedBucketOwner = "string"
)