Class CfnBucketProps.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnBucketProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucketProps>
- Enclosing interface:
- CfnBucketProps
@Stability(Stable)
public static final class CfnBucketProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucketProps>
A builder for
CfnBucketProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccessRules(IResolvable accessRules) Sets the value ofCfnBucketProps.getAccessRules()accessRules(CfnBucket.AccessRulesProperty accessRules) Sets the value ofCfnBucketProps.getAccessRules()bucketName(String bucketName) Sets the value ofCfnBucketProps.getBucketName()build()Builds the configured instance.Sets the value ofCfnBucketProps.getBundleId()objectVersioning(Boolean objectVersioning) Sets the value ofCfnBucketProps.getObjectVersioning()objectVersioning(IResolvable objectVersioning) Sets the value ofCfnBucketProps.getObjectVersioning()readOnlyAccessAccounts(List<String> readOnlyAccessAccounts) Sets the value ofCfnBucketProps.getReadOnlyAccessAccounts()resourcesReceivingAccess(List<String> resourcesReceivingAccess) Sets the value ofCfnBucketProps.getResourcesReceivingAccess()Sets the value ofCfnBucketProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucketName
Sets the value ofCfnBucketProps.getBucketName()- Parameters:
bucketName- The name of the bucket. This parameter is required.- Returns:
this
-
bundleId
Sets the value ofCfnBucketProps.getBundleId()- Parameters:
bundleId- The bundle ID for the bucket (for example,small_1_0). This parameter is required. A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.- Returns:
this
-
accessRules
Sets the value ofCfnBucketProps.getAccessRules()- Parameters:
accessRules- An object that describes the access rules for the bucket.- Returns:
this
-
accessRules
@Stability(Stable) public CfnBucketProps.Builder accessRules(CfnBucket.AccessRulesProperty accessRules) Sets the value ofCfnBucketProps.getAccessRules()- Parameters:
accessRules- An object that describes the access rules for the bucket.- Returns:
this
-
objectVersioning
Sets the value ofCfnBucketProps.getObjectVersioning()- Parameters:
objectVersioning- Indicates whether object versioning is enabled for the bucket. The following options can be configured:Enabled- Object versioning is enabled.Suspended- Object versioning was previously enabled but is currently suspended. Existing object versions are retained.NeverEnabled- Object versioning has never been enabled.
- Returns:
this
-
objectVersioning
Sets the value ofCfnBucketProps.getObjectVersioning()- Parameters:
objectVersioning- Indicates whether object versioning is enabled for the bucket. The following options can be configured:Enabled- Object versioning is enabled.Suspended- Object versioning was previously enabled but is currently suspended. Existing object versions are retained.NeverEnabled- Object versioning has never been enabled.
- Returns:
this
-
readOnlyAccessAccounts
@Stability(Stable) public CfnBucketProps.Builder readOnlyAccessAccounts(List<String> readOnlyAccessAccounts) Sets the value ofCfnBucketProps.getReadOnlyAccessAccounts()- Parameters:
readOnlyAccessAccounts- An array of AWS account IDs that have read-only access to the bucket.- Returns:
this
-
resourcesReceivingAccess
@Stability(Stable) public CfnBucketProps.Builder resourcesReceivingAccess(List<String> resourcesReceivingAccess) Sets the value ofCfnBucketProps.getResourcesReceivingAccess()- Parameters:
resourcesReceivingAccess- An array of Lightsail instances that have access to the bucket.- Returns:
this
-
tags
Sets the value ofCfnBucketProps.getTags()- Parameters:
tags- An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide .The
ValueofTagsis optional for Lightsail resources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnBucketProps>- Returns:
- a new instance of
CfnBucketProps - Throws:
NullPointerException- if any required attribute was not provided
-