# CfnBucketProps

Properties for defining a `CfnBucket`.

Extends: CfnBucketProps
Used as props by: CfnBucket

- Source: Generated code
- Type last changed: v2.9.0 · 26 Jan 2022

## 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

- `accessRules`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBucket.AccessRulesProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lightsail.CfnBucket.AccessRulesProperty.html) — An object that describes the access rules for the bucket.

- `bucketName`: string (required) — The name of the bucket.

- `bundleId`: string (required) — 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.

- `objectVersioning`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — 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`: 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](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — An array of key-value pairs to apply to this resource.

  For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *AWS CloudFormation User Guide* .

  > The `Value` of `Tags` is optional for Lightsail resources.
