Class BucketAttributes.Builder
java.lang.Object
software.amazon.awscdk.services.s3.BucketAttributes.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BucketAttributes>
- Enclosing interface:
- BucketAttributes
@Stability(Stable)
public static final class BucketAttributes.Builder
extends Object
implements software.amazon.jsii.Builder<BucketAttributes>
A builder for
BucketAttributes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSets the value ofBucketAttributes.getAccount()
Sets the value ofBucketAttributes.getBucketArn()
bucketDomainName
(String bucketDomainName) Sets the value ofBucketAttributes.getBucketDomainName()
bucketDualStackDomainName
(String bucketDualStackDomainName) Sets the value ofBucketAttributes.getBucketDualStackDomainName()
bucketName
(String bucketName) Sets the value ofBucketAttributes.getBucketName()
bucketRegionalDomainName
(String bucketRegionalDomainName) Sets the value ofBucketAttributes.getBucketRegionalDomainName()
bucketWebsiteNewUrlFormat
(Boolean bucketWebsiteNewUrlFormat) Sets the value ofBucketAttributes.getBucketWebsiteNewUrlFormat()
bucketWebsiteUrl
(String bucketWebsiteUrl) Sets the value ofBucketAttributes.getBucketWebsiteUrl()
build()
Builds the configured instance.encryptionKey
(IKey encryptionKey) Sets the value ofBucketAttributes.getEncryptionKey()
Sets the value ofBucketAttributes.getIsWebsite()
notificationsHandlerRole
(IRole notificationsHandlerRole) Sets the value ofBucketAttributes.getNotificationsHandlerRole()
Sets the value ofBucketAttributes.getRegion()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
account
Sets the value ofBucketAttributes.getAccount()
- Parameters:
account
- The account this existing bucket belongs to.- Returns:
this
-
bucketArn
Sets the value ofBucketAttributes.getBucketArn()
- Parameters:
bucketArn
- The ARN of the bucket. At least one of bucketArn or bucketName must be defined in order to initialize a bucket ref.- Returns:
this
-
bucketDomainName
Sets the value ofBucketAttributes.getBucketDomainName()
- Parameters:
bucketDomainName
- The domain name of the bucket.- Returns:
this
-
bucketDualStackDomainName
@Stability(Stable) public BucketAttributes.Builder bucketDualStackDomainName(String bucketDualStackDomainName) Sets the value ofBucketAttributes.getBucketDualStackDomainName()
- Parameters:
bucketDualStackDomainName
- The IPv6 DNS name of the specified bucket.- Returns:
this
-
bucketName
Sets the value ofBucketAttributes.getBucketName()
- Parameters:
bucketName
- The name of the bucket. If the underlying value of ARN is a string, the name will be parsed from the ARN. Otherwise, the name is optional, but some features that require the bucket name such as auto-creating a bucket policy, won't work.- Returns:
this
-
bucketRegionalDomainName
@Stability(Stable) public BucketAttributes.Builder bucketRegionalDomainName(String bucketRegionalDomainName) Sets the value ofBucketAttributes.getBucketRegionalDomainName()
- Parameters:
bucketRegionalDomainName
- The regional domain name of the specified bucket.- Returns:
this
-
bucketWebsiteNewUrlFormat
@Stability(Stable) public BucketAttributes.Builder bucketWebsiteNewUrlFormat(Boolean bucketWebsiteNewUrlFormat) Sets the value ofBucketAttributes.getBucketWebsiteNewUrlFormat()
- Parameters:
bucketWebsiteNewUrlFormat
- The format of the website URL of the bucket. This should be true for regions launched since 2014.- Returns:
this
-
bucketWebsiteUrl
Sets the value ofBucketAttributes.getBucketWebsiteUrl()
- Parameters:
bucketWebsiteUrl
- The website URL of the bucket (if static web hosting is enabled).- Returns:
this
-
encryptionKey
Sets the value ofBucketAttributes.getEncryptionKey()
- Parameters:
encryptionKey
- the value to be set.- Returns:
this
-
isWebsite
Sets the value ofBucketAttributes.getIsWebsite()
- Parameters:
isWebsite
- If this bucket has been configured for static website hosting.- Returns:
this
-
notificationsHandlerRole
@Stability(Stable) public BucketAttributes.Builder notificationsHandlerRole(IRole notificationsHandlerRole) Sets the value ofBucketAttributes.getNotificationsHandlerRole()
- Parameters:
notificationsHandlerRole
- The role to be used by the notifications handler.- Returns:
this
-
region
Sets the value ofBucketAttributes.getRegion()
- Parameters:
region
- The region this existing bucket is in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BucketAttributes>
- Returns:
- a new instance of
BucketAttributes
- Throws:
NullPointerException
- if any required attribute was not provided
-