AWS SDK Version 3 for .NET
API Reference

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.

Contains all the parameters that can be set when making a this request with the TransferUtility method.

Inheritance Hierarchy

System.Object
  Amazon.S3.Transfer.BaseUploadRequest
    Amazon.S3.Transfer.TransferUtilityUploadRequest

Namespace: Amazon.S3.Transfer
Assembly: AWSSDK.S3.dll
Version: 3.x.y.z

Syntax

C#
public class TransferUtilityUploadRequest : BaseUploadRequest

The TransferUtilityUploadRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AutoCloseStream System.Boolean

Gets or sets whether or not the stream used with this request is automatically closed when all of the content is read from the stream.

Public Property AutoResetStreamPosition System.Boolean

If this value is set to true then the stream's position will be reset to the start before being read for upload. Default: true.

Public Property BucketName System.String

Gets or sets the name of the bucket.

Public Property CalculateContentMD5Header System.Boolean

Gets or sets whether the Content-MD5 header should be calculated for upload.

Public Property CannedACL Amazon.S3.S3CannedACL

Gets or sets the canned access control list (ACL) for the uploaded object. Please refer to Amazon.S3.S3CannedACL for information on Amazon S3 canned ACLs.

Public Property ChecksumAlgorithm Amazon.S3.ChecksumAlgorithm

Gets and sets the property ChecksumAlgorithm.

Indicates the algorithm used to create the checksum for the object. Amazon S3 will fail the request with a 400 error if there is no checksum associated with the object. For more information, see Checking object integrity in the Amazon S3 User Guide.

If you provide an individual checksum, Amazon S3 will ignore any provided ChecksumAlgorithm.

Public Property ContentType System.String

Gets or sets the content type of the uploaded Amazon S3 object.

Public Property DisableDefaultChecksumValidation System.Nullable<System.Boolean>

WARNING: Setting DisableDefaultChecksumValidation to true disables the default data integrity check on upload requests.

When true, checksum verification will not be used in upload requests. This may increase upload performance under high CPU loads. Setting DisableDefaultChecksumValidation sets the deprecated property DisableMD5Stream to the same value. The default value is false. Set this value to true to disable the default checksum validation used in all S3 upload requests or override this value per request by setting the DisableDefaultChecksumValidation property on Amazon.S3.Model.PutObjectRequest, Amazon.S3.Model.UploadPartRequest, or Amazon.S3.Transfer.TransferUtilityUploadRequest.

Checksums, SigV4 payload signing, and HTTPS each provide some data integrity verification. If DisableDefaultChecksumValidation is true and DisablePayloadSigning is true, then the possibility of data corruption is completely dependent on HTTPS being the only remaining source of data integrity verification.

This flag is a rename of the Amazon.S3.Transfer.TransferUtilityUploadRequest.DisableMD5Stream property

Public Property DisableMD5Stream System.Nullable<System.Boolean>

WARNING: Setting DisableMD5Stream to true disables the MD5 data integrity check on upload requests.This property has been deprecated in favor of Amazon.S3.Transfer.TransferUtilityUploadRequest.DisableDefaultChecksumValidation Setting the value of DisableMD5Stream will set DisableDefaultChecksumValidation to the same value and vice versa. This property was left here for backwards compatibility.

When true, MD5Stream will not be used in upload requests. This may increase upload performance under high CPU loads. The default value is false. Set this value to true to disable MD5Stream use in all S3 upload requests or override this value per request by setting the DisableMD5Stream property on PutObjectRequest, UploadPartRequest, or TransferUtilityUploadRequest.

MD5Stream, SigV4 payload signing, and HTTPS each provide some data integrity verification. If DisableMD5Stream is true and DisablePayloadSigning is true, then the possibility of data corruption is completely dependant on HTTPS being the only remaining source of data integrity verification.

Public Property DisablePayloadSigning System.Nullable<System.Boolean>

WARNING: Setting DisablePayloadSigning to true disables the SigV4 payload signing data integrity check on this request.

If using SigV4, the DisablePayloadSigning flag controls if the payload should be signed on a request by request basis. By default this flag is null which will use the default client behavior. The default client behavior is to sign the payload. When DisablePayloadSigning is true, the request will be signed with an UNSIGNED-PAYLOAD value. Setting DisablePayloadSigning to true requires that the request is sent over a HTTPS connection.

