This documentation is for the developer preview release of the AWS CDK. Do not use this version of the AWS CDK in production. Subsequent releases of the AWS CDK will likely include breaking changes.

@aws-cdk/aws-kinesis

AWS Kinesis Construct Library

Define an unencrypted Kinesis stream.

new Stream(this, 'MyFirstStream');

Encryption

Define a KMS-encrypted stream:

const stream = newStream(this, 'MyEncryptedStream', {
    encryption: StreamEncryption.Kms
});

// you can access the encryption key:
assert(stream.encryptionKey instanceof kms.EncryptionKey);

You can also supply your own key:

const myKmsKey = new kms.EncryptionKey(this, 'MyKey');

const stream = new Stream(this, 'MyEncryptedStream', {
    encryption: StreamEncryption.Kms,
    encryptionKey: myKmsKey
});

assert(stream.encryptionKey === myKmsKey);

Reference

View in Nuget

csproj:

<PackageReference Include="Amazon.CDK.AWS.Kinesis" Version="0.25.3" />

dotnet:

dotnet add package Amazon.CDK.AWS.Kinesis --version 0.25.3

packages.config:

<package id="Amazon.CDK.AWS.Kinesis" version="0.25.3" />

View in Maven Central

Apache Buildr:

'software.amazon.awscdk:kinesis:jar:0.25.3'

Apache Ivy:

<dependency groupId="software.amazon.awscdk" name="kinesis" rev="0.25.3"/>

Apache Maven:

<dependency>
  <groupId>software.amazon.awscdk</groupId>
  <artifactId>kinesis</artifactId>
  <version>0.25.3</version>
</dependency>

Gradle / Grails:

compile 'software.amazon.awscdk:kinesis:0.25.3'

Groovy Grape:

@Grapes(
@Grab(group='software.amazon.awscdk', module='kinesis', version='0.25.3')
)

View in NPM

npm:

$ npm i @aws-cdk/aws-kinesis@0.25.3

package.json:

{
  "@aws-cdk/aws-kinesis": "^0.25.3"
}

yarn:

$ yarn add @aws-cdk/aws-kinesis@0.25.3

View in NPM

npm:

$ npm i @aws-cdk/aws-kinesis@0.25.3

package.json:

{
  "@aws-cdk/aws-kinesis": "^0.25.3"
}

yarn:

$ yarn add @aws-cdk/aws-kinesis@0.25.3

CfnStream

class @aws-cdk/aws-kinesis.CfnStream(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.CfnStream;
const { CfnStream } = require('@aws-cdk/aws-kinesis');
import { CfnStream } from '@aws-cdk/aws-kinesis';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
propertyOverrides
Type:CfnStreamProps (readonly)
streamArn
Type:string (readonly)
streamId
Type:string (readonly)
tags

The TagManager handles setting, removing and formatting tags

Tags should be managed either passing them as properties during

initiation or by calling methods on this object. If both techniques are

used only the tags from the TagManager will be used. Tag (aspect)

will use the manager.

Type:@aws-cdk/cdk.TagManager (readonly)
class StreamEncryptionProperty

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.CfnStream.StreamEncryptionProperty;
// CfnStream.StreamEncryptionProperty is an interface
import { CfnStream.StreamEncryptionProperty } from '@aws-cdk/aws-kinesis';
encryptionType

CfnStream.StreamEncryptionProperty.EncryptionType

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html#cfn-kinesis-stream-streamencryption-encryptiontype

Type:string
keyId

CfnStream.StreamEncryptionProperty.KeyId

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesis-stream-streamencryption.html#cfn-kinesis-stream-streamencryption-keyid

Type:string
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)

CfnStreamConsumer

class @aws-cdk/aws-kinesis.CfnStreamConsumer(scope, id, props)

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.CfnStreamConsumer;
const { CfnStreamConsumer } = require('@aws-cdk/aws-kinesis');
import { CfnStreamConsumer } from '@aws-cdk/aws-kinesis';
Extends:

@aws-cdk/cdk.Resource

