S3 / Paginator / ListObjectVersions
ListObjectVersions#
- class S3.Paginator.ListObjectVersions#
paginator = client.get_paginator('list_object_versions')
- paginate(**kwargs)#
Creates an iterator that will paginate through responses from
S3.Client.list_object_versions()
.See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate( Bucket='string', Delimiter='string', EncodingType='url', Prefix='string', ExpectedBucketOwner='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } )
- Parameters:
Bucket (string) –
[REQUIRED]
The bucket name that contains the objects.
Delimiter (string) – 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.EncodingType (string) – Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response.
Prefix (string) – 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 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.
ExpectedBucketOwner (string) – The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code
403 Forbidden
(access denied).PaginationConfig (dict) –
A dictionary that provides parameters to control pagination.
MaxItems (integer) –
The total number of items to return. If the total number of items available is more than the value specified in max-items then a
NextToken
will be provided in the output that you can use to resume pagination.PageSize (integer) –
The size of each page.
StartingToken (string) –
A token to specify where to start paginating. This is the
NextToken
from a previous response.
- Return type:
dict
- Returns:
Response Syntax
{ 'IsTruncated': True|False, 'KeyMarker': 'string', 'VersionIdMarker': 'string', 'Versions': [ { 'ETag': 'string', 'ChecksumAlgorithm': [ 'CRC32'|'CRC32C'|'SHA1'|'SHA256', ], 'Size': 123, 'StorageClass': 'STANDARD', 'Key': 'string', 'VersionId': 'string', 'IsLatest': True|False, 'LastModified': datetime(2015, 1, 1), 'Owner': { 'DisplayName': 'string', 'ID': 'string' } }, ], 'DeleteMarkers': [ { 'Owner': { 'DisplayName': 'string', 'ID': 'string' }, 'Key': 'string', 'VersionId': 'string', 'IsLatest': True|False, 'LastModified': datetime(2015, 1, 1) }, ], 'Name': 'string', 'Prefix': 'string', 'Delimiter': 'string', 'MaxKeys': 123, 'CommonPrefixes': [ { 'Prefix': 'string' }, ], 'EncodingType': 'url', 'NextToken': 'string' }
Response Structure
(dict) –
IsTruncated (boolean) –
A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria. If your results were truncated, you can make a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker response parameters as a starting place in another request to return the rest of the results.
KeyMarker (string) –
Marks the last key returned in a truncated response.
VersionIdMarker (string) –
Marks the last version of the key returned in a truncated response.
Versions (list) –
Container for version information.
(dict) –
The version of an object.
ETag (string) –
The entity tag is an MD5 hash of that version of the object.
ChecksumAlgorithm (list) –
The algorithm that was used to create a checksum of the object.
(string) –
Size (integer) –
Size in bytes of the object.
StorageClass (string) –
The class of storage used to store the object.
Key (string) –
The object key.
VersionId (string) –
Version ID of an object.
IsLatest (boolean) –
Specifies whether the object is (true) or is not (false) the latest version of an object.
LastModified (datetime) –
Date and time the object was last modified.
Owner (dict) –
Specifies the owner of the object.
DisplayName (string) –
Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:
US East (N. Virginia)
US West (N. California)
US West (Oregon)
Asia Pacific (Singapore)
Asia Pacific (Sydney)
Asia Pacific (Tokyo)
Europe (Ireland)
South America (São Paulo)
ID (string) –
Container for the ID of the owner.
DeleteMarkers (list) –
Container for an object that is a delete marker.
(dict) –
Information about the delete marker.
Owner (dict) –
The account that created the delete marker.>
DisplayName (string) –
Container for the display name of the owner. This value is only supported in the following Amazon Web Services Regions:
US East (N. Virginia)
US West (N. California)
US West (Oregon)
Asia Pacific (Singapore)
Asia Pacific (Sydney)
Asia Pacific (Tokyo)
Europe (Ireland)
South America (São Paulo)
ID (string) –
Container for the ID of the owner.
Key (string) –
The object key.
VersionId (string) –
Version ID of an object.
IsLatest (boolean) –
Specifies whether the object is (true) or is not (false) the latest version of an object.
LastModified (datetime) –
Date and time the object was last modified.
Name (string) –
The bucket name.
Prefix (string) –
Selects objects that start with the value supplied by this parameter.
Delimiter (string) –
The delimiter grouping the included keys. 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.MaxKeys (integer) –
Specifies the maximum number of objects to return.
CommonPrefixes (list) –
All of the keys rolled up into a common prefix count as a single return when calculating the number of returns.
(dict) –
Container for all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter. CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix. For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.
Prefix (string) –
Container for the specified common prefix.
EncodingType (string) –
Encoding type used by Amazon S3 to encode object key names in the XML response.
If you specify encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:
KeyMarker, NextKeyMarker, Prefix, Key
, andDelimiter
.NextToken (string) –
A token to resume pagination.