Class ArnExtensions
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
ArnThe ARN which is being validated
Returns
IsMRAPArn(Arn)
Determines whether an ARN is for a multi-region access point
public static bool IsMRAPArn(this Arn arn)
Parameters
arn
ArnAn 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
ArnAn 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
ArnserviceName
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
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
ArnAn AWS ARN to parse
accessPoint
stringThe 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
ArnAn AWS ARN to parse
bucketName
stringThe bucket name found in the ARN.
Returns
- bool
True if the ARN contains a bucket name.