Parameters:
renderProperties(properties) → string => any

Overrides @aws-cdk/cdk.Resource.renderProperties()

Protected method

Parameters:properties (any) –
Return type:string => any
resourceTypeName

The CloudFormation resource type name for this resource class.

Type:string (readonly) (static)
propertyOverrides
Type:CfnStreamConsumerProps (readonly)
streamConsumerArn
Type:string (readonly)
streamConsumerConsumerArn
Type:string (readonly)
streamConsumerConsumerCreationTimestamp
Type:string (readonly)
streamConsumerConsumerName
Type:string (readonly)
streamConsumerConsumerStatus
Type:string (readonly)
streamConsumerStreamArn
Type:string (readonly)
toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)
ref

Inherited from @aws-cdk/cdk.Referenceable

Returns a token to a CloudFormation { Ref } that references this entity based on it’s logical ID.

Type:string (readonly)
addDeletionOverride(path)

Inherited from @aws-cdk/cdk.Resource

Syntactic sugar for addOverride(path, undefined).

Parameters:path (string) – The path of the value to delete
addDependsOn(resource)

Inherited from @aws-cdk/cdk.Resource

Indicates that this resource depends on another resource and cannot be provisioned

unless the other resource has been successfully provisioned.

Parameters:resource (@aws-cdk/cdk.Resource) –
addOverride(path, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to the synthesized CloudFormation resource. To add a

property override, either use addPropertyOverride or prefix path with

“Properties.” (i.e. Properties.TopicName).

Parameters:
  • path (string) – The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
  • value (any) – The value. Could be primitive or complex.
addPropertyDeletionOverride(propertyPath)

Inherited from @aws-cdk/cdk.Resource

Adds an override that deletes the value of a property from the resource definition.

Parameters:propertyPath (string) – The path to the property.
addPropertyOverride(propertyPath, value)

Inherited from @aws-cdk/cdk.Resource

Adds an override to a resource property.

Syntactic sugar for addOverride(“Properties.<…>”, value).

Parameters:
  • propertyPath (string) – The path of the property
  • value (any) – The value
getAtt(attributeName) → @aws-cdk/cdk.CfnReference

Inherited from @aws-cdk/cdk.Resource

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility

in case there is no generated attribute.

Parameters:attributeName (string) – The name of the attribute.
Return type:@aws-cdk/cdk.CfnReference
toCloudFormation() → json

Inherited from @aws-cdk/cdk.Resource

Emits CloudFormation for this resource.

Return type:json
options

Inherited from @aws-cdk/cdk.Resource

Options for this resource, such as condition, update policy etc.

Type:@aws-cdk/cdk.ResourceOptions (readonly)
properties

Inherited from @aws-cdk/cdk.Resource

AWS resource properties.

This object is rendered via a call to “renderProperties(this.properties)”.

Protected property

Type:any (readonly)
resourceType

Inherited from @aws-cdk/cdk.Resource

AWS resource type.

Type:string (readonly)
untypedPropertyOverrides

Inherited from @aws-cdk/cdk.Resource

AWS resource property overrides.

During synthesis, the method “renderProperties(this.overrides)” is called

with this object, and merged on top of the output of

“renderProperties(this.properties)”.

Derived classes should expose a strongly-typed version of this object as

a public property called propertyOverrides.

Protected property

Type:any (readonly)
overrideLogicalId(newLogicalId)

Inherited from @aws-cdk/cdk.StackElement

Overrides the auto-generated logical ID with a specific ID.

Parameters:newLogicalId (string) – The new logical ID to use for this stack element.
prepare()

Inherited from @aws-cdk/cdk.StackElement

Automatically detect references in this StackElement

Protected method

creationStackTrace

Inherited from @aws-cdk/cdk.StackElement

Type:string[] (readonly)
logicalId

Inherited from @aws-cdk/cdk.StackElement

The logical ID for this CloudFormation stack element. The logical ID of the element

is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Type:string (readonly)
stackPath

Inherited from @aws-cdk/cdk.StackElement

Return the path with respect to the stack

Type:string (readonly)

CfnStreamConsumerProps (interface)

class @aws-cdk/aws-kinesis.CfnStreamConsumerProps

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.CfnStreamConsumerProps;
// CfnStreamConsumerProps is an interface
import { CfnStreamConsumerProps } from '@aws-cdk/aws-kinesis';
consumerName

AWS::Kinesis::StreamConsumer.ConsumerName

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-streamconsumer.html#cfn-kinesis-streamconsumer-consumername

Type:string
streamArn

AWS::Kinesis::StreamConsumer.StreamARN

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-streamconsumer.html#cfn-kinesis-streamconsumer-streamarn

Type:string

CfnStreamProps (interface)

class @aws-cdk/aws-kinesis.CfnStreamProps

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.CfnStreamProps;
// CfnStreamProps is an interface
import { CfnStreamProps } from '@aws-cdk/aws-kinesis';
shardCount

AWS::Kinesis::Stream.ShardCount

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-shardcount

Type:number or @aws-cdk/cdk.Token
name

AWS::Kinesis::Stream.Name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-name

Type:string (optional)
retentionPeriodHours

AWS::Kinesis::Stream.RetentionPeriodHours

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-retentionperiodhours

Type:number or @aws-cdk/cdk.Token (optional)
streamEncryption

AWS::Kinesis::Stream.StreamEncryption

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-streamencryption

Type:@aws-cdk/cdk.Token or StreamEncryptionProperty (optional)
tags

AWS::Kinesis::Stream.Tags

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-tags

Type:@aws-cdk/cdk.Token or (@aws-cdk/cdk.Token or @aws-cdk/cdk.CfnTag)[] (optional)

IStream (interface)

class @aws-cdk/aws-kinesis.IStream

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.IStream;
// IStream is an interface
import { IStream } from '@aws-cdk/aws-kinesis';
Extends:@aws-cdk/cdk.IConstruct
Extends:@aws-cdk/aws-logs.ILogSubscriptionDestination
streamArn

The ARN of the stream.

Type:string (readonly)
streamName

The name of the stream

Type:string (readonly)
encryptionKey

Optional KMS encryption key associated with this stream.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional) (readonly)
export() → @aws-cdk/aws-kinesis.StreamImportProps

