Skip to content
v2.278.0

StreamAttributes Struct ​

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.

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',
  ),
});
python
imported_stream = kinesis.Stream.from_stream_attributes(self, "ImportedEncryptedStream",
    stream_arn="arn:aws:kinesis:us-east-2:123456789012:stream/f3j09j2230j",
    encryption_key=kms.Key.from_key_arn(self, "key", "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012")
)
java
IStream importedStream = Stream.fromStreamAttributes(this, "ImportedEncryptedStream", StreamAttributes.builder()
        .streamArn("arn:aws:kinesis:us-east-2:123456789012:stream/f3j09j2230j")
        .encryptionKey(Key.fromKeyArn(this, "key", "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012"))
        .build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
var importedStream = Stream.FromStreamAttributes(this, "ImportedEncryptedStream", new StreamAttributes {
    StreamArn = "arn:aws:kinesis:us-east-2:123456789012:stream/f3j09j2230j",
    EncryptionKey = Key.FromKeyArn(this, "key", "arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012")
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
importedStream := kinesis.Stream_FromStreamAttributes(this, jsii.String("ImportedEncryptedStream"), &StreamAttributes{
	StreamArn: jsii.String("arn:aws:kinesis:us-east-2:123456789012:stream/f3j09j2230j"),
	EncryptionKey: kms.Key_FromKeyArn(this, jsii.String("key"), jsii.String("arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012")),
})

Properties ​

encryptionKeyoptionalIKeyencryption_keyoptionalIKeyencryptionKeyoptionalIKeyEncryptionKeyoptionalIKeyEncryptionKeyoptionalIKey #
The KMS key securing the contents of the stream if encryption is enabled.

Default: No encryption

streamArnstringstream_arnstrstreamArnStringStreamArnstringStreamArn*string required #
The ARN of the stream.