java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-17T05:10:13.451Z") @Stability(Stable) public class CfnBucket extends CfnResource implements IInspectable, ITaggable
The AWS::Lightsail::Bucket resource specifies a bucket.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lightsail.*;
 CfnBucket cfnBucket = CfnBucket.Builder.create(this, "MyCfnBucket")
         .bucketName("bucketName")
         .bundleId("bundleId")
         // the properties below are optional
         .accessRules(AccessRulesProperty.builder()
                 .allowPublicOverrides(false)
                 .objectAccess("objectAccess")
                 .build())
         .objectVersioning(false)
         .readOnlyAccessAccounts(List.of("readOnlyAccessAccounts"))
         .resourcesReceivingAccess(List.of("resourcesReceivingAccess"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnBucket

      protected CfnBucket(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnBucket

      protected CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnBucket

      @Stability(Stable) public CfnBucket(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnBucketProps props)
      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.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrAbleToUpdateBundle

      @Stability(Stable) @NotNull public IResolvable getAttrAbleToUpdateBundle()
      A Boolean value indicating whether the bundle that is currently applied to your distribution can be changed to another bundle.
    • getAttrBucketArn

      @Stability(Stable) @NotNull public String getAttrBucketArn()
      The Amazon Resource Name (ARN) of the bucket.
    • getAttrUrl

      @Stability(Stable) @NotNull public String getAttrUrl()
      The URL of the bucket.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getBucketName

      @Stability(Stable) @NotNull public String getBucketName()
      The name of the bucket.
    • setBucketName

      @Stability(Stable) public void setBucketName(@NotNull String value)
      The name of the bucket.
    • getBundleId

      @Stability(Stable) @NotNull public String getBundleId()
      The bundle ID for the bucket (for example, small_1_0 ).
    • setBundleId

      @Stability(Stable) public void setBundleId(@NotNull String value)
      The bundle ID for the bucket (for example, small_1_0 ).
    • getAccessRules

      @Stability(Stable) @Nullable public Object getAccessRules()
      An object that describes the access rules for the bucket.
    • setAccessRules

      @Stability(Stable) public void setAccessRules(@Nullable IResolvable value)
      An object that describes the access rules for the bucket.
    • setAccessRules

      @Stability(Stable) public void setAccessRules(@Nullable CfnBucket.AccessRulesProperty value)
      An object that describes the access rules for the bucket.
    • getObjectVersioning

      @Stability(Stable) @Nullable public Object getObjectVersioning()
      Indicates whether object versioning is enabled for the bucket.
    • setObjectVersioning

      @Stability(Stable) public void setObjectVersioning(@Nullable Boolean value)
      Indicates whether object versioning is enabled for the bucket.
    • setObjectVersioning

      @Stability(Stable) public void setObjectVersioning(@Nullable IResolvable value)
      Indicates whether object versioning is enabled for the bucket.
    • getReadOnlyAccessAccounts

      @Stability(Stable) @Nullable public List<String> getReadOnlyAccessAccounts()
      An array of AWS account IDs that have read-only access to the bucket.
    • setReadOnlyAccessAccounts

      @Stability(Stable) public void setReadOnlyAccessAccounts(@Nullable List<String> value)
      An array of AWS account IDs that have read-only access to the bucket.
    • getResourcesReceivingAccess

      @Stability(Stable) @Nullable public List<String> getResourcesReceivingAccess()
      An array of Lightsail instances that have access to the bucket.
    • setResourcesReceivingAccess

      @Stability(Stable) public void setResourcesReceivingAccess(@Nullable List<String> value)
      An array of Lightsail instances that have access to the bucket.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      An array of key-value pairs to apply to this resource.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      An array of key-value pairs to apply to this resource.