Class CfnBucket
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.lightsail.CfnBucket
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IBucketRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.120.0 (build 192dc88)",
date="2025-12-05T22:26:39.694Z")
@Stability(Stable)
public class CfnBucket
extends CfnResource
implements IInspectable, IBucketRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAccessRulesis a property of the AWS::Lightsail::Bucket resource.static final classA fluent builder forCfnBucket.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.lightsail.IBucketRef
IBucketRef.Jsii$Default, IBucketRef.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnBucket(software.amazon.jsii.JsiiObjectRef objRef) CfnBucket(software.constructs.Construct scope, String id, CfnBucketProps props) Create a newAWS::Lightsail::Bucket. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForBucket(IBucketRef resource) An object that describes the access rules for the bucket.A Boolean value indicating whether the bundle that is currently applied to your distribution can be changed to another bundle.The Amazon Resource Name (ARN) of the bucket.The URL of the bucket.The name of the bucket.A reference to a Bucket resource.The bundle ID for the bucket (for example,small_1_0).Indicates whether object versioning is enabled for the bucket.An array of AWS account IDs that have read-only access to the bucket.An array of Lightsail instances that have access to the bucket.getTags()Tag Manager which manages the tags for this resource.An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnBucket.renderProperties(Map<String, Object> props) voidsetAccessRules(IResolvable value) An object that describes the access rules for the bucket.voidAn object that describes the access rules for the bucket.voidsetBucketName(String value) The name of the bucket.voidsetBundleId(String value) The bundle ID for the bucket (for example,small_1_0).voidsetObjectVersioning(Boolean value) Indicates whether object versioning is enabled for the bucket.voidsetObjectVersioning(IResolvable value) Indicates whether object versioning is enabled for the bucket.voidsetReadOnlyAccessAccounts(List<String> value) An array of AWS account IDs that have read-only access to the bucket.voidsetResourcesReceivingAccess(List<String> value) An array of Lightsail instances that have access to the bucket.voidsetTagsRaw(List<CfnTag> value) An array of key-value pairs to apply to this resource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::Lightsail::Bucket.- 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
-
arnForBucket
- Parameters:
resource- This parameter is required.
-
isCfnBucket
Checks whether the given object is a CfnBucket.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrAbleToUpdateBundle
A Boolean value indicating whether the bundle that is currently applied to your distribution can be changed to another bundle. -
getAttrBucketArn
The Amazon Resource Name (ARN) of the bucket. -
getAttrUrl
The URL of the bucket. -
getBucketRef
A reference to a Bucket resource.- Specified by:
getBucketRefin interfaceIBucketRef
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getBucketName
The name of the bucket. -
setBucketName
The name of the bucket. -
getBundleId
The bundle ID for the bucket (for example,small_1_0). -
setBundleId
The bundle ID for the bucket (for example,small_1_0). -
getAccessRules
An object that describes the access rules for the bucket.Returns union: either
IResolvableorCfnBucket.AccessRulesProperty -
setAccessRules
An object that describes the access rules for the bucket. -
setAccessRules
An object that describes the access rules for the bucket. -
getObjectVersioning
Indicates whether object versioning is enabled for the bucket.Returns union: either
BooleanorIResolvable -
setObjectVersioning
Indicates whether object versioning is enabled for the bucket. -
setObjectVersioning
Indicates whether object versioning is enabled for the bucket. -
getReadOnlyAccessAccounts
An array of AWS account IDs that have read-only access to the bucket. -
setReadOnlyAccessAccounts
An array of AWS account IDs that have read-only access to the bucket. -
getResourcesReceivingAccess
An array of Lightsail instances that have access to the bucket. -
setResourcesReceivingAccess
An array of Lightsail instances that have access to the bucket. -
getTagsRaw
An array of key-value pairs to apply to this resource. -
setTagsRaw
An array of key-value pairs to apply to this resource.
-