Table of Contents

Class CompleteMultipartUploadRequest

Namespace
Amazon.S3.Model
Assembly
AWSSDK.S3.dll

Container for the parameters to the CompleteMultipartUpload operation. 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.

You cannot use

Content-Type: application/x-www-form-urlencode
with Complete Multipart Upload requests. It is not allowed by the Amazon S3. Also, if you do not provide a
Content-Type
header,
CompleteMultipartUpload
returns a 200 OK response.

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
:
public class CompleteMultipartUploadRequest : AmazonWebServiceRequest
Inheritance
CompleteMultipartUploadRequest

Constructors

CompleteMultipartUploadRequest()

public CompleteMultipartUploadRequest()

Properties

BucketName

Gets and sets the property 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 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.
public string BucketName { get; set; }

Property Value

string

ChecksumCRC32

Gets and sets the property ChecksumCRC32.

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 specifies the base64-encoded, 32-bit CRC32 checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

public string ChecksumCRC32 { get; set; }

Property Value

string

ChecksumCRC32C

Gets and sets the property ChecksumCRC32C.

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 specifies the base64-encoded, 32-bit CRC32C checksum of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

public string ChecksumCRC32C { get; set; }

Property Value

string

ChecksumSHA1

Gets and sets the property ChecksumSHA1.

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 specifies the base64-encoded, 160-bit SHA-1 digest of the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

public string ChecksumSHA1 { get; set; }

Property Value

string

ChecksumSHA256

Gets and sets the property ChecksumSHA256.

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

public string ChecksumSHA256 { get; set; }

Property Value

string

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.

public string ExpectedBucketOwner { get; set; }

Property Value

string

Key

The key of the S3 object that was being uploaded.

public string Key { get; set; }

Property Value

string

Remarks

This property will be used as part of the resource path of the HTTP request. In .NET the System.Uri class is used to construct the uri for the request. The System.Uri class will canonicalize the uri string by compacting characters like "..". /// For example an object key of "foo/../bar/file.txt" will be transformed into "bar/file.txt" because the ".." is interpreted as use parent directory. For further information view the documentation for the Uri class: https://docs.microsoft.com/en-us/dotnet/api/system.uri

PartETags

A collection of part numbers and corresponding etags.

public List<PartETag> PartETags { get; set; }

Property Value

List<PartETag>

RequestPayer

Confirms that the requester knows that she or he will be charged for the request. Bucket owners need not specify this parameter in their requests.

public RequestPayer RequestPayer { get; set; }

Property Value

RequestPayer

SSECustomerAlgorithm

Gets and sets the property SSECustomerAlgorithm.

The SSE algorithm used to encrypt the object. This is only needed 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.

public string SSECustomerAlgorithm { get; set; }

Property Value

string

SSECustomerKey

Gets and sets the property SSECustomerKey.

The SSE customer key. This is only needed when the object was cureated using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

public string SSECustomerKey { get; set; }

Property Value

string

SSECustomerKeyMD5

Gets and sets the property SSECustomerKeyMD5.

The MD5 SSE customer key. This is only needed when the object was cureated using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

public string SSECustomerKeyMD5 { get; set; }

Property Value

string

UploadId

The upload id for the in-progress multipart upload that should be completed.

public string UploadId { get; set; }

Property Value

string

Methods

AddPartETags(params CopyPartResponse[])

Adds a collection of part numbers and corresponding etags by transforming the CopyPartResponse into PartETags.

public void AddPartETags(params CopyPartResponse[] responses)

Parameters

responses CopyPartResponse[]

The list of response objects return from CopyParts.

AddPartETags(params PartETag[])

Adds a collection of part numbers and corresponding etags.

public void AddPartETags(params PartETag[] partETags)

Parameters

partETags PartETag[]

PartETags that will added to this request.

AddPartETags(params UploadPartResponse[])

Adds a collection of part numbers and corresponding etags by transforming the UploadPartResponses into PartETags.

public void AddPartETags(params UploadPartResponse[] responses)

Parameters

responses UploadPartResponse[]

The list of response objects return from UploadParts.

AddPartETags(IEnumerable<CopyPartResponse>)

Adds a collection of part numbers and corresponding etags by transforming the CopyPartResponse into PartETags.

public void AddPartETags(IEnumerable<CopyPartResponse> responses)

Parameters

responses IEnumerable<CopyPartResponse>

The list of response objects return from CopyParts.

AddPartETags(IEnumerable<PartETag>)

Adds a collection of part numbers and corresponding etags.

public void AddPartETags(IEnumerable<PartETag> partETags)

Parameters

partETags IEnumerable<PartETag>

PartETags that will added to this request.

AddPartETags(IEnumerable<UploadPartResponse>)

Adds a collection of part numbers and corresponding etags by transforming the UploadPartResponses into PartETags.

public void AddPartETags(IEnumerable<UploadPartResponse> responses)

Parameters

responses IEnumerable<UploadPartResponse>

The list of response objects return from UploadParts.