# StreamAttributes

A reference to a stream.

The easiest way to instantiate is to call
`stream.export()`. Then, the consumer can use `Stream.import(this, ref)` and
get a `Stream`.

- Source: [`aws-kinesis/lib/stream.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-kinesis/lib/stream.ts#L367)

## Example

```ts
const importedStream = kinesis.Stream.fromStreamAttributes(this, 'ImportedEncryptedStream', {
  streamArn: 'arn:aws:kinesis:us-east-2:123456789012:stream/f3j09j2230j',
  encryptionKey: kms.Key.fromKeyArn(this, 'key',
    'arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012',
  ),
});
```

## Properties

- `encryptionKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — The KMS key securing the contents of the stream if encryption is enabled.

  **Default:** No encryption

- `streamArn`: string (required) — The ARN of the stream.
