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 Details

    • Builder

      public Builder()
  • Method Details

    • bucketName

      @Stability(Stable) public CfnBucketProps.Builder bucketName(String bucketName)
      Parameters:
      bucketName - The name of the bucket. This parameter is required.
      Returns:
      this
    • bundleId

      @Stability(Stable) public CfnBucketProps.Builder bundleId(String bundleId)
      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

      @Stability(Stable) public CfnBucketProps.Builder accessRules(IResolvable accessRules)
      Parameters:
      accessRules - An object that describes the access rules for the bucket.
      Returns:
      this
    • accessRules

      @Stability(Stable) public CfnBucketProps.Builder accessRules(CfnBucket.AccessRulesProperty accessRules)
      Parameters:
      accessRules - An object that describes the access rules for the bucket.
      Returns:
      this
    • objectVersioning

      @Stability(Stable) public CfnBucketProps.Builder objectVersioning(Boolean objectVersioning)
      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

      @Stability(Stable) public CfnBucketProps.Builder objectVersioning(IResolvable objectVersioning)
      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)
      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)
      Parameters:
      resourcesReceivingAccess - An array of Lightsail instances that have access to the bucket.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnBucketProps.Builder tags(List<? extends CfnTag> tags)
      Sets the value of CfnBucketProps.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 Value of Tags is optional for Lightsail resources.

      Returns:
      this
    • build

      @Stability(Stable) public CfnBucketProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnBucketProps>
      Returns:
      a new instance of CfnBucketProps
      Throws:
      NullPointerException - if any required attribute was not provided