Skip to content

S3  >  Operations  >  get_object_annotation

get_object_annotation

Operation

get_object_annotation async

get_object_annotation(input: GetObjectAnnotationInput, plugins: list[Plugin] | None = None) -> GetObjectAnnotationOutput

Retrieves an annotation from an Amazon S3 object. To use this operation, you must have the s3:GetObjectAnnotation permission.

If checksum mode is enabled via the x-amz-checksum-mode header, Amazon S3 returns the stored checksum in the response headers for client-side validation.

Note

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 GetObjectAnnotation:

Parameters:

Name Type Description Default
input GetObjectAnnotationInput

An instance of GetObjectAnnotationInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
GetObjectAnnotationOutput

An instance of GetObjectAnnotationOutput.

Input

GetObjectAnnotationInput dataclass

Bases: _SerdeShape

Dataclass for GetObjectAnnotationInput structure.

Attributes

annotation_name class-attribute instance-attribute
annotation_name: str | None = ...

The name of the annotation to retrieve.

Length Constraints: Minimum length of 1. Maximum length of 512 bytes.

bucket class-attribute instance-attribute
bucket: str | None = ...

The name of the bucket that contains the object.

checksum_mode class-attribute instance-attribute
checksum_mode: str | None = ...

Set to ENABLED to validate the checksum of the annotation payload on retrieval.

expected_bucket_owner class-attribute instance-attribute
expected_bucket_owner: str | None = ...

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.

key class-attribute instance-attribute
key: str | None = ...

The object key.

request_payer class-attribute instance-attribute
request_payer: str | None = ...

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.

version_id class-attribute instance-attribute
version_id: str | None = ...

The version ID of the object.

Output

GetObjectAnnotationOutput dataclass

Bases: _SerdeShape

Dataclass for GetObjectAnnotationOutput structure.

Attributes

annotation_payload class-attribute instance-attribute
annotation_payload: StreamingBlob = ...

The annotation payload.

checksum_crc32 class-attribute instance-attribute
checksum_crc32: str | None = ...

The CRC32 checksum of the annotation payload.

checksum_crc32_c class-attribute instance-attribute
checksum_crc32_c: str | None = ...

The CRC32C checksum of the annotation payload.

checksum_crc64_nvme class-attribute instance-attribute
checksum_crc64_nvme: str | None = ...

The CRC64NVME checksum of the annotation payload.

checksum_md5 class-attribute instance-attribute
checksum_md5: str | None = ...

The MD5 checksum of the annotation payload.

checksum_sha1 class-attribute instance-attribute
checksum_sha1: str | None = ...

The SHA1 checksum of the annotation payload.

checksum_sha256 class-attribute instance-attribute
checksum_sha256: str | None = ...

The SHA256 checksum of the annotation payload.

checksum_sha512 class-attribute instance-attribute
checksum_sha512: str | None = ...

The SHA512 checksum of the annotation payload.

checksum_type class-attribute instance-attribute
checksum_type: str | None = ...

The type of checksum used.

checksum_xxhash128 class-attribute instance-attribute
checksum_xxhash128: str | None = ...

The XXHASH128 checksum of the annotation payload.

checksum_xxhash3 class-attribute instance-attribute
checksum_xxhash3: str | None = ...

The XXHASH3 checksum of the annotation payload.

checksum_xxhash64 class-attribute instance-attribute
checksum_xxhash64: str | None = ...

The XXHASH64 checksum of the annotation payload.

content_length class-attribute instance-attribute
content_length: int | None = ...

The size of the annotation payload, in bytes.

e_tag class-attribute instance-attribute
e_tag: str | None = ...

The entity tag of the annotation.

last_modified class-attribute instance-attribute
last_modified: datetime | None = ...

The date and time the annotation was last modified.

object_version_id class-attribute instance-attribute
object_version_id: str | None = ...

The version ID of the object that the annotation is attached to.

replication_status class-attribute instance-attribute
replication_status: str | None = ...

The replication status of the annotation. Possible values include PENDING, COMPLETED, FAILED, and REPLICA.

request_charged class-attribute instance-attribute
request_charged: str | None = ...

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.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

server_side_encryption class-attribute instance-attribute
server_side_encryption: str | None = ...

The server-side encryption algorithm used.