aws-cdk-lib.aws_lightsail.CfnBucketProps

interface CfnBucketProps

LanguageType name
.NETAmazon.CDK.AWS.Lightsail.CfnBucketProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslightsail#CfnBucketProps
Javasoftware.amazon.awscdk.services.lightsail.CfnBucketProps
Pythonaws_cdk.aws_lightsail.CfnBucketProps
TypeScript aws-cdk-lib » 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 { 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

NameTypeDescription
bucketNamestringThe name of the bucket.
bundleIdstringThe bundle ID for the bucket (for example, small_1_0 ).
accessRules?IResolvable | AccessRulesPropertyAn object that describes the access rules for the bucket.
objectVersioning?boolean | IResolvableIndicates whether object versioning is enabled for the bucket.
readOnlyAccessAccounts?string[]An array of AWS account IDs that have read-only access to the bucket.
resourcesReceivingAccess?string[]An array of Lightsail instances that have access to the bucket.
tags?CfnTag[]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 | AccessRulesProperty (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: CfnTag[] (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 of Tags is optional for Lightsail resources.