AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Returns information about the CompleteMultipartUpload response and response metadata.
Namespace: Amazon.S3.Model
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z
public class CompleteMultipartUploadResponse : AmazonWebServiceResponse
The CompleteMultipartUploadResponse type exposes the following members
Name | Description | |
---|---|---|
![]() |
CompleteMultipartUploadResponse() |
Name | Type | Description | |
---|---|---|---|
![]() |
BucketKeyEnabled | System.Boolean |
Gets and sets the property BucketKeyEnabled. Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with AWS KMS (SSE-KMS). |
![]() |
BucketName | System.String |
Gets and sets the property 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 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 |
![]() |
ChecksumCRC32 | System.String |
Gets and sets the property ChecksumCRC32. The base64-encoded, 32-bit CRC32 checksum of the object. |
![]() |
ChecksumCRC32C | System.String |
Gets and sets the property ChecksumCRC32C. The base64-encoded, 32-bit CRC32C checksum of the object. |
![]() |
ChecksumSHA1 | System.String |
Gets and sets the property ChecksumSHA1. The base64-encoded, 160-bit SHA-1 digest of the object. |
![]() |
ChecksumSHA256 | System.String |
Gets and sets the property ChecksumSHA256. The base64-encoded, 256-bit SHA-256 digest of the object. |
![]() |
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
![]() |
ETag | System.String |
Gets and sets the property 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. |
![]() |
Expiration | Amazon.S3.Model.Expiration |
Gets and sets the property 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. |
![]() |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
![]() |
Key | System.String |
Gets and sets the property Key. The object key of the newly created object. |
![]() |
Location | System.String |
Gets and sets the property Location. The URI that identifies the newly created object. |
![]() |
RequestCharged | Amazon.S3.RequestCharged |
If present, indicates that the requester was successfully charged for the request. |
![]() |
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
![]() |
ServerSideEncryptionKeyManagementServiceKeyId | System.String |
The id of the AWS Key Management Service key that Amazon S3 uses to encrypt and decrypt the object. If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for the object. |
![]() |
ServerSideEncryptionMethod | Amazon.S3.ServerSideEncryptionMethod |
The server-side encryption algorithm used when storing this object in Amazon S3 (for
example, AES256, |
![]() |
VersionId | System.String |
Gets and sets the property VersionId. Version ID of the newly created object, in case the bucket has versioning turned on. |
This example shows how to upload 13MB of data using mutlipart upload.
The data is contained in a stream and the upload is done in 3 parts:
5MB, 5MB, then the remainder.
int MB = (int)Math.Pow(2, 20); // Create a client AmazonS3Client client = new AmazonS3Client(); // Define input stream Stream inputStream = Create13MBDataStream(); // Initiate multipart upload InitiateMultipartUploadRequest initRequest = new InitiateMultipartUploadRequest { BucketName = "SampleBucket", Key = "Item1" }; InitiateMultipartUploadResponse initResponse = client.InitiateMultipartUpload(initRequest); // Upload part 1 UploadPartRequest uploadRequest = new UploadPartRequest { BucketName = "SampleBucket", Key = "Item1", UploadId = initResponse.UploadId, PartNumber = 1, PartSize = 5 * MB, InputStream = inputStream }; UploadPartResponse up1Response = client.UploadPart(uploadRequest); // Upload part 2 uploadRequest = new UploadPartRequest { BucketName = "SampleBucket", Key = "Item1", UploadId = initResponse.UploadId, PartNumber = 2, PartSize = 5 * MB, InputStream = inputStream }; UploadPartResponse up2Response = client.UploadPart(uploadRequest); // Upload part 3 uploadRequest = new UploadPartRequest { BucketName = "SampleBucket", Key = "Item1", UploadId = initResponse.UploadId, PartNumber = 3, InputStream = inputStream }; UploadPartResponse up3Response = client.UploadPart(uploadRequest); // List parts for current upload ListPartsRequest listPartRequest = new ListPartsRequest { BucketName = "SampleBucket", Key = "Item1", UploadId = initResponse.UploadId }; ListPartsResponse listPartResponse = client.ListParts(listPartRequest); Debug.Assert(listPartResponse.Parts.Count == 3); // Complete the multipart upload CompleteMultipartUploadRequest compRequest = new CompleteMultipartUploadRequest { BucketName = "SampleBucket", Key = "Item1", UploadId = initResponse.UploadId, PartETags = new List<PartETag> { new PartETag { ETag = up1Response.ETag, PartNumber = 1 }, new PartETag { ETag = up2Response.ETag, PartNumber = 2 }, new PartETag { ETag = up3Response.ETag, PartNumber = 3 } } }; CompleteMultipartUploadResponse compResponse = client.CompleteMultipartUpload(compRequest);
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5