libZSservicesZSamazonka-s3ZSamazonka-s3
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.S3.CompleteMultipartUpload

Description

Completes a multipart upload by assembling previously uploaded parts.

You first initiate the multipart upload and then upload all parts using the UploadPart operation. After successfully uploading all relevant parts of an upload, you call this action to complete the upload. Upon receiving this request, Amazon S3 concatenates all the parts in ascending order by part number to create a new object. In the Complete Multipart Upload request, you must provide the parts list. You must ensure that the parts list is complete. This action concatenates the parts that you provide in the list. For each part in the list, you must provide the part number and the ETag value, returned after that part was uploaded.

Processing of a Complete Multipart Upload request could take several minutes to complete. After Amazon S3 begins processing the request, it sends an HTTP response header that specifies a 200 OK response. While processing is in progress, Amazon S3 periodically sends white space characters to keep the connection from timing out. Because a request could fail after the initial 200 OK response has been sent, it is important that you check the response body to determine whether the request succeeded.

Note that if CompleteMultipartUpload fails, applications should be prepared to retry the failed requests. For more information, see Amazon S3 Error Best Practices.

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

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

CompleteMultipartUpload has the following special errors:

  • Error code: EntityTooSmall

    • Description: Your proposed upload is smaller than the minimum allowed object size. Each part must be at least 5 MB in size, except the last part.
    • 400 Bad Request
  • Error code: InvalidPart

    • Description: One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag.
    • 400 Bad Request
  • Error code: InvalidPartOrder

    • Description: The list of parts was not in ascending order. The parts list must be specified in order by part number.
    • 400 Bad Request
  • Error code: NoSuchUpload

    • Description: The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.
    • 404 Not Found

The following operations are related to CompleteMultipartUpload:

Synopsis

Creating a Request

data CompleteMultipartUpload Source #

See: newCompleteMultipartUpload smart constructor.

Constructors

CompleteMultipartUpload' 

Fields

  • requestPayer :: Maybe RequestPayer
     
  • multipartUpload :: Maybe CompletedMultipartUpload

    The container for the multipart upload request information.

  • expectedBucketOwner :: Maybe Text

    The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

  • bucket :: BucketName

    Name of the bucket to which the multipart upload was initiated.

    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 using 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 S3 on Outposts in the Amazon S3 User Guide.

  • key :: ObjectKey

    Object key for which the multipart upload was initiated.

  • uploadId :: Text

    ID for the initiated multipart upload.

Instances

Instances details
Eq CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Read CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Show CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Generic CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Associated Types

type Rep CompleteMultipartUpload :: Type -> Type #

NFData CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Methods

rnf :: CompleteMultipartUpload -> () #

Hashable CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

AWSRequest CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

ToHeaders CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

ToPath CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

ToQuery CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

ToElement CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

type Rep CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

