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.

Uri wrapper that can parse out information (bucket, key, region, style) from an S3 URI.

Inheritance Hierarchy

System.Object
  Amazon.S3.Util.AmazonS3Uri

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

Syntax

C#
public class AmazonS3Uri

The AmazonS3Uri type exposes the following members

Constructors

NameDescription
Public Method AmazonS3Uri(string)

Constructs a parser for the S3 URI specified as a string. An encoded URI is expected.

Public Method AmazonS3Uri(Uri)

Constructs a parser for the S3 URI specified as a Uri instance. An encoded URI is expected.

Public Method AmazonS3Uri(string, bool)

Constructs a parser for the S3 URI specified as a string. An encoded URI is expected.

Properties

NameTypeDescription
Public Property Bucket System.String

The bucket name parsed from the URI (or null if no bucket specified).

Public Property IsPathStyle System.Boolean

True if the URI contains the bucket in the path, false if it contains the bucket in the authority.

Public Property Key System.String

The key parsed from the URI (or null if no key specified).

Public Property Region Amazon.RegionEndpoint

The region parsed from the URI (or null if no region specified).

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 IsAmazonS3Endpoint(string)

Checks whether the given URI is a Amazon S3 URI.

Public Method Static Method IsAmazonS3Endpoint(Uri)

Checks whether the given URI is a Amazon S3 URI.

Public Method Static Method TryParseAmazonS3Uri(string, out AmazonS3Uri)

If the given string is an AmazonS3Endpoint return true and set the AmazonS3Uri out parameter.

Public Method Static Method TryParseAmazonS3Uri(string, bool, out AmazonS3Uri)

If the given string is an AmazonS3Endpoint return true and set the AmazonS3Uri out parameter.

Public Method Static Method TryParseAmazonS3Uri(Uri, out AmazonS3Uri)

If the given Uri is an AmazonS3Endpoint return true and set the AmazonS3Uri out parameter.

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

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