Table of Contents

Class TransferUtilityUploadDirectoryRequest

Namespace
Amazon.S3.Transfer
Assembly
AWSSDK.S3.dll

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

public class TransferUtilityUploadDirectoryRequest : BaseUploadRequest
Inheritance
TransferUtilityUploadDirectoryRequest
Inherited Members

Constructors

TransferUtilityUploadDirectoryRequest()

public TransferUtilityUploadDirectoryRequest()

Properties

BucketName

Gets or sets the name of the bucket.

public string BucketName { get; set; }

Property Value

string

The name of the bucket.

CannedACL

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

public S3CannedACL CannedACL { get; set; }

Property Value

S3CannedACL

The canned access control list (ACL) for the uploaded objects.

ContentType

Gets or sets the content type for the uploaded Amazon S3 objects. The default behavior when this field is not set is to use the file extension to set the content type. If this field is set to a value it will be applied to all uploaded files in the directory, overriding file extension inspection.

public string ContentType { get; set; }

Property Value

string

The content type for all the uploaded Amazon S3 objects.

Directory

Gets or sets the directory where files are uploaded from.

public string Directory { get; set; }

Property Value

string

The directory where files are uploaded from.

KeyPrefix

Gets or sets the KeyPrefix property. As object keys are generated for the files being uploaded this value will prefix the key. This is useful when a directory needs to be uploaded into sub directory in the S3 Bucket.

public string KeyPrefix { get; set; }

Property Value

string

The directory where files are uploaded from.

Metadata

The collection of meta data for the request.

public MetadataCollection Metadata { get; }

Property Value

MetadataCollection

SearchOption

Gets or sets the recursive options for the directory upload.

public SearchOption SearchOption { get; set; }

Property Value

SearchOption

The recursive options for the directory upload. Set by default to TopDirectoryOnly, specifying that files will be uploaded from the root directory only.

SearchPattern

Gets and sets the search pattern used to determine which files in the directory are uploaded.

public string SearchPattern { get; set; }

Property Value

string

The search pattern used to deterimine which files in the directory are uploaded. The default value is "*", specifying that all files in the directory will be uploaded.

ServerSideEncryptionKeyManagementServiceKeyId

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 string ServerSideEncryptionKeyManagementServiceKeyId { get; set; }

Property Value

string

ServerSideEncryptionMethod

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

public ServerSideEncryptionMethod ServerSideEncryptionMethod { get; set; }

Property Value

ServerSideEncryptionMethod

StorageClass

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

public S3StorageClass StorageClass { get; set; }

Property Value

S3StorageClass

The storage class for the uploaded Amazon S3 objects.

TagSet

Tags that will be applied to all objects in the diretory.

public List<Tag> TagSet { get; set; }

Property Value

List<Tag>

UploadFilesConcurrently

Gets or sets the UploadFilesConcurrently property. Specifies if multiple files will be uploaded concurrently. The number of concurrent web requests used is controlled by the TransferUtilityConfig.ConcurrencyLevel property.

public bool UploadFilesConcurrently { get; set; }

Property Value

bool

Events

UploadDirectoryFileRequestEvent

The event for modifying individual TransferUtilityUploadRequest for each file being uploaded.

public event EventHandler<UploadDirectoryFileRequestArgs> UploadDirectoryFileRequestEvent

Event Type

EventHandler<UploadDirectoryFileRequestArgs>

UploadDirectoryProgressEvent

The event for UploadDirectoryProgressEvent notifications. All subscribers will be notified when a new progress event is raised.

The UploadDirectoryProgressEvent is fired as data is uploaded to S3. The delegates attached to the event will be passed information detailing how much data has been uploaded as well as how much will be uploaded.

public event EventHandler<UploadDirectoryProgressArgs> UploadDirectoryProgressEvent

Event Type

EventHandler<UploadDirectoryProgressArgs>

Remarks

Subscribe to this event if you want to receive UploadDirectoryProgressEvent notifications. Here is how:

  1. Define a method with a signature similar to this one:
private void displayProgress(object sender, UploadDirectoryProgressArgs args)
{
    Console.WriteLine(args);
}
  1. Add this method to the UploadDirectoryProgressEvent delegate's invocation list
TransferUtilityUploadDirectoryRequest request = new TransferUtilityUploadDirectoryRequest();
request.UploadDirectoryProgressEvent += displayProgress;