Skip to content

S3Client.list_object_annotations

rboto-s3==0.4.0 · Service index · Types

Model summary (excerpt): Lists the annotations attached to an Amazon S3 object. Results are paginated, with a maximum of 1,000 annotations per object. Use the AnnotationPrefix parameter to filter the results by name prefix. To use this operation, you must have the s3:ListObjectAnnotations permission. Annotations are not supported by the following features: S3 Inventory Reports, API Gateway, S3 Storage Lens, Amazon S3...

Install and imports

python -m pip install "rboto[s3]==0.4.0"
from rboto import S3Client
from rboto_s3.types import (
    ListObjectAnnotationsOutput,
    RequestPayer,
)

Signature

async def list_object_annotations(
    *,
    bucket: str,
    key: str,
    version_id: str | None = None,
    max_annotation_results: int | None = None,
    annotation_prefix: str | None = None,
    continuation_token: str | None = None,
    request_payer: RequestPayer | None = None,
    expected_bucket_owner: str | None = None,
) -> ListObjectAnnotationsOutput: ...

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.
version_id No The version ID of the object.
max_annotation_results No The maximum number of annotations to return in the response. Maximum is 1,000.
annotation_prefix No Filter results to annotations whose name begins with the specified prefix.
continuation_token No Continuation token returned by a previous request to retrieve the next page.
request_payer No
expected_bucket_owner No The account ID of the expected bucket owner.

Output

ListObjectAnnotationsOutput.

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
annotations list[AnnotationEntryOutput] | None Always present AnnotationEntryOutput
bucket str | None Always present —
key str | None Always present —
object_version_id str | None Always present —
annotation_prefix str | None Always present —
max_annotation_results int | None Always present —
annotation_count int | None Always present —
continuation_token str | None Always present —
next_continuation_token str | None Always present —
request_charged RequestChargedOutput | None Always present RequestChargedOutput

| 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.

ListObjectAnnotationsOutput, RequestPayer

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

client.paginators.list_object_annotations(...) accepts the same arguments and returns AsyncIterator[ListObjectAnnotationsOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: continuation_token. Page-size argument: max_annotation_results.

No output stream.

Errors

Import from rboto_s3.exceptions:

InvalidPrefixError, NoSuchBucketError, NoSuchKeyError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model