KinesisStreamingDestination class

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", {
    attributes: [{
        name: "id",
        type: "S",
    }],
    name: "orders",
    hashKey: "id",
});
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,
    approximateCreationDateTimePrecision: "MICROSECOND",
});
import pulumi
import pulumi_aws as aws

example = aws.dynamodb.Table("example",
    attributes=[{
        "name": "id",
        "type": "S",
    }],
    name="orders",
    hash_key="id")
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,
    approximate_creation_date_time_precision="MICROSECOND")
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()
    {
        Attributes = new[]
        {
            new Aws.DynamoDB.Inputs.TableAttributeArgs
            {
                Name = "id",
                Type = "S",
            },
        },
        Name = "orders",
        HashKey = "id",
    });

    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,
        ApproximateCreationDateTimePrecision = "MICROSECOND",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/dynamodb"
	"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 {
		example, err := dynamodb.NewTable(ctx, "example", &dynamodb.TableArgs{
			Attributes: dynamodb.TableAttributeArray{
				&dynamodb.TableAttributeArgs{
					Name: pulumi.String("id"),
					Type: pulumi.String("S"),
				},
			},
			Name:    pulumi.String("orders"),
			HashKey: pulumi.String("id"),
		})
		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,
			ApproximateCreationDateTimePrecision: pulumi.String("MICROSECOND"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_dynamodb_table" "example" {
  attributes {
    name = "id"
    type = "S"
  }
  name     = "orders"
  hash_key = "id"
}
resource "aws_kinesis_stream" "example" {
  name        = "order_item_changes"
  shard_count = 1
}
resource "aws_dynamodb_kinesisstreamingdestination" "example" {
  stream_arn                               = aws_kinesis_stream.example.arn
  table_name                               = aws_dynamodb_table.example.name
  approximate_creation_date_time_precision = "MICROSECOND"
}
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.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 example = new Table("example", TableArgs.builder()
            .attributes(TableAttributeArgs.builder()
                .name("id")
                .type("S")
                .build())
            .name("orders")
            .hashKey("id")
            .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())
            .approximateCreationDateTimePrecision("MICROSECOND")
            .build());

    }
}
resources:
  example:
    type: aws:dynamodb:Table
    properties:
      attributes:
        - name: id
          type: S
      name: orders
      hashKey: id
  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}
      approximateCreationDateTimePrecision: MICROSECOND

Import

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

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

Constructors

KinesisStreamingDestination(String name, {KinesisStreamingDestinationArgs? args, CustomResourceOptions? options})
Creates a new KinesisStreamingDestination. name The Pulumi resource name. args Arguments used to configure this KinesisStreamingDestination. The set of arguments for KinesisStreamingDestination. options Resource options controlling this resource's behavior.
KinesisStreamingDestination.reference(String urn)
Creates a typed reference to an existing KinesisStreamingDestination resource.

Properties

approximateCreationDateTimePrecision ↔ Output<String>
Toggle for the precision of Kinesis data stream timestamp. Valid values: MILLISECOND and MICROSECOND.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
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
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
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
streamArn ↔ Output<String>
The ARN for a Kinesis data stream. This must exist in the same account and region as the DynamoDB table.
latefinal
tableName ↔ Output<String>
The name of the DynamoDB table. There can only be one Kinesis streaming destination for a given DynamoDB table.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

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

Static Methods

get(String name, Input<String> id, {KinesisStreamingDestinationState? state, CustomResourceOptions? options}) → KinesisStreamingDestination
Gets an existing KinesisStreamingDestination resource's state with the given name and id.