Stream Args
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
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testStream = new aws.kinesis.Stream("test_stream", {
name: "kinesis-test",
shardCount: 1,
retentionPeriod: 48,
shardLevelMetrics: [
"IncomingBytes",
"OutgoingBytes",
],
streamModeDetails: {
streamMode: "PROVISIONED",
},
tags: {
Environment: "test",
},
});import pulumi
import pulumi_aws as aws
test_stream = aws.kinesis.Stream("test_stream",
name="kinesis-test",
shard_count=1,
retention_period=48,
shard_level_metrics=[
"IncomingBytes",
"OutgoingBytes",
],
stream_mode_details={
"stream_mode": "PROVISIONED",
},
tags={
"Environment": "test",
})using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testStream = new Aws.Kinesis.Stream("test_stream", new()
{
Name = "kinesis-test",
ShardCount = 1,
RetentionPeriod = 48,
ShardLevelMetrics = new[]
{
"IncomingBytes",
"OutgoingBytes",
},
StreamModeDetails = new Aws.Kinesis.Inputs.StreamStreamModeDetailsArgs
{
StreamMode = "PROVISIONED",
},
Tags =
{
{ "Environment", "test" },
},
});
});package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kinesis"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kinesis.NewStream(ctx, "test_stream", &kinesis.StreamArgs{
Name: pulumi.String("kinesis-test"),
ShardCount: pulumi.Int(1),
RetentionPeriod: pulumi.Int(48),
ShardLevelMetrics: pulumi.StringArray{
pulumi.String("IncomingBytes"),
pulumi.String("OutgoingBytes"),
},
StreamModeDetails: &kinesis.StreamStreamModeDetailsArgs{
StreamMode: pulumi.String("PROVISIONED"),
},
Tags: pulumi.StringMap{
"Environment": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kinesis.Stream;
import com.pulumi.aws.kinesis.StreamArgs;
import com.pulumi.aws.kinesis.inputs.StreamStreamModeDetailsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var testStream = new Stream("testStream", StreamArgs.builder()
.name("kinesis-test")
.shardCount(1)
.retentionPeriod(48)
.shardLevelMetrics(
"IncomingBytes",
"OutgoingBytes")
.streamModeDetails(StreamStreamModeDetailsArgs.builder()
.streamMode("PROVISIONED")
.build())
.tags(Map.of("Environment", "test"))
.build());
}
}resources:
testStream:
type: aws:kinesis:Stream
name: test_stream
properties:
name: kinesis-test
shardCount: 1
retentionPeriod: 48
shardLevelMetrics:
- IncomingBytes
- OutgoingBytes
streamModeDetails:
streamMode: PROVISIONED
tags:
Environment: testImport
Using pulumi import, import Kinesis Streams using the name. For example:
$ pulumi import aws:kinesis/stream:Stream test_stream pulumi-kinesis-testConstructors
Properties
The encryption type to use. The only acceptable values are NONE or KMS. The default value is NONE.
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.
Length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 8760 hours. Minimum value is 24. Default is 24.
The number of shards that the stream will use. If the stream_mode is PROVISIONED, this field is required. Amazon has guidelines for specifying the Stream size that should be referenced when creating a Kinesis stream. See Amazon Kinesis Streams for more.
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.
Indicates the capacity mode of the data stream. Detailed below.