Class S3ControlBucketResource

java.lang.Object
software.amazon.awssdk.services.s3control.S3ControlBucketResource
All Implemented Interfaces:
AwsResource, S3Resource

public final class S3ControlBucketResource extends Object implements S3Resource
An S3Resource that represents an bucket.
  • Method Details

    • builder

      public static S3ControlBucketResource.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:
      type in interface S3Resource
      Returns:
      This will always return "bucket_name".
    • partition

      public Optional<String> partition()
      Gets the AWS partition name associated with this bucket (e.g.: 'aws').
      Specified by:
      partition in interface AwsResource
      Returns:
      the name of the partition.
    • region

      public Optional<String> region()
      Gets the AWS region name associated with this bucket (e.g.: 'us-east-1').
      Specified by:
      region in interface AwsResource
      Returns:
      the name of the region or null 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.
      Specified by:
      accountId in interface AwsResource
      Returns:
      the AWS account ID or null if the account ID has not been specified.
    • bucketName

      public String bucketName()
      Gets the name of the bucket.
      Returns:
      the name of the bucket.
    • parentS3Resource

      public Optional<S3Resource> parentS3Resource()
      Gets the optional parent s3 resource
      Specified by:
      parentS3Resource in interface S3Resource
      Returns:
      the parent s3 resource if exists, otherwise null
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object