UNPKG

@pulumi/aws

Version:

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

118 lines 5.61 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.Table = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a Keyspaces Table. * * More information about Keyspaces tables can be found in the [Keyspaces Developer Guide](https://docs.aws.amazon.com/keyspaces/latest/devguide/working-with-tables.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.keyspaces.Table("example", { * keyspaceName: exampleAwsKeyspacesKeyspace.name, * tableName: "my_table", * schemaDefinition: { * columns: [{ * name: "Message", * type: "ASCII", * }], * partitionKeys: [{ * name: "Message", * }], * }, * }); * ``` * * ## Import * * Using `pulumi import`, import a table using the `keyspace_name` and `table_name` separated by `/`. For example: * * ```sh * $ pulumi import aws:keyspaces/table:Table example my_keyspace/my_table * ``` */ class Table extends pulumi.CustomResource { /** * Get an existing Table 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 Table(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Table. 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'] === Table.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["capacitySpecification"] = state ? state.capacitySpecification : undefined; resourceInputs["clientSideTimestamps"] = state ? state.clientSideTimestamps : undefined; resourceInputs["comment"] = state ? state.comment : undefined; resourceInputs["defaultTimeToLive"] = state ? state.defaultTimeToLive : undefined; resourceInputs["encryptionSpecification"] = state ? state.encryptionSpecification : undefined; resourceInputs["keyspaceName"] = state ? state.keyspaceName : undefined; resourceInputs["pointInTimeRecovery"] = state ? state.pointInTimeRecovery : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["schemaDefinition"] = state ? state.schemaDefinition : undefined; resourceInputs["tableName"] = state ? state.tableName : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["ttl"] = state ? state.ttl : undefined; } else { const args = argsOrState; if ((!args || args.keyspaceName === undefined) && !opts.urn) { throw new Error("Missing required property 'keyspaceName'"); } if ((!args || args.schemaDefinition === undefined) && !opts.urn) { throw new Error("Missing required property 'schemaDefinition'"); } if ((!args || args.tableName === undefined) && !opts.urn) { throw new Error("Missing required property 'tableName'"); } resourceInputs["capacitySpecification"] = args ? args.capacitySpecification : undefined; resourceInputs["clientSideTimestamps"] = args ? args.clientSideTimestamps : undefined; resourceInputs["comment"] = args ? args.comment : undefined; resourceInputs["defaultTimeToLive"] = args ? args.defaultTimeToLive : undefined; resourceInputs["encryptionSpecification"] = args ? args.encryptionSpecification : undefined; resourceInputs["keyspaceName"] = args ? args.keyspaceName : undefined; resourceInputs["pointInTimeRecovery"] = args ? args.pointInTimeRecovery : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["schemaDefinition"] = args ? args.schemaDefinition : undefined; resourceInputs["tableName"] = args ? args.tableName : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["ttl"] = args ? args.ttl : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Table.__pulumiType, name, resourceInputs, opts); } } exports.Table = Table; /** @internal */ Table.__pulumiType = 'aws:keyspaces/table:Table'; //# sourceMappingURL=table.js.map