# StreamGrantsProps

Construction properties for StreamGrants.

Used as props by: [StreamGrants](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.StreamGrants.html)

- Source: [`aws-dynamodb/lib/stream-grants.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-dynamodb/lib/stream-grants.ts#L9)
- Type last changed: v2.255.0 · 19 May 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
import { aws_kms as kms } from 'aws-cdk-lib';
import { aws_dynamodb as interfaces_dynamodb } from 'aws-cdk-lib/interfaces';

declare const key: kms.Key;
declare const tableRef: interfaces_dynamodb.ITableRef;
const streamGrantsProps: dynamodb.StreamGrantsProps = {
  tableStreamArn: 'tableStreamArn',

  // the properties below are optional
  encryptionKey: key,
  table: tableRef,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb
from aws_cdk import aws_kms as kms
from aws_cdk.interfaces import aws_dynamodb as interfaces_dynamodb

# key: kms.Key
# table_ref: interfaces_dynamodb.ITableRef

stream_grants_props = dynamodb.StreamGrantsProps(
    table_stream_arn="tableStreamArn",

    # the properties below are optional
    encryption_key=key,
    table=table_ref
)
```

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.dynamodb.*;
import software.amazon.awscdk.services.kms.*;
import software.amazon.awscdk.interfaces.dynamodb.*;

Key key;
ITableRef tableRef;

StreamGrantsProps streamGrantsProps = StreamGrantsProps.builder()
        .tableStreamArn("tableStreamArn")

        // the properties below are optional
        .encryptionKey(key)
        .table(tableRef)
        .build();
```

C# / .NET:

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

Key key;
ITableRef tableRef;

var streamGrantsProps = new StreamGrantsProps {
    TableStreamArn = "tableStreamArn",

    // the properties below are optional
    EncryptionKey = key,
    Table = tableRef
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var key Key
var tableRef ITableRef

streamGrantsProps := &StreamGrantsProps{
	TableStreamArn: jsii.String("tableStreamArn"),

	// the properties below are optional
	EncryptionKey: key,
	Table: tableRef,
}
```

## Properties

- `encryptionKey`: [IKey](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — The encryption key of the table.

  **Default:** No key

  Required permissions will be added to the key as well.

- `table`: [ITableRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_dynamodb.ITableRef.html) — This property is not used anymore

  **Default:** None, no longer required

- `tableStreamArn`: string (required) — The ARN of the Stream.
