Class BucketProperties
java.lang.Object
com.netflix.genie.common.internal.aws.s3.BucketProperties
A property class which holds information about how to interact with a specific S3 Bucket.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet theRegion
this bucket is in.Get the ARN of the role to assume from this instance when working with the given bucket.void
Set the AWS region from a string name representation (e.g., us-east-1).void
setRoleARN
(String roleARN) Set the ARN of the role to assume from this instance when working with the given bucket.
-
Constructor Details
-
BucketProperties
public BucketProperties()
-
-
Method Details
-
getRegion
Get theRegion
this bucket is in.- Returns:
- The
Region.id()
wrapped in anOptional
. If the optional is empty it indicates that the default or current region should be used
-
setRegion
Set the AWS region from a string name representation (e.g., us-east-1). This method validates that the provided region is a valid AWS region.- Parameters:
region
- The name of the region to use, or null to clear the region setting- Throws:
IllegalArgumentException
- If the provided region is not a valid AWS region- See Also:
-
Region.of(String)
-
getRoleARN
Get the ARN of the role to assume from this instance when working with the given bucket. -
setRoleARN
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:
IllegalArgumentException
- If theroleARN
is not null and the value isn't a valid role ARN format
-