KinesisStream Class
Use a Kinesis Stream as a target for AWS CloudWatch event rules.
Example
ts
/// fixture=withRepoAndKinesisStream
// put to a Kinesis stream every time code is committed
// to a CodeCommit repository
repository.onCommit('onCommit', { target: new targets.KinesisStream(stream) });
python
# put to a Kinesis stream every time code is committed
# to a CodeCommit repository
repository.on_commit("onCommit", target=targets.KinesisStream(stream))
java
// put to a Kinesis stream every time code is committed
// to a CodeCommit repository
repository.onCommit("onCommit", OnCommitOptions.builder().target(new KinesisStream(stream)).build());
csharp
// Install: dotnet add package Amazon.CDK.Lib
// put to a Kinesis stream every time code is committed
// to a CodeCommit repository
repository.OnCommit("onCommit", new OnCommitOptions { Target = new KinesisStream(stream) });
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// put to a Kinesis stream every time code is committed
// to a CodeCommit repository
repository.onCommit(jsii.String("onCommit"), &OnCommitOptions{
Target: targets.NewKinesisStream(stream),
})
Initializer
ts
new KinesisStream(stream: IStream, props?: KinesisStreamProps)
python
KinesisStream(stream: IStream, props: typing.Optional[KinesisStreamProps] = None)
java
new KinesisStream(IStream stream, KinesisStreamProps props)
csharp
new KinesisStream(IStream stream, KinesisStreamProps? props = null)
go
NewKinesisStream(Stream IStream, Props KinesisStreamProps)
Methods
bind(_rule: IRuleRef, _id?: string): RuleTargetConfigdef bind(self, _rule: IRuleRef, _id: typing.Optional[str] = None) -> RuleTargetConfigpublic RuleTargetConfig bind(IRuleRef _rule, String _id)public RuleTargetConfig Bind(IRuleRef _rule, string? _id = null)func Bind(_rule IRuleRef, _id *string) RuleTargetConfig#Returns a RuleTarget that can be used to trigger this Kinesis Stream as a result from a CloudWatch event.