1. Packages
  2. AWS Classic
  3. API Docs
  4. dynamodb
  5. KinesisStreamingDestination

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.dynamodb.KinesisStreamingDestination

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Enables a Kinesis streaming destination for data replication of a DynamoDB table.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.dynamodb.Table("example", {
        name: "orders",
        hashKey: "id",
        attributes: [{
            name: "id",
            type: "S",
        }],
    });
    const exampleStream = new aws.kinesis.Stream("example", {
        name: "order_item_changes",
        shardCount: 1,
    });
    const exampleKinesisStreamingDestination = new aws.dynamodb.KinesisStreamingDestination("example", {
        streamArn: exampleStream.arn,
        tableName: example.name,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.dynamodb.Table("example",
        name="orders",
        hash_key="id",
        attributes=[{
            "name": "id",
            "type": "S",
        }])
    example_stream = aws.kinesis.Stream("example",
        name="order_item_changes",
        shard_count=1)
    example_kinesis_streaming_destination = aws.dynamodb.KinesisStreamingDestination("example",
        stream_arn=example_stream.arn,
        table_name=example.name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb"
    	"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 := dynamodb.NewTable(ctx, "example", &dynamodb.TableArgs{
    			Name:    pulumi.String("orders"),
    			HashKey: pulumi.String("id"),
    			Attributes: dynamodb.TableAttributeArray{
    				&dynamodb.TableAttributeArgs{
    					Name: pulumi.String("id"),
    					Type: pulumi.String("S"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleStream, err := kinesis.NewStream(ctx, "example", &kinesis.StreamArgs{
    			Name:       pulumi.String("order_item_changes"),
    			ShardCount: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dynamodb.NewKinesisStreamingDestination(ctx, "example", &dynamodb.KinesisStreamingDestinationArgs{
    			StreamArn: exampleStream.Arn,
    			TableName: example.Name,
    		})
    		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.DynamoDB.Table("example", new()
        {
            Name = "orders",
            HashKey = "id",
            Attributes = new[]
            {
                new Aws.DynamoDB.Inputs.TableAttributeArgs
                {
                    Name = "id",
                    Type = "S",
                },
            },
        });
    
        var exampleStream = new Aws.Kinesis.Stream("example", new()
        {
            Name = "order_item_changes",
            ShardCount = 1,
        });
    
        var exampleKinesisStreamingDestination = new Aws.DynamoDB.KinesisStreamingDestination("example", new()
        {
            StreamArn = exampleStream.Arn,
            TableName = example.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.dynamodb.Table;
    import com.pulumi.aws.dynamodb.TableArgs;
    import com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;
    import com.pulumi.aws.kinesis.Stream;
    import com.pulumi.aws.kinesis.StreamArgs;
    import com.pulumi.aws.dynamodb.KinesisStreamingDestination;
    import com.pulumi.aws.dynamodb.KinesisStreamingDestinationArgs;
    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 Table("example", TableArgs.builder()
                .name("orders")
                .hashKey("id")
                .attributes(TableAttributeArgs.builder()
                    .name("id")
                    .type("S")
                    .build())
                .build());
    
            var exampleStream = new Stream("exampleStream", StreamArgs.builder()
                .name("order_item_changes")
                .shardCount(1)
                .build());
    
            var exampleKinesisStreamingDestination = new KinesisStreamingDestination("exampleKinesisStreamingDestination", KinesisStreamingDestinationArgs.builder()
                .streamArn(exampleStream.arn())
                .tableName(example.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:dynamodb:Table
        properties:
          name: orders
          hashKey: id
          attributes:
            - name: id
              type: S
      exampleStream:
        type: aws:kinesis:Stream
        name: example
        properties:
          name: order_item_changes
          shardCount: 1
      exampleKinesisStreamingDestination:
        type: aws:dynamodb:KinesisStreamingDestination
        name: example
        properties:
          streamArn: ${exampleStream.arn}
          tableName: ${example.name}
    

    Create KinesisStreamingDestination Resource

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

    Constructor syntax

    new KinesisStreamingDestination(name: string, args: KinesisStreamingDestinationArgs, opts?: CustomResourceOptions);
    @overload
    def KinesisStreamingDestination(resource_name: str,
                                    args: KinesisStreamingDestinationArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def KinesisStreamingDestination(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    stream_arn: Optional[str] = None,
                                    table_name: Optional[str] = None)
    func NewKinesisStreamingDestination(ctx *Context, name string, args KinesisStreamingDestinationArgs, opts ...ResourceOption) (*KinesisStreamingDestination, error)
    public KinesisStreamingDestination(string name, KinesisStreamingDestinationArgs args, CustomResourceOptions? opts = null)
    public KinesisStreamingDestination(String name, KinesisStreamingDestinationArgs args)
    public KinesisStreamingDestination(String name, KinesisStreamingDestinationArgs args, CustomResourceOptions options)
    
    type: aws:dynamodb:KinesisStreamingDestination
    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 KinesisStreamingDestinationArgs
    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 KinesisStreamingDestinationArgs
    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 KinesisStreamingDestinationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args KinesisStreamingDestinationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args KinesisStreamingDestinationArgs
    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 kinesisStreamingDestinationResource = new Aws.DynamoDB.KinesisStreamingDestination("kinesisStreamingDestinationResource", new()
    {
        StreamArn = "string",
        TableName = "string",
    });
    
    example, err := dynamodb.NewKinesisStreamingDestination(ctx, "kinesisStreamingDestinationResource", &dynamodb.KinesisStreamingDestinationArgs{
    	StreamArn: pulumi.String("string"),
    	TableName: pulumi.String("string"),
    })
    
    var kinesisStreamingDestinationResource = new KinesisStreamingDestination("kinesisStreamingDestinationResource", KinesisStreamingDestinationArgs.builder()
        .streamArn("string")
        .tableName("string")
        .build());
    
    kinesis_streaming_destination_resource = aws.dynamodb.KinesisStreamingDestination("kinesisStreamingDestinationResource",
        stream_arn="string",
        table_name="string")
    
    const kinesisStreamingDestinationResource = new aws.dynamodb.KinesisStreamingDestination("kinesisStreamingDestinationResource", {
        streamArn: "string",
        tableName: "string",
    });
    
    type: aws:dynamodb:KinesisStreamingDestination
    properties:
        streamArn: string
        tableName: string
    

    KinesisStreamingDestination 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 KinesisStreamingDestination resource accepts the following input properties:

    StreamArn string
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    TableName string
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    StreamArn string
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    TableName string
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    streamArn String
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    tableName String
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    streamArn string
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    tableName string
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    stream_arn str
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    table_name str
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    streamArn String
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    tableName String
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing KinesisStreamingDestination Resource

    Get an existing KinesisStreamingDestination 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?: KinesisStreamingDestinationState, opts?: CustomResourceOptions): KinesisStreamingDestination
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            stream_arn: Optional[str] = None,
            table_name: Optional[str] = None) -> KinesisStreamingDestination
    func GetKinesisStreamingDestination(ctx *Context, name string, id IDInput, state *KinesisStreamingDestinationState, opts ...ResourceOption) (*KinesisStreamingDestination, error)
    public static KinesisStreamingDestination Get(string name, Input<string> id, KinesisStreamingDestinationState? state, CustomResourceOptions? opts = null)
    public static KinesisStreamingDestination get(String name, Output<String> id, KinesisStreamingDestinationState 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:
    StreamArn string
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    TableName string
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    StreamArn string
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    TableName string
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    streamArn String
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    tableName String
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    streamArn string
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    tableName string
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    stream_arn str
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    table_name str
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
    streamArn String
    The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
    tableName String
    The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.

    Import

    Using pulumi import, import DynamoDB Kinesis Streaming Destinations using the table_name and stream_arn separated by ,. For example:

    $ pulumi import aws:dynamodb/kinesisStreamingDestination:KinesisStreamingDestination example example,arn:aws:kinesis:us-east-1:111122223333:exampleStreamName
    

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi