Table

Provides a DynamoDB table resource

Note: It is recommended to use ignoreChanges for read_capacity and/or write_capacity if there’s autoscaling policy attached to the table.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var basic_dynamodb_table = new Aws.DynamoDB.Table("basic-dynamodb-table", new Aws.DynamoDB.TableArgs
        {
            Attributes = 
            {
                new Aws.DynamoDB.Inputs.TableAttributeArgs
                {
                    Name = "UserId",
                    Type = "S",
                },
                new Aws.DynamoDB.Inputs.TableAttributeArgs
                {
                    Name = "GameTitle",
                    Type = "S",
                },
                new Aws.DynamoDB.Inputs.TableAttributeArgs
                {
                    Name = "TopScore",
                    Type = "N",
                },
            },
            BillingMode = "PROVISIONED",
            GlobalSecondaryIndexes = 
            {
                new Aws.DynamoDB.Inputs.TableGlobalSecondaryIndexArgs
                {
                    HashKey = "GameTitle",
                    Name = "GameTitleIndex",
                    NonKeyAttributes = 
                    {
                        "UserId",
                    },
                    ProjectionType = "INCLUDE",
                    RangeKey = "TopScore",
                    ReadCapacity = 10,
                    WriteCapacity = 10,
                },
            },
            HashKey = "UserId",
            RangeKey = "GameTitle",
            ReadCapacity = 20,
            Tags = 
            {
                { "Environment", "production" },
                { "Name", "dynamodb-table-1" },
            },
            Ttl = new Aws.DynamoDB.Inputs.TableTtlArgs
            {
                AttributeName = "TimeToExist",
                Enabled = false,
            },
            WriteCapacity = 20,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/dynamodb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := dynamodb.NewTable(ctx, "basic_dynamodb_table", &dynamodb.TableArgs{
            Attributes: dynamodb.TableAttributeArray{
                &dynamodb.TableAttributeArgs{
                    Name: pulumi.String("UserId"),
                    Type: pulumi.String("S"),
                },
                &dynamodb.TableAttributeArgs{
                    Name: pulumi.String("GameTitle"),
                    Type: pulumi.String("S"),
                },
                &dynamodb.TableAttributeArgs{
                    Name: pulumi.String("TopScore"),
                    Type: pulumi.String("N"),
                },
            },
            BillingMode: pulumi.String("PROVISIONED"),
            GlobalSecondaryIndexes: dynamodb.TableGlobalSecondaryIndexArray{
                &dynamodb.TableGlobalSecondaryIndexArgs{
                    HashKey: pulumi.String("GameTitle"),
                    Name:    pulumi.String("GameTitleIndex"),
                    NonKeyAttributes: pulumi.StringArray{
                        pulumi.String("UserId"),
                    },
                    ProjectionType: pulumi.String("INCLUDE"),
                    RangeKey:       pulumi.String("TopScore"),
                    ReadCapacity:   pulumi.Int(10),
                    WriteCapacity:  pulumi.Int(10),
                },
            },
            HashKey:      pulumi.String("UserId"),
            RangeKey:     pulumi.String("GameTitle"),
            ReadCapacity: pulumi.Int(20),
            Tags: pulumi.StringMap{
                "Environment": pulumi.String("production"),
                "Name":        pulumi.String("dynamodb-table-1"),
            },
            Ttl: &dynamodb.TableTtlArgs{
                AttributeName: pulumi.String("TimeToExist"),
                Enabled:       pulumi.Bool(false),
            },
            WriteCapacity: pulumi.Int(20),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

basic_dynamodb_table = aws.dynamodb.Table("basic-dynamodb-table",
    attributes=[
        {
            "name": "UserId",
            "type": "S",
        },
        {
            "name": "GameTitle",
            "type": "S",
        },
        {
            "name": "TopScore",
            "type": "N",
        },
    ],
    billing_mode="PROVISIONED",
    global_secondary_indexes=[{
        "hash_key": "GameTitle",
        "name": "GameTitleIndex",
        "nonKeyAttributes": ["UserId"],
        "projectionType": "INCLUDE",
        "range_key": "TopScore",
        "read_capacity": 10,
        "write_capacity": 10,
    }],
    hash_key="UserId",
    range_key="GameTitle",
    read_capacity=20,
    tags={
        "Environment": "production",
        "Name": "dynamodb-table-1",
    },
    ttl={
        "attributeName": "TimeToExist",
        "enabled": False,
    },
    write_capacity=20)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const basic_dynamodb_table = new aws.dynamodb.Table("basic-dynamodb-table", {
    attributes: [
        {
            name: "UserId",
            type: "S",
        },
        {
            name: "GameTitle",
            type: "S",
        },
        {
            name: "TopScore",
            type: "N",
        },
    ],
    billingMode: "PROVISIONED",
    globalSecondaryIndexes: [{
        hashKey: "GameTitle",
        name: "GameTitleIndex",
        nonKeyAttributes: ["UserId"],
        projectionType: "INCLUDE",
        rangeKey: "TopScore",
        readCapacity: 10,
        writeCapacity: 10,
    }],
    hashKey: "UserId",
    rangeKey: "GameTitle",
    readCapacity: 20,
    tags: {
        Environment: "production",
        Name: "dynamodb-table-1",
    },
    ttl: {
        attributeName: "TimeToExist",
        enabled: false,
    },
    writeCapacity: 20,
});

Global Tables

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.DynamoDB.Table("example", new Aws.DynamoDB.TableArgs
        {
            Attributes = 
            {
                new Aws.DynamoDB.Inputs.TableAttributeArgs
                {
                    Name = "TestTableHashKey",
                    Type = "S",
                },
            },
            BillingMode = "PAY_PER_REQUEST",
            HashKey = "TestTableHashKey",
            Replicas = 
            {
                new Aws.DynamoDB.Inputs.TableReplicaArgs
                {
                    RegionName = "us-east-2",
                },
                new Aws.DynamoDB.Inputs.TableReplicaArgs
                {
                    RegionName = "us-west-2",
                },
            },
            StreamEnabled = true,
            StreamViewType = "NEW_AND_OLD_IMAGES",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/dynamodb"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := dynamodb.NewTable(ctx, "example", &dynamodb.TableArgs{
            Attributes: dynamodb.TableAttributeArray{
                &dynamodb.TableAttributeArgs{
                    Name: pulumi.String("TestTableHashKey"),
                    Type: pulumi.String("S"),
                },
            },
            BillingMode: pulumi.String("PAY_PER_REQUEST"),
            HashKey:     pulumi.String("TestTableHashKey"),
            Replicas: dynamodb.TableReplicaArray{
                &dynamodb.TableReplicaArgs{
                    RegionName: pulumi.String("us-east-2"),
                },
                &dynamodb.TableReplicaArgs{
                    RegionName: pulumi.String("us-west-2"),
                },
            },
            StreamEnabled:  pulumi.Bool(true),
            StreamViewType: pulumi.String("NEW_AND_OLD_IMAGES"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.dynamodb.Table("example",
    attributes=[{
        "name": "TestTableHashKey",
        "type": "S",
    }],
    billing_mode="PAY_PER_REQUEST",
    hash_key="TestTableHashKey",
    replicas=[
        {
            "regionName": "us-east-2",
        },
        {
            "regionName": "us-west-2",
        },
    ],
    stream_enabled=True,
    stream_view_type="NEW_AND_OLD_IMAGES")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.dynamodb.Table("example", {
    attributes: [{
        name: "TestTableHashKey",
        type: "S",
    }],
    billingMode: "PAY_PER_REQUEST",
    hashKey: "TestTableHashKey",
    replicas: [
        {
            regionName: "us-east-2",
        },
        {
            regionName: "us-west-2",
        },
    ],
    streamEnabled: true,
    streamViewType: "NEW_AND_OLD_IMAGES",
});

Create a Table Resource

new Table(name: string, args: TableArgs, opts?: CustomResourceOptions);
def Table(resource_name, opts=None, attributes=None, billing_mode=None, global_secondary_indexes=None, hash_key=None, local_secondary_indexes=None, name=None, point_in_time_recovery=None, range_key=None, read_capacity=None, replicas=None, server_side_encryption=None, stream_enabled=None, stream_view_type=None, tags=None, ttl=None, write_capacity=None, __props__=None);
func NewTable(ctx *Context, name string, args TableArgs, opts ...ResourceOption) (*Table, error)
public Table(string name, TableArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Table Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Table resource accepts the following input properties:

Attributes List<TableAttributeArgs>

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

HashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

BillingMode string

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

GlobalSecondaryIndexes List<TableGlobalSecondaryIndexArgs>

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

LocalSecondaryIndexes List<TableLocalSecondaryIndexArgs>

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

Name string

The name of the index

PointInTimeRecovery TablePointInTimeRecoveryArgs

Point-in-time recovery options.

RangeKey string

The name of the range key; must be defined

ReadCapacity int

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

Replicas List<TableReplicaArgs>

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

ServerSideEncryption TableServerSideEncryptionArgs

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

StreamEnabled bool

Indicates whether Streams are to be enabled (true) or disabled (false).

StreamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

Tags Dictionary<string, string>

A map of tags to populate on the created table.

Ttl TableTtlArgs

Defines ttl, has two properties, and can only be specified once:

WriteCapacity int

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

Attributes []TableAttribute

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

HashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

BillingMode string

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

GlobalSecondaryIndexes []TableGlobalSecondaryIndex

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

LocalSecondaryIndexes []TableLocalSecondaryIndex

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

Name string

The name of the index

PointInTimeRecovery TablePointInTimeRecovery

Point-in-time recovery options.

RangeKey string

The name of the range key; must be defined

ReadCapacity int

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

Replicas []TableReplica

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

ServerSideEncryption TableServerSideEncryption

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

StreamEnabled bool

Indicates whether Streams are to be enabled (true) or disabled (false).

StreamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

Tags map[string]string

A map of tags to populate on the created table.

Ttl TableTtl

Defines ttl, has two properties, and can only be specified once:

WriteCapacity int

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

attributes TableAttribute[]

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

hashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

billingMode string

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

globalSecondaryIndexes TableGlobalSecondaryIndex[]

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

localSecondaryIndexes TableLocalSecondaryIndex[]

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

name string

The name of the index

pointInTimeRecovery TablePointInTimeRecovery

Point-in-time recovery options.

rangeKey string

The name of the range key; must be defined

readCapacity number

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

replicas TableReplica[]

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

serverSideEncryption TableServerSideEncryption

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

streamEnabled boolean

Indicates whether Streams are to be enabled (true) or disabled (false).

streamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

tags {[key: string]: string}

A map of tags to populate on the created table.

ttl TableTtl

Defines ttl, has two properties, and can only be specified once:

writeCapacity number

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

attributes List[TableAttribute]

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

hash_key str

The name of the hash key in the index; must be defined as an attribute in the resource.

billing_mode str

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

global_secondary_indexes List[TableGlobalSecondaryIndex]

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

local_secondary_indexes List[TableLocalSecondaryIndex]

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

name str

The name of the index

point_in_time_recovery Dict[TablePointInTimeRecovery]

Point-in-time recovery options.

range_key str

The name of the range key; must be defined

read_capacity float

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

replicas List[TableReplica]

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

server_side_encryption Dict[TableServerSideEncryption]

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

stream_enabled bool

Indicates whether Streams are to be enabled (true) or disabled (false).

stream_view_type str

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

tags Dict[str, str]

A map of tags to populate on the created table.

ttl Dict[TableTtl]

Defines ttl, has two properties, and can only be specified once:

write_capacity float

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

Outputs

All input properties are implicitly available as output properties. Additionally, the Table resource produces the following output properties:

Arn string

The arn of the table

Id string
The provider-assigned unique ID for this managed resource.
StreamArn string

The ARN of the Table Stream. Only available when stream_enabled = true

StreamLabel string

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

Arn string

The arn of the table

Id string
The provider-assigned unique ID for this managed resource.
StreamArn string

The ARN of the Table Stream. Only available when stream_enabled = true

StreamLabel string

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

arn string

The arn of the table

id string
The provider-assigned unique ID for this managed resource.
streamArn string

The ARN of the Table Stream. Only available when stream_enabled = true

streamLabel string

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

arn str

The arn of the table

id str
The provider-assigned unique ID for this managed resource.
stream_arn str

The ARN of the Table Stream. Only available when stream_enabled = true

stream_label str

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

Look up an Existing Table Resource

Get an existing Table resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TableState, opts?: CustomResourceOptions): Table
static get(resource_name, id, opts=None, arn=None, attributes=None, billing_mode=None, global_secondary_indexes=None, hash_key=None, local_secondary_indexes=None, name=None, point_in_time_recovery=None, range_key=None, read_capacity=None, replicas=None, server_side_encryption=None, stream_arn=None, stream_enabled=None, stream_label=None, stream_view_type=None, tags=None, ttl=None, write_capacity=None, __props__=None);
func GetTable(ctx *Context, name string, id IDInput, state *TableState, opts ...ResourceOption) (*Table, error)
public static Table Get(string name, Input<string> id, TableState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

The arn of the table

Attributes List<TableAttributeArgs>

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

BillingMode string

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

GlobalSecondaryIndexes List<TableGlobalSecondaryIndexArgs>

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

HashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

LocalSecondaryIndexes List<TableLocalSecondaryIndexArgs>

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

Name string

The name of the index

PointInTimeRecovery TablePointInTimeRecoveryArgs

Point-in-time recovery options.

RangeKey string

The name of the range key; must be defined

ReadCapacity int

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

Replicas List<TableReplicaArgs>

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

ServerSideEncryption TableServerSideEncryptionArgs

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

StreamArn string

The ARN of the Table Stream. Only available when stream_enabled = true

StreamEnabled bool

Indicates whether Streams are to be enabled (true) or disabled (false).

StreamLabel string

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

StreamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

Tags Dictionary<string, string>

A map of tags to populate on the created table.

Ttl TableTtlArgs

Defines ttl, has two properties, and can only be specified once:

WriteCapacity int

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

Arn string

The arn of the table

Attributes []TableAttribute

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

BillingMode string

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

GlobalSecondaryIndexes []TableGlobalSecondaryIndex

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

HashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

LocalSecondaryIndexes []TableLocalSecondaryIndex

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

Name string

The name of the index

PointInTimeRecovery TablePointInTimeRecovery

Point-in-time recovery options.

RangeKey string

The name of the range key; must be defined

ReadCapacity int

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

Replicas []TableReplica

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

ServerSideEncryption TableServerSideEncryption

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

StreamArn string

The ARN of the Table Stream. Only available when stream_enabled = true

StreamEnabled bool

Indicates whether Streams are to be enabled (true) or disabled (false).

StreamLabel string

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

StreamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

Tags map[string]string

A map of tags to populate on the created table.

Ttl TableTtl

Defines ttl, has two properties, and can only be specified once:

WriteCapacity int

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

arn string

The arn of the table

attributes TableAttribute[]

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

billingMode string

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

globalSecondaryIndexes TableGlobalSecondaryIndex[]

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

hashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

localSecondaryIndexes TableLocalSecondaryIndex[]

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

name string

The name of the index

pointInTimeRecovery TablePointInTimeRecovery

Point-in-time recovery options.

rangeKey string

The name of the range key; must be defined

readCapacity number

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

replicas TableReplica[]

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

serverSideEncryption TableServerSideEncryption

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

streamArn string

The ARN of the Table Stream. Only available when stream_enabled = true

streamEnabled boolean

Indicates whether Streams are to be enabled (true) or disabled (false).

streamLabel string

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

streamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

tags {[key: string]: string}

A map of tags to populate on the created table.

ttl TableTtl

Defines ttl, has two properties, and can only be specified once:

writeCapacity number

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

arn str

The arn of the table

attributes List[TableAttribute]

List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties:

billing_mode str

Controls how you are charged for read and write throughput and how you manage capacity. The valid values are PROVISIONED and PAY_PER_REQUEST. Defaults to PROVISIONED.

global_secondary_indexes List[TableGlobalSecondaryIndex]

Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.

hash_key str

The name of the hash key in the index; must be defined as an attribute in the resource.

local_secondary_indexes List[TableLocalSecondaryIndex]

Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource.

name str

The name of the index

point_in_time_recovery Dict[TablePointInTimeRecovery]

Point-in-time recovery options.

range_key str

The name of the range key; must be defined

read_capacity float

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

replicas List[TableReplica]

Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.

server_side_encryption Dict[TableServerSideEncryption]

Encryption at rest options. AWS DynamoDB tables are automatically encrypted at rest with an AWS owned Customer Master Key if this argument isn’t specified.

stream_arn str

The ARN of the Table Stream. Only available when stream_enabled = true

stream_enabled bool

Indicates whether Streams are to be enabled (true) or disabled (false).

stream_label str

A timestamp, in ISO 8601 format, for this stream. Note that this timestamp is not a unique identifier for the stream on its own. However, the combination of AWS customer ID, table name and this field is guaranteed to be unique. It can be used for creating CloudWatch Alarms. Only available when stream_enabled = true

stream_view_type str

When an item in the table is modified, StreamViewType determines what information is written to the table’s stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES.

tags Dict[str, str]

A map of tags to populate on the created table.

ttl Dict[TableTtl]

Defines ttl, has two properties, and can only be specified once:

write_capacity float

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

Supporting Types

TableAttribute

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the index

Type string

Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

Name string

The name of the index

Type string

Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

name string

The name of the index

type string

Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

name str

The name of the index

type str

Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data

TableGlobalSecondaryIndex

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

HashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

Name string

The name of the index

ProjectionType string

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

NonKeyAttributes List<string>

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

RangeKey string

The name of the range key; must be defined

ReadCapacity int

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

WriteCapacity int

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

HashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

Name string

The name of the index

ProjectionType string

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

NonKeyAttributes []string

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

RangeKey string

The name of the range key; must be defined

ReadCapacity int

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

WriteCapacity int

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

hashKey string

The name of the hash key in the index; must be defined as an attribute in the resource.

name string

The name of the index

projectionType string

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

nonKeyAttributes string[]

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

rangeKey string

The name of the range key; must be defined

readCapacity number

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

writeCapacity number

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

hash_key str

The name of the hash key in the index; must be defined as an attribute in the resource.

name str

The name of the index

projectionType str

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

nonKeyAttributes List[str]

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

range_key str

The name of the range key; must be defined

read_capacity float

The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.

write_capacity float

The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.

TableLocalSecondaryIndex

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the index

ProjectionType string

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

RangeKey string

The name of the range key; must be defined

NonKeyAttributes List<string>

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

Name string

The name of the index

ProjectionType string

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

RangeKey string

The name of the range key; must be defined

NonKeyAttributes []string

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

name string

The name of the index

projectionType string

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

rangeKey string

The name of the range key; must be defined

nonKeyAttributes string[]

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

name str

The name of the index

projectionType str

One of ALL, INCLUDE or KEYS_ONLY where ALL projects every attribute into the index, KEYS_ONLY projects just the hash and range key into the index, and INCLUDE projects only the keys specified in the _non_keyattributes parameter.

range_key str

The name of the range key; must be defined

nonKeyAttributes List[str]

Only required with INCLUDE as a projection type; a list of attributes to project into the index. These do not need to be defined as attributes on the table.

TablePointInTimeRecovery

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

Enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

enabled boolean

Indicates whether ttl is enabled (true) or disabled (false).

enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

TableReplica

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

RegionName string

Region name of the replica.

RegionName string

Region name of the replica.

regionName string

Region name of the replica.

regionName str

Region name of the replica.

TableServerSideEncryption

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

KmsKeyArn string

The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.

Enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

KmsKeyArn string

The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.

enabled boolean

Indicates whether ttl is enabled (true) or disabled (false).

kmsKeyArn string

The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.

enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

kms_key_arn str

The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb.

TableTtl

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AttributeName string

The name of the table attribute to store the TTL timestamp in.

Enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

AttributeName string

The name of the table attribute to store the TTL timestamp in.

Enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

attributeName string

The name of the table attribute to store the TTL timestamp in.

enabled boolean

Indicates whether ttl is enabled (true) or disabled (false).

attributeName str

The name of the table attribute to store the TTL timestamp in.

enabled bool

Indicates whether ttl is enabled (true) or disabled (false).

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.