UNPKG

@pulumi/aws

Version:

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

118 lines 5.07 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, { ...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?.arn; resourceInputs["capacitySpecification"] = state?.capacitySpecification; resourceInputs["clientSideTimestamps"] = state?.clientSideTimestamps; resourceInputs["comment"] = state?.comment; resourceInputs["defaultTimeToLive"] = state?.defaultTimeToLive; resourceInputs["encryptionSpecification"] = state?.encryptionSpecification; resourceInputs["keyspaceName"] = state?.keyspaceName; resourceInputs["pointInTimeRecovery"] = state?.pointInTimeRecovery; resourceInputs["region"] = state?.region; resourceInputs["schemaDefinition"] = state?.schemaDefinition; resourceInputs["tableName"] = state?.tableName; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["ttl"] = state?.ttl; } else { const args = argsOrState; if (args?.keyspaceName === undefined && !opts.urn) { throw new Error("Missing required property 'keyspaceName'"); } if (args?.schemaDefinition === undefined && !opts.urn) { throw new Error("Missing required property 'schemaDefinition'"); } if (args?.tableName === undefined && !opts.urn) { throw new Error("Missing required property 'tableName'"); } resourceInputs["capacitySpecification"] = args?.capacitySpecification; resourceInputs["clientSideTimestamps"] = args?.clientSideTimestamps; resourceInputs["comment"] = args?.comment; resourceInputs["defaultTimeToLive"] = args?.defaultTimeToLive; resourceInputs["encryptionSpecification"] = args?.encryptionSpecification; resourceInputs["keyspaceName"] = args?.keyspaceName; resourceInputs["pointInTimeRecovery"] = args?.pointInTimeRecovery; resourceInputs["region"] = args?.region; resourceInputs["schemaDefinition"] = args?.schemaDefinition; resourceInputs["tableName"] = args?.tableName; resourceInputs["tags"] = args?.tags; resourceInputs["ttl"] = args?.ttl; 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