S3Client.get_object_annotation
rboto-s3==0.4.0 · Service index · Types
Model summary (excerpt): 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. Annotations are not supported by the following features: S3 Inventory Reports, API Gateway, S3 Storage Lens, Amazon...
Install and imports
from rboto import S3Client
from rboto_s3.types import (
ChecksumMode,
GetObjectAnnotationOutput,
RequestPayer,
)
Signature
async def get_object_annotation(
*,
bucket: str,
key: str,
annotation_name: str,
version_id: str | None = None,
request_payer: RequestPayer | None = None,
expected_bucket_owner: str | None = None,
checksum_mode: ChecksumMode | None = None,
) -> GetObjectAnnotationOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
bucket |
Yes | The name of the bucket that contains the object. |
key |
Yes | The object key. |
annotation_name |
Yes | The name of the annotation to retrieve. Length Constraints: Minimum length of 1. Maximum length of 512 bytes. |
version_id |
No | The version ID of the object. |
request_payer |
No | |
expected_bucket_owner |
No | 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. |
checksum_mode |
No | Set to ENABLED to validate the checksum of the annotation payload on retrieval. |
Output
GetObjectAnnotationOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
annotation_payload |
ByteStream |
Always present | ByteStream |
object_version_id |
str | None |
Always present | — |
last_modified |
str | None |
Always present | — |
content_length |
int | None |
Always present | — |
e_tag |
str | None |
Always present | — |
checksum_crc32 |
str | None |
Always present | — |
checksum_crc32_c |
str | None |
Always present | — |
checksum_crc64_nvme |
str | None |
Always present | — |
checksum_sha1 |
str | None |
Always present | — |
checksum_sha256 |
str | None |
Always present | — |
checksum_sha512 |
str | None |
Always present | — |
checksum_md5 |
str | None |
Always present | — |
checksum_xxhash64 |
str | None |
Always present | — |
checksum_xxhash3 |
str | None |
Always present | — |
checksum_xxhash128 |
str | None |
Always present | — |
checksum_type |
ChecksumTypeOutput | None |
Always present | ChecksumTypeOutput |
server_side_encryption |
ServerSideEncryptionOutput | None |
Always present | ServerSideEncryptionOutput |
request_charged |
RequestChargedOutput | None |
Always present | RequestChargedOutput |
replication_status |
ReplicationStatusOutput | None |
Always present | ReplicationStatusOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
ChecksumMode, GetObjectAnnotationOutput, RequestPayer
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
Output streams: ByteStream.
Consume with async for. Do not reuse a consumed stream.
ByteStream.read() buffers the complete body.
Errors
Import from rboto_s3.exceptions:
NoSuchAnnotationError, NoSuchBucketError, NoSuchKeyError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.