Exports this stream from the stack.

Return type:StreamImportProps
Abstract:Yes
grantRead([identity])

Grant read permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to ues the key to decrypt the

contents of the stream will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
Abstract:Yes
grantReadWrite([identity])

Grants read/write permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to use the key for

encrypt/decrypt will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
Abstract:Yes
grantWrite([identity])

Grant write permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to ues the key to encrypt the

contents of the stream will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
Abstract:Yes
logSubscriptionDestination(sourceLogGroup) → @aws-cdk/aws-logs.LogSubscriptionDestination

Inherited from @aws-cdk/aws-logs.ILogSubscriptionDestination

Return the properties required to send subscription events to this destination.

If necessary, the destination can use the properties of the SubscriptionFilter

object itself to configure its permissions to allow the subscription to write

to it.

The destination may reconfigure its own permissions in response to this

function call.

Parameters:sourceLogGroup (@aws-cdk/aws-logs.ILogGroup) –
Return type:@aws-cdk/aws-logs.LogSubscriptionDestination
Abstract:Yes
node

Inherited from @aws-cdk/cdk.IConstruct

The construct node in the scope tree.

Type:@aws-cdk/cdk.ConstructNode (readonly)
dependencyRoots

Inherited from @aws-cdk/cdk.IDependable

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)

Stream

class @aws-cdk/aws-kinesis.Stream(scope, id[, props])

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.Stream;
const { Stream } = require('@aws-cdk/aws-kinesis');
import { Stream } from '@aws-cdk/aws-kinesis';

A Kinesis stream. Can be encrypted with a KMS key.

Extends:

StreamBase

Parameters:
static import(scope, id, props) → @aws-cdk/aws-kinesis.IStream

