Class S3ArnConverter
- java.lang.Object
-
- software.amazon.awssdk.services.s3.internal.resource.S3ArnConverter
-
- All Implemented Interfaces:
ArnConverter<S3Resource>
@SdkInternalApi public final class S3ArnConverter extends Object implements ArnConverter<S3Resource>
An implementation ofArnConverterthat can be used to convert validArnrepresentations of s3 resources intoS3Resourceobjects. To fetch an instance of this class, use the singleton getter methodcreate().
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description S3ResourceconvertArn(Arn arn)Converts a valid ARN representation of an S3 resource into aS3Resourceobject.static S3ArnConvertercreate()Gets a static singleton instance of anS3ArnConverter.
-
-
-
Method Detail
-
create
public static S3ArnConverter create()
Gets a static singleton instance of anS3ArnConverter.- Returns:
- A static instance of an
S3ArnConverter.
-
convertArn
public S3Resource convertArn(Arn arn)
Converts a valid ARN representation of an S3 resource into aS3Resourceobject.- Specified by:
convertArnin interfaceArnConverter<S3Resource>- Parameters:
arn- The ARN to convert.- Returns:
- An
S3Resourceobject as specified by the ARN. - Throws:
IllegalArgumentException- if the ARN is not a valid representation of an S3 resource supported by this SDK.
-
-