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

Parameters for constructing a TablePolicy.

Used as props by: [TablePolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.TablePolicy.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/table-policy.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-s3tables-alpha/lib/table-policy.ts#L13)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3tables_alpha from '@aws-cdk/aws-s3tables-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';

declare const policyDocument: iam.PolicyDocument;
declare const table: s3tables_alpha.Table;
const tablePolicyProps: s3tables_alpha.TablePolicyProps = {
  table: table,

  // the properties below are optional
  removalPolicy: cdk.RemovalPolicy.DESTROY,
  resourcePolicy: policyDocument,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_s3tables_alpha as s3tables_alpha
import aws_cdk as cdk
from aws_cdk import aws_iam as iam

# policy_document: iam.PolicyDocument
# table: s3tables_alpha.Table

table_policy_props = s3tables_alpha.TablePolicyProps(
    table=table,

    # the properties below are optional
    removal_policy=cdk.RemovalPolicy.DESTROY,
    resource_policy=policy_document
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3tables.alpha.*;
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.iam.*;

PolicyDocument policyDocument;
Table table;

TablePolicyProps tablePolicyProps = TablePolicyProps.builder()
        .table(table)

        // the properties below are optional
        .removalPolicy(RemovalPolicy.DESTROY)
        .resourcePolicy(policyDocument)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.S3Tables.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3Tables.Alpha;
using Amazon.CDK;
using Amazon.CDK.AWS.IAM;

PolicyDocument policyDocument;
Table table;

var tablePolicyProps = new TablePolicyProps {
    Table = table,

    // the properties below are optional
    RemovalPolicy = RemovalPolicy.DESTROY,
    ResourcePolicy = policyDocument
};
```

Golang:

```go
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import s3tables_alpha "github.com/aws-samples/dummy/awscdkawss3tablesalpha"
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var policyDocument PolicyDocument
var table Table

tablePolicyProps := &TablePolicyProps{
	Table: table,

	// the properties below are optional
	RemovalPolicy: cdk.RemovalPolicy_DESTROY,
	ResourcePolicy: policyDocument,
}
```

## Properties

- `removalPolicy`: [RemovalPolicy](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.DESTROY. — Policy to apply when the policy is removed from this stack.

- `resourcePolicy`: [PolicyDocument](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — The policy document for the table's resource policy.

  **Default:** undefined An empty iam.PolicyDocument will be initialized

- `table`: [ITable](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-s3tables-alpha.ITable.html) (required) — The associated table.
