amazonka-s3-2.0: Amazon Simple Storage Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.S3.ListParts

Description

Lists the parts that have been uploaded for a specific multipart upload. This operation must include the upload ID, which you obtain by sending the initiate multipart upload request (see CreateMultipartUpload). This request returns a maximum of 1,000 uploaded parts. The default number of parts returned is 1,000 parts. You can restrict the number of parts returned by specifying the max-parts request parameter. If your multipart upload consists of more than 1,000 parts, the response returns an IsTruncated field with the value of true, and a NextPartNumberMarker element. In subsequent ListParts requests you can include the part-number-marker query string parameter and set its value to the NextPartNumberMarker field value from the previous response.

If the upload was created using a checksum algorithm, you will need to have permission to the kms:Decrypt action for the request to succeed.

For more information on multipart uploads, see Uploading Objects Using Multipart Upload.

For information on permissions required to use the multipart upload API, see Multipart Upload and Permissions.

The following operations are related to ListParts:

This operation returns paginated results.

Synopsis

Creating a Request

data ListParts Source #

See: newListParts smart constructor.

Constructors

ListParts' 

Fields

  • expectedBucketOwner :: Maybe Text

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

  • maxParts :: Maybe Int

    Sets the maximum number of parts to return.

  • partNumberMarker :: Maybe Int

    Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.

  • requestPayer :: Maybe RequestPayer
     
  • sSECustomerAlgorithm :: Maybe Text

    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 :: Maybe (Sensitive Text)

    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 :: Maybe Text

    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.

  • bucket :: BucketName

    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 using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

  • key :: ObjectKey

    Object key for which the multipart upload was initiated.

  • uploadId :: Text

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

Instances

Instances details
ToHeaders ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

Methods

toHeaders :: ListParts -> [Header] #

ToPath ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

ToQuery ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

AWSPager ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

AWSRequest ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

Associated Types

type AWSResponse ListParts #

Generic ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

Associated Types

type Rep ListParts :: Type -> Type #

Show ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

NFData ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

Methods

rnf :: ListParts -> () #

Eq ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

Hashable ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

type AWSResponse ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

type Rep ListParts Source # 
Instance details

Defined in Amazonka.S3.ListParts

newListParts Source #

Create a value of ListParts with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:expectedBucketOwner:ListParts', listParts_expectedBucketOwner - 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).

ListParts, listParts_maxParts - Sets the maximum number of parts to return.

ListParts, listParts_partNumberMarker - Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.

$sel:requestPayer:ListParts', listParts_requestPayer - Undocumented member.

$sel:sSECustomerAlgorithm:ListParts', listParts_sSECustomerAlgorithm - 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.

$sel:sSECustomerKey:ListParts', listParts_sSECustomerKey - 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.

$sel:sSECustomerKeyMD5:ListParts', listParts_sSECustomerKeyMD5 - 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.

ListParts, listParts_bucket - 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 using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

ListParts, listParts_key - Object key for which the multipart upload was initiated.

ListParts, listParts_uploadId - Upload ID identifying the multipart upload whose parts are being listed.

Request Lenses

listParts_expectedBucketOwner :: Lens' ListParts (Maybe Text) Source #

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

listParts_maxParts :: Lens' ListParts (Maybe Int) Source #

Sets the maximum number of parts to return.

listParts_partNumberMarker :: Lens' ListParts (Maybe Int) Source #

Specifies the part after which listing should begin. Only parts with higher part numbers will be listed.

listParts_sSECustomerAlgorithm :: Lens' ListParts (Maybe Text) Source #

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.

listParts_sSECustomerKey :: Lens' ListParts (Maybe Text) Source #

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.

listParts_sSECustomerKeyMD5 :: Lens' ListParts (Maybe Text) Source #

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.

listParts_bucket :: Lens' ListParts BucketName Source #

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 using 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 using this action with S3 on Outposts through the Amazon Web Services SDKs, you provide the Outposts bucket ARN in place of the bucket name. For more information about S3 on Outposts ARNs, see Using Amazon S3 on Outposts in the Amazon S3 User Guide.

listParts_key :: Lens' ListParts ObjectKey Source #

Object key for which the multipart upload was initiated.

listParts_uploadId :: Lens' ListParts Text Source #

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

Destructuring the Response

data ListPartsResponse Source #

See: newListPartsResponse smart constructor.

Constructors

ListPartsResponse' 

Fields

  • abortDate :: Maybe RFC822

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

    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 :: Maybe Text

    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 :: Maybe BucketName

    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.

  • checksumAlgorithm :: Maybe ChecksumAlgorithm

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

  • initiator :: Maybe Initiator

    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.

  • isTruncated :: Maybe Bool

    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.

  • key :: Maybe ObjectKey

    Object key for which the multipart upload was initiated.

  • maxParts :: Maybe Int

    Maximum number of parts that were allowed in the response.

  • nextPartNumberMarker :: Maybe Int

    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.

  • owner :: Maybe Owner

    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.

  • partNumberMarker :: Maybe Int

    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.

  • parts :: Maybe [Part]

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

  • requestCharged :: Maybe RequestCharged
     
  • storageClass :: Maybe StorageClass

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

  • uploadId :: Maybe Text

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

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic ListPartsResponse Source # 
Instance details

