Stream

Provides a Kinesis Stream resource. Amazon Kinesis is a managed service that scales elastically for real-time processing of streaming big data.

For more details, see the Amazon Kinesis Documentation.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var testStream = new Aws.Kinesis.Stream("testStream", new Aws.Kinesis.StreamArgs
        {
            RetentionPeriod = 48,
            ShardCount = 1,
            ShardLevelMetrics = 
            {
                "IncomingBytes",
                "OutgoingBytes",
            },
            Tags = 
            {
                { "Environment", "test" },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/kinesis"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := kinesis.NewStream(ctx, "testStream", &kinesis.StreamArgs{
            RetentionPeriod: pulumi.Int(48),
            ShardCount:      pulumi.Int(1),
            ShardLevelMetrics: pulumi.StringArray{
                pulumi.String("IncomingBytes"),
                pulumi.String("OutgoingBytes"),
            },
            Tags: pulumi.StringMap{
                "Environment": pulumi.String("test"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

test_stream = aws.kinesis.Stream("testStream",
    retention_period=48,
    shard_count=1,
    shard_level_metrics=[
        "IncomingBytes",
        "OutgoingBytes",
    ],
    tags={
        "Environment": "test",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testStream = new aws.kinesis.Stream("test_stream", {
    retentionPeriod: 48,
    shardCount: 1,
    shardLevelMetrics: [
        "IncomingBytes",
        "OutgoingBytes",
    ],
    tags: {
        Environment: "test",
    },
});

Create a Stream Resource

new Stream(name: string, args: StreamArgs, opts?: CustomResourceOptions);
def Stream(resource_name, opts=None, arn=None, encryption_type=None, enforce_consumer_deletion=None, kms_key_id=None, name=None, retention_period=None, shard_count=None, shard_level_metrics=None, tags=None, __props__=None);
func NewStream(ctx *Context, name string, args StreamArgs, opts ...ResourceOption) (*Stream, error)
public Stream(string name, StreamArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args StreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args StreamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args StreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Stream Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Stream resource accepts the following input properties:

ShardCount int

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

Arn string

The Amazon Resource Name (ARN) specifying the Stream (same as id)

EncryptionType string

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

EnforceConsumerDeletion bool

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

KmsKeyId string

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

Name string

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

RetentionPeriod int

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

ShardLevelMetrics List<string>

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

ShardCount int

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

Arn string

The Amazon Resource Name (ARN) specifying the Stream (same as id)

EncryptionType string

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

EnforceConsumerDeletion bool

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

KmsKeyId string

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

Name string

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

RetentionPeriod int

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

ShardLevelMetrics []string

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

Tags map[string]string

A map of tags to assign to the resource.

shardCount number

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

arn string

The Amazon Resource Name (ARN) specifying the Stream (same as id)

encryptionType string

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

enforceConsumerDeletion boolean

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

kmsKeyId string

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

name string

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

retentionPeriod number

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

shardLevelMetrics string[]

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

tags {[key: string]: string}

A map of tags to assign to the resource.

shard_count float

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

arn str

The Amazon Resource Name (ARN) specifying the Stream (same as id)

encryption_type str

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

enforce_consumer_deletion bool

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

kms_key_id str

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

name str

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

retention_period float

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

shard_level_metrics List[str]

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Stream resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Stream Resource

Get an existing Stream resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: StreamState, opts?: CustomResourceOptions): Stream
static get(resource_name, id, opts=None, arn=None, encryption_type=None, enforce_consumer_deletion=None, kms_key_id=None, name=None, retention_period=None, shard_count=None, shard_level_metrics=None, tags=None, __props__=None);
func GetStream(ctx *Context, name string, id IDInput, state *StreamState, opts ...ResourceOption) (*Stream, error)
public static Stream Get(string name, Input<string> id, StreamState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The Amazon Resource Name (ARN) specifying the Stream (same as id)

EncryptionType string

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

EnforceConsumerDeletion bool

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

KmsKeyId string

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

Name string

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

RetentionPeriod int

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

ShardCount int

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

ShardLevelMetrics List<string>

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Arn string

The Amazon Resource Name (ARN) specifying the Stream (same as id)

EncryptionType string

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

EnforceConsumerDeletion bool

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

KmsKeyId string

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

Name string

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

RetentionPeriod int

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

ShardCount int

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

ShardLevelMetrics []string

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

Tags map[string]string

A map of tags to assign to the resource.

arn string

The Amazon Resource Name (ARN) specifying the Stream (same as id)

encryptionType string

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

enforceConsumerDeletion boolean

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

kmsKeyId string

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

name string

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

retentionPeriod number

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

shardCount number

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

shardLevelMetrics string[]

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

tags {[key: string]: string}

A map of tags to assign to the resource.

arn str

The Amazon Resource Name (ARN) specifying the Stream (same as id)

encryption_type str

The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.

enforce_consumer_deletion bool

A boolean that indicates all registered consumers should be deregistered from the stream so that the stream can be destroyed without error. The default value is false.

kms_key_id str

The GUID for the customer-managed KMS key to use for encryption. You can also use a Kinesis-owned master key by specifying the alias alias/aws/kinesis.

name str

A name to identify the stream. This is unique to the AWS account and region the Stream is created in.

retention_period float

Length of time data records are accessible after they are added to the stream. The maximum value of a stream’s retention period is 168 hours. Minimum value is 24. Default is 24.

shard_count float

The number of shards that the stream will use. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.

shard_level_metrics List[str]

A list of shard-level CloudWatch metrics which can be enabled for the stream. See Monitoring with CloudWatch for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.

tags Dict[str, str]

A map of tags to assign to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.