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.
| Source | aws-kinesis/lib/stream.ts |
|---|
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',
),
});
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")),
})