@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
78 lines • 3.22 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.ContributorInsights = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a DynamoDB contributor insights resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.dynamodb.ContributorInsights("test", {tableName: "ExampleTableName"});
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_dynamodb_contributor_insights` using the format `name:table_name/index:index_name`, followed by the account number. For example:
*
* ```sh
* $ pulumi import aws:dynamodb/contributorInsights:ContributorInsights test name:ExampleTableName/index:ExampleIndexName/123456789012
* ```
*/
class ContributorInsights extends pulumi.CustomResource {
/**
* Get an existing ContributorInsights 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 ContributorInsights(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ContributorInsights. 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'] === ContributorInsights.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["indexName"] = state?.indexName;
resourceInputs["mode"] = state?.mode;
resourceInputs["region"] = state?.region;
resourceInputs["tableName"] = state?.tableName;
}
else {
const args = argsOrState;
if (args?.tableName === undefined && !opts.urn) {
throw new Error("Missing required property 'tableName'");
}
resourceInputs["indexName"] = args?.indexName;
resourceInputs["mode"] = args?.mode;
resourceInputs["region"] = args?.region;
resourceInputs["tableName"] = args?.tableName;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ContributorInsights.__pulumiType, name, resourceInputs, opts);
}
}
exports.ContributorInsights = ContributorInsights;
/** @internal */
ContributorInsights.__pulumiType = 'aws:dynamodb/contributorInsights:ContributorInsights';
//# sourceMappingURL=contributorInsights.js.map