1. Packages
  2. AWS
  3. API Docs
  4. kinesis
  5. StreamConsumer
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.kinesis.StreamConsumer

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.kinesis.Stream("example", {
        name: "example-stream",
        shardCount: 1,
    });
    const exampleStreamConsumer = new aws.kinesis.StreamConsumer("example", {
        name: "example-consumer",
        streamArn: example.arn,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.kinesis.Stream("example",
        name="example-stream",
        shard_count=1)
    example_stream_consumer = aws.kinesis.StreamConsumer("example",
        name="example-consumer",
        stream_arn=example.arn)
    
    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 {
    		example, err := kinesis.NewStream(ctx, "example", &kinesis.StreamArgs{
    			Name:       pulumi.String("example-stream"),
    			ShardCount: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = kinesis.NewStreamConsumer(ctx, "example", &kinesis.StreamConsumerArgs{
    			Name:      pulumi.String("example-consumer"),
    			StreamArn: example.Arn,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Kinesis.Stream("example", new()
        {
            Name = "example-stream",
            ShardCount = 1,
        });
    
        var exampleStreamConsumer = new Aws.Kinesis.StreamConsumer("example", new()
        {
            Name = "example-consumer",
            StreamArn = example.Arn,
        });
    
    });
    
    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 example = new Stream("example", StreamArgs.builder()
                .name("example-stream")
                .shardCount(1)
                .build());
    
            var exampleStreamConsumer = new StreamConsumer("exampleStreamConsumer", StreamConsumerArgs.builder()
                .name("example-consumer")
                .streamArn(example.arn())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:kinesis:Stream
        properties:
          name: example-stream
          shardCount: 1
      exampleStreamConsumer:
        type: aws:kinesis:StreamConsumer
        name: example
        properties:
          name: example-consumer
          streamArn: ${example.arn}
    

    Create StreamConsumer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new StreamConsumer(name: string, args: StreamConsumerArgs, opts?: CustomResourceOptions);
    @overload
    def StreamConsumer(resource_name: str,
                       args: StreamConsumerArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def StreamConsumer(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       stream_arn: Optional[str] = None,
                       name: Optional[str] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var streamConsumerResource = new Aws.Kinesis.StreamConsumer("streamConsumerResource", new()
    {
        StreamArn = "string",
        Name = "string",
    });
    
    example, err := kinesis.NewStreamConsumer(ctx, "streamConsumerResource", &kinesis.StreamConsumerArgs{
    	StreamArn: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    })
    
    var streamConsumerResource = new StreamConsumer("streamConsumerResource", StreamConsumerArgs.builder()
        .streamArn("string")
        .name("string")
        .build());
    
    stream_consumer_resource = aws.kinesis.StreamConsumer("streamConsumerResource",
        stream_arn="string",
        name="string")
    
    const streamConsumerResource = new aws.kinesis.StreamConsumer("streamConsumerResource", {
        streamArn: "string",
        name: "string",
    });
    
    type: aws:kinesis:StreamConsumer
    properties:
        name: string
        streamArn: string
    

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    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 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

    Using pulumi import, import Kinesis Stream Consumers using the Amazon Resource Name (ARN). For example:

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi