UNPKG

@pulumi/aws

Version:

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

143 lines (142 loc) 6.32 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a DynamoDB table item resource * * > **Note:** This resource is not meant to be used for managing large amounts of data in your table, it is not designed to scale. * You should perform **regular backups** of all data in the table, see [AWS docs for more](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/BackupRestore.html). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const exampleTable = new aws.dynamodb.Table("example", { * name: "example-name", * readCapacity: 10, * writeCapacity: 10, * hashKey: "exampleHashKey", * attributes: [{ * name: "exampleHashKey", * type: "S", * }], * }); * const example = new aws.dynamodb.TableItem("example", { * tableName: exampleTable.name, * hashKey: exampleTable.hashKey, * item: `{ * "exampleHashKey": {"S": "something"}, * "one": {"N": "11111"}, * "two": {"N": "22222"}, * "three": {"N": "33333"}, * "four": {"N": "44444"} * } * `, * }); * ``` * * ## Import * * You cannot import DynamoDB table items. */ export declare class TableItem extends pulumi.CustomResource { /** * Get an existing TableItem 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: string, id: pulumi.Input<pulumi.ID>, state?: TableItemState, opts?: pulumi.CustomResourceOptions): TableItem; /** * Returns true if the given object is an instance of TableItem. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is TableItem; /** * Hash key to use for lookups and identification of the item */ readonly hashKey: pulumi.Output<string>; /** * JSON representation of a map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item. */ readonly item: pulumi.Output<string>; /** * Range key to use for lookups and identification of the item. Required if there is range key defined in the table. */ readonly rangeKey: pulumi.Output<string | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * Name of the table to contain the item. * * > **Note:** Names included in `item` are represented internally with everything but letters removed. There is the possibility of collisions if two names, once filtered, are the same. For example, the names `your-name-here` and `yournamehere` will overlap and cause an error. */ readonly tableName: pulumi.Output<string>; /** * Create a TableItem resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: TableItemArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering TableItem resources. */ export interface TableItemState { /** * Hash key to use for lookups and identification of the item */ hashKey?: pulumi.Input<string>; /** * JSON representation of a map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item. */ item?: pulumi.Input<string>; /** * Range key to use for lookups and identification of the item. Required if there is range key defined in the table. */ rangeKey?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * Name of the table to contain the item. * * > **Note:** Names included in `item` are represented internally with everything but letters removed. There is the possibility of collisions if two names, once filtered, are the same. For example, the names `your-name-here` and `yournamehere` will overlap and cause an error. */ tableName?: pulumi.Input<string>; } /** * The set of arguments for constructing a TableItem resource. */ export interface TableItemArgs { /** * Hash key to use for lookups and identification of the item */ hashKey: pulumi.Input<string>; /** * JSON representation of a map of attribute name/value pairs, one for each attribute. Only the primary key attributes are required; you can optionally provide other attribute name-value pairs for the item. */ item: pulumi.Input<string>; /** * Range key to use for lookups and identification of the item. Required if there is range key defined in the table. */ rangeKey?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * Name of the table to contain the item. * * > **Note:** Names included in `item` are represented internally with everything but letters removed. There is the possibility of collisions if two names, once filtered, are the same. For example, the names `your-name-here` and `yournamehere` will overlap and cause an error. */ tableName: pulumi.Input<string>; }