Class BucketProperties


  • @Validated
    public class BucketProperties
    extends java.lang.Object
    A property class which holds information about how to interact with a specific S3 Bucket.
    Since:
    4.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> getRegion()
      Get the Regions this bucket is in.
      java.util.Optional<java.lang.String> getRoleARN()
      Get the ARN of the role to assume from this instance when working with the given bucket.
      void setRegion​(java.lang.String region)
      Set the AWS region from a string name representation e.g.
      void setRoleARN​(java.lang.String roleARN)
      Set the ARN of the role to assume from this instance when working with the given bucket.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BucketProperties

        public BucketProperties()
    • Method Detail

      • getRegion

        public java.util.Optional<java.lang.String> getRegion()
        Get the Regions this bucket is in.
        Returns:
        The Regions.getName() wrapped in an Optional. If the optional is empty it indicates that the default or current region should be used
      • setRegion

        public void setRegion​(@Nullable
                              java.lang.String region)
        Set the AWS region from a string name representation e.g. us-east-1.
        Parameters:
        region - The name of the region to use
        See Also:
        Regions.fromName(String)
      • getRoleARN

        public java.util.Optional<java.lang.String> getRoleARN()
        Get the ARN of the role to assume from this instance when working with the given bucket.
        Returns:
        The ARN wrapped in an Optional. If the Optional is empty no role should be assumed when working with this bucket
      • setRoleARN

        public void setRoleARN​(@Nullable
                               java.lang.String roleARN)
        Set the ARN of the role to assume from this instance when working with the given bucket.
        Parameters:
        roleARN - The valid role ARN or null if no role assumption is needed.
        Throws:
        java.lang.IllegalArgumentException - If the roleARN is not null and the value isn't a valid role ARN format