Class CfnBucket
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.CfnElement
software.amazon.awscdk.core.CfnRefElement
software.amazon.awscdk.core.CfnResource
software.amazon.awscdk.services.lightsail.CfnBucket
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:59.693Z")
@Stability(Stable)
public class CfnBucket
extends CfnResource
implements IInspectable
A CloudFormation
AWS::Lightsail::Bucket.
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();
-
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.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAn 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.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()An array of key-value pairs to apply to this resource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.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.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @NotNull CfnBucketProps props) Create a newAWS::Lightsail::Bucket.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
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. -
getBucketName
The name of the bucket. -
setBucketName
The name of the bucket. -
getBundleId
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.
-
setBundleId
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.
-
getAccessRules
An object that describes the access rules for the bucket. -
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.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.
-
setObjectVersioning
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.
-
setObjectVersioning
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.
-
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.
-