@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.630Z") @Stability(value=Stable) public class CfnBucket extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnBucket.AccessRulesProperty
`AccessRules` is a property of the [AWS::Lightsail::Bucket](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-bucket.html) resource.
|
static class |
CfnBucket.Builder
A fluent builder for
CfnBucket. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnBucket(software.constructs.Construct scope,
String id,
CfnBucketProps props)
Create a new `AWS::Lightsail::Bucket`.
|
protected |
CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnBucket(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAccessRules()
An object that describes the access rules for the bucket.
|
IResolvable |
getAttrAbleToUpdateBundle()
A Boolean value indicating whether the bundle that is currently applied to your distribution can be changed to another bundle.
|
String |
getAttrBucketArn()
The Amazon Resource Name (ARN) of the bucket.
|
String |
getAttrUrl()
The URL of the bucket.
|
String |
getBucketName()
The name of the bucket.
|
String |
getBundleId()
The bundle ID for the bucket (for example, `small_1_0` ).
|
protected Map<String,Object> |
getCfnProperties() |
Object |
getObjectVersioning()
Indicates whether object versioning is enabled for the bucket.
|
List<String> |
getReadOnlyAccessAccounts()
An array of AWS account IDs that have read-only access to the bucket.
|
List<String> |
getResourcesReceivingAccess()
An array of Lightsail instances that have access to the bucket.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAccessRules(CfnBucket.AccessRulesProperty value)
An object that describes the access rules for the bucket.
|
void |
setAccessRules(IResolvable value)
An object that describes the access rules for the bucket.
|
void |
setBucketName(String value)
The name of the bucket.
|
void |
setBundleId(String value)
The bundle ID for the bucket (for example, `small_1_0` ).
|
void |
setObjectVersioning(Boolean value)
Indicates whether object versioning is enabled for the bucket.
|
void |
setObjectVersioning(IResolvable value)
Indicates whether object versioning is enabled for the bucket.
|
void |
setReadOnlyAccessAccounts(List<String> value)
An array of AWS account IDs that have read-only access to the bucket.
|
void |
setResourcesReceivingAccess(List<String> value)
An array of Lightsail instances that have access to the bucket.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnBucket(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnBucket(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnBucketProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public IResolvable getAttrAbleToUpdateBundle()
@Stability(value=Stable) @NotNull public String getAttrBucketArn()
@Stability(value=Stable) @NotNull public String getAttrUrl()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
ValueofTagsis optional for Lightsail resources.
@Stability(value=Stable) @NotNull public String getBucketName()
@Stability(value=Stable)
public void setBucketName(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getBundleId()
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
@Stability(value=Stable)
public void setBundleId(@NotNull
String value)
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
@Stability(value=Stable) @Nullable public Object getAccessRules()
@Stability(value=Stable)
public void setAccessRules(@Nullable
CfnBucket.AccessRulesProperty value)
@Stability(value=Stable)
public void setAccessRules(@Nullable
IResolvable value)
@Stability(value=Stable) @Nullable public Object getObjectVersioning()
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.@Stability(value=Stable)
public void setObjectVersioning(@Nullable
Boolean value)
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.@Stability(value=Stable)
public void setObjectVersioning(@Nullable
IResolvable value)
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.@Stability(value=Stable) @Nullable public List<String> getReadOnlyAccessAccounts()
@Stability(value=Stable)
public void setReadOnlyAccessAccounts(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public List<String> getResourcesReceivingAccess()
Copyright © 2022. All rights reserved.