Skip to content

S3Client.list_object_versions

rboto-s3==0.4.0 · Service index · Types

Model summary (excerpt): This operation is not supported for directory buckets. Returns metadata about all versions of the objects in a bucket. You can also use request parameters as selection criteria to return metadata about a subset of all the object versions. To use this operation, you must have permission to perform the s3:ListBucketVersions action. Be aware of the name difference. A 200 OK response can contain...

Install and imports

python -m pip install "rboto[s3]==0.4.0"
from rboto import S3Client
from collections.abc import Sequence
from rboto_s3.types import (
    EncodingType,
    ListObjectVersionsOutput,
    OptionalObjectAttributes,
    RequestPayer,
)

Signature

async def list_object_versions(
    *,
    bucket: str,
    delimiter: str | None = None,
    encoding_type: EncodingType | None = None,
    key_marker: str | None = None,
    max_keys: int | None = None,
    prefix: str | None = None,
    version_id_marker: str | None = None,
    expected_bucket_owner: str | None = None,
    request_payer: RequestPayer | None = None,
    optional_object_attributes: Sequence[OptionalObjectAttributes] | None = None,
) -> ListObjectVersionsOutput: ...

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 bucket name that contains the objects.
delimiter No A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes . These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response. CommonPrefixes is filtered out from results if it...
encoding_type No
key_marker No Specifies the key to start with when listing objects in a bucket.
max_keys No Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains true . To return the additional keys, see key-marker and version-id-marker .
prefix No Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way that you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes .
version_id_marker No Specifies the object version you want to start listing from.
expected_bucket_owner No The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).
request_payer No
optional_object_attributes No Specifies the optional fields that you want returned in the response. Fields that you do not specify are not returned.

Output

ListObjectVersionsOutput.

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
is_truncated bool | None Always present —
key_marker str | None Always present —
version_id_marker str | None Always present —
next_key_marker str | None Always present —
next_version_id_marker str | None Always present —
versions list[ObjectVersionOutput] | None Always present ObjectVersionOutput
delete_markers list[DeleteMarkerEntryOutput] | None Always present DeleteMarkerEntryOutput
name str | None Always present —
prefix str | None Always present —
delimiter str | None Always present —
max_keys int | None Always present —
common_prefixes list[CommonPrefixOutput] | None Always present CommonPrefixOutput
encoding_type EncodingTypeOutput | None Always present EncodingTypeOutput
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.

EncodingType, ListObjectVersionsOutput, OptionalObjectAttributes, 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_versions(...) accepts the same arguments and returns AsyncIterator[ListObjectVersionsOutput]. Direct calls return one page. Pages preserve the Output representation above.

Input cursors: key_marker, version_id_marker. Page-size argument: max_keys.

No output stream.

Errors

No modeled service errors for this operation.

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

Service guide · Pinned model