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.
The following operations are related to PutObjectAnnotation :
See also: AWS API Documentation
put-object-annotation
--bucket <value>
--key <value>
[--version-id <value>]
--annotation-name <value>
--annotation-payload <value>
[--object-if-match <value>]
[--checksum-algorithm <value>]
[--checksum-crc32 <value>]
[--checksum-crc32-c <value>]
[--checksum-crc64-nvme <value>]
[--checksum-sha1 <value>]
[--checksum-sha256 <value>]
[--checksum-sha512 <value>]
[--checksum-md5 <value>]
[--checksum-xxhash64 <value>]
[--checksum-xxhash3 <value>]
[--checksum-xxhash128 <value>]
[--content-md5 <value>]
[--request-payer <value>]
[--expected-bucket-owner <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
[--cli-binary-format <value>]
[--no-cli-pager]
[--cli-auto-prompt]
[--no-cli-auto-prompt]
[--cli-error-format <value>]
--bucket (string) [required]
The name of the bucket that contains the object.
--key (string) [required]
The object key.
Constraints:
- min:
1
--version-id (string)
The version ID of the object to attach the annotation to.
--annotation-name (string) [required]
The name of the annotation.
Length Constraints: Minimum length of 1. Maximum length of 512 bytes.
--annotation-payload (streaming blob) [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.
Note
This argument is of type: streaming blob. Its value must be the path to a file (e.g.path/to/file) and must not be prefixed withfile://orfileb://
--object-if-match (string)
If specified, the operation only succeeds if the object’s ETag matches the provided value.
--checksum-algorithm (string)
The checksum algorithm to use. Supported values:
CRC32,CRC32C,CRC64NVME,SHA1,SHA256,SHA512,MD5,XXHASH64,XXHASH3,XXHASH128.Possible values:
CRC32CRC32CSHA1SHA256CRC64NVMESHA512MD5XXHASH64XXHASH3XXHASH128
--checksum-crc32 (string)
Base64-encoded CRC32 checksum of the annotation payload.
--checksum-crc32-c (string)
Base64-encoded CRC32C checksum of the annotation payload.
--checksum-crc64-nvme (string)
Base64-encoded CRC64NVME checksum of the annotation payload.
--checksum-sha1 (string)
Base64-encoded SHA1 checksum of the annotation payload.
--checksum-sha256 (string)
Base64-encoded SHA256 checksum of the annotation payload.
--checksum-sha512 (string)
Base64-encoded SHA512 checksum of the annotation payload.
--checksum-md5 (string)
Base64-encoded MD5 checksum of the annotation payload.
--checksum-xxhash64 (string)
Base64-encoded XXHASH64 checksum of the annotation payload.
--checksum-xxhash3 (string)
Base64-encoded XXHASH3 checksum of the annotation payload.
--checksum-xxhash128 (string)
Base64-encoded XXHASH128 checksum of the annotation payload.
--content-md5 (string)
Base64-encoded MD5 digest of the message.
--request-payer (string)
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 .
Note
This functionality is not supported for directory buckets.Possible values:
requester
--expected-bucket-owner (string)
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.
--cli-input-json | --cli-input-yaml (string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.
--generate-cli-skeleton (string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command. The generated JSON skeleton is not stable between versions of the AWS CLI and there are no backwards compatibility guarantees in the JSON skeleton generated.
--debug (boolean)
Turn on debug logging.
--endpoint-url (string)
Override command’s default URL with the given URL.
--no-verify-ssl (boolean)
By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI will verify SSL certificates. This option overrides the default behavior of verifying SSL certificates.
--no-paginate (boolean)
Disable automatic pagination. If automatic pagination is disabled, the AWS CLI will only make one call, for the first page of results.
--output (string)
The formatting style for command output.
--query (string)
A JMESPath query to use in filtering the response data.
--profile (string)
Use a specific profile from your credential file.
--region (string)
The region to use. Overrides config/env settings.
--version (string)
Display the version of this tool.
--color (string)
Turn on/off color output.
--no-sign-request (boolean)
Do not sign requests. Credentials will not be loaded if this argument is provided.
--ca-bundle (string)
The CA certificate bundle to use when verifying SSL certificates. Overrides config/env settings.
--cli-read-timeout (int)
The maximum socket read time in seconds. If the value is set to 0, the socket read will be blocking and not timeout. The default value is 60 seconds.
--cli-connect-timeout (int)
The maximum socket connect time in seconds. If the value is set to 0, the socket connect will be blocking and not timeout. The default value is 60 seconds.
--cli-binary-format (string)
The formatting style to be used for binary blobs. The default format is base64. The base64 format expects binary blobs to be provided as a base64 encoded string. The raw-in-base64-out format preserves compatibility with AWS CLI V1 behavior and binary values must be passed literally. When providing contents from a file that map to a binary blob fileb:// will always be treated as binary and use the file contents directly regardless of the cli-binary-format setting. When using file:// the file contents will need to properly formatted for the configured cli-binary-format.
--no-cli-pager (boolean)
Disable cli pager for output.
--cli-auto-prompt (boolean)
Automatically prompt for CLI input parameters.
--no-cli-auto-prompt (boolean)
Disable automatically prompt for CLI input parameters.
--cli-error-format (string)
The formatting style for error output. By default, errors are displayed in enhanced format.
Key -> (string)
The object key.
Constraints:
- min:
1
AnnotationName -> (string)
The name of the annotation.
ObjectVersionId -> (string)
The version ID of the object that the annotation was attached to.
ETag -> (string)
The entity tag of the annotation.
ChecksumCRC32 -> (string)
The CRC32 checksum of the stored annotation.
ChecksumCRC32C -> (string)
The CRC32C checksum of the stored annotation.
ChecksumCRC64NVME -> (string)
The CRC64NVME checksum of the stored annotation.
ChecksumSHA1 -> (string)
The SHA1 checksum of the stored annotation.
ChecksumSHA256 -> (string)
The SHA256 checksum of the stored annotation.
ChecksumSHA512 -> (string)
The SHA512 checksum of the stored annotation.
ChecksumMD5 -> (string)
The MD5 checksum of the stored annotation.
ChecksumXXHASH64 -> (string)
The XXHASH64 checksum of the stored annotation.
ChecksumXXHASH3 -> (string)
The XXHASH3 checksum of the stored annotation.
ChecksumXXHASH128 -> (string)
The XXHASH128 checksum of the stored annotation.
ChecksumType -> (string)
The type of checksum used.
Possible values:
COMPOSITEFULL_OBJECT
ServerSideEncryption -> (string)
The server-side encryption algorithm used to encrypt the annotation.
Possible values:
AES256aws:fsxaws:kmsaws:kms:dsse
RequestCharged -> (string)
If present, indicates that the requester was successfully charged for the request. For more information, see Using Requester Pays buckets for storage transfers and usage in the Amazon Simple Storage Service user guide .
Note
This functionality is not supported for directory buckets.Possible values:
requester