C# Class Amazon.DynamoDBv2.DataModel.S3Link

S3Link is an object that provides a connection to an S3 resource that can be stored in a DynamoDB field through DynamoDBContext
Show file Open project: aws/aws-sdk-net Class Usage Examples

Public Methods

Method Description
BeginDownloadTo ( string downloadPath, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the DownloadTo operation.

BeginOpenStream ( AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the OpenStream operation.

BeginUploadFrom ( string sourcePath, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the UploadFrom operation.

BeginUploadStream ( Stream stream, AsyncCallback callback, object state ) : IAsyncResult

Initiates the asynchronous execution of the UploadStream operation.

DownloadTo ( string downloadPath ) : void

Downloads the file from the S3Link's specified bucket and key then saves it in the given path. Creates directories and the file if they do not already exist.

DownloadToAsync ( string downloadPath, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Downloads the file from the S3Link's specified bucket and key then saves it in the given path. Creates directories and the file if they do not already exist.

EndDownloadTo ( IAsyncResult asyncResult ) : void

Finishes the asynchronous execution of the DownloadTo operation.

EndOpenStream ( IAsyncResult asyncResult ) : Stream

Finishes the asynchronous execution of the OpenStream operation.

EndUploadFrom ( IAsyncResult asyncResult ) : void

Finishes the asynchronous execution of the UploadFrom operation.

EndUploadStream ( IAsyncResult asyncResult ) : void

Finishes the asynchronous execution of the UploadStream operation.

MakeS3ObjectPublic ( bool enable ) : void

If enable is set to true the object will have its permission set to PublicRead otherwise the permissions will be set to Private.

OpenStream ( ) : Stream

Open stream to the data stored in Amazon S3.

OpenStreamAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task

Opens a stream to object stored in Amazon S3.

UploadFrom ( string sourcePath ) : void

Uploads the specified file and stores it in the specified bucket with the provided key from construction.

UploadFromAsync ( string sourcePath, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Uploads the specified file and stores it in the specified bucket with the provided key from construction.

UploadStream ( Stream stream ) : void

Uploads the stream and stores it in the specified bucket with the provided key from construction.

UploadStreamAsync ( Stream stream, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Uploads the stream and stores it in the specified bucket with the provided key from construction.

Method Details

BeginDownloadTo() public method

Initiates the asynchronous execution of the DownloadTo operation.
public BeginDownloadTo ( string downloadPath, AsyncCallback callback, object state ) : IAsyncResult
downloadPath string Path to save the file.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property
return IAsyncResult

BeginOpenStream() public method

Initiates the asynchronous execution of the OpenStream operation.
public BeginOpenStream ( AsyncCallback callback, object state ) : IAsyncResult
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property
return IAsyncResult

BeginUploadFrom() public method

Initiates the asynchronous execution of the UploadFrom operation.
public BeginUploadFrom ( string sourcePath, AsyncCallback callback, object state ) : IAsyncResult
sourcePath string Path of the file to be uploaded.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property
return IAsyncResult

BeginUploadStream() public method

Initiates the asynchronous execution of the UploadStream operation.
public BeginUploadStream ( Stream stream, AsyncCallback callback, object state ) : IAsyncResult
stream Stream The stream of data to upload.
callback AsyncCallback An AsyncCallback delegate that is invoked when the operation completes
state object A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property
return IAsyncResult

DownloadTo() public method

Downloads the file from the S3Link's specified bucket and key then saves it in the given path. Creates directories and the file if they do not already exist.
public DownloadTo ( string downloadPath ) : void
downloadPath string Path to save the file.
return void

DownloadToAsync() public method

Downloads the file from the S3Link's specified bucket and key then saves it in the given path. Creates directories and the file if they do not already exist.
public DownloadToAsync ( string downloadPath, CancellationToken cancellationToken = default(CancellationToken) ) : Task
downloadPath string Path to save the file.
cancellationToken CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
return Task

EndDownloadTo() public method

Finishes the asynchronous execution of the DownloadTo operation.
public EndDownloadTo ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginDownloadTo.
return void

EndOpenStream() public method

Finishes the asynchronous execution of the OpenStream operation.
public EndOpenStream ( IAsyncResult asyncResult ) : Stream
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginOpenStream.
return Stream

EndUploadFrom() public method

Finishes the asynchronous execution of the UploadFrom operation.
public EndUploadFrom ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginUploadFrom.
return void

EndUploadStream() public method

Finishes the asynchronous execution of the UploadStream operation.
public EndUploadStream ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult The IAsyncResult returned by the call to BeginUploadStream.
return void

MakeS3ObjectPublic() public method

If enable is set to true the object will have its permission set to PublicRead otherwise the permissions will be set to Private.
public MakeS3ObjectPublic ( bool enable ) : void
enable bool If true the object will have its permission set to PublicRead otherwise the permissions will be set to Private.
return void

OpenStream() public method

Open stream to the data stored in Amazon S3.
public OpenStream ( ) : Stream
return Stream

OpenStreamAsync() public method

Opens a stream to object stored in Amazon S3.
public OpenStreamAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
cancellationToken CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
return Task

UploadFrom() public method

Uploads the specified file and stores it in the specified bucket with the provided key from construction.
public UploadFrom ( string sourcePath ) : void
sourcePath string Path of the file to be uploaded.
return void

UploadFromAsync() public method

Uploads the specified file and stores it in the specified bucket with the provided key from construction.
public UploadFromAsync ( string sourcePath, CancellationToken cancellationToken = default(CancellationToken) ) : Task
sourcePath string Path of the file to be uploaded.
cancellationToken CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
return Task

UploadStream() public method

Uploads the stream and stores it in the specified bucket with the provided key from construction.
public UploadStream ( Stream stream ) : void
stream Stream Stream to upload.
return void

UploadStreamAsync() public method

Uploads the stream and stores it in the specified bucket with the provided key from construction.
public UploadStreamAsync ( Stream stream, CancellationToken cancellationToken = default(CancellationToken) ) : Task
stream Stream Stream to be uploaded to Amazon S3.
cancellationToken CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
return Task