Creates a Stream construct that represents an external stream.

Parameters:
Return type:

IStream

export() → @aws-cdk/aws-kinesis.StreamImportProps

Implements @aws-cdk/aws-kinesis.StreamBase.export()

Exports this stream from the stack.

Return type:StreamImportProps
streamArn

Implements @aws-cdk/aws-kinesis.StreamBase.streamArn()

The ARN of the stream.

Type:string (readonly)
streamName

Implements @aws-cdk/aws-kinesis.StreamBase.streamName()

The name of the stream

Type:string (readonly)
encryptionKey

Implements @aws-cdk/aws-kinesis.StreamBase.encryptionKey()

Optional KMS encryption key associated with this stream.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional) (readonly)
grantRead([identity])

Inherited from @aws-cdk/aws-kinesis.StreamBase

Grant write permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to ues the key to decrypt the

contents of the stream will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
grantReadWrite([identity])

Inherited from @aws-cdk/aws-kinesis.StreamBase

Grants read/write permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to use the key for

encrypt/decrypt will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
grantWrite([identity])

Inherited from @aws-cdk/aws-kinesis.StreamBase

Grant read permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to ues the key to decrypt the

contents of the stream will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
logSubscriptionDestination(sourceLogGroup) → @aws-cdk/aws-logs.LogSubscriptionDestination

Inherited from @aws-cdk/aws-kinesis.StreamBase

Return the properties required to send subscription events to this destination.

If necessary, the destination can use the properties of the SubscriptionFilter

object itself to configure its permissions to allow the subscription to write

to it.

The destination may reconfigure its own permissions in response to this

function call.

Parameters:sourceLogGroup (@aws-cdk/aws-logs.ILogGroup) –
Return type:@aws-cdk/aws-logs.LogSubscriptionDestination
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

StreamBase

class @aws-cdk/aws-kinesis.StreamBase(scope, id)

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.StreamBase;
const { StreamBase } = require('@aws-cdk/aws-kinesis');
import { StreamBase } from '@aws-cdk/aws-kinesis';

Represents a Kinesis Stream.

Streams can be either defined within this stack:

new Stream(this, ‘MyStream’, { props });

Or imported from an existing stream:

Stream.import(this, ‘MyImportedStream’, { streamArn: … });

You can also export a stream and import it into another stack:

const ref = myStream.export();

Stream.import(this, ‘MyImportedStream’, ref);

Extends:

@aws-cdk/cdk.Construct

Implements:

IStream

Abstract:

Yes

Parameters:
  • scope (@aws-cdk/cdk.Construct) – The scope in which to define this construct
  • id (string) – The scoped construct ID. Must be unique amongst siblings. If the ID includes a path separator (/), then it will be replaced by double dash .
export() → @aws-cdk/aws-kinesis.StreamImportProps

Implements @aws-cdk/aws-kinesis.IStream.export()

Exports this stream from the stack.

Return type:StreamImportProps
Abstract:Yes
grantRead([identity])

Implements @aws-cdk/aws-kinesis.IStream.grantRead()

Grant write permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to ues the key to decrypt the

contents of the stream will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
grantReadWrite([identity])

Implements @aws-cdk/aws-kinesis.IStream.grantReadWrite()

Grants read/write permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to use the key for

encrypt/decrypt will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
grantWrite([identity])

Implements @aws-cdk/aws-kinesis.IStream.grantWrite()

Grant read permissions for this stream and its contents to an IAM

principal (Role/Group/User).

If an encryption key is used, permission to ues the key to decrypt the

contents of the stream will also be granted.

Parameters:identity (@aws-cdk/aws-iam.IPrincipal (optional)) –
logSubscriptionDestination(sourceLogGroup) → @aws-cdk/aws-logs.LogSubscriptionDestination

Implements @aws-cdk/aws-logs.ILogSubscriptionDestination.logSubscriptionDestination()

Return the properties required to send subscription events to this destination.

If necessary, the destination can use the properties of the SubscriptionFilter

