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:
- 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)- Encryption
Type string The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.- Enforce
Consumer boolDeletion 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 stringId 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.
- Retention
Period 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.
- 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.
- Dictionary<string, string>
A map of tags to assign to the resource.
- 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)- Encryption
Type string The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.- Enforce
Consumer boolDeletion 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 stringId 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.
- Retention
Period 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.
- []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.
- map[string]string
A map of tags to assign to the resource.
- 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)- encryption
Type string The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.- enforce
Consumer booleanDeletion 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 stringId 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.
- retention
Period 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.
- 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.
- {[key: string]: string}
A map of tags to assign to the resource.
- 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
NONEorKMS. The default value isNONE.- enforce_
consumer_ booldeletion 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_ strid 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.
- 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.
- 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:
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): Streamstatic 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)- Encryption
Type string The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.- Enforce
Consumer boolDeletion 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 stringId 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.
- Retention
Period 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.
- Shard
Count 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.
- Shard
Level List<string>Metrics 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.
- 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)- Encryption
Type string The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.- Enforce
Consumer boolDeletion 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 stringId 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.
- Retention
Period 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.
- Shard
Count 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.
- Shard
Level []stringMetrics 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.
- 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)- encryption
Type string The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.- enforce
Consumer booleanDeletion 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 stringId 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.
- retention
Period 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.
- shard
Count 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.
- shard
Level string[]Metrics 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.
- {[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
NONEorKMS. The default value isNONE.- enforce_
consumer_ booldeletion 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_ strid 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_ List[str]metrics 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.
- 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
awsTerraform Provider.