import * as core from "@terrascript/core"; export interface LocalSecondaryIndexArgs extends core.SchemaArgs { name: string | core.StringOut; nonKeyAttributes?: core.Array | core.ArrayOut; projectionType: string | core.StringOut; rangeKey: string | core.StringOut; } export class LocalSecondaryIndex extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(String, { kind: "array" }) public nonKeyAttributes?: core.Array | core.ArrayOut; @core.attr(String) public projectionType!: string | core.StringOut; @core.attr(String) public rangeKey!: string | core.StringOut; } export interface PointInTimeRecoveryArgs extends core.SchemaArgs { enabled: boolean | core.BooleanOut; } export class PointInTimeRecovery extends core.Schema { @core.attr(Boolean) public enabled!: boolean | core.BooleanOut; } export interface ReplicaArgs extends core.SchemaArgs { kmsKeyArn?: string | core.StringOut; pointInTimeRecovery?: boolean | core.BooleanOut; propagateTags?: boolean | core.BooleanOut; regionName: string | core.StringOut; } export class Replica extends core.Schema { @core.attr(String, { computed: true }) public kmsKeyArn?: string | core.StringOut; @core.attr(Boolean) public pointInTimeRecovery?: boolean | core.BooleanOut; @core.attr(Boolean) public propagateTags?: boolean | core.BooleanOut; @core.attr(String) public regionName!: string | core.StringOut; } export interface ServerSideEncryptionArgs extends core.SchemaArgs { enabled: boolean | core.BooleanOut; kmsKeyArn?: string | core.StringOut; } export class ServerSideEncryption extends core.Schema { @core.attr(Boolean) public enabled!: boolean | core.BooleanOut; @core.attr(String, { computed: true }) public kmsKeyArn?: string | core.StringOut; } export interface GlobalSecondaryIndexArgs extends core.SchemaArgs { hashKey: string | core.StringOut; name: string | core.StringOut; nonKeyAttributes?: core.Array | core.ArrayOut; projectionType: string | core.StringOut; rangeKey?: string | core.StringOut; readCapacity?: number | core.NumberOut; writeCapacity?: number | core.NumberOut; } export class GlobalSecondaryIndex extends core.Schema { @core.attr(String) public hashKey!: string | core.StringOut; @core.attr(String) public name!: string | core.StringOut; @core.attr(String, { kind: "array" }) public nonKeyAttributes?: core.Array | core.ArrayOut; @core.attr(String) public projectionType!: string | core.StringOut; @core.attr(String) public rangeKey?: string | core.StringOut; @core.attr(Number) public readCapacity?: number | core.NumberOut; @core.attr(Number) public writeCapacity?: number | core.NumberOut; } export interface AttributeArgs extends core.SchemaArgs { name: string | core.StringOut; type: string | core.StringOut; } export class Attribute extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(String) public type!: string | core.StringOut; } export interface TtlArgs extends core.SchemaArgs { attributeName: string | core.StringOut; enabled?: boolean | core.BooleanOut; } export class Ttl extends core.Schema { @core.attr(String) public attributeName!: string | core.StringOut; @core.attr(Boolean) public enabled?: boolean | core.BooleanOut; } export interface TableArgs extends core.ResourceArgs { /** * (Required) Set of nested attribute definitions. Only required for `hash_key` and `range_key` attribu * tes. See below. */ attribute?: core.Array | core.ArrayOut; /** * (Optional) Controls how you are charged for read and write throughput and how you manage capacity. T * he valid values are `PROVISIONED` and `PAY_PER_REQUEST`. Defaults to `PROVISIONED`. */ billingMode?: string | core.StringOut; /** * (Optional) Describe a GSI for the table; subject to the normal limits on the number of GSIs, project * ed attributes, etc. See below. */ globalSecondaryIndex?: | core.Array | core.ArrayOut; /** * (Required, Forces new resource) Attribute to use as the hash (partition) key. Must also be defined a * s an `attribute`. See below. */ hashKey?: string | core.StringOut; /** * (Optional, Forces new resource) Describe an LSI on the table; these can only be allocated *at creati * on* so you cannot change this definition after you have created the resource. See below. */ localSecondaryIndex?: | core.Array | core.ArrayOut; /** * (Required) Unique within a region name of the table. */ name: string | core.StringOut; /** * (Optional) Enable point-in-time recovery options. See below. */ pointInTimeRecovery?: PointInTimeRecovery; /** * (Optional, Forces new resource) Attribute to use as the range (sort) key. Must also be defined as an * attribute`, see below. */ rangeKey?: string | core.StringOut; /** * (Optional) Number of read units for this table. If the `billing_mode` is `PROVISIONED`, this field i * s required. */ readCapacity?: number | core.NumberOut; /** * (Optional) Configuration block(s) with [DynamoDB Global Tables V2 (version 2019.11.21)](https://docs * .aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) replication configuration * s. See below. */ replica?: core.Array | core.ArrayOut; /** * (Optional) Time of the point-in-time recovery point to restore. */ restoreDateTime?: string | core.StringOut; /** * (Optional) Name of the table to restore. Must match the name of an existing table. */ restoreSourceName?: string | core.StringOut; /** * (Optional) If set, restores table to the most recent point-in-time recovery point. */ restoreToLatestTime?: boolean | core.BooleanOut; /** * (Optional) 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. See below. */ serverSideEncryption?: ServerSideEncryption; /** * (Optional) Whether Streams are enabled. */ streamEnabled?: boolean | core.BooleanOut; /** * (Optional) When an item in the table is modified, StreamViewType determines what information is writ * ten to the table's stream. Valid values are `KEYS_ONLY`, `NEW_IMAGE`, `OLD_IMAGE`, `NEW_AND_OLD_IMAG * ES`. */ streamViewType?: string | core.StringOut; /** * (Optional) Storage class of the table. Valid values are `STANDARD` and `STANDARD_INFREQUENT_ACCESS`. */ tableClass?: string | core.StringOut; /** * (Optional) A map of tags to populate on the created table. If configured with a provider [`default_t * ags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_ * tags-configuration-block) present, tags with matching keys will overwrite those defined at the provi * der-level. */ tags?: core.Map | core.MapOut; /** * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) Configuration block for TTL. See below. */ ttl?: Ttl; /** * (Optional) Number of write units for this table. If the `billing_mode` is `PROVISIONED`, this field * is required. */ writeCapacity?: number | core.NumberOut; } export class Table extends core.Resource { /** * ARN of the table */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Required) Set of nested attribute definitions. Only required for `hash_key` and `range_key` attribu * tes. See below. */ @core.attr(Attribute, { computed: true, kind: "array" }) public attribute?: core.Array | core.ArrayOut; /** * (Optional) Controls how you are charged for read and write throughput and how you manage capacity. T * he valid values are `PROVISIONED` and `PAY_PER_REQUEST`. Defaults to `PROVISIONED`. */ @core.attr(String) public billingMode?: string | core.StringOut; /** * (Optional) Describe a GSI for the table; subject to the normal limits on the number of GSIs, project * ed attributes, etc. See below. */ @core.attr(GlobalSecondaryIndex, { kind: "array" }) public globalSecondaryIndex?: | core.Array | core.ArrayOut; /** * (Required, Forces new resource) Attribute to use as the hash (partition) key. Must also be defined a * s an `attribute`. See below. */ @core.attr(String, { computed: true }) public hashKey?: string | core.StringOut; /** * Name of the table */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional, Forces new resource) Describe an LSI on the table; these can only be allocated *at creati * on* so you cannot change this definition after you have created the resource. See below. */ @core.attr(LocalSecondaryIndex, { kind: "array" }) public localSecondaryIndex?: | core.Array | core.ArrayOut; /** * (Required) Unique within a region name of the table. */ @core.attr(String) public name!: string | core.StringOut; /** * (Optional) Enable point-in-time recovery options. See below. */ @core.attr(PointInTimeRecovery, { computed: true }) public pointInTimeRecovery?: PointInTimeRecovery; /** * (Optional, Forces new resource) Attribute to use as the range (sort) key. Must also be defined as an * attribute`, see below. */ @core.attr(String) public rangeKey?: string | core.StringOut; /** * (Optional) Number of read units for this table. If the `billing_mode` is `PROVISIONED`, this field i * s required. */ @core.attr(Number, { computed: true }) public readCapacity?: number | core.NumberOut; /** * (Optional) Configuration block(s) with [DynamoDB Global Tables V2 (version 2019.11.21)](https://docs * .aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html) replication configuration * s. See below. */ @core.attr(Replica, { kind: "array" }) public replica?: core.Array | core.ArrayOut; /** * (Optional) Time of the point-in-time recovery point to restore. */ @core.attr(String) public restoreDateTime?: string | core.StringOut; /** * (Optional) Name of the table to restore. Must match the name of an existing table. */ @core.attr(String) public restoreSourceName?: string | core.StringOut; /** * (Optional) If set, restores table to the most recent point-in-time recovery point. */ @core.attr(Boolean) public restoreToLatestTime?: boolean | core.BooleanOut; /** * (Optional) 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. See below. */ @core.attr(ServerSideEncryption, { computed: true }) public serverSideEncryption?: ServerSideEncryption; /** * ARN of the Table Stream. Only available when `stream_enabled = true` */ @core.attr(String, { computed: true }) public streamArn!: string | core.StringOut; /** * (Optional) Whether Streams are enabled. */ @core.attr(Boolean) public streamEnabled?: boolean | core.BooleanOut; /** * 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` */ @core.attr(String, { computed: true }) public streamLabel!: string | core.StringOut; /** * (Optional) When an item in the table is modified, StreamViewType determines what information is writ * ten to the table's stream. Valid values are `KEYS_ONLY`, `NEW_IMAGE`, `OLD_IMAGE`, `NEW_AND_OLD_IMAG * ES`. */ @core.attr(String, { computed: true }) public streamViewType?: string | core.StringOut; /** * (Optional) Storage class of the table. Valid values are `STANDARD` and `STANDARD_INFREQUENT_ACCESS`. */ @core.attr(String) public tableClass?: string | core.StringOut; /** * (Optional) A map of tags to populate on the created table. If configured with a provider [`default_t * ags` configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_ * tags-configuration-block) present, tags with matching keys will overwrite those defined at the provi * der-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * Map of tags assigned to the resource, including those inherited from the provider [`default_tags` co * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co * nfiguration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Optional) Configuration block for TTL. See below. */ @core.attr(Ttl, { computed: true }) public ttl?: Ttl; /** * (Optional) Number of write units for this table. If the `billing_mode` is `PROVISIONED`, this field * is required. */ @core.attr(Number, { computed: true }) public writeCapacity?: number | core.NumberOut; constructor(name: string, args?: TableArgs) { super(name, "aws_dynamodb_table", args); } public override getNamespace(): string { return "aws_dynamodb"; } }