Under certain circumstances, such as uploading to S3 while using MD5 hashing, it may be desireable to use UNSIGNED-PAYLOAD to decrease signing CPU usage. This flag only applies to Amazon S3 PutObject and UploadPart requests.

MD5Stream, SigV4 payload signing, and HTTPS each provide some data integrity verification. If DisableMD5Stream is true and DisablePayloadSigning is true, then the possibility of data corruption is completely dependant on HTTPS being the only remaining source of data integrity verification.

Public Property FilePath System.String

Gets or sets the file path where the Amazon S3 object will be uploaded from.

For WinRT and Windows Phone this property must be in the form of "ms-appdata:///local/file.txt".

Public Property Headers Amazon.S3.Model.HeadersCollection

The collection of headers for the request.

Public Property InputStream System.IO.Stream

Input stream for the request; content for the request will be read from the stream.

Public Property Key System.String

Gets or sets the key under which the Amazon S3 object is to be stored.

Public Property Metadata Amazon.S3.Model.MetadataCollection

The collection of meta data for the request.

Public Property ObjectLockLegalHoldStatus Amazon.S3.ObjectLockLegalHoldStatus

Gets and sets the property ObjectLockLegalHoldStatus.

Specifies whether a legal hold will be applied to this object. For more information about S3 Object Lock, see Object Lock.

Public Property ObjectLockMode Amazon.S3.ObjectLockMode

Gets and sets the property ObjectLockMode.

The Object Lock mode that you want to apply to this object.

Public Property ObjectLockRetainUntilDate System.DateTime

Gets and sets the property ObjectLockRetainUntilDate.

The date and time when you want this object's Object Lock to expire.

Public Property PartSize System.Int64

Gets or sets the part size of the upload in bytes. The uploaded file will be divided into parts the size specified and uploaded to Amazon S3 individually.

Public Property ServerSideEncryptionCustomerMethod Amazon.S3.ServerSideEncryptionCustomerMethod

The Server-side encryption algorithm to be used with the customer provided key.

Public Property ServerSideEncryptionCustomerProvidedKey System.String

The base64-encoded encryption key for Amazon S3 to use to encrypt the object

Using the encryption key you provide as part of your request Amazon S3 manages both the encryption, as it writes to disks, and decryption, when you access your objects. Therefore, you don't need to maintain any data encryption code. The only thing you do is manage the encryption keys you provide.

When you retrieve an object, you must provide the same encryption key as part of your request. Amazon S3 first verifies the encryption key you provided matches, and then decrypts the object before returning the object data to you.

Important: Amazon S3 does not store the encryption key you provide.

Public Property ServerSideEncryptionCustomerProvidedKeyMD5 System.String

The MD5 of the customer encryption key specified in the ServerSideEncryptionCustomerProvidedKey property. The MD5 is base 64 encoded. This field is optional, the SDK will calculate the MD5 if this is not set.

Public Property ServerSideEncryptionKeyManagementServiceKeyId System.String

The id of the AWS Key Management Service key that Amazon S3 should use to encrypt and decrypt the object. If a key id is not specified, the default key will be used for encryption and decryption.

Public Property ServerSideEncryptionMethod Amazon.S3.ServerSideEncryptionMethod

Gets and sets the ServerSideEncryptionMethod property. Specifies the encryption used on the server to store the content.

Public Property StorageClass Amazon.S3.S3StorageClass

Gets or sets the storage class for the uploaded Amazon S3 object. Please refer to Amazon.S3.S3StorageClass for information on S3 Storage Classes.

Public Property TagSet System.Collections.Generic.List<Amazon.S3.Model.Tag>

The tag-set for the object.

Methods

Note:

Asynchronous operations (methods ending with Async) in the table below are for .NET 4.5 or higher. For .NET 3.5 the SDK follows the standard naming convention of BeginMethodName and EndMethodName to indicate asynchronous operations - these method pairs are not shown in the table below.

NameDescription
Public Method RemoveCannedACL()

Removes the cannned access control list (ACL) for the uploaded object.

Public Method WithAutoCloseStream(bool)

Sets whether or not the stream used with this request is automatically closed when all of the content is read from the stream and returns this object instance, enabling additional method calls to be chained together.

Events

NameDescription
Event UploadProgressEvent

Version Information

.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