Class CfnBucket.Builder
java.lang.Object
software.amazon.awscdk.services.lightsail.CfnBucket.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnBucket>
- Enclosing class:
CfnBucket
@Stability(Stable)
public static final class CfnBucket.Builder
extends Object
implements software.amazon.jsii.Builder<CfnBucket>
A fluent builder for
CfnBucket
.-
Method Summary
Modifier and TypeMethodDescriptionaccessRules
(IResolvable accessRules) An object that describes the access rules for the bucket.accessRules
(CfnBucket.AccessRulesProperty accessRules) An object that describes the access rules for the bucket.bucketName
(String bucketName) The name of the bucket.build()
The bundle ID for the bucket (for example,small_1_0
).static CfnBucket.Builder
objectVersioning
(Boolean objectVersioning) Indicates whether object versioning is enabled for the bucket.objectVersioning
(IResolvable objectVersioning) Indicates whether object versioning is enabled for the bucket.readOnlyAccessAccounts
(List<String> readOnlyAccessAccounts) An array of AWS account IDs that have read-only access to the bucket.resourcesReceivingAccess
(List<String> resourcesReceivingAccess) An array of Lightsail instances that have access to the bucket.An array of key-value pairs to apply to this resource.
-
Method Details
-
create
@Stability(Stable) public static CfnBucket.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnBucket.Builder
.
-
bucketName
The name of the bucket.- Parameters:
bucketName
- The name of the bucket. This parameter is required.- Returns:
this
- See Also:
-
bundleId
The bundle ID for the bucket (for example,small_1_0
).A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
- Parameters:
bundleId
- The bundle ID for the bucket (for example,small_1_0
). This parameter is required.- Returns:
this
- See Also:
-
accessRules
An object that describes the access rules for the bucket.- Parameters:
accessRules
- An object that describes the access rules for the bucket. This parameter is required.- Returns:
this
- See Also:
-
accessRules
An object that describes the access rules for the bucket.- Parameters:
accessRules
- An object that describes the access rules for the bucket. This parameter is required.- Returns:
this
- See Also:
-
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.
- Parameters:
objectVersioning
- Indicates whether object versioning is enabled for the bucket. This parameter is required.- Returns:
this
- See Also:
-
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.
- Parameters:
objectVersioning
- Indicates whether object versioning is enabled for the bucket. This parameter is required.- Returns:
this
- See Also:
-
readOnlyAccessAccounts
@Stability(Stable) public CfnBucket.Builder readOnlyAccessAccounts(List<String> readOnlyAccessAccounts) An array of AWS account IDs that have read-only access to the bucket.- Parameters:
readOnlyAccessAccounts
- An array of AWS account IDs that have read-only access to the bucket. This parameter is required.- Returns:
this
- See Also:
-
resourcesReceivingAccess
@Stability(Stable) public CfnBucket.Builder resourcesReceivingAccess(List<String> resourcesReceivingAccess) An array of Lightsail instances that have access to the bucket.- Parameters:
resourcesReceivingAccess
- An array of Lightsail instances that have access to the bucket. This parameter is required.- Returns:
this
- See Also:
-
tags
An array of key-value pairs to apply to this resource.For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources.- Parameters:
tags
- An array of key-value pairs to apply to this resource. This parameter is required.- Returns:
this
- See Also:
-
build
-