@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.193Z") @Stability(value=Stable) public class Stream extends Resource implements IStream
Can be encrypted with a KMS key.
Example:
Key key = new Key(this, "MyKey");
Stream.Builder.create(this, "MyEncryptedStream")
.encryption(StreamEncryption.KMS)
.encryptionKey(key)
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
Stream.Builder
A fluent builder for
Stream. |
software.amazon.jsii.JsiiObject.InitializationModeIStream.Jsii$Default, IStream.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Stream(software.constructs.Construct scope,
String id) |
|
Stream(software.constructs.Construct scope,
String id,
StreamProps props) |
protected |
Stream(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Stream(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IStream |
fromStreamArn(software.constructs.Construct scope,
String id,
String streamArn)
Import an existing Kinesis Stream provided an ARN.
|
static IStream |
fromStreamAttributes(software.constructs.Construct scope,
String id,
StreamAttributes attrs)
Creates a Stream construct that represents an external stream.
|
IKey |
getEncryptionKey()
Optional KMS encryption key associated with this stream.
|
String |
getStreamArn()
The ARN of the stream.
|
String |
getStreamName()
The name of the stream.
|
Grant |
grant(IGrantable grantee,
String... actions)
Grant the indicated permissions on this stream to the given IAM principal (Role/Group/User).
|
Grant |
grantRead(IGrantable grantee)
Grant read permissions for this stream and its contents to an IAM principal (Role/Group/User).
|
Grant |
grantReadWrite(IGrantable grantee)
Grants read/write permissions for this stream and its contents to an IAM principal (Role/Group/User).
|
Grant |
grantWrite(IGrantable grantee)
Grant write permissions for this stream and its contents to an IAM principal (Role/Group/User).
|
Metric |
metric(String metricName)
Return stream metric based from its metric name.
|
Metric |
metric(String metricName,
MetricOptions props)
Return stream metric based from its metric name.
|
Metric |
metricGetRecords()
The number of records retrieved from the shard, measured over the specified time period.
|
Metric |
metricGetRecords(MetricOptions props)
The number of records retrieved from the shard, measured over the specified time period.
|
Metric |
metricGetRecordsBytes()
The number of bytes retrieved from the Kinesis stream, measured over the specified time period.
|
Metric |
metricGetRecordsBytes(MetricOptions props)
The number of bytes retrieved from the Kinesis stream, measured over the specified time period.
|
Metric |
metricGetRecordsIteratorAgeMilliseconds()
The age of the last record in all GetRecords calls made against a Kinesis stream, measured over the specified time period.
|
Metric |
metricGetRecordsIteratorAgeMilliseconds(MetricOptions props)
The age of the last record in all GetRecords calls made against a Kinesis stream, measured over the specified time period.
|
Metric |
metricGetRecordsLatency()
The number of successful GetRecords operations per stream, measured over the specified time period.
|
Metric |
metricGetRecordsLatency(MetricOptions props)
The number of successful GetRecords operations per stream, measured over the specified time period.
|
Metric |
metricGetRecordsSuccess()
The number of successful GetRecords operations per stream, measured over the specified time period.
|
Metric |
metricGetRecordsSuccess(MetricOptions props)
The number of successful GetRecords operations per stream, measured over the specified time period.
|
Metric |
metricIncomingBytes()
The number of bytes successfully put to the Kinesis stream over the specified time period.
|
Metric |
metricIncomingBytes(MetricOptions props)
The number of bytes successfully put to the Kinesis stream over the specified time period.
|
Metric |
metricIncomingRecords()
The number of records successfully put to the Kinesis stream over the specified time period.
|
Metric |
metricIncomingRecords(MetricOptions props)
The number of records successfully put to the Kinesis stream over the specified time period.
|
Metric |
metricPutRecordBytes()
The number of bytes put to the Kinesis stream using the PutRecord operation over the specified time period.
|
Metric |
metricPutRecordBytes(MetricOptions props)
The number of bytes put to the Kinesis stream using the PutRecord operation over the specified time period.
|
Metric |
metricPutRecordLatency()
The time taken per PutRecord operation, measured over the specified time period.
|
Metric |
metricPutRecordLatency(MetricOptions props)
The time taken per PutRecord operation, measured over the specified time period.
|
Metric |
metricPutRecordsBytes()
The number of bytes put to the Kinesis stream using the PutRecords operation over the specified time period.
|
Metric |
metricPutRecordsBytes(MetricOptions props)
The number of bytes put to the Kinesis stream using the PutRecords operation over the specified time period.
|
Metric |
metricPutRecordsFailedRecords()
The number of records rejected due to internal failures in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsFailedRecords(MetricOptions props)
The number of records rejected due to internal failures in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsLatency()
The time taken per PutRecords operation, measured over the specified time period.
|
Metric |
metricPutRecordsLatency(MetricOptions props)
The time taken per PutRecords operation, measured over the specified time period.
|
Metric |
metricPutRecordsSuccess()
The number of PutRecords operations where at least one record succeeded, per Kinesis stream, measured over the specified time period.
|
Metric |
metricPutRecordsSuccess(MetricOptions props)
The number of PutRecords operations where at least one record succeeded, per Kinesis stream, measured over the specified time period.
|
Metric |
metricPutRecordsSuccessfulRecords()
The number of successful records in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsSuccessfulRecords(MetricOptions props)
The number of successful records in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsThrottledRecords()
The number of records rejected due to throttling in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsThrottledRecords(MetricOptions props)
The number of records rejected due to throttling in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsTotalRecords()
The total number of records sent in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordsTotalRecords(MetricOptions props)
The total number of records sent in a PutRecords operation per Kinesis data stream, measured over the specified time period.
|
Metric |
metricPutRecordSuccess()
The number of successful PutRecord operations per Kinesis stream, measured over the specified time period.
|
Metric |
metricPutRecordSuccess(MetricOptions props)
The number of successful PutRecord operations per Kinesis stream, measured over the specified time period.
|
Metric |
metricReadProvisionedThroughputExceeded()
The number of GetRecords calls throttled for the stream over the specified time period.
|
Metric |
metricReadProvisionedThroughputExceeded(MetricOptions props)
The number of GetRecords calls throttled for the stream over the specified time period.
|
Metric |
metricWriteProvisionedThroughputExceeded()
The number of records rejected due to throttling for the stream over the specified time period.
|
Metric |
metricWriteProvisionedThroughputExceeded(MetricOptions props)
The number of records rejected due to throttling for the stream over the specified time period.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected Stream(software.amazon.jsii.JsiiObjectRef objRef)
protected Stream(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public Stream(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
StreamProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public Stream(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static IStream fromStreamArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String streamArn)
scope - The parent creating construct (usually `this`). This parameter is required.id - The construct's name. This parameter is required.streamArn - Stream ARN (i.e. arn:aws:kinesis:@Stability(value=Stable) @NotNull public static IStream fromStreamAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull StreamAttributes attrs)
scope - The parent creating construct (usually `this`). This parameter is required.id - The construct's name. This parameter is required.attrs - Stream import properties. This parameter is required.@Stability(value=Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
@Stability(value=Stable) @NotNull public Grant grantRead(@NotNull IGrantable grantee)
If an encryption key is used, permission to ues the key to decrypt the contents of the stream will also be granted.
@Stability(value=Stable) @NotNull public Grant grantReadWrite(@NotNull IGrantable grantee)
If an encryption key is used, permission to use the key for encrypt/decrypt will also be granted.
grantReadWrite in interface IStreamgrantee - This parameter is required.@Stability(value=Stable) @NotNull public Grant grantWrite(@NotNull IGrantable grantee)
If an encryption key is used, permission to ues the key to encrypt the contents of the stream will also be granted.
grantWrite in interface IStreamgrantee - This parameter is required.@Stability(value=Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
@Stability(value=Stable) @NotNull public Metric metric(@NotNull String metricName)
@Stability(value=Stable) @NotNull public Metric metricGetRecords(@Nullable MetricOptions props)
Minimum, Maximum, and Average statistics represent the records in a single GetRecords operation for the stream in the specified time period.
average
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecords in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricGetRecords()
Minimum, Maximum, and Average statistics represent the records in a single GetRecords operation for the stream in the specified time period.
average
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecords in interface IStream@Stability(value=Stable) @NotNull public Metric metricGetRecordsBytes(@Nullable MetricOptions props)
Minimum, Maximum, and Average statistics represent the bytes in a single GetRecords operation for the stream in the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsBytes in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricGetRecordsBytes()
Minimum, Maximum, and Average statistics represent the bytes in a single GetRecords operation for the stream in the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsBytes in interface IStream@Stability(value=Stable) @NotNull public Metric metricGetRecordsIteratorAgeMilliseconds(@Nullable MetricOptions props)
Age is the difference between the current time and when the last record of the GetRecords call was written to the stream. The Minimum and Maximum statistics can be used to track the progress of Kinesis consumer applications. A value of zero indicates that the records being read are completely caught up with the stream.
The metric defaults to maximum over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsIteratorAgeMilliseconds in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricGetRecordsIteratorAgeMilliseconds()
Age is the difference between the current time and when the last record of the GetRecords call was written to the stream. The Minimum and Maximum statistics can be used to track the progress of Kinesis consumer applications. A value of zero indicates that the records being read are completely caught up with the stream.
The metric defaults to maximum over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsIteratorAgeMilliseconds in interface IStream@Stability(value=Stable) @NotNull public Metric metricGetRecordsLatency(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsLatency in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricGetRecordsLatency()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsLatency in interface IStream@Stability(value=Stable) @NotNull public Metric metricGetRecordsSuccess(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsSuccess in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricGetRecordsSuccess()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricGetRecordsSuccess in interface IStream@Stability(value=Stable) @NotNull public Metric metricIncomingBytes(@Nullable MetricOptions props)
This metric includes bytes from PutRecord and PutRecords operations. Minimum, Maximum, and Average statistics represent the bytes in a single put operation for the stream in the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricIncomingBytes in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricIncomingBytes()
This metric includes bytes from PutRecord and PutRecords operations. Minimum, Maximum, and Average statistics represent the bytes in a single put operation for the stream in the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricIncomingBytes in interface IStream@Stability(value=Stable) @NotNull public Metric metricIncomingRecords(@Nullable MetricOptions props)
This metric includes record counts from PutRecord and PutRecords operations. Minimum, Maximum, and Average statistics represent the records in a single put operation for the stream in the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricIncomingRecords in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricIncomingRecords()
This metric includes record counts from PutRecord and PutRecords operations. Minimum, Maximum, and Average statistics represent the records in a single put operation for the stream in the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricIncomingRecords in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordBytes(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordBytes in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordBytes()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordBytes in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordLatency(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordLatency in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordLatency()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordLatency in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsBytes(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsBytes in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsBytes()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsBytes in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsFailedRecords(@Nullable MetricOptions props)
Occasional internal failures are to be expected and should be retried.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsFailedRecords in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsFailedRecords()
Occasional internal failures are to be expected and should be retried.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsFailedRecords in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsLatency(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsLatency in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsLatency()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsLatency in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsSuccess(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsSuccess in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsSuccess()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsSuccess in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsSuccessfulRecords(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsSuccessfulRecords in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsSuccessfulRecords()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsSuccessfulRecords in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsThrottledRecords(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsThrottledRecords in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsThrottledRecords()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsThrottledRecords in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordsTotalRecords(@Nullable MetricOptions props)
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsTotalRecords in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordsTotalRecords()
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordsTotalRecords in interface IStream@Stability(value=Stable) @NotNull public Metric metricPutRecordSuccess(@Nullable MetricOptions props)
Average reflects the percentage of successful writes to a stream.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordSuccess in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricPutRecordSuccess()
Average reflects the percentage of successful writes to a stream.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricPutRecordSuccess in interface IStream@Stability(value=Stable) @NotNull public Metric metricReadProvisionedThroughputExceeded(@Nullable MetricOptions props)
The most commonly used statistic for this metric is Average.
When the Minimum statistic has a value of 1, all records were throttled for the stream during the specified time period.
When the Maximum statistic has a value of 0 (zero), no records were throttled for the stream during the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties
metricReadProvisionedThroughputExceeded in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricReadProvisionedThroughputExceeded()
The most commonly used statistic for this metric is Average.
When the Minimum statistic has a value of 1, all records were throttled for the stream during the specified time period.
When the Maximum statistic has a value of 0 (zero), no records were throttled for the stream during the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties
metricReadProvisionedThroughputExceeded in interface IStream@Stability(value=Stable) @NotNull public Metric metricWriteProvisionedThroughputExceeded(@Nullable MetricOptions props)
This metric includes throttling from PutRecord and PutRecords operations.
When the Minimum statistic has a non-zero value, records were being throttled for the stream during the specified time period.
When the Maximum statistic has a value of 0 (zero), no records were being throttled for the stream during the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricWriteProvisionedThroughputExceeded in interface IStreamprops - properties of the metric.@Stability(value=Stable) @NotNull public Metric metricWriteProvisionedThroughputExceeded()
This metric includes throttling from PutRecord and PutRecords operations.
When the Minimum statistic has a non-zero value, records were being throttled for the stream during the specified time period.
When the Maximum statistic has a value of 0 (zero), no records were being throttled for the stream during the specified time period.
The metric defaults to average over 5 minutes, it can be changed by passing statistic and period properties.
metricWriteProvisionedThroughputExceeded in interface IStream@Stability(value=Stable) @NotNull public String getStreamArn()
getStreamArn in interface IStream@Stability(value=Stable) @NotNull public String getStreamName()
getStreamName in interface IStream@Stability(value=Stable) @Nullable public IKey getEncryptionKey()
getEncryptionKey in interface IStreamCopyright © 2022. All rights reserved.