TableItem

class TableItem : KotlinCustomResource

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.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dynamodb.Table;
import com.pulumi.aws.dynamodb.TableArgs;
import com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;
import com.pulumi.aws.dynamodb.TableItem;
import com.pulumi.aws.dynamodb.TableItemArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleTable = new Table("exampleTable", TableArgs.builder()
.readCapacity(10)
.writeCapacity(10)
.hashKey("exampleHashKey")
.attributes(TableAttributeArgs.builder()
.name("exampleHashKey")
.type("S")
.build())
.build());
var exampleTableItem = new TableItem("exampleTableItem", TableItemArgs.builder()
.tableName(exampleTable.name())
.hashKey(exampleTable.hashKey())
.item("""
{
"exampleHashKey": {"S": "something"},
"one": {"N": "11111"},
"two": {"N": "22222"},
"three": {"N": "33333"},
"four": {"N": "44444"}
}
""")
.build());
}
}

Import

DynamoDB table items cannot be imported.

Properties

Link copied to clipboard
val hashKey: Output<String>

Hash key to use for lookups and identification of the item

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val item: 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.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rangeKey: Output<String>?

Range key to use for lookups and identification of the item. Required if there is range key defined in the table.

Link copied to clipboard
val tableName: Output<String>

Name of the table to contain the item.

Link copied to clipboard
val urn: Output<String>