Table
Provides a DynamoDB table resource
Note: It is recommended to use
ignoreChangesforread_capacityand/orwrite_capacityif there’sautoscaling policyattached 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);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<Table
Attribute Args> List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. Each attribute has two properties:- Hash
Key string The name of the hash key in the index; must be defined as an attribute in the resource.
- Billing
Mode string Controls how you are charged for read and write throughput and how you manage capacity. The valid values are
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- Global
Secondary List<TableIndexes Global Secondary Index Args> Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- Local
Secondary List<TableIndexes Local Secondary Index Args> 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
- Point
In TableTime Recovery Point In Time Recovery Args Point-in-time recovery options.
- Range
Key string The name of the range key; must be defined
- Read
Capacity int The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- Replicas
List<Table
Replica Args> Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- Server
Side TableEncryption Server Side Encryption Args 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 stringType 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.- Dictionary<string, string>
A map of tags to populate on the created table.
- Ttl
Table
Ttl Args Defines ttl, has two properties, and can only be specified once:
- Write
Capacity int The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
- Attributes
[]Table
Attribute List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. Each attribute has two properties:- Hash
Key string The name of the hash key in the index; must be defined as an attribute in the resource.
- Billing
Mode string Controls how you are charged for read and write throughput and how you manage capacity. The valid values are
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- Global
Secondary []TableIndexes Global Secondary Index Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- Local
Secondary []TableIndexes Local Secondary Index 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
- Point
In TableTime Recovery Point In Time Recovery Point-in-time recovery options.
- Range
Key string The name of the range key; must be defined
- Read
Capacity int The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- Replicas
[]Table
Replica Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- Server
Side TableEncryption Server Side Encryption 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 stringType 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.- map[string]string
A map of tags to populate on the created table.
- Ttl
Table
Ttl Defines ttl, has two properties, and can only be specified once:
- Write
Capacity int The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
- attributes
Table
Attribute[] List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. Each attribute has two properties:- hash
Key string The name of the hash key in the index; must be defined as an attribute in the resource.
- billing
Mode string Controls how you are charged for read and write throughput and how you manage capacity. The valid values are
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- global
Secondary TableIndexes Global Secondary Index[] Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- local
Secondary TableIndexes Local Secondary Index[] 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
- point
In TableTime Recovery Point In Time Recovery Point-in-time recovery options.
- range
Key string The name of the range key; must be defined
- read
Capacity number The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- replicas
Table
Replica[] Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- server
Side TableEncryption Server Side Encryption 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 boolean Indicates whether Streams are to be enabled (true) or disabled (false).
- stream
View stringType 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.- {[key: string]: string}
A map of tags to populate on the created table.
- ttl
Table
Ttl Defines ttl, has two properties, and can only be specified once:
- write
Capacity number The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
- attributes
List[Table
Attribute] List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. 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
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- global_
secondary_ List[Tableindexes Global Secondary Index] Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- local_
secondary_ List[Tableindexes Local Secondary Index] 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_ Dict[Tabletime_ recovery Point In Time Recovery] 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[Table
Replica] Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- server_
side_ Dict[Tableencryption Server Side Encryption] 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_ strtype 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.- Dict[str, str]
A map of tags to populate on the created table.
- ttl
Dict[Table
Ttl] 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.
- Stream
Arn string The ARN of the Table Stream. Only available when
stream_enabled = true- Stream
Label 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.
- Stream
Arn string The ARN of the Table Stream. Only available when
stream_enabled = true- Stream
Label 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.
- stream
Arn string The ARN of the Table Stream. Only available when
stream_enabled = true- stream
Label 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): Tablestatic 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<Table
Attribute Args> List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. Each attribute has two properties:- Billing
Mode string Controls how you are charged for read and write throughput and how you manage capacity. The valid values are
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- Global
Secondary List<TableIndexes Global Secondary Index Args> Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- Hash
Key string The name of the hash key in the index; must be defined as an attribute in the resource.
- Local
Secondary List<TableIndexes Local Secondary Index Args> 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
- Point
In TableTime Recovery Point In Time Recovery Args Point-in-time recovery options.
- Range
Key string The name of the range key; must be defined
- Read
Capacity int The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- Replicas
List<Table
Replica Args> Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- Server
Side TableEncryption Server Side Encryption Args 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 string 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 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- Stream
View stringType 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.- Dictionary<string, string>
A map of tags to populate on the created table.
- Ttl
Table
Ttl Args Defines ttl, has two properties, and can only be specified once:
- Write
Capacity 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
[]Table
Attribute List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. Each attribute has two properties:- Billing
Mode string Controls how you are charged for read and write throughput and how you manage capacity. The valid values are
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- Global
Secondary []TableIndexes Global Secondary Index Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- Hash
Key string The name of the hash key in the index; must be defined as an attribute in the resource.
- Local
Secondary []TableIndexes Local Secondary Index 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
- Point
In TableTime Recovery Point In Time Recovery Point-in-time recovery options.
- Range
Key string The name of the range key; must be defined
- Read
Capacity int The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- Replicas
[]Table
Replica Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- Server
Side TableEncryption Server Side Encryption 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 string 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 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- Stream
View stringType 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.- map[string]string
A map of tags to populate on the created table.
- Ttl
Table
Ttl Defines ttl, has two properties, and can only be specified once:
- Write
Capacity 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
Table
Attribute[] List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. Each attribute has two properties:- billing
Mode string Controls how you are charged for read and write throughput and how you manage capacity. The valid values are
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- global
Secondary TableIndexes Global Secondary Index[] Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc.
- hash
Key string The name of the hash key in the index; must be defined as an attribute in the resource.
- local
Secondary TableIndexes Local Secondary Index[] 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
- point
In TableTime Recovery Point In Time Recovery Point-in-time recovery options.
- range
Key string The name of the range key; must be defined
- read
Capacity number The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- replicas
Table
Replica[] Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- server
Side TableEncryption Server Side Encryption 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 string The ARN of the Table Stream. Only available when
stream_enabled = true- stream
Enabled boolean Indicates whether Streams are to be enabled (true) or disabled (false).
- stream
Label 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- stream
View stringType 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.- {[key: string]: string}
A map of tags to populate on the created table.
- ttl
Table
Ttl Defines ttl, has two properties, and can only be specified once:
- write
Capacity 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[Table
Attribute] List of nested attribute definitions. Only required for
hash_keyandrange_keyattributes. 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
PROVISIONEDandPAY_PER_REQUEST. Defaults toPROVISIONED.- global_
secondary_ List[Tableindexes Global Secondary Index] 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_ List[Tableindexes Local Secondary Index] 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_ Dict[Tabletime_ recovery Point In Time Recovery] 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[Table
Replica] Configuration block(s) with DynamoDB Global Tables V2 (version 2019.11.21) replication configurations. Detailed below.
- server_
side_ Dict[Tableencryption Server Side Encryption] 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_ strtype 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.- Dict[str, str]
A map of tags to populate on the created table.
- ttl
Dict[Table
Ttl] 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
TableGlobalSecondaryIndex
- Hash
Key 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
- Projection
Type string One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- Non
Key List<string>Attributes Only required with
INCLUDEas 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 string The name of the range key; must be defined
- Read
Capacity int The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- Write
Capacity int The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
- Hash
Key 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
- Projection
Type string One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- Non
Key []stringAttributes Only required with
INCLUDEas 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 string The name of the range key; must be defined
- Read
Capacity int The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- Write
Capacity int The number of write units for this index. Must be set if billing_mode is set to PROVISIONED.
- hash
Key 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
- projection
Type string One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- non
Key string[]Attributes Only required with
INCLUDEas 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 string The name of the range key; must be defined
- read
Capacity number The number of read units for this index. Must be set if billing_mode is set to PROVISIONED.
- write
Capacity 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
- projection
Type str One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- non
Key List[str]Attributes Only required with
INCLUDEas 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
- Name string
The name of the index
- Projection
Type string One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- Range
Key string The name of the range key; must be defined
- Non
Key List<string>Attributes Only required with
INCLUDEas 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
- Projection
Type string One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- Range
Key string The name of the range key; must be defined
- Non
Key []stringAttributes Only required with
INCLUDEas 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
- projection
Type string One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- range
Key string The name of the range key; must be defined
- non
Key string[]Attributes Only required with
INCLUDEas 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
- projection
Type str One of
ALL,INCLUDEorKEYS_ONLYwhereALLprojects every attribute into the index,KEYS_ONLYprojects just the hash and range key into the index, andINCLUDEprojects only the keys specified in the _non_keyattributes parameter.- range_
key str The name of the range key; must be defined
- non
Key List[str]Attributes Only required with
INCLUDEas 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
TableReplica
- Region
Name string Region name of the replica.
- Region
Name string Region name of the replica.
- region
Name string Region name of the replica.
- region
Name str Region name of the replica.
TableServerSideEncryption
- enabled bool
Indicates whether ttl is enabled (true) or disabled (false).
- kms_
key_ strarn 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
- Attribute
Name string The name of the table attribute to store the TTL timestamp in.
- Enabled bool
Indicates whether ttl is enabled (true) or disabled (false).
- Attribute
Name string The name of the table attribute to store the TTL timestamp in.
- Enabled bool
Indicates whether ttl is enabled (true) or disabled (false).
- attribute
Name string The name of the table attribute to store the TTL timestamp in.
- enabled boolean
Indicates whether ttl is enabled (true) or disabled (false).
- attribute
Name 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
awsTerraform Provider.