@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
97 lines • 4.17 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.KinesisStreamingDestination = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Enables a [Kinesis streaming destination](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/kds.html) for data replication of a DynamoDB table.
*
* ## Example Usage
*
* ```typescript
* 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,
* approximateCreationDateTimePrecision: "MICROSECOND",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import DynamoDB Kinesis Streaming Destinations using the `table_name` and `stream_arn` separated by `,`. For example:
*
* ```sh
* $ pulumi import aws:dynamodb/kinesisStreamingDestination:KinesisStreamingDestination example example,arn:aws:kinesis:us-east-1:111122223333:exampleStreamName
* ```
*/
class KinesisStreamingDestination extends pulumi.CustomResource {
/**
* Get an existing KinesisStreamingDestination resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new KinesisStreamingDestination(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of KinesisStreamingDestination. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === KinesisStreamingDestination.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["approximateCreationDateTimePrecision"] = state?.approximateCreationDateTimePrecision;
resourceInputs["region"] = state?.region;
resourceInputs["streamArn"] = state?.streamArn;
resourceInputs["tableName"] = state?.tableName;
}
else {
const args = argsOrState;
if (args?.streamArn === undefined && !opts.urn) {
throw new Error("Missing required property 'streamArn'");
}
if (args?.tableName === undefined && !opts.urn) {
throw new Error("Missing required property 'tableName'");
}
resourceInputs["approximateCreationDateTimePrecision"] = args?.approximateCreationDateTimePrecision;
resourceInputs["region"] = args?.region;
resourceInputs["streamArn"] = args?.streamArn;
resourceInputs["tableName"] = args?.tableName;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(KinesisStreamingDestination.__pulumiType, name, resourceInputs, opts);
}
}
exports.KinesisStreamingDestination = KinesisStreamingDestination;
/** @internal */
KinesisStreamingDestination.__pulumiType = 'aws:dynamodb/kinesisStreamingDestination:KinesisStreamingDestination';
//# sourceMappingURL=kinesisStreamingDestination.js.map