UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

94 lines 4.15 kB
"use strict"; // *** 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.GlobalSecondaryIndex = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Import * * ### Identity Schema * * #### Required * * * `index_name` (String) Name of the index. * * * `table_name` (String) Name of the table this index belongs to. * * #### Optional * * * `account_id` (String) AWS Account where this resource is managed. * * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import DynamoDB tables using the `table_name` and `index_name`, separated by a comma. For example: * * % pulumi import aws_dynamodb_global_secondary_index.example 'example-table,example-index' */ class GlobalSecondaryIndex extends pulumi.CustomResource { /** * Get an existing GlobalSecondaryIndex 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 GlobalSecondaryIndex(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of GlobalSecondaryIndex. 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'] === GlobalSecondaryIndex.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["indexName"] = state?.indexName; resourceInputs["keySchemas"] = state?.keySchemas; resourceInputs["onDemandThroughput"] = state?.onDemandThroughput; resourceInputs["projection"] = state?.projection; resourceInputs["provisionedThroughput"] = state?.provisionedThroughput; resourceInputs["region"] = state?.region; resourceInputs["tableName"] = state?.tableName; resourceInputs["timeouts"] = state?.timeouts; resourceInputs["warmThroughput"] = state?.warmThroughput; } else { const args = argsOrState; if (args?.indexName === undefined && !opts.urn) { throw new Error("Missing required property 'indexName'"); } if (args?.tableName === undefined && !opts.urn) { throw new Error("Missing required property 'tableName'"); } resourceInputs["indexName"] = args?.indexName; resourceInputs["keySchemas"] = args?.keySchemas; resourceInputs["onDemandThroughput"] = args?.onDemandThroughput; resourceInputs["projection"] = args?.projection; resourceInputs["provisionedThroughput"] = args?.provisionedThroughput; resourceInputs["region"] = args?.region; resourceInputs["tableName"] = args?.tableName; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["warmThroughput"] = args?.warmThroughput; resourceInputs["arn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(GlobalSecondaryIndex.__pulumiType, name, resourceInputs, opts); } } exports.GlobalSecondaryIndex = GlobalSecondaryIndex; /** @internal */ GlobalSecondaryIndex.__pulumiType = 'aws:dynamodb/globalSecondaryIndex:GlobalSecondaryIndex'; //# sourceMappingURL=globalSecondaryIndex.js.map