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.

Utility class to parse Amazon resource names more commonly known as an ARN.

Inheritance Hierarchy

System.Object
  Amazon.Arn

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

Syntax

C#
public class Arn

The Arn type exposes the following members

Constructors

NameDescription
Public Method Arn()

Properties

NameTypeDescription
Public Property AccountId System.String

Gets and sets the account ID associated with the ARN.

Public Property Partition System.String

Gets and sets the partition associated with the ARN (e.g.: 'aws').

Public Property Region System.String

Gets and sets the region associated with the ARN (e.g.: 'us-east-1').

Public Property Resource System.String

Gets and sets the resource associated with the ARN (e.g.: 'mybucket/myobject').

Public Property Service System.String

Gets and sets the AWS service associated with the ARN (e.g.: 's3').

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

Returns true if the string appears to be an ARN by seeing if the string starts with "arn:". This method doesn't guarantee the string is a valid ARN. To validate the string call TryParse.

Public Method Static Method Parse(string)

Parses the string into an ARN object.

Public Method Static Method TryParse(string, out Arn)

Parses the string into an ARN object.

Version Information

.NET:
Supported in: 8.0 and newer, Core 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5 and newer, 3.5