S3 / Paginator / ListParts

ListParts#

class S3.Paginator.ListParts#
paginator = client.get_paginator('list_parts')
paginate(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    Bucket='string',
    Key='string',
    UploadId='string',
    RequestPayer='requester',
    ExpectedBucketOwner='string',
    SSECustomerAlgorithm='string',
    SSECustomerKey='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • Bucket (string) –

    [REQUIRED]

    The name of the bucket to which the parts are being uploaded.

    When using this action with an access point, 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.

    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.

  • Key (string) –

    [REQUIRED]

    Object key for which the multipart upload was initiated.

  • UploadId (string) –

    [REQUIRED]

    Upload ID identifying the multipart upload whose parts are being listed.

  • 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. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.

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

  • SSECustomerAlgorithm (string) – The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

  • SSECustomerKey (string) – The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

  • SSECustomerKeyMD5 (string) –

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

    Please note that this parameter is automatically populated if it is not provided. Including this parameter is not required

  • 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

{
    'AbortDate': datetime(2015, 1, 1),
    'AbortRuleId': 'string',
    'Bucket': 'string',
    'Key': 'string',
    'UploadId': 'string',
    'PartNumberMarker': 123,
    'MaxParts': 123,
    'IsTruncated': True|False,
    'Parts': [
        {
            'PartNumber': 123,
            'LastModified': datetime(2015, 1, 1),
            'ETag': 'string',
            'Size': 123,
            'ChecksumCRC32': 'string',
            'ChecksumCRC32C': 'string',
            'ChecksumSHA1': 'string',
            'ChecksumSHA256': 'string'
        },
    ],
    'Initiator': {
        'ID': 'string',
        'DisplayName': 'string'
    },
    'Owner': {
        'DisplayName': 'string',
        'ID': 'string'
    },
    'StorageClass': 'STANDARD'|'REDUCED_REDUNDANCY'|'STANDARD_IA'|'ONEZONE_IA'|'INTELLIGENT_TIERING'|'GLACIER'|'DEEP_ARCHIVE'|'OUTPOSTS'|'GLACIER_IR'|'SNOW',
    'RequestCharged': 'requester',
    'ChecksumAlgorithm': 'CRC32'|'CRC32C'|'SHA1'|'SHA256',
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • AbortDate (datetime) –

      If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, then the response includes this header indicating when the initiated multipart upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration.

      The response will also include the x-amz-abort-rule-id header that will provide the ID of the lifecycle configuration rule that defines this action.

    • AbortRuleId (string) –

      This header is returned along with the x-amz-abort-date header. It identifies applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads.

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

    • Key (string) –

      Object key for which the multipart upload was initiated.

    • UploadId (string) –

      Upload ID identifying the multipart upload whose parts are being listed.

    • PartNumberMarker (integer) –

      When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request.

    • MaxParts (integer) –

      Maximum number of parts that were allowed in the response.

    • IsTruncated (boolean) –

      Indicates whether the returned list of parts is truncated. A true value indicates that the list was truncated. A list can be truncated if the number of parts exceeds the limit returned in the MaxParts element.

    • Parts (list) –

      Container for elements related to a particular part. A response can contain zero or more Part elements.

      • (dict) –

        Container for elements related to a part.

        • PartNumber (integer) –

          Part number identifying the part. This is a positive integer between 1 and 10,000.

        • LastModified (datetime) –

          Date and time at which the part was uploaded.

        • ETag (string) –

          Entity tag returned when the part was uploaded.

        • Size (integer) –

          Size in bytes of the uploaded part data.

        • ChecksumCRC32 (string) –

          This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

        • ChecksumCRC32C (string) –

          The base64-encoded, 32-bit CRC32C checksum of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

        • ChecksumSHA1 (string) –

          The base64-encoded, 160-bit SHA-1 digest of the object. This will only be present if it was uploaded with the object. With multipart uploads, this may not be a checksum value of the object. For more information about how checksums are calculated with multipart uploads, see Checking object integrity in the Amazon S3 User Guide.

        • ChecksumSHA256 (string) –

          This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. This header specifies the base64-encoded, 256-bit SHA-256 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

    • Initiator (dict) –

      Container element that identifies who initiated the multipart upload. If the initiator is an Amazon Web Services account, this element provides the same information as the Owner element. If the initiator is an IAM User, this element provides the user ARN and display name.

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

      • DisplayName (string) –

        Name of the Principal.

    • Owner (dict) –

      Container element that identifies the object owner, after the object is created. If multipart upload is initiated by an IAM user, this element provides the parent account ID and display name.

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

    • StorageClass (string) –

      Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded object.

    • RequestCharged (string) –

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

    • ChecksumAlgorithm (string) –

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

    • NextToken (string) –

      A token to resume pagination.