Defined in Amazonka.S3.ListParts

Associated Types

type Rep ListPartsResponse :: Type -> Type #

Read ListPartsResponse Source # 
Instance details

Defined in Amazonka.S3.ListParts

Show ListPartsResponse Source # 
Instance details

Defined in Amazonka.S3.ListParts

NFData ListPartsResponse Source # 
Instance details

Defined in Amazonka.S3.ListParts

Methods

rnf :: ListPartsResponse -> () #

Eq ListPartsResponse Source # 
Instance details

Defined in Amazonka.S3.ListParts

type Rep ListPartsResponse Source # 
Instance details

Defined in Amazonka.S3.ListParts

type Rep ListPartsResponse = D1 ('MetaData "ListPartsResponse" "Amazonka.S3.ListParts" "amazonka-s3-2.0-CNZtv1UmVzj28JXsFvwNoj" 'False) (C1 ('MetaCons "ListPartsResponse'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "abortDate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RFC822)) :*: S1 ('MetaSel ('Just "abortRuleId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BucketName)) :*: S1 ('MetaSel ('Just "checksumAlgorithm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ChecksumAlgorithm)))) :*: ((S1 ('MetaSel ('Just "initiator") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Initiator)) :*: S1 ('MetaSel ('Just "isTruncated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ObjectKey)) :*: S1 ('MetaSel ('Just "maxParts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))) :*: (((S1 ('MetaSel ('Just "nextPartNumberMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "owner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Owner))) :*: (S1 ('MetaSel ('Just "partNumberMarker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "parts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Part])))) :*: ((S1 ('MetaSel ('Just "requestCharged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestCharged)) :*: S1 ('MetaSel ('Just "storageClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe StorageClass))) :*: (S1 ('MetaSel ('Just "uploadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))

newListPartsResponse Source #

Create a value of ListPartsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:abortDate:ListPartsResponse', listPartsResponse_abortDate - 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 Policy.

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.

$sel:abortRuleId:ListPartsResponse', listPartsResponse_abortRuleId - 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.

ListParts, listPartsResponse_bucket - 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.

ListPartsResponse, listPartsResponse_checksumAlgorithm - The algorithm that was used to create a checksum of the object.

ListPartsResponse, listPartsResponse_initiator - 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.

ListPartsResponse, listPartsResponse_isTruncated - 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.

ListParts, listPartsResponse_key - Object key for which the multipart upload was initiated.

ListParts, listPartsResponse_maxParts - Maximum number of parts that were allowed in the response.

ListPartsResponse, listPartsResponse_nextPartNumberMarker - 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.

ListPartsResponse, listPartsResponse_owner - 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.

ListParts, listPartsResponse_partNumberMarker - 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.

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

$sel:requestCharged:ListPartsResponse', listPartsResponse_requestCharged - Undocumented member.

ListPartsResponse, listPartsResponse_storageClass - Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded object.

ListParts, listPartsResponse_uploadId - Upload ID identifying the multipart upload whose parts are being listed.

$sel:httpStatus:ListPartsResponse', listPartsResponse_httpStatus - The response's http status code.

Response Lenses

listPartsResponse_abortDate :: Lens' ListPartsResponse (Maybe UTCTime) Source #

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

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.

listPartsResponse_abortRuleId :: Lens' ListPartsResponse (Maybe Text) Source #

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.

listPartsResponse_bucket :: Lens' ListPartsResponse (Maybe BucketName) Source #

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.

listPartsResponse_checksumAlgorithm :: Lens' ListPartsResponse (Maybe ChecksumAlgorithm) Source #

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

listPartsResponse_initiator :: Lens' ListPartsResponse (Maybe Initiator) Source #

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.

listPartsResponse_isTruncated :: Lens' ListPartsResponse (Maybe Bool) Source #

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.

listPartsResponse_key :: Lens' ListPartsResponse (Maybe ObjectKey) Source #

Object key for which the multipart upload was initiated.

listPartsResponse_maxParts :: Lens' ListPartsResponse (Maybe Int) Source #

Maximum number of parts that were allowed in the response.

listPartsResponse_nextPartNumberMarker :: Lens' ListPartsResponse (Maybe Int) Source #

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.

listPartsResponse_owner :: Lens' ListPartsResponse (Maybe Owner) Source #

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.

listPartsResponse_partNumberMarker :: Lens' ListPartsResponse (Maybe Int) Source #

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.

listPartsResponse_parts :: Lens' ListPartsResponse (Maybe [Part]) Source #

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

listPartsResponse_storageClass :: Lens' ListPartsResponse (Maybe StorageClass) Source #

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

listPartsResponse_uploadId :: Lens' ListPartsResponse (Maybe Text) Source #

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

listPartsResponse_httpStatus :: Lens' ListPartsResponse Int Source #

The response's http status code.