type Rep CompleteMultipartUpload = D1 ('MetaData "CompleteMultipartUpload" "Amazonka.S3.CompleteMultipartUpload" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "CompleteMultipartUpload'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "requestPayer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestPayer)) :*: (S1 ('MetaSel ('Just "multipartUpload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CompletedMultipartUpload)) :*: S1 ('MetaSel ('Just "expectedBucketOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 BucketName) :*: (S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ObjectKey) :*: S1 ('MetaSel ('Just "uploadId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CompleteMultipartUpload Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

newCompleteMultipartUpload Source #

Create a value of CompleteMultipartUpload 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:requestPayer:CompleteMultipartUpload', completeMultipartUpload_requestPayer - Undocumented member.

$sel:multipartUpload:CompleteMultipartUpload', completeMultipartUpload_multipartUpload - The container for the multipart upload request information.

$sel:expectedBucketOwner:CompleteMultipartUpload', completeMultipartUpload_expectedBucketOwner - The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

$sel:bucket:CompleteMultipartUpload', completeMultipartUpload_bucket - Name of the bucket to which the multipart upload was initiated.

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 using 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 S3 on Outposts in the Amazon S3 User Guide.

$sel:key:CompleteMultipartUpload', completeMultipartUpload_key - Object key for which the multipart upload was initiated.

$sel:uploadId:CompleteMultipartUpload', completeMultipartUpload_uploadId - ID for the initiated multipart upload.

Request Lenses

completeMultipartUpload_multipartUpload :: Lens' CompleteMultipartUpload (Maybe CompletedMultipartUpload) Source #

The container for the multipart upload request information.

completeMultipartUpload_expectedBucketOwner :: Lens' CompleteMultipartUpload (Maybe Text) Source #

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

completeMultipartUpload_bucket :: Lens' CompleteMultipartUpload BucketName Source #

Name of the bucket to which the multipart upload was initiated.

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 using 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 S3 on Outposts in the Amazon S3 User Guide.

completeMultipartUpload_key :: Lens' CompleteMultipartUpload ObjectKey Source #

Object key for which the multipart upload was initiated.

Destructuring the Response

data CompleteMultipartUploadResponse Source #

See: newCompleteMultipartUploadResponse smart constructor.

Constructors

CompleteMultipartUploadResponse' 

Fields

  • requestCharged :: Maybe RequestCharged
     
  • eTag :: Maybe ETag

    Entity tag that identifies the newly created object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.

  • versionId :: Maybe ObjectVersionId

    Version ID of the newly created object, in case the bucket has versioning turned on.

  • location :: Maybe Text

    The URI that identifies the newly created object.

  • expiration :: Maybe Text

    If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.

  • bucket :: Maybe BucketName

    The name of the bucket that contains the newly created object. Does not return the access point ARN or access point alias if used.

    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 using 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 S3 on Outposts in the Amazon S3 User Guide.

  • bucketKeyEnabled :: Maybe Bool

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

  • key :: Maybe ObjectKey

    The object key of the newly created object.

  • sSEKMSKeyId :: Maybe (Sensitive Text)

    If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.

  • serverSideEncryption :: Maybe ServerSideEncryption

    If you specified server-side encryption either with an Amazon S3-managed encryption key or an Amazon Web Services KMS key in your initiate multipart upload request, the response includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the object.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CompleteMultipartUploadResponse Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Show CompleteMultipartUploadResponse Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Generic CompleteMultipartUploadResponse Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

Associated Types

type Rep CompleteMultipartUploadResponse :: Type -> Type #

NFData CompleteMultipartUploadResponse Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

type Rep CompleteMultipartUploadResponse Source # 
Instance details

Defined in Amazonka.S3.CompleteMultipartUpload

type Rep CompleteMultipartUploadResponse = D1 ('MetaData "CompleteMultipartUploadResponse" "Amazonka.S3.CompleteMultipartUpload" "libZSservicesZSamazonka-s3ZSamazonka-s3" 'False) (C1 ('MetaCons "CompleteMultipartUploadResponse'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "requestCharged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RequestCharged)) :*: S1 ('MetaSel ('Just "eTag") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ETag))) :*: (S1 ('MetaSel ('Just "versionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ObjectVersionId)) :*: (S1 ('MetaSel ('Just "location") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "expiration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "bucket") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BucketName)) :*: (S1 ('MetaSel ('Just "bucketKeyEnabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ObjectKey)))) :*: (S1 ('MetaSel ('Just "sSEKMSKeyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Sensitive Text))) :*: (S1 ('MetaSel ('Just "serverSideEncryption") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ServerSideEncryption)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))

newCompleteMultipartUploadResponse Source #

Create a value of CompleteMultipartUploadResponse 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:requestCharged:CompleteMultipartUploadResponse', completeMultipartUploadResponse_requestCharged - Undocumented member.

$sel:eTag:CompleteMultipartUploadResponse', completeMultipartUploadResponse_eTag - Entity tag that identifies the newly created object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.

$sel:versionId:CompleteMultipartUploadResponse', completeMultipartUploadResponse_versionId - Version ID of the newly created object, in case the bucket has versioning turned on.

$sel:location:CompleteMultipartUploadResponse', completeMultipartUploadResponse_location - The URI that identifies the newly created object.

$sel:expiration:CompleteMultipartUploadResponse', completeMultipartUploadResponse_expiration - If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.

$sel:bucket:CompleteMultipartUpload', completeMultipartUploadResponse_bucket - The name of the bucket that contains the newly created object. Does not return the access point ARN or access point alias if used.

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 using 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 S3 on Outposts in the Amazon S3 User Guide.

$sel:bucketKeyEnabled:CompleteMultipartUploadResponse', completeMultipartUploadResponse_bucketKeyEnabled - Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

$sel:key:CompleteMultipartUpload', completeMultipartUploadResponse_key - The object key of the newly created object.

$sel:sSEKMSKeyId:CompleteMultipartUploadResponse', completeMultipartUploadResponse_sSEKMSKeyId - If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.

$sel:serverSideEncryption:CompleteMultipartUploadResponse', completeMultipartUploadResponse_serverSideEncryption - If you specified server-side encryption either with an Amazon S3-managed encryption key or an Amazon Web Services KMS key in your initiate multipart upload request, the response includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the object.

$sel:httpStatus:CompleteMultipartUploadResponse', completeMultipartUploadResponse_httpStatus - The response's http status code.

Response Lenses

completeMultipartUploadResponse_eTag :: Lens' CompleteMultipartUploadResponse (Maybe ETag) Source #

Entity tag that identifies the newly created object's data. Objects with different object data will have different entity tags. The entity tag is an opaque string. The entity tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 digest of the object data, it will contain one or more nonhexadecimal characters and/or will consist of less than 32 or more than 32 hexadecimal digits.

completeMultipartUploadResponse_versionId :: Lens' CompleteMultipartUploadResponse (Maybe ObjectVersionId) Source #

Version ID of the newly created object, in case the bucket has versioning turned on.

completeMultipartUploadResponse_expiration :: Lens' CompleteMultipartUploadResponse (Maybe Text) Source #

If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.

completeMultipartUploadResponse_bucket :: Lens' CompleteMultipartUploadResponse (Maybe BucketName) Source #

The name of the bucket that contains the newly created object. Does not return the access point ARN or access point alias if used.

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 using 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 S3 on Outposts in the Amazon S3 User Guide.

completeMultipartUploadResponse_bucketKeyEnabled :: Lens' CompleteMultipartUploadResponse (Maybe Bool) Source #

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS).

completeMultipartUploadResponse_sSEKMSKeyId :: Lens' CompleteMultipartUploadResponse (Maybe Text) Source #

If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object.

completeMultipartUploadResponse_serverSideEncryption :: Lens' CompleteMultipartUploadResponse (Maybe ServerSideEncryption) Source #

If you specified server-side encryption either with an Amazon S3-managed encryption key or an Amazon Web Services KMS key in your initiate multipart upload request, the response includes this header. It confirms the encryption algorithm that Amazon S3 used to encrypt the object.