interface CfnBucketProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lightsail.CfnBucketProps |
Java | software.amazon.awscdk.services.lightsail.CfnBucketProps |
Python | aws_cdk.aws_lightsail.CfnBucketProps |
TypeScript | @aws-cdk/aws-lightsail » CfnBucketProps |
Properties for defining a CfnBucket
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as lightsail from '@aws-cdk/aws-lightsail';
const cfnBucketProps: lightsail.CfnBucketProps = {
bucketName: 'bucketName',
bundleId: 'bundleId',
// the properties below are optional
accessRules: {
allowPublicOverrides: false,
objectAccess: 'objectAccess',
},
objectVersioning: false,
readOnlyAccessAccounts: ['readOnlyAccessAccounts'],
resourcesReceivingAccess: ['resourcesReceivingAccess'],
tags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
bucket | string | The name of the bucket. |
bundle | string | The bundle ID for the bucket (for example, small_1_0 ). |
access | IResolvable | Access | An object that describes the access rules for the bucket. |
object | boolean | IResolvable | Indicates whether object versioning is enabled for the bucket. |
read | string[] | An array of AWS account IDs that have read-only access to the bucket. |
resources | string[] | An array of Lightsail instances that have access to the bucket. |
tags? | Cfn [] | An array of key-value pairs to apply to this resource. |
bucketName
Type:
string
The name of the bucket.
bundleId
Type:
string
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.
accessRules?
Type:
IResolvable
|
Access
(optional)
An object that describes the access rules for the bucket.
objectVersioning?
Type:
boolean |
IResolvable
(optional)
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.
readOnlyAccessAccounts?
Type:
string[]
(optional)
An array of AWS account IDs that have read-only access to the bucket.
resourcesReceivingAccess?
Type:
string[]
(optional)
An array of Lightsail instances that have access to the bucket.
tags?
Type:
Cfn
[]
(optional)
An array of key-value pairs to apply to this resource.
For more information, see Tag in the AWS CloudFormation User Guide .
The
Value
ofTags
is optional for Lightsail resources.