Class S3BucketResource
- java.lang.Object
-
- software.amazon.awssdk.services.s3.internal.resource.S3BucketResource
-
- All Implemented Interfaces:
AwsResource,S3Resource,ToCopyableBuilder<S3BucketResource.Builder,S3BucketResource>
public final class S3BucketResource extends Object implements S3Resource, ToCopyableBuilder<S3BucketResource.Builder,S3BucketResource>
AnS3Resourcethat represents an S3 bucket.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classS3BucketResource.BuilderA builder forS3BucketResourceobjects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>accountId()Gets the AWS account ID associated with this bucket if one has been specified.StringbucketName()Gets the name of the bucket.static S3BucketResource.Builderbuilder()Get a new builder for this class.booleanequals(Object o)inthashCode()Optional<String>partition()Gets the AWS partition name associated with this bucket (e.g.: 'aws') if one has been specified.Optional<String>region()Gets the AWS region name associated with this bucket (e.g.: 'us-east-1') if one has been specified.S3BucketResource.BuildertoBuilder()Stringtype()Gets the resource type for this bucket.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.services.s3.internal.resource.S3Resource
overrideSigner, parentS3Resource
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
builder
public static S3BucketResource.Builder builder()
Get a new builder for this class.- Returns:
- A newly initialized instance of a builder.
-
type
public String type()
Gets the resource type for this bucket.- Specified by:
typein interfaceS3Resource- Returns:
- This will always return "bucket_name".
-
partition
public Optional<String> partition()
Gets the AWS partition name associated with this bucket (e.g.: 'aws') if one has been specified.- Specified by:
partitionin interfaceAwsResource- Returns:
- the optional name of the partition or empty if it has not been specified.
-
region
public Optional<String> region()
Gets the AWS region name associated with this bucket (e.g.: 'us-east-1') if one has been specified.- Specified by:
regionin interfaceAwsResource- Returns:
- the optional name of the region or empty if the region has not been specified (e.g. the resource is in the global namespace).
-
accountId
public Optional<String> accountId()
Gets the AWS account ID associated with this bucket if one has been specified.- Specified by:
accountIdin interfaceAwsResource- Returns:
- the optional AWS account ID or empty if the account ID has not been specified.
-
bucketName
public String bucketName()
Gets the name of the bucket.- Returns:
- the name of the bucket.
-
toBuilder
public S3BucketResource.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<S3BucketResource.Builder,S3BucketResource>
-
-