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.

S3Link is an object that provides a connection to an S3 resource that can be stored in a DynamoDB field through DynamoDBContext

Inheritance Hierarchy

System.Object
  Amazon.DynamoDBv2.DataModel.S3Link

Namespace: Amazon.DynamoDBv2.DataModel
Assembly: AWSSDK.DynamoDBv2.dll
Version: 3.x.y.z

Syntax

C#
public class S3Link

The S3Link type exposes the following members

Properties

NameTypeDescription
Public Property BucketName System.String

The name of the target Bucket for the managed resource

Public Property Key System.String

The Key that S3Link stores and downloads a resource to and from

Public Property Region System.String

The region the S3 resource is in

Public Property RegionAsEndpoint Amazon.RegionEndpoint

Looks up RegionEndpoint based on region as a string

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 Static Method Create(DynamoDBContext, string, string, RegionEndpoint)

Creates an S3Link that can be used to managed an S3 connection

Public Method DownloadTo(string)

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 Method DownloadToAsync(string, CancellationToken)

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 Method GetPreSignedURL(DateTime)

Provides a URL for accessing the S3 object managed by S3Link

Public Method MakeS3ObjectPublic(bool)

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

Public Method OpenStream()

Open stream to the data stored in Amazon S3.

Public Method OpenStreamAsync(CancellationToken)

Opens a stream to object stored in Amazon S3.

Public Method UploadFrom(string)

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

Public Method UploadFromAsync(string, CancellationToken)

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

Public Method UploadStream(Stream)

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

Public Method UploadStreamAsync(Stream, CancellationToken)

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

Version Information

.NET Standard:
Supported in: 1.3

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

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms