> **Experimental**
>
> `@aws-cdk/aws-s3tables-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ITableBucket

Interface definition for S3 Table Buckets.

Extends: ITableBucket
Extends: IResource
Implemented by: TableBucket

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/table-bucket.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-s3tables-alpha/lib/table-bucket.ts#L18)

## Properties

- `account`: string — The accountId containing the table bucket.

- `encryptionKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — Optional KMS encryption key associated with this table bucket.

- `env`: [ResourceEnvironment](/cdk/api/v2/docs/aws-cdk-lib.interfaces.ResourceEnvironment.html) — The environment this resource belongs to.

  For resources that are created and managed in a Stack (those created by
  creating new class instances like `new Role()`, `new Bucket()`, etc.), this
  is always the same as the environment of the stack they belong to.

  For referenced resources (those obtained from referencing methods like
  `Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
  different than the stack they were imported into.

- `node`: [Node](/cdk/api/v2/docs/constructs.Node.html) — The tree node.

- `region`: string — The region containing the table bucket.

- `stack`: [Stack](/cdk/api/v2/docs/aws-cdk-lib.Stack.html) — The stack in which this resource is defined.

- `tableBucketArn`: string — The ARN of the table bucket.

- `tableBucketName`: string — The name of the table bucket.

## Methods

- `addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult` — Adds a statement to the resource policy for a principal (i.e. account/role/service) to perform actions on this table bucket and/or its tables.

  Note that the policy statement may or may not be added to the policy.
  For example, when an `ITableBucket` is created from an existing table bucket,
  it's not possible to tell whether the bucket already has a policy
  attached, let alone to re-use that policy to add more statements to it.
  So it's safest to do nothing in these cases.

  **Parameters**

  - `statement` — the policy statement to be added to the bucket's policy.

  **Returns:** metadata about the execution of this method. If the policy was not added, the value of `statementAdded` will be `false`. You should always check this value to make sure that the operation was actually carried out. Otherwise, synthesis and deploy will terminate silently, which may be confusing.

- `applyRemovalPolicy(policy: RemovalPolicy): void` — Apply the given removal policy to this resource.

  The Removal Policy controls what happens to this resource when it stops
  being managed by CloudFormation, either because you've removed it from the
  CDK application or because you've made a change that requires the resource
  to be replaced.

  The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
  account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).

- `grantRead(identity: IGrantable, tableId: string): Grant` — Grant read permissions for this table bucket and its tables to an IAM principal (Role/Group/User).

  If encryption is used, permission to use the key to decrypt the contents
  of the bucket will also be granted to the same principal.

  **Parameters**

  - `identity` — The principal to allow read permissions to.
  - `tableId` — Allow the permissions to all tables using '*' or to single table by its unique ID.

- `grantReadWrite(identity: IGrantable, tableId: string): Grant` — Grant read and write permissions for this table bucket and its tables to an IAM principal (Role/Group/User).

  If encryption is used, permission to use the key to encrypt/decrypt the contents
  of the bucket will also be granted to the same principal.

  **Parameters**

  - `identity` — The principal to allow read and write permissions to.
  - `tableId` — Allow the permissions to all tables using '*' or to single table by its unique ID.

- `grantWrite(identity: IGrantable, tableId: string): Grant` — Grant write permissions for this table bucket and its tables to an IAM principal (Role/Group/User).

  If encryption is used, permission to use the key to encrypt the contents
  of the bucket will also be granted to the same principal.

  **Parameters**

  - `identity` — The principal to allow write permissions to.
  - `tableId` — Allow the permissions to all tables using '*' or to single table by its unique ID.

- `with(...mixins: IMixin[]): IConstruct` — Applies one or more mixins to this construct.

  Mixins are applied in order. The list of constructs is captured at the
  start of the call, so constructs added by a mixin will not be visited.

  **Parameters**

  - `mixins` — The mixins to apply.

  **Returns:** This construct for chaining
