Stream class
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", {
streamModeDetails: {
streamMode: "PROVISIONED",
},
name: "kinesis-test",
shardCount: 1,
retentionPeriod: 48,
shardLevelMetrics: [
"IncomingBytes",
"OutgoingBytes",
],
tags: {
Environment: "test",
},
});
import pulumi
import pulumi_aws as aws
test_stream = aws.kinesis.Stream("test_stream",
stream_mode_details={
"stream_mode": "PROVISIONED",
},
name="kinesis-test",
shard_count=1,
retention_period=48,
shard_level_metrics=[
"IncomingBytes",
"OutgoingBytes",
],
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()
{
StreamModeDetails = new Aws.Kinesis.Inputs.StreamStreamModeDetailsArgs
{
StreamMode = "PROVISIONED",
},
Name = "kinesis-test",
ShardCount = 1,
RetentionPeriod = 48,
ShardLevelMetrics = new[]
{
"IncomingBytes",
"OutgoingBytes",
},
Tags =
{
{ "Environment", "test" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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{
StreamModeDetails: &kinesis.StreamStreamModeDetailsArgs{
StreamMode: pulumi.String("PROVISIONED"),
},
Name: pulumi.String("kinesis-test"),
ShardCount: pulumi.Int(1),
RetentionPeriod: pulumi.Int(48),
ShardLevelMetrics: pulumi.StringArray{
pulumi.String("IncomingBytes"),
pulumi.String("OutgoingBytes"),
},
Tags: pulumi.StringMap{
"Environment": pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_kinesis_stream" "test_stream" {
stream_mode_details = {
stream_mode = "PROVISIONED"
}
name = "kinesis-test"
shard_count = 1
retention_period = 48
shard_level_metrics = ["IncomingBytes", "OutgoingBytes"]
tags = {
"Environment" = "test"
}
}
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.ArrayList;
import java.util.Arrays;
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()
.streamModeDetails(StreamStreamModeDetailsArgs.builder()
.streamMode("PROVISIONED")
.build())
.name("kinesis-test")
.shardCount(1)
.retentionPeriod(48)
.shardLevelMetrics(
"IncomingBytes",
"OutgoingBytes")
.tags(Map.of("Environment", "test"))
.build());
}
}
resources:
testStream:
type: aws:kinesis:Stream
name: test_stream
properties:
streamModeDetails:
streamMode: PROVISIONED
name: kinesis-test
shardCount: 1
retentionPeriod: 48
shardLevelMetrics:
- IncomingBytes
- OutgoingBytes
tags:
Environment: test
Import
Identity Schema
Required
name(String) Name of the stream.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import Kinesis Streams using name. For example:
$ pulumi import aws:kinesis/stream:Stream example example-stream
Constructors
- Stream(String name, {StreamArgs? args, CustomResourceOptions? options})
-
Creates a new Stream.
nameThe Pulumi resource name.argsArguments used to configure this Stream. The set of arguments for Stream.optionsResource options controlling this resource's behavior. - Stream.reference(String urn)
- Creates a typed reference to an existing Stream resource.
Properties
-
arn
↔ Output<
String> -
ARN specifying the stream (same as
id).latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
encryptionType
↔ Output<
String?> -
The encryption type to use. The only acceptable values are
NONEorKMS. The default value isNONE.latefinal -
enforceConsumerDeletion
↔ Output<
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.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kmsKeyId
↔ Output<
String?> -
The identifier for the customer-managed KMS key to use for encryption. This can be a Key ID (UUID), a Key ARN, an Alias Name (prefixed with
alias/), or an Alias ARN. You can also use a master key owned by Kinesis Data Streams by specifying the aliasaws/kinesis.latefinal -
maxRecordSizeInKib
↔ Output<
int> -
The maximum size for a single data record in KiB. The minimum value is 1024. The maximum value is 10240.
latefinal
-
name
↔ Output<
String> -
A name to identify the stream. This is unique to the AWS account and region the Stream is created in.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
retentionPeriod
↔ Output<
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 8760 hours. Minimum value is 24. Default is 24.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
The number of shards that the stream will use. If the
streamModeisPROVISIONED, 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.latefinal -
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.
latefinal
-
streamModeDetails
↔ Output<
StreamStreamModeDetails> -
Indicates the capacity mode of the data stream. Detailed below.
latefinal
-
A map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
warmThroughputMibPs
↔ Output<
int?> -
Target warm throughput in MB/s that the stream should be scaled to handle.
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited