AWS Classic

v5.16.2 published on Tuesday, Oct 4, 2022 by Pulumi

StreamConsumer

Provides a resource to manage a Kinesis Stream Consumer.

Note: You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time.

For more details, see the Amazon Kinesis Stream Consumer Documentation.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var exampleStream = new Aws.Kinesis.Stream("exampleStream", new()
    {
        ShardCount = 1,
    });

    var exampleStreamConsumer = new Aws.Kinesis.StreamConsumer("exampleStreamConsumer", new()
    {
        StreamArn = exampleStream.Arn,
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleStream, err := kinesis.NewStream(ctx, "exampleStream", &kinesis.StreamArgs{
			ShardCount: pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_, err = kinesis.NewStreamConsumer(ctx, "exampleStreamConsumer", &kinesis.StreamConsumerArgs{
			StreamArn: exampleStream.Arn,
		})
		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.StreamConsumer;
import com.pulumi.aws.kinesis.StreamConsumerArgs;
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 exampleStream = new Stream("exampleStream", StreamArgs.builder()        
            .shardCount(1)
            .build());

        var exampleStreamConsumer = new StreamConsumer("exampleStreamConsumer", StreamConsumerArgs.builder()        
            .streamArn(exampleStream.arn())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example_stream = aws.kinesis.Stream("exampleStream", shard_count=1)
example_stream_consumer = aws.kinesis.StreamConsumer("exampleStreamConsumer", stream_arn=example_stream.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleStream = new aws.kinesis.Stream("exampleStream", {shardCount: 1});
const exampleStreamConsumer = new aws.kinesis.StreamConsumer("exampleStreamConsumer", {streamArn: exampleStream.arn});
resources:
  exampleStream:
    type: aws:kinesis:Stream
    properties:
      shardCount: 1
  exampleStreamConsumer:
    type: aws:kinesis:StreamConsumer
    properties:
      streamArn: ${exampleStream.arn}

Create a StreamConsumer Resource

new StreamConsumer(name: string, args: StreamConsumerArgs, opts?: CustomResourceOptions);
@overload
def StreamConsumer(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   name: Optional[str] = None,
                   stream_arn: Optional[str] = None)
@overload
def StreamConsumer(resource_name: str,
                   args: StreamConsumerArgs,
                   opts: Optional[ResourceOptions] = None)
func NewStreamConsumer(ctx *Context, name string, args StreamConsumerArgs, opts ...ResourceOption) (*StreamConsumer, error)
public StreamConsumer(string name, StreamConsumerArgs args, CustomResourceOptions? opts = null)
public StreamConsumer(String name, StreamConsumerArgs args)
public StreamConsumer(String name, StreamConsumerArgs args, CustomResourceOptions options)
type: aws:kinesis:StreamConsumer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args StreamConsumerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args StreamConsumerArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args StreamConsumerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args StreamConsumerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args StreamConsumerArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

StreamConsumer Resource Properties

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

Inputs

The StreamConsumer resource accepts the following input properties:

StreamArn string

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

Name string

Name of the stream consumer.

StreamArn string

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

Name string

Name of the stream consumer.

streamArn String

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

name String

Name of the stream consumer.

streamArn string

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

name string

Name of the stream consumer.

stream_arn str

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

name str

Name of the stream consumer.

streamArn String

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

name String

Name of the stream consumer.

Outputs

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

Arn string

Amazon Resource Name (ARN) of the stream consumer.

CreationTimestamp string

Approximate timestamp in RFC3339 format of when the stream consumer was created.

Id string

The provider-assigned unique ID for this managed resource.

Arn string

Amazon Resource Name (ARN) of the stream consumer.

CreationTimestamp string

Approximate timestamp in RFC3339 format of when the stream consumer was created.

Id string

The provider-assigned unique ID for this managed resource.

arn String

Amazon Resource Name (ARN) of the stream consumer.

creationTimestamp String

Approximate timestamp in RFC3339 format of when the stream consumer was created.

id String

The provider-assigned unique ID for this managed resource.

arn string

Amazon Resource Name (ARN) of the stream consumer.

creationTimestamp string

Approximate timestamp in RFC3339 format of when the stream consumer was created.

id string

The provider-assigned unique ID for this managed resource.

arn str

Amazon Resource Name (ARN) of the stream consumer.

creation_timestamp str

Approximate timestamp in RFC3339 format of when the stream consumer was created.

id str

The provider-assigned unique ID for this managed resource.

arn String

Amazon Resource Name (ARN) of the stream consumer.

creationTimestamp String

Approximate timestamp in RFC3339 format of when the stream consumer was created.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing StreamConsumer Resource

Get an existing StreamConsumer 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?: StreamConsumerState, opts?: CustomResourceOptions): StreamConsumer
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        creation_timestamp: Optional[str] = None,
        name: Optional[str] = None,
        stream_arn: Optional[str] = None) -> StreamConsumer
func GetStreamConsumer(ctx *Context, name string, id IDInput, state *StreamConsumerState, opts ...ResourceOption) (*StreamConsumer, error)
public static StreamConsumer Get(string name, Input<string> id, StreamConsumerState? state, CustomResourceOptions? opts = null)
public static StreamConsumer get(String name, Output<String> id, StreamConsumerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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

Amazon Resource Name (ARN) of the stream consumer.

CreationTimestamp string

Approximate timestamp in RFC3339 format of when the stream consumer was created.

Name string

Name of the stream consumer.

StreamArn string

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

Arn string

Amazon Resource Name (ARN) of the stream consumer.

CreationTimestamp string

Approximate timestamp in RFC3339 format of when the stream consumer was created.

Name string

Name of the stream consumer.

StreamArn string

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

arn String

Amazon Resource Name (ARN) of the stream consumer.

creationTimestamp String

Approximate timestamp in RFC3339 format of when the stream consumer was created.

name String

Name of the stream consumer.

streamArn String

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

arn string

Amazon Resource Name (ARN) of the stream consumer.

creationTimestamp string

Approximate timestamp in RFC3339 format of when the stream consumer was created.

name string

Name of the stream consumer.

streamArn string

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

arn str

Amazon Resource Name (ARN) of the stream consumer.

creation_timestamp str

Approximate timestamp in RFC3339 format of when the stream consumer was created.

name str

Name of the stream consumer.

stream_arn str

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

arn String

Amazon Resource Name (ARN) of the stream consumer.

creationTimestamp String

Approximate timestamp in RFC3339 format of when the stream consumer was created.

name String

Name of the stream consumer.

streamArn String

Amazon Resource Name (ARN) of the data stream the consumer is registered with.

Import

Kinesis Stream Consumers can be imported using the Amazon Resource Name (ARN) e.g.,

 $ pulumi import aws:kinesis/streamConsumer:StreamConsumer example arn:aws:kinesis:us-west-2:123456789012:stream/example/consumer/example:1616044553

[1]https://docs.aws.amazon.com/streams/latest/dev/amazon-kinesis-consumers.html

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.