Table of Contents

Class ArnExtensions

Namespace
Amazon.S3
Assembly
AWSSDK.S3.dll

Extensions methods added to Amazon.Arn type to help parse S3 specific resources from the ARN.

public static class ArnExtensions
Inheritance
ArnExtensions
Inherited Members

Methods

HasValidAccountId(Arn)

Check if the ARN has a valid Account ID

public static bool HasValidAccountId(this Arn arn)

Parameters

arn Arn

The ARN which is being validated

Returns

bool

IsMRAPArn(Arn)

Determines whether an ARN is for a multi-region access point

public static bool IsMRAPArn(this Arn arn)

Parameters

arn Arn

An AWS ARN to parse

Returns

bool

True if the ARN is for a multi-region access point

IsOutpostArn(Arn)

Attempt to parse the resource component of the ARN into outpost resource with outpost id and access point name.

public static bool IsOutpostArn(this Arn arn)

Parameters

arn Arn

An AWS ARN to parse

Returns

bool

True if the ARN contains an outpost access point resource identifier.

IsService(Arn, string)

Checks whether an ARN belongs to a particular service

public static bool IsService(this Arn arn, string serviceName)

Parameters

arn Arn
serviceName string

Returns

bool

True if a match is found

ParseOutpost(Arn)

Parse an Arn to extract information on S3 outpost access point and if it is not found or properly formatted, throw an exception

public static S3OutpostResource ParseOutpost(this Arn arn)

Parameters

arn Arn

Returns

S3OutpostResource

TryParseAccessPoint(Arn, out string)

Attempt to parse the resource component of the ARN into access point resource name.

public static bool TryParseAccessPoint(this Arn arn, out string accessPoint)

Parameters

arn Arn

An AWS ARN to parse

accessPoint string

The access point resouce identifier found in the ARN.

Returns

bool

True if the ARN contains an access point resource identifier.

TryParseBucket(Arn, out string)

Attempt to parse the resource component of the ARN into bucket name.

public static bool TryParseBucket(this Arn arn, out string bucketName)

Parameters

arn Arn

An AWS ARN to parse

bucketName string

The bucket name found in the ARN.

Returns

bool

True if the ARN contains a bucket name.