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", { * attributes: [{ * name: "exampleHashKey", * type: "S", * }], * name: "example-name", * readCapacity: 10, * writeCapacity: 10, * hashKey: "exampleHashKey", * }); * 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 * * ### Identity Schema * * #### Required * * * `tableName` (String) Name of the DynamoDB table. * * `hashKeyValue` (String) Canonical value of the hash key (base64 for `B`, verbatim for `N` and `S`). * * #### Optional * * * `rangeKeyValue` (String) Canonical value of the range key, required for tables that define a range key. * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * For tables with a range key, append the range key value: * * Use `pulumi import` for the same effect on the command line: * * ```sh * $ pulumi import aws:dynamodb/tableItem:TableItem example example-name,something * ``` * * > **Note:** Importing requires `dynamodb:DescribeTable` in addition to `dynamodb:GetItem`. The DescribeTable call is used to recover the key attribute names and types from the table's schema. * * > **Note:** If a hash key or range key value contains the separator character (`,`), use the `import` block with the `identity` attribute. The legacy `pulumi import` command and `id`-based `import` block cannot disambiguate separators from value content. * * For Binary (`B`) key attributes, the value in the import ID and the identity attribute must be standard base64. */ 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, 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; /** * Canonical string representation of the hash key value. Binary values are base64-encoded; numbers and strings are taken verbatim. */ readonly hashKeyValue: pulumi.Output; /** * 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; /** * 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; /** * Canonical string representation of the range key value, when the table has a range key. Same encoding as `hashKeyValue`. */ readonly rangeKeyValue: pulumi.Output; /** * 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; /** * Name or ARN 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; /** * 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; /** * Canonical string representation of the hash key value. Binary values are base64-encoded; numbers and strings are taken verbatim. */ hashKeyValue?: pulumi.Input; /** * 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; /** * Range key to use for lookups and identification of the item. Required if there is range key defined in the table. */ rangeKey?: pulumi.Input; /** * Canonical string representation of the range key value, when the table has a range key. Same encoding as `hashKeyValue`. */ rangeKeyValue?: pulumi.Input; /** * 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; /** * Name or ARN 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; } /** * 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; /** * 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; /** * Range key to use for lookups and identification of the item. Required if there is range key defined in the table. */ rangeKey?: pulumi.Input; /** * 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; /** * Name or ARN 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; } //# sourceMappingURL=tableItem.d.ts.map