S3 / Paginator / ListMultipartUploads

ListMultipartUploads#

class S3.Paginator.ListMultipartUploads#
paginator = client.get_paginator('list_multipart_uploads')
paginate(**kwargs)#

Creates an iterator that will paginate through responses from S3.Client.list_multipart_uploads().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Bucket='string',
    Delimiter='string',
    EncodingType='url',
    Prefix='string',
    ExpectedBucketOwner='string',
    RequestPayer='requester',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • Bucket (string) –

    [REQUIRED]

    The name of the bucket to which the multipart upload was initiated.

    Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format Bucket_name.s3express-az_id.region.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Availability Zone. Bucket names must follow the format bucket_base_name--az-id--x-s3 (for example, DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide.

    Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.*Region*.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    Note

    Access points and Object Lambda access points are not supported by directory buckets.

    S3 on Outposts - When you use this action with Amazon S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts access point ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see What is S3 on Outposts? in the Amazon S3 User Guide.

  • Delimiter (string) –

    Character you use to group keys.

    All keys that contain the same string between the prefix, if specified, and the first occurrence of the delimiter after the prefix are grouped under a single result element, CommonPrefixes. If you don’t specify the prefix parameter, then the substring starts at the beginning of the key. The keys that are grouped under CommonPrefixes result element are not returned elsewhere in the response.

    Note

    Directory buckets - For directory buckets, / is the only supported delimiter.

  • EncodingType (string) –

    Encoding type used by Amazon S3 to encode the object keys in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can’t parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren’t supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. For more information about characters to avoid in object key names, see Object key naming guidelines.

    Note

    When using the URL encoding type, non-ASCII characters that are used in an object’s key name will be percent-encoded according to UTF-8 code values. For example, the object test_file(3).png will appear as test_file%283%29.png.

  • Prefix (string) –

    Lists in-progress uploads only for those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different grouping 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.)

    Note

    Directory buckets - For directory buckets, only prefixes that end in a delimiter ( /) are supported.

  • ExpectedBucketOwner (string) – 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).

  • RequestPayer (string) –

    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 corresponding charges to copy the object. 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.

  • 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

{
    'Bucket': 'string',
    'KeyMarker': 'string',
    'UploadIdMarker': 'string',
    'Prefix': 'string',
    'Delimiter': 'string',
    'MaxUploads': 123,
    'IsTruncated': True|False,
    'Uploads': [
        {
            'UploadId': 'string',
            'Key': 'string',
            'Initiated': datetime(2015, 1, 1),
            'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'|'OUTPOSTS'|'GLACIER_IR'|'SNOW'|'EXPRESS_ONEZONE',
            'Owner': {
                'DisplayName': 'string',
                'ID': 'string'
            },
            'Initiator': {
                'ID': 'string',
                'DisplayName': 'string'
            },
            'ChecksumAlgorithm': 'CRC32'|'CRC32C'|'SHA1'|'SHA256'
        },
    ],
    'CommonPrefixes': [
        {
            'Prefix': 'string'
        },
    ],
    'EncodingType': 'url',
    'RequestCharged': 'requester',
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Bucket (string) –

      The name of the bucket to which the multipart upload was initiated. Does not return the access point ARN or access point alias if used.

    • KeyMarker (string) –

      The key at or after which the listing began.

    • UploadIdMarker (string) –

      Together with key-marker, specifies the multipart upload after which listing should begin. If key-marker is not specified, the upload-id-marker parameter is ignored. Otherwise, any multipart uploads for a key equal to the key-marker might be included in the list only if they have an upload ID lexicographically greater than the specified upload-id-marker.

      Note

      This functionality is not supported for directory buckets.

    • Prefix (string) –

      When a prefix is provided in the request, this field contains the specified prefix. The result contains only keys starting with the specified prefix.

      Note

      Directory buckets - For directory buckets, only prefixes that end in a delimiter ( /) are supported.

    • Delimiter (string) –

      Contains the delimiter you specified in the request. If you don’t specify a delimiter in your request, this element is absent from the response.

      Note

      Directory buckets - For directory buckets, / is the only supported delimiter.

    • MaxUploads (integer) –

      Maximum number of multipart uploads that could have been included in the response.

    • IsTruncated (boolean) –

      Indicates whether the returned list of multipart uploads is truncated. A value of true indicates that the list was truncated. The list can be truncated if the number of multipart uploads exceeds the limit allowed or specified by max uploads.

    • Uploads (list) –

      Container for elements related to a particular multipart upload. A response can contain zero or more Upload elements.

      • (dict) –

        Container for the MultipartUpload for the Amazon S3 object.

        • UploadId (string) –

          Upload ID that identifies the multipart upload.

        • Key (string) –

          Key of the object for which the multipart upload was initiated.

        • Initiated (datetime) –

          Date and time at which the multipart upload was initiated.

        • StorageClass (string) –

          The class of storage used to store the object.

          Note

          Directory buckets - Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

        • Owner (dict) –

          Specifies the owner of the object that is part of the multipart upload.

          Note

          Directory buckets - The bucket owner is returned as the object owner for all the objects.

          • 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)

            Note

            This functionality is not supported for directory buckets.

          • ID (string) –

            Container for the ID of the owner.

        • Initiator (dict) –

          Identifies who initiated the multipart upload.

          • ID (string) –

            If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the principal is an IAM User, it provides a user ARN value.

            Note

            Directory buckets - If the principal is an Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it provides a user ARN value.

          • DisplayName (string) –

            Name of the Principal.

            Note

            This functionality is not supported for directory buckets.

        • ChecksumAlgorithm (string) –

          The algorithm that was used to create a checksum of the object.

    • CommonPrefixes (list) –

      If you specify a delimiter in the request, then the result returns each distinct key prefix containing the delimiter in a CommonPrefixes element. The distinct key prefixes are returned in the Prefix child element.

      Note

      Directory buckets - For directory buckets, only prefixes that end in a delimiter ( /) are supported.

      • (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 keys in the response.

      If you specify the encoding-type request parameter, Amazon S3 includes this element in the response, and returns encoded key name values in the following response elements:

      Delimiter, KeyMarker, Prefix, NextKeyMarker, Key.

    • RequestCharged (string) –

      If present, indicates that the requester was successfully charged for the request.

      Note

      This functionality is not supported for directory buckets.

    • NextToken (string) –

      A token to resume pagination.