Package com.pulumi.aws.kinesis
Class Stream
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.kinesis.Stream
-
public class Stream extends com.pulumi.resources.CustomResourceProvides 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](https://aws.amazon.com/documentation/kinesis/). ## Example Usage ### On-Demand Mode
### Provisioned Modepackage 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("ON_DEMAND") .build()) .name("kinesis-test") .retentionPeriod(48) .shardLevelMetrics( "IncomingBytes", "OutgoingBytes") .tags(Map.of("Environment", "test")) .build()); } }
## 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: ```sh $ pulumi import aws:kinesis/stream:Stream example example-stream ```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()); } }
-
-
Constructor Summary
Constructors Constructor Description Stream(java.lang.String name)Stream(java.lang.String name, StreamArgs args)Stream(java.lang.String name, StreamArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>encryptionType()com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>enforceConsumerDeletion()static Streamget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, StreamState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.String>>kmsKeyId()com.pulumi.core.Output<java.lang.Integer>maxRecordSizeInKib()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>retentionPeriod()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>shardCount()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>shardLevelMetrics()com.pulumi.core.Output<StreamStreamModeDetails>streamModeDetails()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>warmThroughputMibPs()
-
-
-
Constructor Detail
-
Stream
public Stream(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Stream
public Stream(java.lang.String name, @Nullable StreamArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Stream
public Stream(java.lang.String name, @Nullable StreamArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN specifying the stream (same as `id`).
-
encryptionType
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> encryptionType()
- Returns:
- Encryption type to use. The only acceptable values are `NONE` or `KMS`. The default value is `NONE`.
-
enforceConsumerDeletion
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> enforceConsumerDeletion()
- Returns:
- Whether to deregister all registered consumers from the stream so that the stream can be destroyed without error. The default value is `false`.
-
kmsKeyId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> kmsKeyId()
- Returns:
- 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 alias `aws/kinesis`.
-
maxRecordSizeInKib
public com.pulumi.core.Output<java.lang.Integer> maxRecordSizeInKib()
- Returns:
- Maximum size for a single data record in KiB. The minimum value is 1024. The maximum value is 10240.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name to identify the stream. This is unique to the AWS account and region the Stream is created in.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
retentionPeriod
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> retentionPeriod()
- Returns:
- 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.
-
shardCount
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> shardCount()
- Returns:
- Number of shards that the stream will use. If the `streamMode` 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](https://docs.aws.amazon.com/kinesis/latest/dev/amazon-kinesis-streams.html) for more.
-
shardLevelMetrics
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> shardLevelMetrics()
- Returns:
- List of shard-level CloudWatch metrics which can be enabled for the stream. See [Monitoring with CloudWatch](https://docs.aws.amazon.com/streams/latest/dev/monitoring-with-cloudwatch.html) for more. Note that the value ALL should not be used; instead you should provide an explicit list of metrics you wish to enable.
-
streamModeDetails
public com.pulumi.core.Output<StreamStreamModeDetails> streamModeDetails()
- Returns:
- [Capacity mode](https://docs.aws.amazon.com/streams/latest/dev/how-do-i-size-a-stream.html) of the data stream. Detailed below.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
warmThroughputMibPs
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> warmThroughputMibPs()
- Returns:
- Target warm throughput in MB/s that the stream should be scaled to handle.
-
get
public static Stream get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable StreamState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-