AmazonS3Client Class

.NET Framework 4.5
 
 
 
Did this page help you?  Yes  No   Tell us about it...
Implementation for accessing AmazonS3.

Inheritance Hierarchy

Namespace: Amazon.S3
Assembly: AWSSDK.dll
Version: 2.0.0.3

Syntax

C#
public class AmazonS3Client : AmazonWebServiceClient
         IAmazonS3, IDisposable

The AmazonS3Client type exposes the following members

Constructors

  Name Description
Public Method AmazonS3Client() Constructs AmazonS3Client with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>
             
Public Method AmazonS3Client(RegionEndpoint) Constructs AmazonS3Client with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>
             
Public Method AmazonS3Client(AmazonS3Config) Constructs AmazonS3Client with the credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. Example App.config with credentials set.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSAccessKey" value="********************"/>
        <add key="AWSSecretKey" value="****************************************"/>
    </appSettings>
</configuration>
             
Public Method AmazonS3Client(AWSCredentials) Constructs AmazonS3Client with AWS Credentials
Public Method AmazonS3Client(AWSCredentials, RegionEndpoint) Constructs AmazonS3Client with AWS Credentials
Public Method AmazonS3Client(AWSCredentials, AmazonS3Config) Constructs AmazonS3Client with AWS Credentials and an AmazonS3Client Configuration object.
Public Method AmazonS3Client(string, string) Constructs AmazonS3Client with AWS Access Key ID and AWS Secret Key
Public Method AmazonS3Client(string, string, RegionEndpoint) Constructs AmazonS3Client with AWS Access Key ID and AWS Secret Key
Public Method AmazonS3Client(string, string, AmazonS3Config) Constructs AmazonS3Client with AWS Access Key ID, AWS Secret Key and an AmazonS3Client Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.
Public Method AmazonS3Client(string, string, string) Constructs AmazonS3Client with AWS Access Key ID and AWS Secret Key
Public Method AmazonS3Client(string, string, string, RegionEndpoint) Constructs AmazonS3Client with AWS Access Key ID and AWS Secret Key
Public Method AmazonS3Client(string, string, string, AmazonS3Config) Constructs AmazonS3Client with AWS Access Key ID, AWS Secret Key and an AmazonS3Client Configuration object. If the config object's UseSecureStringForAwsSecretKey is false, the AWS Secret Key is stored as a clear-text string. Please use this option only if the application environment doesn't allow the use of SecureStrings.

Methods

  Name Description
Public Method AbortMultipartUpload(AbortMultipartUploadRequest)

Aborts a multipart upload.

Public Method AbortMultipartUploadAsync(AbortMultipartUploadRequest, CancellationToken) Initiates the asynchronous execution of the AbortMultipartUpload operation.
Public Method CompleteMultipartUpload(CompleteMultipartUploadRequest)

Completes a multipart upload by assembling previously uploaded parts.

Public Method CompleteMultipartUploadAsync(CompleteMultipartUploadRequest, CancellationToken) Initiates the asynchronous execution of the CompleteMultipartUpload operation.
Public Method CopyObject(CopyObjectRequest)

Creates a copy of an object that is already stored in Amazon S3.

Public Method CopyObjectAsync(CopyObjectRequest, CancellationToken) Initiates the asynchronous execution of the CopyObject operation.
Public Method CopyPart(CopyPartRequest)

Uploads a part by copying data from an existing object as data source.

Public Method CopyPartAsync(CopyPartRequest, CancellationToken) Initiates the asynchronous execution of the CopyPart operation.
Public Method DeleteBucket(DeleteBucketRequest)

Deletes the bucket. All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.

Public Method DeleteBucketAsync(DeleteBucketRequest, CancellationToken) Initiates the asynchronous execution of the DeleteBucket operation.
Public Method DeleteBucketPolicy(DeleteBucketPolicyRequest)

Deletes the policy from the bucket.

Public Method DeleteBucketPolicyAsync(DeleteBucketPolicyRequest, CancellationToken) Initiates the asynchronous execution of the DeleteBucketPolicy operation.
Public Method DeleteBucketTagging(DeleteBucketTaggingRequest)

Deletes the tags from the bucket.

Public Method DeleteBucketTaggingAsync(DeleteBucketTaggingRequest, CancellationToken) Initiates the asynchronous execution of the DeleteBucketTagging operation.
Public Method DeleteBucketWebsite(DeleteBucketWebsiteRequest)

This operation removes the website configuration from the bucket.

Public Method DeleteBucketWebsiteAsync(DeleteBucketWebsiteRequest, CancellationToken) Initiates the asynchronous execution of the DeleteBucketWebsite operation.
Public Method DeleteCORSConfiguration(DeleteCORSConfigurationRequest)

Deletes the cors configuration information set for the bucket.

Public Method DeleteCORSConfigurationAsync(DeleteCORSConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the DeleteCORSConfiguration operation.
Public Method DeleteLifecycleConfiguration(DeleteLifecycleConfigurationRequest)

Deletes the lifecycle configuration from the bucket.

Public Method DeleteLifecycleConfigurationAsync(DeleteLifecycleConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the DeleteLifecycleConfiguration operation.
Public Method DeleteObject(DeleteObjectRequest)

Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn''t a null version, Amazon S3 does not remove any objects.

Public Method DeleteObjectAsync(DeleteObjectRequest, CancellationToken) Initiates the asynchronous execution of the DeleteObject operation.
Public Method DeleteObjects(DeleteObjectsRequest)

This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.

Public Method DeleteObjectsAsync(DeleteObjectsRequest, CancellationToken) Initiates the asynchronous execution of the DeleteObjects operation.
Public Method Dispose() Disposes of all managed and unmanaged resources.
Public Method GetACL(GetACLRequest)

Returns the access control list (ACL) of an object.

Public Method GetACLAsync(GetACLRequest, CancellationToken) Initiates the asynchronous execution of the GetACL operation.
Public Method GetBucketLocation(GetBucketLocationRequest)

Returns the region the bucket resides in.

Public Method GetBucketLocationAsync(GetBucketLocationRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketLocation operation.
Public Method GetBucketLogging(GetBucketLoggingRequest)

Returns the logging status of a bucket and the permissions users have to view and modify that status. To use GET, you must be the bucket owner.

Public Method GetBucketLoggingAsync(GetBucketLoggingRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketLogging operation.
Public Method GetBucketNotification(GetBucketNotificationRequest)

Return the notification configuration of a bucket.

Public Method GetBucketNotificationAsync(GetBucketNotificationRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketNotification operation.
Public Method GetBucketPolicy(GetBucketPolicyRequest)

Returns the policy of a specified bucket.

Public Method GetBucketPolicyAsync(GetBucketPolicyRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketPolicy operation.
Public Method GetBucketRequestPayment(GetBucketRequestPaymentRequest)

Returns the request payment configuration of a bucket.

Public Method GetBucketRequestPaymentAsync(GetBucketRequestPaymentRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketRequestPayment operation.
Public Method GetBucketTagging(GetBucketTaggingRequest)

Returns the tag set associated with the bucket.

Public Method GetBucketTaggingAsync(GetBucketTaggingRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketTagging operation.
Public Method GetBucketVersioning(GetBucketVersioningRequest)

Returns the versioning state of a bucket.

Public Method GetBucketVersioningAsync(GetBucketVersioningRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketVersioning operation.
Public Method GetBucketWebsite(GetBucketWebsiteRequest)

Returns the website configuration for a bucket.

Public Method GetBucketWebsiteAsync(GetBucketWebsiteRequest, CancellationToken) Initiates the asynchronous execution of the GetBucketWebsite operation.
Public Method GetCORSConfiguration(GetCORSConfigurationRequest)

Returns the cors configuration for the bucket.

Public Method GetCORSConfigurationAsync(GetCORSConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the GetCORSConfiguration operation.
Public Method GetLifecycleConfiguration(GetLifecycleConfigurationRequest)

Returns the lifecycle configuration information set on the bucket.

Public Method GetLifecycleConfigurationAsync(GetLifecycleConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the GetLifecycleConfiguration operation.
Public Method GetObject(GetObjectRequest)

Retrieves objects from Amazon S3.

Public Method GetObjectAsync(GetObjectRequest, CancellationToken) Initiates the asynchronous execution of the GetObject operation.
Public Method GetObjectMetadata(GetObjectMetadataRequest) Returns information about a specified object.
Public Method GetObjectMetadataAsync(GetObjectMetadataRequest, CancellationToken) Initiates the asynchronous execution of the GetObjectMetadata operation.
Public Method GetObjectTorrent(GetObjectTorrentRequest)

Return torrent files from a bucket.

Public Method GetObjectTorrentAsync(GetObjectTorrentRequest, CancellationToken) Initiates the asynchronous execution of the GetObjectTorrent operation.
Public Method GetPreSignedURL(GetPreSignedUrlRequest) Create a signed URL allowing access to a resource that would usually require authentication.
Public Method InitiateMultipartUpload(InitiateMultipartUploadRequest)

Initiates a multipart upload and returns an upload ID.

Public Method InitiateMultipartUploadAsync(InitiateMultipartUploadRequest, CancellationToken) Initiates the asynchronous execution of the InitiateMultipartUpload operation.
Public Method ListBuckets(ListBucketsRequest)

Returns a list of all buckets owned by the authenticated sender of the request.

Public Method ListBuckets()

Returns a list of all buckets owned by the authenticated sender of the request.

Public Method ListBucketsAsync(ListBucketsRequest, CancellationToken) Initiates the asynchronous execution of the ListBuckets operation.
Public Method ListMultipartUploads(ListMultipartUploadsRequest)

This operation lists in-progress multipart uploads.

Public Method ListMultipartUploadsAsync(ListMultipartUploadsRequest, CancellationToken) Initiates the asynchronous execution of the ListMultipartUploads operation.
Public Method ListObjects(ListObjectsRequest)

Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket.

Public Method ListObjectsAsync(ListObjectsRequest, CancellationToken) Initiates the asynchronous execution of the ListObjects operation.
Public Method ListParts(ListPartsRequest)

Lists the parts that have been uploaded for a specific multipart upload.

Public Method ListPartsAsync(ListPartsRequest, CancellationToken) Initiates the asynchronous execution of the ListParts operation.
Public Method ListVersions(ListVersionsRequest)

Returns metadata about all of the versions of objects in a bucket.

Public Method ListVersionsAsync(ListVersionsRequest, CancellationToken) Initiates the asynchronous execution of the ListVersions operation.
Public Method PutACL(PutACLRequest)

uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket

Public Method PutACLAsync(PutACLRequest, CancellationToken) Initiates the asynchronous execution of the PutACL operation.
Public Method PutBucket(PutBucketRequest)

Creates a new bucket.

Public Method PutBucketAsync(PutBucketRequest, CancellationToken) Initiates the asynchronous execution of the PutBucket operation.
Public Method PutBucketLogging(PutBucketLoggingRequest)

Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. To set the logging status of a bucket, you must be the bucket owner.

Public Method PutBucketLoggingAsync(PutBucketLoggingRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketLogging operation.
Public Method PutBucketNotification(PutBucketNotificationRequest)

Enables notifications of specified events for a bucket.

Public Method PutBucketNotificationAsync(PutBucketNotificationRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketNotification operation.
Public Method PutBucketPolicy(PutBucketPolicyRequest)

Replaces a policy on a bucket. If the bucket already has a policy, the one in this request completely replaces it.

Public Method PutBucketPolicyAsync(PutBucketPolicyRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketPolicy operation.
Public Method PutBucketRequestPayment(PutBucketRequestPaymentRequest)

Sets the request payment configuration for a bucket. By default, the bucket owner pays for downloads from the bucket. This configuration parameter enables the bucket owner (only) to specify that the person requesting the download will be charged for the download.

Public Method PutBucketRequestPaymentAsync(PutBucketRequestPaymentRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketRequestPayment operation.
Public Method PutBucketTagging(PutBucketTaggingRequest)

Sets the tags for a bucket.

Public Method PutBucketTaggingAsync(PutBucketTaggingRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketTagging operation.
Public Method PutBucketVersioning(PutBucketVersioningRequest)

Puts the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner.

Public Method PutBucketVersioningAsync(PutBucketVersioningRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketVersioning operation.
Public Method PutBucketWebsite(PutBucketWebsiteRequest)

Set the website configuration for a bucket.

Public Method PutBucketWebsiteAsync(PutBucketWebsiteRequest, CancellationToken) Initiates the asynchronous execution of the PutBucketWebsite operation.
Public Method PutCORSConfiguration(PutCORSConfigurationRequest)

Sets the cors configuration for a bucket.

Public Method PutCORSConfigurationAsync(PutCORSConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the PutCORSConfiguration operation.
Public Method PutLifecycleConfiguration(PutLifecycleConfigurationRequest)

Sets lifecycle configuration for your bucket. If a lifecycle configuration exists, it replaces it.

Public Method PutLifecycleConfigurationAsync(PutLifecycleConfigurationRequest, CancellationToken) Initiates the asynchronous execution of the PutLifecycleConfiguration operation.
Public Method PutObject(PutObjectRequest)

Adds an object to a bucket.

Public Method PutObjectAsync(PutObjectRequest, CancellationToken) Initiates the asynchronous execution of the PutObject operation.
Public Method RestoreObject(RestoreObjectRequest)

Restores an archived copy of an object back into Amazon S3

Public Method RestoreObjectAsync(RestoreObjectRequest, CancellationToken) Initiates the asynchronous execution of the RestoreObject operation.
Public Method UploadPart(UploadPartRequest)

Uploads a part in a multipart upload.

Public Method UploadPartAsync(UploadPartRequest, CancellationToken) Initiates the asynchronous execution of the UploadPart operation.

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

.NET for Windows Store apps:
Supported in: Windows 8

.NET for Windows Phone:
Supported in: Window Phone 8