object itself to configure its permissions to allow the subscription to write

to it.

The destination may reconfigure its own permissions in response to this

function call.

Parameters:sourceLogGroup (@aws-cdk/aws-logs.ILogGroup) –
Return type:@aws-cdk/aws-logs.LogSubscriptionDestination
streamArn

Implements @aws-cdk/aws-kinesis.IStream.streamArn()

The ARN of the stream.

Type:string (readonly) (abstract)
streamName

Implements @aws-cdk/aws-kinesis.IStream.streamName()

The name of the stream

Type:string (readonly) (abstract)
encryptionKey

Implements @aws-cdk/aws-kinesis.IStream.encryptionKey()

Optional KMS encryption key associated with this stream.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional) (readonly) (abstract)
prepare()

Inherited from @aws-cdk/cdk.Construct

Perform final modifications before synthesis

This method can be implemented by derived constructs in order to perform

final changes before synthesis. prepare() will be called after child

constructs have been prepared.

This is an advanced framework feature. Only use this if you

understand the implications.

Protected method

toString() → string

Inherited from @aws-cdk/cdk.Construct

Returns a string representation of this construct.

Return type:string
validate() → string[]

Inherited from @aws-cdk/cdk.Construct

Validate the current construct.

This method can be implemented by derived constructs in order to perform

validation logic. It is called on all constructs before synthesis.

Protected method

Returns:An array of validation error messages, or an empty array if there the construct is valid.
Return type:string[]
dependencyRoots

Inherited from @aws-cdk/cdk.Construct

The set of constructs that form the root of this dependable

All resources under all returned constructs are included in the ordering

dependency.

Type:@aws-cdk/cdk.IConstruct[] (readonly)
node

Inherited from @aws-cdk/cdk.Construct

Construct node.

Type:@aws-cdk/cdk.ConstructNode (readonly)

StreamEncryption (enum)

class @aws-cdk/aws-kinesis.StreamEncryption

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.StreamEncryption;
const { StreamEncryption } = require('@aws-cdk/aws-kinesis');
import { StreamEncryption } from '@aws-cdk/aws-kinesis';

What kind of server-side encryption to apply to this stream

Unencrypted

Records in the stream are not encrypted.

Kms

Server-side encryption with a KMS key managed by the user.

If encryptionKey is specified, this key will be used, otherwise, one will be defined.

StreamImportProps (interface)

class @aws-cdk/aws-kinesis.StreamImportProps

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.StreamImportProps;
// StreamImportProps is an interface
import { StreamImportProps } from '@aws-cdk/aws-kinesis';

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.

streamArn

The ARN of the stream.

Type:string
encryptionKey

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

Type:@aws-cdk/aws-kms.EncryptionKeyImportProps (optional)

StreamProps (interface)

class @aws-cdk/aws-kinesis.StreamProps

Language-specific names:

using Amazon.CDK.AWS.Kinesis;
import software.amazon.awscdk.services.kinesis.StreamProps;
// StreamProps is an interface
import { StreamProps } from '@aws-cdk/aws-kinesis';
encryption

The kind of server-side encryption to apply to this stream.

If you choose KMS, you can specify a KMS key via encryptionKey. If

encryption key is not specified, a key will automatically be created.

Type:StreamEncryption (optional)
Default:Unencrypted
encryptionKey

External KMS key to use for stream encryption.

The ‘encryption’ property must be set to “Kms”.

Type:@aws-cdk/aws-kms.IEncryptionKey (optional)
Default:If encryption is set to “Kms” and this property is undefined, a

new KMS key will be created and associated with this stream.

@aws-cdk/aws-kinesis.retentionPeriodHours

The number of hours for the data records that are stored in shards to remain accessible.

Type:number (optional)
Default:24
@aws-cdk/aws-kinesis.shardCount

The number of shards for the stream.

Type:number (optional)
Default:1
@aws-cdk/aws-kinesis.streamName

Enforces a particular physical stream name.

Type:string (optional)
Default:<generated>