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.
Namespace: Amazon
Assembly: AWSSDK.Core.dll
Version: 3.x.y.z
public class Arn
The Arn type exposes the following members
Name | Description | |
---|---|---|
Arn() |
Name | Type | Description | |
---|---|---|---|
AccountId | System.String |
Gets and sets the account ID associated with the ARN. |
|
Partition | System.String |
Gets and sets the partition associated with the ARN (e.g.: 'aws'). |
|
Region | System.String |
Gets and sets the region associated with the ARN (e.g.: 'us-east-1'). |
|
Resource | System.String |
Gets and sets the resource associated with the ARN (e.g.: 'mybucket/myobject'). |
|
Service | System.String |
Gets and sets the AWS service associated with the ARN (e.g.: 's3'). |
Name | Description | |
---|---|---|
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. |
|
Parse(string) |
Parses the string into an ARN object. |
|
TryParse(string, out Arn) |
Parses the string into an ARN object. |
.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