Skip to content
v2.274.0

CfnBucketProps Struct ​

Properties for defining a CfnBucket.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lightsail as lightsail } from 'aws-cdk-lib';
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 ​

accessRulesoptionalIResolvable | CfnBucket.AccessRulesPropertyaccess_rulesoptionaltyping.Union[IResolvable, AccessRulesProperty]accessRulesoptionalIResolvableAccessRulesoptionalIResolvableAccessRulesoptionalinterface{}#
An object that describes the access rules for the bucket.
bucketNamestringbucket_namestrbucketNameStringBucketNamestringBucketName*stringrequired#
The name of the bucket.
bundleIdstringbundle_idstrbundleIdStringBundleIdstringBundleId*stringrequired#
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.

objectVersioningoptionalboolean | IResolvableobject_versioningoptionaltyping.Union[bool, IResolvable]objectVersioningoptionalBooleanObjectVersioningoptionalboolObjectVersioningoptionalinterface{}#
Indicates whether object versioning is enabled for the bucket.
notes

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.
readOnlyAccessAccountsoptionalstring[]read_only_access_accountsoptionaltyping.List[str]readOnlyAccessAccountsoptionalList<String>ReadOnlyAccessAccountsoptionalstring[]ReadOnlyAccessAccountsoptional*[]*string#
An array of AWS account IDs that have read-only access to the bucket.
resourcesReceivingAccessoptionalstring[]resources_receiving_accessoptionaltyping.List[str]resourcesReceivingAccessoptionalList<String>ResourcesReceivingAccessoptionalstring[]ResourcesReceivingAccessoptional*[]*string#
An array of Lightsail instances that have access to the bucket.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide .

The Value of Tags is optional for Lightsail resources.