@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)", date="2022-06-22T23:27:51.571Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnBucket(Construct scope,
java.lang.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 |
---|---|
java.lang.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.
|
java.lang.String |
getAttrBucketArn()
The Amazon Resource Name (ARN) of the bucket.
|
java.lang.String |
getAttrUrl()
The URL of the bucket.
|
java.lang.String |
getBucketName()
The name of the bucket.
|
java.lang.String |
getBundleId()
The bundle ID for the bucket (for example, `small_1_0` ).
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getObjectVersioning()
Indicates whether object versioning is enabled for the bucket.
|
java.util.List<java.lang.String> |
getReadOnlyAccessAccounts()
An array of AWS account IDs that have read-only access to the bucket.
|
java.util.List<java.lang.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 java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.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(java.lang.String value)
The name of the bucket.
|
void |
setBundleId(java.lang.String value)
The bundle ID for the bucket (for example, `small_1_0` ).
|
void |
setObjectVersioning(java.lang.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(java.util.List<java.lang.String> value)
An array of AWS account IDs that have read-only access to the bucket.
|
void |
setResourcesReceivingAccess(java.util.List<java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnBucket(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnBucket(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnBucket(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public IResolvable getAttrAbleToUpdateBundle()
public java.lang.String getAttrBucketArn()
public java.lang.String getAttrUrl()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources.
public java.lang.String getBucketName()
public void setBucketName(java.lang.String value)
public java.lang.String getBundleId()
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
public void setBundleId(java.lang.String value)
A bucket bundle specifies the monthly cost, storage space, and data transfer quota for a bucket.
public java.lang.Object getAccessRules()
public void setAccessRules(IResolvable value)
public void setAccessRules(CfnBucket.AccessRulesProperty value)
public java.lang.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.public void setObjectVersioning(java.lang.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.public void setObjectVersioning(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.public java.util.List<java.lang.String> getReadOnlyAccessAccounts()
public void setReadOnlyAccessAccounts(java.util.List<java.lang.String> value)
public java.util.List<java.lang.String> getResourcesReceivingAccess()
public void setResourcesReceivingAccess(java.util.List<java.lang.String> value)