Interface StreamAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
StreamAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-04-10T22:22:29.642Z") @Stability(Stable) public interface StreamAttributes extends software.amazon.jsii.JsiiSerializable
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:

 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());
 
  • Method Details

    • getStreamArn

      @Stability(Stable) @NotNull String getStreamArn()
      The ARN of the stream.
    • getEncryptionKey

      @Stability(Stable) @Nullable default IKey getEncryptionKey()
      The KMS key securing the contents of the stream if encryption is enabled.

      Default: - No encryption

    • builder

      @Stability(Stable) static StreamAttributes.Builder builder()
      Returns:
      a StreamAttributes.Builder of StreamAttributes