awsdynamodb

package
v2.83.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 41

README

Amazon DynamoDB Construct Library

Here is a minimal deployable DynamoDB table definition:

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

Importing existing tables

To import an existing table into your CDK application, use the Table.fromTableName, Table.fromTableArn or Table.fromTableAttributes factory method. This method accepts table name or table ARN which describes the properties of an already existing table:

var user user

table := dynamodb.Table_FromTableArn(this, jsii.String("ImportedTable"), jsii.String("arn:aws:dynamodb:us-east-1:111111111:table/my-table"))
// now you can just call methods on the table
table.GrantReadWriteData(user)

If you intend to use the tableStreamArn (including indirectly, for example by creating an @aws-cdk/aws-lambda-event-source.DynamoEventSource on the imported table), you must use the Table.fromTableAttributes method and the tableStreamArn property must be populated.

In order to grant permissions to indexes on imported tables you can either set grantIndexPermissions to true, or you can provide the indexes via the globalIndexes or localIndexes properties. This will enable grant* methods to also grant permissions to all table indexes.

Keys

When a table is defined, you must define it's schema using the partitionKey (required) and sortKey (optional) properties.

Billing Mode

DynamoDB supports two billing modes:

  • PROVISIONED - the default mode where the table and global secondary indexes have configured read and write capacity.
  • PAY_PER_REQUEST - on-demand pricing and scaling. You only pay for what you use and there is no read and write capacity for the table or its global secondary indexes.
table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	BillingMode: dynamodb.BillingMode_PAY_PER_REQUEST,
})

Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.

Table Class

DynamoDB supports two table classes:

  • STANDARD - the default mode, and is recommended for the vast majority of workloads.
  • STANDARD_INFREQUENT_ACCESS - optimized for tables where storage is the dominant cost.
table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	TableClass: dynamodb.TableClass_STANDARD_INFREQUENT_ACCESS,
})

Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.TableClasses.html

Configure AutoScaling for your table

You can have DynamoDB automatically raise and lower the read and write capacities of your table by setting up autoscaling. You can use this to either keep your tables at a desired utilization level, or by scaling up and down at pre-configured times of the day:

Auto-scaling is only relevant for tables with the billing mode, PROVISIONED.

readScaling := table.AutoScaleReadCapacity(&EnableScalingProps{
	MinCapacity: jsii.Number(1),
	MaxCapacity: jsii.Number(50),
})

readScaling.ScaleOnUtilization(&UtilizationScalingProps{
	TargetUtilizationPercent: jsii.Number(50),
})

readScaling.ScaleOnSchedule(jsii.String("ScaleUpInTheMorning"), &ScalingSchedule{
	Schedule: appscaling.Schedule_Cron(&CronOptions{
		Hour: jsii.String("8"),
		Minute: jsii.String("0"),
	}),
	MinCapacity: jsii.Number(20),
})

readScaling.ScaleOnSchedule(jsii.String("ScaleDownAtNight"), &ScalingSchedule{
	Schedule: appscaling.Schedule_*Cron(&CronOptions{
		Hour: jsii.String("20"),
		Minute: jsii.String("0"),
	}),
	MaxCapacity: jsii.Number(20),
})

Further reading: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/AutoScaling.html https://aws.amazon.com/blogs/database/how-to-use-aws-cloudformation-to-configure-auto-scaling-for-amazon-dynamodb-tables-and-indexes/

Amazon DynamoDB Global Tables

You can create DynamoDB Global Tables by setting the replicationRegions property on a Table:

globalTable := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ReplicationRegions: []*string{
		jsii.String("us-east-1"),
		jsii.String("us-east-2"),
		jsii.String("us-west-2"),
	},
})

When doing so, a CloudFormation Custom Resource will be added to the stack in order to create the replica tables in the selected regions.

The default billing mode for Global Tables is PAY_PER_REQUEST. If you want to use PROVISIONED, you have to make sure write auto-scaling is enabled for that Table:

globalTable := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ReplicationRegions: []*string{
		jsii.String("us-east-1"),
		jsii.String("us-east-2"),
		jsii.String("us-west-2"),
	},
	BillingMode: dynamodb.BillingMode_PROVISIONED,
})

globalTable.AutoScaleWriteCapacity(&EnableScalingProps{
	MinCapacity: jsii.Number(1),
	MaxCapacity: jsii.Number(10),
}).ScaleOnUtilization(&UtilizationScalingProps{
	TargetUtilizationPercent: jsii.Number(75),
})

When adding a replica region for a large table, you might want to increase the timeout for the replication operation:

globalTable := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ReplicationRegions: []*string{
		jsii.String("us-east-1"),
		jsii.String("us-east-2"),
		jsii.String("us-west-2"),
	},
	ReplicationTimeout: awscdk.Duration_Hours(jsii.Number(2)),
})

A maximum of 10 tables with replication can be added to a stack without a limit increase for managed policies attached to an IAM role. This is because more than 10 managed policies will be attached to the DynamoDB service replication role - one policy per replication table. Consider splitting your tables across multiple stacks if your reach this limit.

Encryption

All user data stored in Amazon DynamoDB is fully encrypted at rest. When creating a new table, you can choose to encrypt using the following customer master keys (CMK) to encrypt your table:

  • AWS owned CMK - By default, all tables are encrypted under an AWS owned customer master key (CMK) in the DynamoDB service account (no additional charges apply).
  • AWS managed CMK - AWS KMS keys (one per region) are created in your account, managed, and used on your behalf by AWS DynamoDB (AWS KMS charges apply).
  • Customer managed CMK - You have full control over the KMS key used to encrypt the DynamoDB Table (AWS KMS charges apply).

Creating a Table encrypted with a customer managed CMK:

table := dynamodb.NewTable(this, jsii.String("MyTable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	Encryption: dynamodb.TableEncryption_CUSTOMER_MANAGED,
})

// You can access the CMK that was added to the stack on your behalf by the Table construct via:
tableEncryptionKey := table.EncryptionKey

You can also supply your own key:

import kms "github.com/aws/aws-cdk-go/awscdk"


encryptionKey := kms.NewKey(this, jsii.String("Key"), &KeyProps{
	EnableKeyRotation: jsii.Boolean(true),
})
table := dynamodb.NewTable(this, jsii.String("MyTable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	Encryption: dynamodb.TableEncryption_CUSTOMER_MANAGED,
	EncryptionKey: EncryptionKey,
})

In order to use the AWS managed CMK instead, change the code to:

table := dynamodb.NewTable(this, jsii.String("MyTable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	Encryption: dynamodb.TableEncryption_AWS_MANAGED,
})

Get schema of table or secondary indexes

To get the partition key and sort key of the table or indexes you have configured:

var table table

schema := table.Schema()
partitionKey := schema.PartitionKey
sortKey := schema.SortKey

Kinesis Stream

A Kinesis Data Stream can be configured on the DynamoDB table to capture item-level changes.

import kinesis "github.com/aws/aws-cdk-go/awscdk"


stream := kinesis.NewStream(this, jsii.String("Stream"))

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	KinesisStream: stream,
})

Alarm metrics

Alarms can be configured on the DynamoDB table to captured metric data

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"


table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})

Deletion Protection for Tables

You can enable deletion protection for a table by setting the deletionProtection property to true. When deletion protection is enabled for a table, it cannot be deleted by anyone. By default, deletion protection is disabled.

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	DeletionProtection: jsii.Boolean(true),
})

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CfnGlobalTable_CFN_RESOURCE_TYPE_NAME

func CfnGlobalTable_CFN_RESOURCE_TYPE_NAME() *string

func CfnGlobalTable_IsCfnElement

func CfnGlobalTable_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

func CfnGlobalTable_IsCfnResource

func CfnGlobalTable_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnGlobalTable_IsConstruct

func CfnGlobalTable_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func CfnTable_CFN_RESOURCE_TYPE_NAME

func CfnTable_CFN_RESOURCE_TYPE_NAME() *string

func CfnTable_IsCfnElement

func CfnTable_IsCfnElement(x interface{}) *bool

Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.

Returns: The construct as a stack element or undefined if it is not a stack element.

func CfnTable_IsCfnResource

func CfnTable_IsCfnResource(construct constructs.IConstruct) *bool

Check whether the given construct is a CfnResource.

func CfnTable_IsConstruct

func CfnTable_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func NewCfnGlobalTable_Override

func NewCfnGlobalTable_Override(c CfnGlobalTable, scope constructs.Construct, id *string, props *CfnGlobalTableProps)

Create a new `AWS::DynamoDB::GlobalTable`.

func NewCfnTable_Override

func NewCfnTable_Override(c CfnTable, scope constructs.Construct, id *string, props *CfnTableProps)

Create a new `AWS::DynamoDB::Table`.

func NewTable_Override

func NewTable_Override(t Table, scope constructs.Construct, id *string, props *TableProps)

func Table_IsConstruct

func Table_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.

Returns: true if `x` is an object created from a class which extends `Construct`.

func Table_IsOwnedResource added in v2.32.0

func Table_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise.

func Table_IsResource

func Table_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

Types

type Attribute

type Attribute struct {
	// The name of an attribute.
	Name *string `field:"required" json:"name" yaml:"name"`
	// The data type of an attribute.
	Type AttributeType `field:"required" json:"type" yaml:"type"`
}

Represents an attribute for describing the key schema for the table and indexes.

Example:

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})

type AttributeType

type AttributeType string

Data types for attributes within a table.

Example:

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})

See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html#HowItWorks.DataTypes

const (
	// Up to 400KiB of binary data (which must be encoded as base64 before sending to DynamoDB).
	AttributeType_BINARY AttributeType = "BINARY"
	// Numeric values made of up to 38 digits (positive, negative or zero).
	AttributeType_NUMBER AttributeType = "NUMBER"
	// Up to 400KiB of UTF-8 encoded text.
	AttributeType_STRING AttributeType = "STRING"
)

type BillingMode

type BillingMode string

DynamoDB's Read/Write capacity modes.

Example:

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	BillingMode: dynamodb.BillingMode_PAY_PER_REQUEST,
})
const (
	// Pay only for what you use.
	//
	// You don't configure Read/Write capacity units.
	BillingMode_PAY_PER_REQUEST BillingMode = "PAY_PER_REQUEST"
	// Explicitly specified Read/Write capacity units.
	BillingMode_PROVISIONED BillingMode = "PROVISIONED"
)

type CfnGlobalTable

type CfnGlobalTable interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The Amazon Resource Name (ARN) of the DynamoDB table, such as `arn:aws:dynamodb:us-east-2:123456789012:table/myDynamoDBTable` .
	//
	// The ARN returned is that of the replica in the region the stack is deployed to.
	AttrArn() *string
	// A list of attributes that describe the key schema for the global table and indexes.
	AttributeDefinitions() interface{}
	SetAttributeDefinitions(val interface{})
	// The ARN of the DynamoDB stream, such as `arn:aws:dynamodb:us-east-1:123456789012:table/testddbstack-myDynamoDBTable-012A1SL7SMP5Q/stream/2015-11-30T20:10:00.000` . The `StreamArn` returned is that of the replica in the region the stack is deployed to.
	//
	// > You must specify the `StreamSpecification` property to use this attribute.
	AttrStreamArn() *string
	// Unique identifier for the table, such as `a123b456-01ab-23cd-123a-111222aaabbb` .
	//
	// The `TableId` returned is that of the replica in the region the stack is deployed to.
	AttrTableId() *string
	// Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are:.
	//
	// - `PAY_PER_REQUEST`
	// - `PROVISIONED`
	//
	// All replicas in your global table will have the same billing mode. If you use `PROVISIONED` billing mode, you must provide an auto scaling configuration via the `WriteProvisionedThroughputSettings` property. The default value of this property is `PROVISIONED` .
	BillingMode() *string
	SetBillingMode(val *string)
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// Global secondary indexes to be created on the global table.
	//
	// You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation.
	//
	// Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.
	GlobalSecondaryIndexes() interface{}
	SetGlobalSecondaryIndexes(val interface{})
	// Specifies the attributes that make up the primary key for the table.
	//
	// The attributes in the `KeySchema` property must also be defined in the `AttributeDefinitions` property.
	KeySchema() interface{}
	SetKeySchema(val interface{})
	// Local secondary indexes to be created on the table.
	//
	// You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.
	LocalSecondaryIndexes() interface{}
	SetLocalSecondaryIndexes(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// Specifies the list of replicas for your global table.
	//
	// The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry in `Replicas` with the region us-east-1. You cannot remove the replica in the stack region.
	//
	// > Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an `UpdateStack` operation containing only that change.
	// >
	// > If you add or delete a replica during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica.
	//
	// You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.
	Replicas() interface{}
	SetReplicas(val interface{})
	// Specifies the settings to enable server-side encryption.
	//
	// These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using the `ReplicaSpecification.ReplicaSSESpecification` property.
	SseSpecification() interface{}
	SetSseSpecification(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() awscdk.Stack
	// Specifies the streams settings on your global table.
	//
	// You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.
	StreamSpecification() interface{}
	SetStreamSpecification(val interface{})
	// A name for the global table.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID as the table name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	TableName() *string
	SetTableName(val *string)
	// Specifies the time to live (TTL) settings for the table.
	//
	// This setting will be applied to all replicas.
	TimeToLiveSpecification() interface{}
	SetTimeToLiveSpecification(val interface{})
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Specifies an auto scaling policy for write capacity.
	//
	// This policy will be applied to all replicas. This setting must be specified if `BillingMode` is set to `PROVISIONED` .
	WriteProvisionedThroughputSettings() interface{}
	SetWriteProvisionedThroughputSettings(val interface{})
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target awscdk.CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]awscdk.CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target awscdk.CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::DynamoDB::GlobalTable`.

The `AWS::DynamoDB::GlobalTable` resource enables you to create and manage a Version 2019.11.21 global table. This resource cannot be used to create or manage a Version 2017.11.29 global table. For more information, see [Global tables](https://docs.aws.amazon.com//amazondynamodb/latest/developerguide/GlobalTables.html) .

> You cannot convert a resource of type `AWS::DynamoDB::Table` into a resource of type `AWS::DynamoDB::GlobalTable` by changing its type in your template. *Doing so might result in the deletion of your DynamoDB table.* > > You can instead use the GlobalTable resource to create a new table in a single Region. This will be billed the same as a single Region table. If you later update the stack to add other Regions then Global Tables pricing will apply.

You should be aware of the following behaviors when working with DynamoDB global tables.

- The IAM Principal executing the stack operation must have the permissions listed below in all regions where you plan to have a global table replica. The IAM Principal's permissions should not have restrictions based on IP source address. Some global tables operations (for example, adding a replica) are asynchronous, and require that the IAM Principal is valid until they complete. You should not delete the Principal (user or IAM role) until CloudFormation has finished updating your stack.

- `dynamodb:CreateTable` - `dynamodb:UpdateTable` - `dynamodb:DeleteTable` - `dynamodb:DescribeContinuousBackups` - `dynamodb:DescribeContributorInsights` - `dynamodb:DescribeTable` - `dynamodb:DescribeTableReplicaAutoScaling` - `dynamodb:DescribeTimeToLive` - `dynamodb:ListTables` - `dynamodb:UpdateTimeToLive` - `dynamodb:UpdateContributorInsights` - `dynamodb:UpdateContinuousBackups` - `dynamodb:ListTagsOfResource` - `dynamodb:TableClass` - `dynamodb:TagResource` - `dynamodb:UntagResource` - `dynamodb:BatchWriteItem` - `dynamodb:CreateTableReplica` - `dynamodb:DeleteItem` - `dynamodb:DeleteTableReplica` - `dynamodb:DisableKinesisStreamingDestination` - `dynamodb:EnableKinesisStreamingDestination` - `dynamodb:GetItem` - `dynamodb:PutItem` - `dynamodb:Query` - `dynamodb:Scan` - `dynamodb:UpdateItem` - `dynamodb:DescribeTableReplicaAutoScaling` - `dynamodb:UpdateTableReplicaAutoScaling` - `iam:CreateServiceLinkedRole` - `kms:CreateGrant` - `kms:DescribeKey` - `application-autoscaling:DeleteScalingPolicy` - `application-autoscaling:DeleteScheduledAction` - `application-autoscaling:DeregisterScalableTarget` - `application-autoscaling:DescribeScalingPolicies` - `application-autoscaling:DescribeScalableTargets` - `application-autoscaling:PutScalingPolicy` - `application-autoscaling:PutScheduledAction` - `application-autoscaling:RegisterScalableTarget` - When using provisioned billing mode, CloudFormation will create an auto scaling policy on each of your replicas to control their write capacities. You must configure this policy using the `WriteProvisionedThroughputSettings` property. CloudFormation will ensure that all replicas have the same write capacity auto scaling property. You cannot directly specify a value for write capacity for a global table. - If your table uses provisioned capacity, you must configure auto scaling directly in the `AWS::DynamoDB::GlobalTable` resource. You should not configure additional auto scaling policies on any of the table replicas or global secondary indexes, either via API or via `AWS::ApplicationAutoScaling::ScalableTarget` or `AWS::ApplicationAutoScaling::ScalingPolicy` . Doing so might result in unexpected behavior and is unsupported. - In AWS CloudFormation , each global table is controlled by a single stack, in a single region, regardless of the number of replicas. When you deploy your template, CloudFormation will create/update all replicas as part of a single stack operation. You should not deploy the same `AWS::DynamoDB::GlobalTable` resource in multiple regions. Doing so will result in errors, and is unsupported. If you deploy your application template in multiple regions, you can use conditions to only create the resource in a single region. Alternatively, you can choose to define your `AWS::DynamoDB::GlobalTable` resources in a stack separate from your application stack, and make sure it is only deployed to a single region.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnGlobalTable := awscdk.Aws_dynamodb.NewCfnGlobalTable(this, jsii.String("MyCfnGlobalTable"), &CfnGlobalTableProps{
	AttributeDefinitions: []interface{}{
		&AttributeDefinitionProperty{
			AttributeName: jsii.String("attributeName"),
			AttributeType: jsii.String("attributeType"),
		},
	},
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},
	Replicas: []interface{}{
		&ReplicaSpecificationProperty{
			Region: jsii.String("region"),

			// the properties below are optional
			ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
				Enabled: jsii.Boolean(false),
			},
			DeletionProtectionEnabled: jsii.Boolean(false),
			GlobalSecondaryIndexes: []interface{}{
				&ReplicaGlobalSecondaryIndexSpecificationProperty{
					IndexName: jsii.String("indexName"),

					// the properties below are optional
					ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
						Enabled: jsii.Boolean(false),
					},
					ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
						ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
							MaxCapacity: jsii.Number(123),
							MinCapacity: jsii.Number(123),
							TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
								TargetValue: jsii.Number(123),

								// the properties below are optional
								DisableScaleIn: jsii.Boolean(false),
								ScaleInCooldown: jsii.Number(123),
								ScaleOutCooldown: jsii.Number(123),
							},

							// the properties below are optional
							SeedCapacity: jsii.Number(123),
						},
						ReadCapacityUnits: jsii.Number(123),
					},
				},
			},
			KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
				StreamArn: jsii.String("streamArn"),
			},
			PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
				PointInTimeRecoveryEnabled: jsii.Boolean(false),
			},
			ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
				ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
					MaxCapacity: jsii.Number(123),
					MinCapacity: jsii.Number(123),
					TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
						TargetValue: jsii.Number(123),

						// the properties below are optional
						DisableScaleIn: jsii.Boolean(false),
						ScaleInCooldown: jsii.Number(123),
						ScaleOutCooldown: jsii.Number(123),
					},

					// the properties below are optional
					SeedCapacity: jsii.Number(123),
				},
				ReadCapacityUnits: jsii.Number(123),
			},
			SseSpecification: &ReplicaSSESpecificationProperty{
				KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
			},
			TableClass: jsii.String("tableClass"),
			Tags: []cfnTag{
				&cfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
		},
	},

	// the properties below are optional
	BillingMode: jsii.String("billingMode"),
	GlobalSecondaryIndexes: []interface{}{
		&GlobalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},

			// the properties below are optional
			WriteProvisionedThroughputSettings: &WriteProvisionedThroughputSettingsProperty{
				WriteCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
					MaxCapacity: jsii.Number(123),
					MinCapacity: jsii.Number(123),
					TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
						TargetValue: jsii.Number(123),

						// the properties below are optional
						DisableScaleIn: jsii.Boolean(false),
						ScaleInCooldown: jsii.Number(123),
						ScaleOutCooldown: jsii.Number(123),
					},

					// the properties below are optional
					SeedCapacity: jsii.Number(123),
				},
			},
		},
	},
	LocalSecondaryIndexes: []interface{}{
		&LocalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},
		},
	},
	SseSpecification: &SSESpecificationProperty{
		SseEnabled: jsii.Boolean(false),

		// the properties below are optional
		SseType: jsii.String("sseType"),
	},
	StreamSpecification: &StreamSpecificationProperty{
		StreamViewType: jsii.String("streamViewType"),
	},
	TableName: jsii.String("tableName"),
	TimeToLiveSpecification: &TimeToLiveSpecificationProperty{
		Enabled: jsii.Boolean(false),

		// the properties below are optional
		AttributeName: jsii.String("attributeName"),
	},
	WriteProvisionedThroughputSettings: &WriteProvisionedThroughputSettingsProperty{
		WriteCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
			MaxCapacity: jsii.Number(123),
			MinCapacity: jsii.Number(123),
			TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
				TargetValue: jsii.Number(123),

				// the properties below are optional
				DisableScaleIn: jsii.Boolean(false),
				ScaleInCooldown: jsii.Number(123),
				ScaleOutCooldown: jsii.Number(123),
			},

			// the properties below are optional
			SeedCapacity: jsii.Number(123),
		},
	},
})

func NewCfnGlobalTable

func NewCfnGlobalTable(scope constructs.Construct, id *string, props *CfnGlobalTableProps) CfnGlobalTable

Create a new `AWS::DynamoDB::GlobalTable`.

type CfnGlobalTableProps

type CfnGlobalTableProps struct {
	// A list of attributes that describe the key schema for the global table and indexes.
	AttributeDefinitions interface{} `field:"required" json:"attributeDefinitions" yaml:"attributeDefinitions"`
	// Specifies the attributes that make up the primary key for the table.
	//
	// The attributes in the `KeySchema` property must also be defined in the `AttributeDefinitions` property.
	KeySchema interface{} `field:"required" json:"keySchema" yaml:"keySchema"`
	// Specifies the list of replicas for your global table.
	//
	// The list must contain at least one element, the region where the stack defining the global table is deployed. For example, if you define your table in a stack deployed to us-east-1, you must have an entry in `Replicas` with the region us-east-1. You cannot remove the replica in the stack region.
	//
	// > Adding a replica might take a few minutes for an empty table, or up to several hours for large tables. If you want to add or remove a replica, we recommend submitting an `UpdateStack` operation containing only that change.
	// >
	// > If you add or delete a replica during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new replica, you might need to manually delete the replica.
	//
	// You can create a new global table with as many replicas as needed. You can add or remove replicas after table creation, but you can only add or remove a single replica in each update.
	Replicas interface{} `field:"required" json:"replicas" yaml:"replicas"`
	// Specifies how you are charged for read and write throughput and how you manage capacity. Valid values are:.
	//
	// - `PAY_PER_REQUEST`
	// - `PROVISIONED`
	//
	// All replicas in your global table will have the same billing mode. If you use `PROVISIONED` billing mode, you must provide an auto scaling configuration via the `WriteProvisionedThroughputSettings` property. The default value of this property is `PROVISIONED` .
	BillingMode *string `field:"optional" json:"billingMode" yaml:"billingMode"`
	// Global secondary indexes to be created on the global table.
	//
	// You can create up to 20 global secondary indexes. Each replica in your global table will have the same global secondary index settings. You can only create or delete one global secondary index in a single stack operation.
	//
	// Since the backfilling of an index could take a long time, CloudFormation does not wait for the index to become active. If a stack operation rolls back, CloudFormation might not delete an index that has been added. In that case, you will need to delete the index manually.
	GlobalSecondaryIndexes interface{} `field:"optional" json:"globalSecondaryIndexes" yaml:"globalSecondaryIndexes"`
	// Local secondary indexes to be created on the table.
	//
	// You can create up to five local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes. Each replica in your global table will have the same local secondary index settings.
	LocalSecondaryIndexes interface{} `field:"optional" json:"localSecondaryIndexes" yaml:"localSecondaryIndexes"`
	// Specifies the settings to enable server-side encryption.
	//
	// These settings will be applied to all replicas. If you plan to use customer-managed KMS keys, you must provide a key for each replica using the `ReplicaSpecification.ReplicaSSESpecification` property.
	SseSpecification interface{} `field:"optional" json:"sseSpecification" yaml:"sseSpecification"`
	// Specifies the streams settings on your global table.
	//
	// You must provide a value for this property if your global table contains more than one replica. You can only change the streams settings if your global table has only one replica.
	StreamSpecification interface{} `field:"optional" json:"streamSpecification" yaml:"streamSpecification"`
	// A name for the global table.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID as the table name. For more information, see [Name type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	TableName *string `field:"optional" json:"tableName" yaml:"tableName"`
	// Specifies the time to live (TTL) settings for the table.
	//
	// This setting will be applied to all replicas.
	TimeToLiveSpecification interface{} `field:"optional" json:"timeToLiveSpecification" yaml:"timeToLiveSpecification"`
	// Specifies an auto scaling policy for write capacity.
	//
	// This policy will be applied to all replicas. This setting must be specified if `BillingMode` is set to `PROVISIONED` .
	WriteProvisionedThroughputSettings interface{} `field:"optional" json:"writeProvisionedThroughputSettings" yaml:"writeProvisionedThroughputSettings"`
}

Properties for defining a `CfnGlobalTable`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnGlobalTableProps := &CfnGlobalTableProps{
	AttributeDefinitions: []interface{}{
		&AttributeDefinitionProperty{
			AttributeName: jsii.String("attributeName"),
			AttributeType: jsii.String("attributeType"),
		},
	},
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},
	Replicas: []interface{}{
		&ReplicaSpecificationProperty{
			Region: jsii.String("region"),

			// the properties below are optional
			ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
				Enabled: jsii.Boolean(false),
			},
			DeletionProtectionEnabled: jsii.Boolean(false),
			GlobalSecondaryIndexes: []interface{}{
				&ReplicaGlobalSecondaryIndexSpecificationProperty{
					IndexName: jsii.String("indexName"),

					// the properties below are optional
					ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
						Enabled: jsii.Boolean(false),
					},
					ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
						ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
							MaxCapacity: jsii.Number(123),
							MinCapacity: jsii.Number(123),
							TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
								TargetValue: jsii.Number(123),

								// the properties below are optional
								DisableScaleIn: jsii.Boolean(false),
								ScaleInCooldown: jsii.Number(123),
								ScaleOutCooldown: jsii.Number(123),
							},

							// the properties below are optional
							SeedCapacity: jsii.Number(123),
						},
						ReadCapacityUnits: jsii.Number(123),
					},
				},
			},
			KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
				StreamArn: jsii.String("streamArn"),
			},
			PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
				PointInTimeRecoveryEnabled: jsii.Boolean(false),
			},
			ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
				ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
					MaxCapacity: jsii.Number(123),
					MinCapacity: jsii.Number(123),
					TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
						TargetValue: jsii.Number(123),

						// the properties below are optional
						DisableScaleIn: jsii.Boolean(false),
						ScaleInCooldown: jsii.Number(123),
						ScaleOutCooldown: jsii.Number(123),
					},

					// the properties below are optional
					SeedCapacity: jsii.Number(123),
				},
				ReadCapacityUnits: jsii.Number(123),
			},
			SseSpecification: &ReplicaSSESpecificationProperty{
				KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
			},
			TableClass: jsii.String("tableClass"),
			Tags: []cfnTag{
				&cfnTag{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
		},
	},

	// the properties below are optional
	BillingMode: jsii.String("billingMode"),
	GlobalSecondaryIndexes: []interface{}{
		&GlobalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},

			// the properties below are optional
			WriteProvisionedThroughputSettings: &WriteProvisionedThroughputSettingsProperty{
				WriteCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
					MaxCapacity: jsii.Number(123),
					MinCapacity: jsii.Number(123),
					TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
						TargetValue: jsii.Number(123),

						// the properties below are optional
						DisableScaleIn: jsii.Boolean(false),
						ScaleInCooldown: jsii.Number(123),
						ScaleOutCooldown: jsii.Number(123),
					},

					// the properties below are optional
					SeedCapacity: jsii.Number(123),
				},
			},
		},
	},
	LocalSecondaryIndexes: []interface{}{
		&LocalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},
		},
	},
	SseSpecification: &SSESpecificationProperty{
		SseEnabled: jsii.Boolean(false),

		// the properties below are optional
		SseType: jsii.String("sseType"),
	},
	StreamSpecification: &StreamSpecificationProperty{
		StreamViewType: jsii.String("streamViewType"),
	},
	TableName: jsii.String("tableName"),
	TimeToLiveSpecification: &TimeToLiveSpecificationProperty{
		Enabled: jsii.Boolean(false),

		// the properties below are optional
		AttributeName: jsii.String("attributeName"),
	},
	WriteProvisionedThroughputSettings: &WriteProvisionedThroughputSettingsProperty{
		WriteCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
			MaxCapacity: jsii.Number(123),
			MinCapacity: jsii.Number(123),
			TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
				TargetValue: jsii.Number(123),

				// the properties below are optional
				DisableScaleIn: jsii.Boolean(false),
				ScaleInCooldown: jsii.Number(123),
				ScaleOutCooldown: jsii.Number(123),
			},

			// the properties below are optional
			SeedCapacity: jsii.Number(123),
		},
	},
}

type CfnGlobalTable_AttributeDefinitionProperty

type CfnGlobalTable_AttributeDefinitionProperty struct {
	// A name for the attribute.
	AttributeName *string `field:"required" json:"attributeName" yaml:"attributeName"`
	// The data type for the attribute, where:.
	//
	// - `S` - the attribute is of type String
	// - `N` - the attribute is of type Number
	// - `B` - the attribute is of type Binary.
	AttributeType *string `field:"required" json:"attributeType" yaml:"attributeType"`
}

Represents an attribute for describing the key schema for the table and indexes.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

attributeDefinitionProperty := &AttributeDefinitionProperty{
	AttributeName: jsii.String("attributeName"),
	AttributeType: jsii.String("attributeType"),
}

type CfnGlobalTable_CapacityAutoScalingSettingsProperty

type CfnGlobalTable_CapacityAutoScalingSettingsProperty struct {
	// The maximum provisioned capacity units for the global table.
	MaxCapacity *float64 `field:"required" json:"maxCapacity" yaml:"maxCapacity"`
	// The minimum provisioned capacity units for the global table.
	MinCapacity *float64 `field:"required" json:"minCapacity" yaml:"minCapacity"`
	// Defines a target tracking scaling policy.
	TargetTrackingScalingPolicyConfiguration interface{} `field:"required" json:"targetTrackingScalingPolicyConfiguration" yaml:"targetTrackingScalingPolicyConfiguration"`
	// When switching billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , DynamoDB requires you to specify read and write capacity unit values for the table and for each global secondary index.
	//
	// These values will be applied to all replicas. The table will use these provisioned values until CloudFormation creates the autoscaling policies you configured in your template. CloudFormation cannot determine what capacity the table and its global secondary indexes will require in this time period, since they are application-dependent.
	//
	// If you want to switch a table's billing mode from `PAY_PER_REQUEST` to `PROVISIONED` , you must specify a value for this property for each autoscaled resource. If you specify different values for the same resource in different regions, CloudFormation will use the highest value found in either the `SeedCapacity` or `ReadCapacityUnits` properties. For example, if your global secondary index `myGSI` has a `SeedCapacity` of 10 in us-east-1 and a fixed `ReadCapacityUnits` of 20 in eu-west-1, CloudFormation will initially set the read capacity for `myGSI` to 20. Note that if you disable `ScaleIn` for `myGSI` in us-east-1, its read capacity units might not be set back to 10.
	//
	// You must also specify a value for `SeedCapacity` when you plan to switch a table's billing mode from `PROVISIONED` to `PAY_PER_REQUEST` , because CloudFormation might need to roll back the operation (reverting the billing mode to `PROVISIONED` ) and this cannot succeed without specifying a value for `SeedCapacity` .
	SeedCapacity *float64 `field:"optional" json:"seedCapacity" yaml:"seedCapacity"`
}

Configures a scalable target and an autoscaling policy for a table or global secondary index's read or write capacity.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

capacityAutoScalingSettingsProperty := &CapacityAutoScalingSettingsProperty{
	MaxCapacity: jsii.Number(123),
	MinCapacity: jsii.Number(123),
	TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
		TargetValue: jsii.Number(123),

		// the properties below are optional
		DisableScaleIn: jsii.Boolean(false),
		ScaleInCooldown: jsii.Number(123),
		ScaleOutCooldown: jsii.Number(123),
	},

	// the properties below are optional
	SeedCapacity: jsii.Number(123),
}

type CfnGlobalTable_ContributorInsightsSpecificationProperty

type CfnGlobalTable_ContributorInsightsSpecificationProperty struct {
	// Indicates whether CloudWatch Contributor Insights are to be enabled (true) or disabled (false).
	Enabled interface{} `field:"required" json:"enabled" yaml:"enabled"`
}

Configures contributor insights settings for a replica or one of its indexes.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

contributorInsightsSpecificationProperty := &ContributorInsightsSpecificationProperty{
	Enabled: jsii.Boolean(false),
}

type CfnGlobalTable_GlobalSecondaryIndexProperty

type CfnGlobalTable_GlobalSecondaryIndexProperty struct {
	// The name of the global secondary index.
	//
	// The name must be unique among all other indexes on this table.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:  - `HASH` - partition key - `RANGE` - sort key  > The partition key of an item is also known as its *hash attribute* .
	//
	// The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
	// >
	// > The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
	KeySchema interface{} `field:"required" json:"keySchema" yaml:"keySchema"`
	// Represents attributes that are copied (projected) from the table into the global secondary index.
	//
	// These are in addition to the primary key attributes and index key attributes, which are automatically projected.
	Projection interface{} `field:"required" json:"projection" yaml:"projection"`
	// Defines write capacity settings for the global secondary index.
	//
	// You must specify a value for this property if the table's `BillingMode` is `PROVISIONED` . All replicas will have the same write capacity settings for this global secondary index.
	WriteProvisionedThroughputSettings interface{} `field:"optional" json:"writeProvisionedThroughputSettings" yaml:"writeProvisionedThroughputSettings"`
}

Allows you to specify a global secondary index for the global table.

The index will be defined on all replicas.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

globalSecondaryIndexProperty := &GlobalSecondaryIndexProperty{
	IndexName: jsii.String("indexName"),
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},
	Projection: &ProjectionProperty{
		NonKeyAttributes: []*string{
			jsii.String("nonKeyAttributes"),
		},
		ProjectionType: jsii.String("projectionType"),
	},

	// the properties below are optional
	WriteProvisionedThroughputSettings: &WriteProvisionedThroughputSettingsProperty{
		WriteCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
			MaxCapacity: jsii.Number(123),
			MinCapacity: jsii.Number(123),
			TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
				TargetValue: jsii.Number(123),

				// the properties below are optional
				DisableScaleIn: jsii.Boolean(false),
				ScaleInCooldown: jsii.Number(123),
				ScaleOutCooldown: jsii.Number(123),
			},

			// the properties below are optional
			SeedCapacity: jsii.Number(123),
		},
	},
}

type CfnGlobalTable_KeySchemaProperty

type CfnGlobalTable_KeySchemaProperty struct {
	// The name of a key attribute.
	AttributeName *string `field:"required" json:"attributeName" yaml:"attributeName"`
	// The role that this key attribute will assume:.
	//
	// - `HASH` - partition key
	// - `RANGE` - sort key
	//
	// > The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
	// >
	// > The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
	KeyType *string `field:"required" json:"keyType" yaml:"keyType"`
}

Represents *a single element* of a key schema.

A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

A `KeySchemaElement` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one `KeySchemaElement` (for the partition key). A composite primary key would require one `KeySchemaElement` for the partition key, and another `KeySchemaElement` for the sort key.

A `KeySchemaElement` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

keySchemaProperty := &KeySchemaProperty{
	AttributeName: jsii.String("attributeName"),
	KeyType: jsii.String("keyType"),
}

type CfnGlobalTable_KinesisStreamSpecificationProperty added in v2.70.0

type CfnGlobalTable_KinesisStreamSpecificationProperty struct {
	// The ARN for a specific Kinesis data stream.
	StreamArn *string `field:"required" json:"streamArn" yaml:"streamArn"`
}

The Kinesis Data Streams configuration for the specified global table replica.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

kinesisStreamSpecificationProperty := &KinesisStreamSpecificationProperty{
	StreamArn: jsii.String("streamArn"),
}

type CfnGlobalTable_LocalSecondaryIndexProperty

type CfnGlobalTable_LocalSecondaryIndexProperty struct {
	// The name of the local secondary index.
	//
	// The name must be unique among all other indexes on this table.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:  - `HASH` - partition key - `RANGE` - sort key  > The partition key of an item is also known as its *hash attribute* .
	//
	// The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
	// >
	// > The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
	KeySchema interface{} `field:"required" json:"keySchema" yaml:"keySchema"`
	// Represents attributes that are copied (projected) from the table into the local secondary index.
	//
	// These are in addition to the primary key attributes and index key attributes, which are automatically projected.
	Projection interface{} `field:"required" json:"projection" yaml:"projection"`
}

Represents the properties of a local secondary index.

A local secondary index can only be created when its parent table is created.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

localSecondaryIndexProperty := &LocalSecondaryIndexProperty{
	IndexName: jsii.String("indexName"),
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},
	Projection: &ProjectionProperty{
		NonKeyAttributes: []*string{
			jsii.String("nonKeyAttributes"),
		},
		ProjectionType: jsii.String("projectionType"),
	},
}

type CfnGlobalTable_PointInTimeRecoverySpecificationProperty

type CfnGlobalTable_PointInTimeRecoverySpecificationProperty struct {
	// Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.
	PointInTimeRecoveryEnabled interface{} `field:"optional" json:"pointInTimeRecoveryEnabled" yaml:"pointInTimeRecoveryEnabled"`
}

Represents the settings used to enable point in time recovery.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

pointInTimeRecoverySpecificationProperty := &PointInTimeRecoverySpecificationProperty{
	PointInTimeRecoveryEnabled: jsii.Boolean(false),
}

type CfnGlobalTable_ProjectionProperty

type CfnGlobalTable_ProjectionProperty struct {
	// Represents the non-key attribute names which will be projected into the index.
	//
	// For local secondary indexes, the total count of `NonKeyAttributes` summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
	NonKeyAttributes *[]*string `field:"optional" json:"nonKeyAttributes" yaml:"nonKeyAttributes"`
	// The set of attributes that are projected into the index:.
	//
	// - `KEYS_ONLY` - Only the index and primary keys are projected into the index.
	// - `INCLUDE` - In addition to the attributes described in `KEYS_ONLY` , the secondary index will include other non-key attributes that you specify.
	// - `ALL` - All of the table attributes are projected into the index.
	ProjectionType *string `field:"optional" json:"projectionType" yaml:"projectionType"`
}

Represents attributes that are copied (projected) from the table into an index.

These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

projectionProperty := &ProjectionProperty{
	NonKeyAttributes: []*string{
		jsii.String("nonKeyAttributes"),
	},
	ProjectionType: jsii.String("projectionType"),
}

type CfnGlobalTable_ReadProvisionedThroughputSettingsProperty

type CfnGlobalTable_ReadProvisionedThroughputSettingsProperty struct {
	// Specifies auto scaling settings for the replica table or global secondary index.
	ReadCapacityAutoScalingSettings interface{} `field:"optional" json:"readCapacityAutoScalingSettings" yaml:"readCapacityAutoScalingSettings"`
	// Specifies a fixed read capacity for the replica table or global secondary index.
	ReadCapacityUnits *float64 `field:"optional" json:"readCapacityUnits" yaml:"readCapacityUnits"`
}

Allows you to specify the read capacity settings for a replica table or a replica global secondary index when the `BillingMode` is set to `PROVISIONED` .

You must specify a value for either `ReadCapacityUnits` or `ReadCapacityAutoScalingSettings` , but not both. You can switch between fixed capacity and auto scaling.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

readProvisionedThroughputSettingsProperty := &ReadProvisionedThroughputSettingsProperty{
	ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
		MaxCapacity: jsii.Number(123),
		MinCapacity: jsii.Number(123),
		TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
			TargetValue: jsii.Number(123),

			// the properties below are optional
			DisableScaleIn: jsii.Boolean(false),
			ScaleInCooldown: jsii.Number(123),
			ScaleOutCooldown: jsii.Number(123),
		},

		// the properties below are optional
		SeedCapacity: jsii.Number(123),
	},
	ReadCapacityUnits: jsii.Number(123),
}

type CfnGlobalTable_ReplicaGlobalSecondaryIndexSpecificationProperty

type CfnGlobalTable_ReplicaGlobalSecondaryIndexSpecificationProperty struct {
	// The name of the global secondary index.
	//
	// The name must be unique among all other indexes on this table.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// Updates the status for contributor insights for a specific table or index.
	//
	// CloudWatch Contributor Insights for DynamoDB graphs display the partition key and (if applicable) sort key of frequently accessed items and frequently throttled items in plaintext. If you require the use of AWS Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an AWS managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.
	ContributorInsightsSpecification interface{} `field:"optional" json:"contributorInsightsSpecification" yaml:"contributorInsightsSpecification"`
	// Allows you to specify the read capacity settings for a replica global secondary index when the `BillingMode` is set to `PROVISIONED` .
	ReadProvisionedThroughputSettings interface{} `field:"optional" json:"readProvisionedThroughputSettings" yaml:"readProvisionedThroughputSettings"`
}

Represents the properties of a global secondary index that can be set on a per-replica basis.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

replicaGlobalSecondaryIndexSpecificationProperty := &ReplicaGlobalSecondaryIndexSpecificationProperty{
	IndexName: jsii.String("indexName"),

	// the properties below are optional
	ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
		Enabled: jsii.Boolean(false),
	},
	ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
		ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
			MaxCapacity: jsii.Number(123),
			MinCapacity: jsii.Number(123),
			TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
				TargetValue: jsii.Number(123),

				// the properties below are optional
				DisableScaleIn: jsii.Boolean(false),
				ScaleInCooldown: jsii.Number(123),
				ScaleOutCooldown: jsii.Number(123),
			},

			// the properties below are optional
			SeedCapacity: jsii.Number(123),
		},
		ReadCapacityUnits: jsii.Number(123),
	},
}

type CfnGlobalTable_ReplicaSSESpecificationProperty

type CfnGlobalTable_ReplicaSSESpecificationProperty struct {
	// The AWS KMS key that should be used for the AWS KMS encryption.
	//
	// To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key `alias/aws/dynamodb` .
	KmsMasterKeyId *string `field:"required" json:"kmsMasterKeyId" yaml:"kmsMasterKeyId"`
}

Allows you to specify a KMS key identifier to be used for server-side encryption.

The key can be specified via ARN, key ID, or alias. The key must be created in the same region as the replica.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

replicaSSESpecificationProperty := &ReplicaSSESpecificationProperty{
	KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
}

type CfnGlobalTable_ReplicaSpecificationProperty

type CfnGlobalTable_ReplicaSpecificationProperty struct {
	// The region in which this replica exists.
	Region *string `field:"required" json:"region" yaml:"region"`
	// The settings used to enable or disable CloudWatch Contributor Insights for the specified replica.
	//
	// When not specified, defaults to contributor insights disabled for the replica.
	ContributorInsightsSpecification interface{} `field:"optional" json:"contributorInsightsSpecification" yaml:"contributorInsightsSpecification"`
	// Determines if a replica is protected from deletion.
	//
	// When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see [Using deletion protection](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html#WorkingWithTables.Basics.DeletionProtection) in the *Amazon DynamoDB Developer Guide* .
	DeletionProtectionEnabled interface{} `field:"optional" json:"deletionProtectionEnabled" yaml:"deletionProtectionEnabled"`
	// Defines additional settings for the global secondary indexes of this replica.
	GlobalSecondaryIndexes interface{} `field:"optional" json:"globalSecondaryIndexes" yaml:"globalSecondaryIndexes"`
	// Defines the Kinesis Data Streams configuration for the specified replica.
	KinesisStreamSpecification interface{} `field:"optional" json:"kinesisStreamSpecification" yaml:"kinesisStreamSpecification"`
	// The settings used to enable point in time recovery.
	//
	// When not specified, defaults to point in time recovery disabled for the replica.
	PointInTimeRecoverySpecification interface{} `field:"optional" json:"pointInTimeRecoverySpecification" yaml:"pointInTimeRecoverySpecification"`
	// Defines read capacity settings for the replica table.
	ReadProvisionedThroughputSettings interface{} `field:"optional" json:"readProvisionedThroughputSettings" yaml:"readProvisionedThroughputSettings"`
	// Allows you to specify a customer-managed key for the replica.
	//
	// When using customer-managed keys for server-side encryption, this property must have a value in all replicas.
	SseSpecification interface{} `field:"optional" json:"sseSpecification" yaml:"sseSpecification"`
	// The table class of the specified table.
	//
	// Valid values are `STANDARD` and `STANDARD_INFREQUENT_ACCESS` .
	TableClass *string `field:"optional" json:"tableClass" yaml:"tableClass"`
	// An array of key-value pairs to apply to this replica.
	//
	// For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
}

Defines settings specific to a single replica of a global table.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

replicaSpecificationProperty := &ReplicaSpecificationProperty{
	Region: jsii.String("region"),

	// the properties below are optional
	ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
		Enabled: jsii.Boolean(false),
	},
	DeletionProtectionEnabled: jsii.Boolean(false),
	GlobalSecondaryIndexes: []interface{}{
		&ReplicaGlobalSecondaryIndexSpecificationProperty{
			IndexName: jsii.String("indexName"),

			// the properties below are optional
			ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
				Enabled: jsii.Boolean(false),
			},
			ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
				ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
					MaxCapacity: jsii.Number(123),
					MinCapacity: jsii.Number(123),
					TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
						TargetValue: jsii.Number(123),

						// the properties below are optional
						DisableScaleIn: jsii.Boolean(false),
						ScaleInCooldown: jsii.Number(123),
						ScaleOutCooldown: jsii.Number(123),
					},

					// the properties below are optional
					SeedCapacity: jsii.Number(123),
				},
				ReadCapacityUnits: jsii.Number(123),
			},
		},
	},
	KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
		StreamArn: jsii.String("streamArn"),
	},
	PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
		PointInTimeRecoveryEnabled: jsii.Boolean(false),
	},
	ReadProvisionedThroughputSettings: &ReadProvisionedThroughputSettingsProperty{
		ReadCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
			MaxCapacity: jsii.Number(123),
			MinCapacity: jsii.Number(123),
			TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
				TargetValue: jsii.Number(123),

				// the properties below are optional
				DisableScaleIn: jsii.Boolean(false),
				ScaleInCooldown: jsii.Number(123),
				ScaleOutCooldown: jsii.Number(123),
			},

			// the properties below are optional
			SeedCapacity: jsii.Number(123),
		},
		ReadCapacityUnits: jsii.Number(123),
	},
	SseSpecification: &ReplicaSSESpecificationProperty{
		KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
	},
	TableClass: jsii.String("tableClass"),
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

type CfnGlobalTable_SSESpecificationProperty

type CfnGlobalTable_SSESpecificationProperty struct {
	// Indicates whether server-side encryption is performed using an AWS managed key or an AWS owned key.
	//
	// If enabled (true), server-side encryption type is set to KMS and an AWS managed key is used ( AWS KMS charges apply). If disabled (false) or not specified,server-side encryption is set to an AWS owned key. If you choose to use KMS encryption, you can also use customer managed KMS keys by specifying them in the `ReplicaSpecification.SSESpecification` object. You cannot mix AWS managed and customer managed KMS keys.
	SseEnabled interface{} `field:"required" json:"sseEnabled" yaml:"sseEnabled"`
	// Server-side encryption type. The only supported value is:.
	//
	// - `KMS` - Server-side encryption that uses AWS Key Management Service . The key is stored in your account and is managed by AWS KMS ( AWS KMS charges apply).
	SseType *string `field:"optional" json:"sseType" yaml:"sseType"`
}

Represents the settings used to enable server-side encryption.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

sSESpecificationProperty := &SSESpecificationProperty{
	SseEnabled: jsii.Boolean(false),

	// the properties below are optional
	SseType: jsii.String("sseType"),
}

type CfnGlobalTable_StreamSpecificationProperty

type CfnGlobalTable_StreamSpecificationProperty struct {
	// When an item in the table is modified, `StreamViewType` determines what information is written to the stream for this table.
	//
	// Valid values for `StreamViewType` are:
	//
	// - `KEYS_ONLY` - Only the key attributes of the modified item are written to the stream.
	// - `NEW_IMAGE` - The entire item, as it appears after it was modified, is written to the stream.
	// - `OLD_IMAGE` - The entire item, as it appeared before it was modified, is written to the stream.
	// - `NEW_AND_OLD_IMAGES` - Both the new and the old item images of the item are written to the stream.
	StreamViewType *string `field:"required" json:"streamViewType" yaml:"streamViewType"`
}

Represents the DynamoDB Streams configuration for a table in DynamoDB.

You can only modify this value if your `AWS::DynamoDB::GlobalTable` contains only one entry in `Replicas` . You must specify a value for this property if your `AWS::DynamoDB::GlobalTable` contains more than one replica.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

streamSpecificationProperty := &StreamSpecificationProperty{
	StreamViewType: jsii.String("streamViewType"),
}

type CfnGlobalTable_TargetTrackingScalingPolicyConfigurationProperty

type CfnGlobalTable_TargetTrackingScalingPolicyConfigurationProperty struct {
	// Defines a target value for the scaling policy.
	TargetValue *float64 `field:"required" json:"targetValue" yaml:"targetValue"`
	// Indicates whether scale in by the target tracking scaling policy is disabled.
	//
	// The default value is `false` .
	DisableScaleIn interface{} `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
	// The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.
	ScaleInCooldown *float64 `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
	// The amount of time, in seconds, after a scale-out activity completes before another scale-out activity can start.
	ScaleOutCooldown *float64 `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
}

Defines a target tracking scaling policy.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

targetTrackingScalingPolicyConfigurationProperty := &TargetTrackingScalingPolicyConfigurationProperty{
	TargetValue: jsii.Number(123),

	// the properties below are optional
	DisableScaleIn: jsii.Boolean(false),
	ScaleInCooldown: jsii.Number(123),
	ScaleOutCooldown: jsii.Number(123),
}

type CfnGlobalTable_TimeToLiveSpecificationProperty

type CfnGlobalTable_TimeToLiveSpecificationProperty struct {
	// Indicates whether TTL is to be enabled (true) or disabled (false) on the table.
	Enabled interface{} `field:"required" json:"enabled" yaml:"enabled"`
	// The name of the attribute used to store the expiration time for items in the table.
	//
	// Currently, you cannot directly change the attribute name used to evaluate time to live. In order to do so, you must first disable time to live, and then re-enable it with the new attribute name. It can take up to one hour for changes to time to live to take effect. If you attempt to modify time to live within that time window, your stack operation might be delayed.
	AttributeName *string `field:"optional" json:"attributeName" yaml:"attributeName"`
}

Represents the settings used to enable or disable Time to Live (TTL) for the specified table.

All replicas will have the same time to live configuration.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

timeToLiveSpecificationProperty := &TimeToLiveSpecificationProperty{
	Enabled: jsii.Boolean(false),

	// the properties below are optional
	AttributeName: jsii.String("attributeName"),
}

type CfnGlobalTable_WriteProvisionedThroughputSettingsProperty

type CfnGlobalTable_WriteProvisionedThroughputSettingsProperty struct {
	// Specifies auto scaling settings for the replica table or global secondary index.
	WriteCapacityAutoScalingSettings interface{} `field:"optional" json:"writeCapacityAutoScalingSettings" yaml:"writeCapacityAutoScalingSettings"`
}

Specifies an auto scaling policy for write capacity.

This policy will be applied to all replicas. This setting must be specified if `BillingMode` is set to `PROVISIONED` .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

writeProvisionedThroughputSettingsProperty := &WriteProvisionedThroughputSettingsProperty{
	WriteCapacityAutoScalingSettings: &CapacityAutoScalingSettingsProperty{
		MaxCapacity: jsii.Number(123),
		MinCapacity: jsii.Number(123),
		TargetTrackingScalingPolicyConfiguration: &TargetTrackingScalingPolicyConfigurationProperty{
			TargetValue: jsii.Number(123),

			// the properties below are optional
			DisableScaleIn: jsii.Boolean(false),
			ScaleInCooldown: jsii.Number(123),
			ScaleOutCooldown: jsii.Number(123),
		},

		// the properties below are optional
		SeedCapacity: jsii.Number(123),
	},
}

type CfnTable

type CfnTable interface {
	awscdk.CfnResource
	awscdk.IInspectable
	// The Amazon Resource Name (ARN) of the DynamoDB table, such as `arn:aws:dynamodb:us-east-2:123456789012:table/myDynamoDBTable` .
	AttrArn() *string
	// A list of attributes that describe the key schema for the table and indexes.
	//
	// This property is required to create a DynamoDB table.
	//
	// Update requires: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt) . Replacement if you edit an existing AttributeDefinition.
	AttributeDefinitions() interface{}
	SetAttributeDefinitions(val interface{})
	// The ARN of the DynamoDB stream, such as `arn:aws:dynamodb:us-east-1:123456789012:table/testddbstack-myDynamoDBTable-012A1SL7SMP5Q/stream/2015-11-30T20:10:00.000` .
	//
	// > You must specify the `StreamSpecification` property to use this attribute.
	AttrStreamArn() *string
	// Specify how you are charged for read and write throughput and how you manage capacity.
	//
	// Valid values include:
	//
	// - `PROVISIONED` - We recommend using `PROVISIONED` for predictable workloads. `PROVISIONED` sets the billing mode to [Provisioned Mode](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual) .
	// - `PAY_PER_REQUEST` - We recommend using `PAY_PER_REQUEST` for unpredictable workloads. `PAY_PER_REQUEST` sets the billing mode to [On-Demand Mode](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand) .
	//
	// If not specified, the default is `PROVISIONED` .
	BillingMode() *string
	SetBillingMode(val *string)
	// Options for this resource, such as condition, update policy etc.
	CfnOptions() awscdk.ICfnResourceOptions
	CfnProperties() *map[string]interface{}
	// AWS resource type.
	CfnResourceType() *string
	// The settings used to enable or disable CloudWatch Contributor Insights for the specified table.
	ContributorInsightsSpecification() interface{}
	SetContributorInsightsSpecification(val interface{})
	// Returns: the stack trace of the point where this Resource was created from, sourced
	// from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most
	// node +internal+ entries filtered.
	CreationStack() *[]*string
	// Determines if a table is protected from deletion.
	//
	// When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see [Using deletion protection](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html#WorkingWithTables.Basics.DeletionProtection) in the *Amazon DynamoDB Developer Guide* .
	DeletionProtectionEnabled() interface{}
	SetDeletionProtectionEnabled(val interface{})
	// Global secondary indexes to be created on the table. You can create up to 20 global secondary indexes.
	//
	// > If you update a table to include a new global secondary index, AWS CloudFormation initiates the index creation and then proceeds with the stack update. AWS CloudFormation doesn't wait for the index to complete creation because the backfilling phase can take a long time, depending on the size of the table. You can't use the index or update the table until the index's status is `ACTIVE` . You can track its status by using the DynamoDB [DescribeTable](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/describe-table.html) command.
	// >
	// > If you add or delete an index during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new index, you must manually delete the index.
	// >
	// > Updates are not supported. The following are exceptions:
	// >
	// > - If you update either the contributor insights specification or the provisioned throughput values of global secondary indexes, you can update the table without interruption.
	// > - You can delete or add one global secondary index without interruption. If you do both in the same update (for example, by changing the index's logical ID), the update fails.
	GlobalSecondaryIndexes() interface{}
	SetGlobalSecondaryIndexes(val interface{})
	// Specifies the properties of data being imported from the S3 bucket source to the table.
	//
	// > If you specify the `ImportSourceSpecification` property, and also specify either the `StreamSpecification` , the `TableClass` property, or the `DeletionProtectionEnabled` property, the IAM entity creating/updating stack must have `UpdateTable` permission.
	ImportSourceSpecification() interface{}
	SetImportSourceSpecification(val interface{})
	// Specifies the attributes that make up the primary key for the table.
	//
	// The attributes in the `KeySchema` property must also be defined in the `AttributeDefinitions` property.
	KeySchema() interface{}
	SetKeySchema(val interface{})
	// The Kinesis Data Streams configuration for the specified table.
	KinesisStreamSpecification() interface{}
	SetKinesisStreamSpecification(val interface{})
	// Local secondary indexes to be created on the table.
	//
	// You can create up to 5 local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes.
	LocalSecondaryIndexes() interface{}
	SetLocalSecondaryIndexes(val interface{})
	// The logical ID for this CloudFormation stack element.
	//
	// The logical ID of the element
	// is calculated from the path of the resource node in the construct tree.
	//
	// To override this value, use `overrideLogicalId(newLogicalId)`.
	//
	// Returns: the logical ID as a stringified token. This value will only get
	// resolved during synthesis.
	LogicalId() *string
	// The tree node.
	Node() constructs.Node
	// The settings used to enable point in time recovery.
	PointInTimeRecoverySpecification() interface{}
	SetPointInTimeRecoverySpecification(val interface{})
	// Throughput for the specified table, which consists of values for `ReadCapacityUnits` and `WriteCapacityUnits` .
	//
	// For more information about the contents of a provisioned throughput structure, see [Amazon DynamoDB Table ProvisionedThroughput](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ProvisionedThroughput.html) .
	//
	// If you set `BillingMode` as `PROVISIONED` , you must specify this property. If you set `BillingMode` as `PAY_PER_REQUEST` , you cannot specify this property.
	ProvisionedThroughput() interface{}
	SetProvisionedThroughput(val interface{})
	// Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
	//
	// If, by any chance, the intrinsic reference of a resource is not a string, you could
	// coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
	Ref() *string
	// Specifies the settings to enable server-side encryption.
	SseSpecification() interface{}
	SetSseSpecification(val interface{})
	// The stack in which this element is defined.
	//
	// CfnElements must be defined within a stack scope (directly or indirectly).
	Stack() awscdk.Stack
	// The settings for the DynamoDB table stream, which capture changes to items stored in the table.
	StreamSpecification() interface{}
	SetStreamSpecification(val interface{})
	// The table class of the new table.
	//
	// Valid values are `STANDARD` and `STANDARD_INFREQUENT_ACCESS` .
	TableClass() *string
	SetTableClass(val *string)
	// A name for the table.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the table name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	TableName() *string
	SetTableName(val *string)
	// An array of key-value pairs to apply to this resource.
	//
	// For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
	Tags() awscdk.TagManager
	// Specifies the Time to Live (TTL) settings for the table.
	//
	// > For detailed information about the limits in DynamoDB, see [Limits in Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) in the Amazon DynamoDB Developer Guide.
	TimeToLiveSpecification() interface{}
	SetTimeToLiveSpecification(val interface{})
	// Deprecated.
	// Deprecated: use `updatedProperties`
	//
	// Return properties modified after initiation
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperites() *map[string]interface{}
	// Return properties modified after initiation.
	//
	// Resources that expose mutable properties should override this function to
	// collect and return the properties object for this resource.
	UpdatedProperties() *map[string]interface{}
	// Syntactic sugar for `addOverride(path, undefined)`.
	AddDeletionOverride(path *string)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	//
	// This can be used for resources across stacks (or nested stack) boundaries
	// and the dependency will automatically be transferred to the relevant scope.
	AddDependency(target awscdk.CfnResource)
	// Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
	// Deprecated: use addDependency.
	AddDependsOn(target awscdk.CfnResource)
	// Add a value to the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	AddMetadata(key *string, value interface{})
	// Adds an override to the synthesized CloudFormation resource.
	//
	// To add a
	// property override, either use `addPropertyOverride` or prefix `path` with
	// "Properties." (i.e. `Properties.TopicName`).
	//
	// If the override is nested, separate each nested level using a dot (.) in the path parameter.
	// If there is an array as part of the nesting, specify the index in the path.
	//
	// To include a literal `.` in the property name, prefix with a `\`. In most
	// programming languages you will need to write this as `"\\."` because the
	// `\` itself will need to be escaped.
	//
	// For example,
	// “`typescript
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
	// cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
	// “`
	// would add the overrides
	// “`json
	// "Properties": {
	//   "GlobalSecondaryIndexes": [
	//     {
	//       "Projection": {
	//         "NonKeyAttributes": [ "myattribute" ]
	//         ...
	//       }
	//       ...
	//     },
	//     {
	//       "ProjectionType": "INCLUDE"
	//       ...
	//     },
	//   ]
	//   ...
	// }
	// “`
	//
	// The `value` argument to `addOverride` will not be processed or translated
	// in any way. Pass raw JSON values in here with the correct capitalization
	// for CloudFormation. If you pass CDK classes or structs, they will be
	// rendered with lowercased key names, and CloudFormation will reject the
	// template.
	AddOverride(path *string, value interface{})
	// Adds an override that deletes the value of a property from the resource definition.
	AddPropertyDeletionOverride(propertyPath *string)
	// Adds an override to a resource property.
	//
	// Syntactic sugar for `addOverride("Properties.<...>", value)`.
	AddPropertyOverride(propertyPath *string, value interface{})
	// Sets the deletion policy of the resource based on the removal policy specified.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
	// cases, a snapshot can be taken of the resource prior to deletion
	// (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
	// can be found in the following link:.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options
	//
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions)
	// Returns a token for an runtime attribute of this resource.
	//
	// Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
	// in case there is no generated attribute.
	GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference
	// Retrieve a value value from the CloudFormation Resource Metadata.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
	//
	// Note that this is a different set of metadata from CDK node metadata; this
	// metadata ends up in the stack template under the resource, whereas CDK
	// node metadata ends up in the Cloud Assembly.
	//
	GetMetadata(key *string) interface{}
	// Examines the CloudFormation resource and discloses attributes.
	Inspect(inspector awscdk.TreeInspector)
	// Retrieves an array of resources this resource depends on.
	//
	// This assembles dependencies on resources across stacks (including nested stacks)
	// automatically.
	ObtainDependencies() *[]interface{}
	// Get a shallow copy of dependencies between this resource and other resources in the same stack.
	ObtainResourceDependencies() *[]awscdk.CfnResource
	// Overrides the auto-generated logical ID with a specific ID.
	OverrideLogicalId(newLogicalId *string)
	// Indicates that this resource no longer depends on another resource.
	//
	// This can be used for resources across stacks (including nested stacks)
	// and the dependency will automatically be removed from the relevant scope.
	RemoveDependency(target awscdk.CfnResource)
	RenderProperties(props *map[string]interface{}) *map[string]interface{}
	// Replaces one dependency with another.
	ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource)
	// Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template.
	//
	// Returns: `true` if the resource should be included or `false` is the resource
	// should be omitted.
	ShouldSynthesize() *bool
	// Returns a string representation of this construct.
	//
	// Returns: a string representation of this resource.
	ToString() *string
	ValidateProperties(_properties interface{})
}

A CloudFormation `AWS::DynamoDB::Table`.

The `AWS::DynamoDB::Table` resource creates a DynamoDB table. For more information, see [CreateTable](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html) in the *Amazon DynamoDB API Reference* .

You should be aware of the following behaviors when working with DynamoDB tables:

- AWS CloudFormation typically creates DynamoDB tables in parallel. However, if your template includes multiple DynamoDB tables with indexes, you must declare dependencies so that the tables are created sequentially. Amazon DynamoDB limits the number of tables with secondary indexes that are in the creating state. If you create multiple tables with indexes at the same time, DynamoDB returns an error and the stack operation fails. For an example, see [DynamoDB Table with a DependsOn Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#aws-resource-dynamodb-table--examples--DynamoDB_Table_with_a_DependsOn_Attribute) .

> Our guidance is to use the latest schema documented here for your AWS CloudFormation templates. This schema supports the provisioning of all table settings below. When using this schema in your AWS CloudFormation templates, please ensure that your Identity and Access Management ( IAM ) policies are updated with appropriate permissions to allow for the authorization of these setting changes.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnTable := awscdk.Aws_dynamodb.NewCfnTable(this, jsii.String("MyCfnTable"), &CfnTableProps{
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},

	// the properties below are optional
	AttributeDefinitions: []interface{}{
		&AttributeDefinitionProperty{
			AttributeName: jsii.String("attributeName"),
			AttributeType: jsii.String("attributeType"),
		},
	},
	BillingMode: jsii.String("billingMode"),
	ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
		Enabled: jsii.Boolean(false),
	},
	DeletionProtectionEnabled: jsii.Boolean(false),
	GlobalSecondaryIndexes: []interface{}{
		&GlobalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},

			// the properties below are optional
			ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
				Enabled: jsii.Boolean(false),
			},
			ProvisionedThroughput: &ProvisionedThroughputProperty{
				ReadCapacityUnits: jsii.Number(123),
				WriteCapacityUnits: jsii.Number(123),
			},
		},
	},
	ImportSourceSpecification: &ImportSourceSpecificationProperty{
		InputFormat: jsii.String("inputFormat"),
		S3BucketSource: &S3BucketSourceProperty{
			S3Bucket: jsii.String("s3Bucket"),

			// the properties below are optional
			S3BucketOwner: jsii.String("s3BucketOwner"),
			S3KeyPrefix: jsii.String("s3KeyPrefix"),
		},

		// the properties below are optional
		InputCompressionType: jsii.String("inputCompressionType"),
		InputFormatOptions: &InputFormatOptionsProperty{
			Csv: &CsvProperty{
				Delimiter: jsii.String("delimiter"),
				HeaderList: []*string{
					jsii.String("headerList"),
				},
			},
		},
	},
	KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
		StreamArn: jsii.String("streamArn"),
	},
	LocalSecondaryIndexes: []interface{}{
		&LocalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},
		},
	},
	PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
		PointInTimeRecoveryEnabled: jsii.Boolean(false),
	},
	ProvisionedThroughput: &ProvisionedThroughputProperty{
		ReadCapacityUnits: jsii.Number(123),
		WriteCapacityUnits: jsii.Number(123),
	},
	SseSpecification: &SSESpecificationProperty{
		SseEnabled: jsii.Boolean(false),

		// the properties below are optional
		KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
		SseType: jsii.String("sseType"),
	},
	StreamSpecification: &StreamSpecificationProperty{
		StreamViewType: jsii.String("streamViewType"),
	},
	TableClass: jsii.String("tableClass"),
	TableName: jsii.String("tableName"),
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TimeToLiveSpecification: &TimeToLiveSpecificationProperty{
		AttributeName: jsii.String("attributeName"),
		Enabled: jsii.Boolean(false),
	},
})

func NewCfnTable

func NewCfnTable(scope constructs.Construct, id *string, props *CfnTableProps) CfnTable

Create a new `AWS::DynamoDB::Table`.

type CfnTableProps

type CfnTableProps struct {
	// Specifies the attributes that make up the primary key for the table.
	//
	// The attributes in the `KeySchema` property must also be defined in the `AttributeDefinitions` property.
	KeySchema interface{} `field:"required" json:"keySchema" yaml:"keySchema"`
	// A list of attributes that describe the key schema for the table and indexes.
	//
	// This property is required to create a DynamoDB table.
	//
	// Update requires: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt) . Replacement if you edit an existing AttributeDefinition.
	AttributeDefinitions interface{} `field:"optional" json:"attributeDefinitions" yaml:"attributeDefinitions"`
	// Specify how you are charged for read and write throughput and how you manage capacity.
	//
	// Valid values include:
	//
	// - `PROVISIONED` - We recommend using `PROVISIONED` for predictable workloads. `PROVISIONED` sets the billing mode to [Provisioned Mode](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual) .
	// - `PAY_PER_REQUEST` - We recommend using `PAY_PER_REQUEST` for unpredictable workloads. `PAY_PER_REQUEST` sets the billing mode to [On-Demand Mode](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand) .
	//
	// If not specified, the default is `PROVISIONED` .
	BillingMode *string `field:"optional" json:"billingMode" yaml:"billingMode"`
	// The settings used to enable or disable CloudWatch Contributor Insights for the specified table.
	ContributorInsightsSpecification interface{} `field:"optional" json:"contributorInsightsSpecification" yaml:"contributorInsightsSpecification"`
	// Determines if a table is protected from deletion.
	//
	// When enabled, the table cannot be deleted by any user or process. This setting is disabled by default. For more information, see [Using deletion protection](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html#WorkingWithTables.Basics.DeletionProtection) in the *Amazon DynamoDB Developer Guide* .
	DeletionProtectionEnabled interface{} `field:"optional" json:"deletionProtectionEnabled" yaml:"deletionProtectionEnabled"`
	// Global secondary indexes to be created on the table. You can create up to 20 global secondary indexes.
	//
	// > If you update a table to include a new global secondary index, AWS CloudFormation initiates the index creation and then proceeds with the stack update. AWS CloudFormation doesn't wait for the index to complete creation because the backfilling phase can take a long time, depending on the size of the table. You can't use the index or update the table until the index's status is `ACTIVE` . You can track its status by using the DynamoDB [DescribeTable](https://docs.aws.amazon.com/cli/latest/reference/dynamodb/describe-table.html) command.
	// >
	// > If you add or delete an index during an update, we recommend that you don't update any other resources. If your stack fails to update and is rolled back while adding a new index, you must manually delete the index.
	// >
	// > Updates are not supported. The following are exceptions:
	// >
	// > - If you update either the contributor insights specification or the provisioned throughput values of global secondary indexes, you can update the table without interruption.
	// > - You can delete or add one global secondary index without interruption. If you do both in the same update (for example, by changing the index's logical ID), the update fails.
	GlobalSecondaryIndexes interface{} `field:"optional" json:"globalSecondaryIndexes" yaml:"globalSecondaryIndexes"`
	// Specifies the properties of data being imported from the S3 bucket source to the table.
	//
	// > If you specify the `ImportSourceSpecification` property, and also specify either the `StreamSpecification` , the `TableClass` property, or the `DeletionProtectionEnabled` property, the IAM entity creating/updating stack must have `UpdateTable` permission.
	ImportSourceSpecification interface{} `field:"optional" json:"importSourceSpecification" yaml:"importSourceSpecification"`
	// The Kinesis Data Streams configuration for the specified table.
	KinesisStreamSpecification interface{} `field:"optional" json:"kinesisStreamSpecification" yaml:"kinesisStreamSpecification"`
	// Local secondary indexes to be created on the table.
	//
	// You can create up to 5 local secondary indexes. Each index is scoped to a given hash key value. The size of each hash key can be up to 10 gigabytes.
	LocalSecondaryIndexes interface{} `field:"optional" json:"localSecondaryIndexes" yaml:"localSecondaryIndexes"`
	// The settings used to enable point in time recovery.
	PointInTimeRecoverySpecification interface{} `field:"optional" json:"pointInTimeRecoverySpecification" yaml:"pointInTimeRecoverySpecification"`
	// Throughput for the specified table, which consists of values for `ReadCapacityUnits` and `WriteCapacityUnits` .
	//
	// For more information about the contents of a provisioned throughput structure, see [Amazon DynamoDB Table ProvisionedThroughput](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ProvisionedThroughput.html) .
	//
	// If you set `BillingMode` as `PROVISIONED` , you must specify this property. If you set `BillingMode` as `PAY_PER_REQUEST` , you cannot specify this property.
	ProvisionedThroughput interface{} `field:"optional" json:"provisionedThroughput" yaml:"provisionedThroughput"`
	// Specifies the settings to enable server-side encryption.
	SseSpecification interface{} `field:"optional" json:"sseSpecification" yaml:"sseSpecification"`
	// The settings for the DynamoDB table stream, which capture changes to items stored in the table.
	StreamSpecification interface{} `field:"optional" json:"streamSpecification" yaml:"streamSpecification"`
	// The table class of the new table.
	//
	// Valid values are `STANDARD` and `STANDARD_INFREQUENT_ACCESS` .
	TableClass *string `field:"optional" json:"tableClass" yaml:"tableClass"`
	// A name for the table.
	//
	// If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the table name. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html) .
	//
	// > If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
	TableName *string `field:"optional" json:"tableName" yaml:"tableName"`
	// An array of key-value pairs to apply to this resource.
	//
	// For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) .
	Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"`
	// Specifies the Time to Live (TTL) settings for the table.
	//
	// > For detailed information about the limits in DynamoDB, see [Limits in Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) in the Amazon DynamoDB Developer Guide.
	TimeToLiveSpecification interface{} `field:"optional" json:"timeToLiveSpecification" yaml:"timeToLiveSpecification"`
}

Properties for defining a `CfnTable`.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnTableProps := &CfnTableProps{
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},

	// the properties below are optional
	AttributeDefinitions: []interface{}{
		&AttributeDefinitionProperty{
			AttributeName: jsii.String("attributeName"),
			AttributeType: jsii.String("attributeType"),
		},
	},
	BillingMode: jsii.String("billingMode"),
	ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
		Enabled: jsii.Boolean(false),
	},
	DeletionProtectionEnabled: jsii.Boolean(false),
	GlobalSecondaryIndexes: []interface{}{
		&GlobalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},

			// the properties below are optional
			ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
				Enabled: jsii.Boolean(false),
			},
			ProvisionedThroughput: &ProvisionedThroughputProperty{
				ReadCapacityUnits: jsii.Number(123),
				WriteCapacityUnits: jsii.Number(123),
			},
		},
	},
	ImportSourceSpecification: &ImportSourceSpecificationProperty{
		InputFormat: jsii.String("inputFormat"),
		S3BucketSource: &S3BucketSourceProperty{
			S3Bucket: jsii.String("s3Bucket"),

			// the properties below are optional
			S3BucketOwner: jsii.String("s3BucketOwner"),
			S3KeyPrefix: jsii.String("s3KeyPrefix"),
		},

		// the properties below are optional
		InputCompressionType: jsii.String("inputCompressionType"),
		InputFormatOptions: &InputFormatOptionsProperty{
			Csv: &CsvProperty{
				Delimiter: jsii.String("delimiter"),
				HeaderList: []*string{
					jsii.String("headerList"),
				},
			},
		},
	},
	KinesisStreamSpecification: &KinesisStreamSpecificationProperty{
		StreamArn: jsii.String("streamArn"),
	},
	LocalSecondaryIndexes: []interface{}{
		&LocalSecondaryIndexProperty{
			IndexName: jsii.String("indexName"),
			KeySchema: []interface{}{
				&KeySchemaProperty{
					AttributeName: jsii.String("attributeName"),
					KeyType: jsii.String("keyType"),
				},
			},
			Projection: &ProjectionProperty{
				NonKeyAttributes: []*string{
					jsii.String("nonKeyAttributes"),
				},
				ProjectionType: jsii.String("projectionType"),
			},
		},
	},
	PointInTimeRecoverySpecification: &PointInTimeRecoverySpecificationProperty{
		PointInTimeRecoveryEnabled: jsii.Boolean(false),
	},
	ProvisionedThroughput: &ProvisionedThroughputProperty{
		ReadCapacityUnits: jsii.Number(123),
		WriteCapacityUnits: jsii.Number(123),
	},
	SseSpecification: &SSESpecificationProperty{
		SseEnabled: jsii.Boolean(false),

		// the properties below are optional
		KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
		SseType: jsii.String("sseType"),
	},
	StreamSpecification: &StreamSpecificationProperty{
		StreamViewType: jsii.String("streamViewType"),
	},
	TableClass: jsii.String("tableClass"),
	TableName: jsii.String("tableName"),
	Tags: []cfnTag{
		&cfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TimeToLiveSpecification: &TimeToLiveSpecificationProperty{
		AttributeName: jsii.String("attributeName"),
		Enabled: jsii.Boolean(false),
	},
}

type CfnTable_AttributeDefinitionProperty

type CfnTable_AttributeDefinitionProperty struct {
	// A name for the attribute.
	AttributeName *string `field:"required" json:"attributeName" yaml:"attributeName"`
	// The data type for the attribute, where:.
	//
	// - `S` - the attribute is of type String
	// - `N` - the attribute is of type Number
	// - `B` - the attribute is of type Binary.
	AttributeType *string `field:"required" json:"attributeType" yaml:"attributeType"`
}

Represents an attribute for describing the key schema for the table and indexes.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

attributeDefinitionProperty := &AttributeDefinitionProperty{
	AttributeName: jsii.String("attributeName"),
	AttributeType: jsii.String("attributeType"),
}

type CfnTable_ContributorInsightsSpecificationProperty

type CfnTable_ContributorInsightsSpecificationProperty struct {
	// Indicates whether CloudWatch Contributor Insights are to be enabled (true) or disabled (false).
	Enabled interface{} `field:"required" json:"enabled" yaml:"enabled"`
}

The settings used to enable or disable CloudWatch Contributor Insights.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

contributorInsightsSpecificationProperty := &ContributorInsightsSpecificationProperty{
	Enabled: jsii.Boolean(false),
}

type CfnTable_CsvProperty added in v2.45.0

type CfnTable_CsvProperty struct {
	// The delimiter used for separating items in the CSV file being imported.
	Delimiter *string `field:"optional" json:"delimiter" yaml:"delimiter"`
	// List of the headers used to specify a common header for all source CSV files being imported.
	//
	// If this field is specified then the first line of each CSV file is treated as data instead of the header. If this field is not specified the the first line of each CSV file is treated as the header.
	HeaderList *[]*string `field:"optional" json:"headerList" yaml:"headerList"`
}

The options for imported source files in CSV format.

The values are Delimiter and HeaderList.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

csvProperty := &CsvProperty{
	Delimiter: jsii.String("delimiter"),
	HeaderList: []*string{
		jsii.String("headerList"),
	},
}

type CfnTable_GlobalSecondaryIndexProperty

type CfnTable_GlobalSecondaryIndexProperty struct {
	// The name of the global secondary index.
	//
	// The name must be unique among all other indexes on this table.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:  - `HASH` - partition key - `RANGE` - sort key  > The partition key of an item is also known as its *hash attribute* .
	//
	// The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
	// >
	// > The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
	KeySchema interface{} `field:"required" json:"keySchema" yaml:"keySchema"`
	// Represents attributes that are copied (projected) from the table into the global secondary index.
	//
	// These are in addition to the primary key attributes and index key attributes, which are automatically projected.
	Projection interface{} `field:"required" json:"projection" yaml:"projection"`
	// The settings used to enable or disable CloudWatch Contributor Insights for the specified global secondary index.
	ContributorInsightsSpecification interface{} `field:"optional" json:"contributorInsightsSpecification" yaml:"contributorInsightsSpecification"`
	// Represents the provisioned throughput settings for the specified global secondary index.
	//
	// For current minimum and maximum provisioned throughput values, see [Service, Account, and Table Quotas](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) in the *Amazon DynamoDB Developer Guide* .
	ProvisionedThroughput interface{} `field:"optional" json:"provisionedThroughput" yaml:"provisionedThroughput"`
}

Represents the properties of a global secondary index.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

globalSecondaryIndexProperty := &GlobalSecondaryIndexProperty{
	IndexName: jsii.String("indexName"),
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},
	Projection: &ProjectionProperty{
		NonKeyAttributes: []*string{
			jsii.String("nonKeyAttributes"),
		},
		ProjectionType: jsii.String("projectionType"),
	},

	// the properties below are optional
	ContributorInsightsSpecification: &ContributorInsightsSpecificationProperty{
		Enabled: jsii.Boolean(false),
	},
	ProvisionedThroughput: &ProvisionedThroughputProperty{
		ReadCapacityUnits: jsii.Number(123),
		WriteCapacityUnits: jsii.Number(123),
	},
}

type CfnTable_ImportSourceSpecificationProperty added in v2.45.0

type CfnTable_ImportSourceSpecificationProperty struct {
	// The format of the source data.
	//
	// Valid values for `ImportFormat` are `CSV` , `DYNAMODB_JSON` or `ION` .
	InputFormat *string `field:"required" json:"inputFormat" yaml:"inputFormat"`
	// The S3 bucket that provides the source for the import.
	S3BucketSource interface{} `field:"required" json:"s3BucketSource" yaml:"s3BucketSource"`
	// Type of compression to be used on the input coming from the imported table.
	InputCompressionType *string `field:"optional" json:"inputCompressionType" yaml:"inputCompressionType"`
	// Additional properties that specify how the input is formatted,.
	InputFormatOptions interface{} `field:"optional" json:"inputFormatOptions" yaml:"inputFormatOptions"`
}

Specifies the properties of data being imported from the S3 bucket source to the table.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

importSourceSpecificationProperty := &ImportSourceSpecificationProperty{
	InputFormat: jsii.String("inputFormat"),
	S3BucketSource: &S3BucketSourceProperty{
		S3Bucket: jsii.String("s3Bucket"),

		// the properties below are optional
		S3BucketOwner: jsii.String("s3BucketOwner"),
		S3KeyPrefix: jsii.String("s3KeyPrefix"),
	},

	// the properties below are optional
	InputCompressionType: jsii.String("inputCompressionType"),
	InputFormatOptions: &InputFormatOptionsProperty{
		Csv: &CsvProperty{
			Delimiter: jsii.String("delimiter"),
			HeaderList: []*string{
				jsii.String("headerList"),
			},
		},
	},
}

type CfnTable_InputFormatOptionsProperty added in v2.45.0

type CfnTable_InputFormatOptionsProperty struct {
	// The options for imported source files in CSV format.
	//
	// The values are Delimiter and HeaderList.
	Csv interface{} `field:"optional" json:"csv" yaml:"csv"`
}

The format options for the data that was imported into the target table.

There is one value, CsvOption.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

inputFormatOptionsProperty := &InputFormatOptionsProperty{
	Csv: &CsvProperty{
		Delimiter: jsii.String("delimiter"),
		HeaderList: []*string{
			jsii.String("headerList"),
		},
	},
}

type CfnTable_KeySchemaProperty

type CfnTable_KeySchemaProperty struct {
	// The name of a key attribute.
	AttributeName *string `field:"required" json:"attributeName" yaml:"attributeName"`
	// The role that this key attribute will assume:.
	//
	// - `HASH` - partition key
	// - `RANGE` - sort key
	//
	// > The partition key of an item is also known as its *hash attribute* . The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
	// >
	// > The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
	KeyType *string `field:"required" json:"keyType" yaml:"keyType"`
}

Represents *a single element* of a key schema.

A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

A `KeySchemaElement` represents exactly one attribute of the primary key. For example, a simple primary key would be represented by one `KeySchemaElement` (for the partition key). A composite primary key would require one `KeySchemaElement` for the partition key, and another `KeySchemaElement` for the sort key.

A `KeySchemaElement` must be a scalar, top-level attribute (not a nested attribute). The data type must be one of String, Number, or Binary. The attribute cannot be nested within a List or a Map.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

keySchemaProperty := &KeySchemaProperty{
	AttributeName: jsii.String("attributeName"),
	KeyType: jsii.String("keyType"),
}

type CfnTable_KinesisStreamSpecificationProperty

type CfnTable_KinesisStreamSpecificationProperty struct {
	// The ARN for a specific Kinesis data stream.
	//
	// Length Constraints: Minimum length of 37. Maximum length of 1024.
	StreamArn *string `field:"required" json:"streamArn" yaml:"streamArn"`
}

The Kinesis Data Streams configuration for the specified table.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

kinesisStreamSpecificationProperty := &KinesisStreamSpecificationProperty{
	StreamArn: jsii.String("streamArn"),
}

type CfnTable_LocalSecondaryIndexProperty

type CfnTable_LocalSecondaryIndexProperty struct {
	// The name of the local secondary index.
	//
	// The name must be unique among all other indexes on this table.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The complete key schema for the local secondary index, consisting of one or more pairs of attribute names and key types:  - `HASH` - partition key - `RANGE` - sort key  > The partition key of an item is also known as its *hash attribute* .
	//
	// The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
	// >
	// > The sort key of an item is also known as its *range attribute* . The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
	KeySchema interface{} `field:"required" json:"keySchema" yaml:"keySchema"`
	// Represents attributes that are copied (projected) from the table into the local secondary index.
	//
	// These are in addition to the primary key attributes and index key attributes, which are automatically projected.
	Projection interface{} `field:"required" json:"projection" yaml:"projection"`
}

Represents the properties of a local secondary index.

A local secondary index can only be created when its parent table is created.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

localSecondaryIndexProperty := &LocalSecondaryIndexProperty{
	IndexName: jsii.String("indexName"),
	KeySchema: []interface{}{
		&KeySchemaProperty{
			AttributeName: jsii.String("attributeName"),
			KeyType: jsii.String("keyType"),
		},
	},
	Projection: &ProjectionProperty{
		NonKeyAttributes: []*string{
			jsii.String("nonKeyAttributes"),
		},
		ProjectionType: jsii.String("projectionType"),
	},
}

type CfnTable_PointInTimeRecoverySpecificationProperty

type CfnTable_PointInTimeRecoverySpecificationProperty struct {
	// Indicates whether point in time recovery is enabled (true) or disabled (false) on the table.
	PointInTimeRecoveryEnabled interface{} `field:"optional" json:"pointInTimeRecoveryEnabled" yaml:"pointInTimeRecoveryEnabled"`
}

The settings used to enable point in time recovery.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

pointInTimeRecoverySpecificationProperty := &PointInTimeRecoverySpecificationProperty{
	PointInTimeRecoveryEnabled: jsii.Boolean(false),
}

type CfnTable_ProjectionProperty

type CfnTable_ProjectionProperty struct {
	// Represents the non-key attribute names which will be projected into the index.
	//
	// For local secondary indexes, the total count of `NonKeyAttributes` summed across all of the local secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
	NonKeyAttributes *[]*string `field:"optional" json:"nonKeyAttributes" yaml:"nonKeyAttributes"`
	// The set of attributes that are projected into the index:.
	//
	// - `KEYS_ONLY` - Only the index and primary keys are projected into the index.
	// - `INCLUDE` - In addition to the attributes described in `KEYS_ONLY` , the secondary index will include other non-key attributes that you specify.
	// - `ALL` - All of the table attributes are projected into the index.
	ProjectionType *string `field:"optional" json:"projectionType" yaml:"projectionType"`
}

Represents attributes that are copied (projected) from the table into an index.

These are in addition to the primary key attributes and index key attributes, which are automatically projected.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

projectionProperty := &ProjectionProperty{
	NonKeyAttributes: []*string{
		jsii.String("nonKeyAttributes"),
	},
	ProjectionType: jsii.String("projectionType"),
}

type CfnTable_ProvisionedThroughputProperty

type CfnTable_ProvisionedThroughputProperty struct {
	// The maximum number of strongly consistent reads consumed per second before DynamoDB returns a `ThrottlingException` .
	//
	// For more information, see [Specifying Read and Write Requirements](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html) in the *Amazon DynamoDB Developer Guide* .
	//
	// If read/write capacity mode is `PAY_PER_REQUEST` the value is set to 0.
	ReadCapacityUnits *float64 `field:"required" json:"readCapacityUnits" yaml:"readCapacityUnits"`
	// The maximum number of writes consumed per second before DynamoDB returns a `ThrottlingException` .
	//
	// For more information, see [Specifying Read and Write Requirements](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ProvisionedThroughput.html) in the *Amazon DynamoDB Developer Guide* .
	//
	// If read/write capacity mode is `PAY_PER_REQUEST` the value is set to 0.
	WriteCapacityUnits *float64 `field:"required" json:"writeCapacityUnits" yaml:"writeCapacityUnits"`
}

Throughput for the specified table, which consists of values for `ReadCapacityUnits` and `WriteCapacityUnits` .

For more information about the contents of a provisioned throughput structure, see [Amazon DynamoDB Table ProvisionedThroughput](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ProvisionedThroughput.html) .

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

provisionedThroughputProperty := &ProvisionedThroughputProperty{
	ReadCapacityUnits: jsii.Number(123),
	WriteCapacityUnits: jsii.Number(123),
}

type CfnTable_S3BucketSourceProperty added in v2.45.0

type CfnTable_S3BucketSourceProperty struct {
	// The S3 bucket that is being imported from.
	S3Bucket *string `field:"required" json:"s3Bucket" yaml:"s3Bucket"`
	// The account number of the S3 bucket that is being imported from.
	//
	// If the bucket is owned by the requester this is optional.
	S3BucketOwner *string `field:"optional" json:"s3BucketOwner" yaml:"s3BucketOwner"`
	// The key prefix shared by all S3 Objects that are being imported.
	S3KeyPrefix *string `field:"optional" json:"s3KeyPrefix" yaml:"s3KeyPrefix"`
}

The S3 bucket that is being imported from.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

s3BucketSourceProperty := &S3BucketSourceProperty{
	S3Bucket: jsii.String("s3Bucket"),

	// the properties below are optional
	S3BucketOwner: jsii.String("s3BucketOwner"),
	S3KeyPrefix: jsii.String("s3KeyPrefix"),
}

type CfnTable_SSESpecificationProperty

type CfnTable_SSESpecificationProperty struct {
	// Indicates whether server-side encryption is done using an AWS managed key or an AWS owned key.
	//
	// If enabled (true), server-side encryption type is set to `KMS` and an AWS managed key is used ( AWS KMS charges apply). If disabled (false) or not specified, server-side encryption is set to AWS owned key.
	SseEnabled interface{} `field:"required" json:"sseEnabled" yaml:"sseEnabled"`
	// The AWS KMS key that should be used for the AWS KMS encryption.
	//
	// To specify a key, use its key ID, Amazon Resource Name (ARN), alias name, or alias ARN. Note that you should only provide this parameter if the key is different from the default DynamoDB key `alias/aws/dynamodb` .
	KmsMasterKeyId *string `field:"optional" json:"kmsMasterKeyId" yaml:"kmsMasterKeyId"`
	// Server-side encryption type. The only supported value is:.
	//
	// - `KMS` - Server-side encryption that uses AWS Key Management Service . The key is stored in your account and is managed by AWS KMS ( AWS KMS charges apply).
	SseType *string `field:"optional" json:"sseType" yaml:"sseType"`
}

Represents the settings used to enable server-side encryption.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

sSESpecificationProperty := &SSESpecificationProperty{
	SseEnabled: jsii.Boolean(false),

	// the properties below are optional
	KmsMasterKeyId: jsii.String("kmsMasterKeyId"),
	SseType: jsii.String("sseType"),
}

type CfnTable_StreamSpecificationProperty

type CfnTable_StreamSpecificationProperty struct {
	// When an item in the table is modified, `StreamViewType` determines what information is written to the stream for this table.
	//
	// Valid values for `StreamViewType` are:
	//
	// - `KEYS_ONLY` - Only the key attributes of the modified item are written to the stream.
	// - `NEW_IMAGE` - The entire item, as it appears after it was modified, is written to the stream.
	// - `OLD_IMAGE` - The entire item, as it appeared before it was modified, is written to the stream.
	// - `NEW_AND_OLD_IMAGES` - Both the new and the old item images of the item are written to the stream.
	StreamViewType *string `field:"required" json:"streamViewType" yaml:"streamViewType"`
}

Represents the DynamoDB Streams configuration for a table in DynamoDB.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

streamSpecificationProperty := &StreamSpecificationProperty{
	StreamViewType: jsii.String("streamViewType"),
}

type CfnTable_TimeToLiveSpecificationProperty

type CfnTable_TimeToLiveSpecificationProperty struct {
	// The name of the TTL attribute used to store the expiration time for items in the table.
	//
	// > - To update this property, you must first disable TTL and then enable TTL with the new attribute name.
	AttributeName *string `field:"required" json:"attributeName" yaml:"attributeName"`
	// Indicates whether TTL is to be enabled (true) or disabled (false) on the table.
	Enabled interface{} `field:"required" json:"enabled" yaml:"enabled"`
}

Represents the settings used to enable or disable Time to Live (TTL) for the specified table.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

timeToLiveSpecificationProperty := &TimeToLiveSpecificationProperty{
	AttributeName: jsii.String("attributeName"),
	Enabled: jsii.Boolean(false),
}

type EnableScalingProps

type EnableScalingProps struct {
	// Maximum capacity to scale to.
	MaxCapacity *float64 `field:"required" json:"maxCapacity" yaml:"maxCapacity"`
	// Minimum capacity to scale to.
	MinCapacity *float64 `field:"required" json:"minCapacity" yaml:"minCapacity"`
}

Properties for enabling DynamoDB capacity scaling.

Example:

globalTable := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ReplicationRegions: []*string{
		jsii.String("us-east-1"),
		jsii.String("us-east-2"),
		jsii.String("us-west-2"),
	},
	BillingMode: dynamodb.BillingMode_PROVISIONED,
})

globalTable.AutoScaleWriteCapacity(&EnableScalingProps{
	MinCapacity: jsii.Number(1),
	MaxCapacity: jsii.Number(10),
}).ScaleOnUtilization(&UtilizationScalingProps{
	TargetUtilizationPercent: jsii.Number(75),
})

type GlobalSecondaryIndexProps

type GlobalSecondaryIndexProps struct {
	// The name of the secondary index.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The non-key attributes that are projected into the secondary index.
	NonKeyAttributes *[]*string `field:"optional" json:"nonKeyAttributes" yaml:"nonKeyAttributes"`
	// The set of attributes that are projected into the secondary index.
	ProjectionType ProjectionType `field:"optional" json:"projectionType" yaml:"projectionType"`
	// Partition key attribute definition.
	PartitionKey *Attribute `field:"required" json:"partitionKey" yaml:"partitionKey"`
	// Sort key attribute definition.
	SortKey *Attribute `field:"optional" json:"sortKey" yaml:"sortKey"`
	// The read capacity for the global secondary index.
	//
	// Can only be provided if table billingMode is Provisioned or undefined.
	ReadCapacity *float64 `field:"optional" json:"readCapacity" yaml:"readCapacity"`
	// The write capacity for the global secondary index.
	//
	// Can only be provided if table billingMode is Provisioned or undefined.
	WriteCapacity *float64 `field:"optional" json:"writeCapacity" yaml:"writeCapacity"`
}

Properties for a global secondary index.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

globalSecondaryIndexProps := &GlobalSecondaryIndexProps{
	IndexName: jsii.String("indexName"),
	PartitionKey: &Attribute{
		Name: jsii.String("name"),
		Type: awscdk.Aws_dynamodb.AttributeType_BINARY,
	},

	// the properties below are optional
	NonKeyAttributes: []*string{
		jsii.String("nonKeyAttributes"),
	},
	ProjectionType: awscdk.*Aws_dynamodb.ProjectionType_KEYS_ONLY,
	ReadCapacity: jsii.Number(123),
	SortKey: &Attribute{
		Name: jsii.String("name"),
		Type: awscdk.*Aws_dynamodb.AttributeType_BINARY,
	},
	WriteCapacity: jsii.Number(123),
}

type IScalableTableAttribute

type IScalableTableAttribute interface {
	// Add scheduled scaling for this scaling attribute.
	ScaleOnSchedule(id *string, actions *awsapplicationautoscaling.ScalingSchedule)
	// Scale out or in to keep utilization at a given level.
	ScaleOnUtilization(props *UtilizationScalingProps)
}

Interface for scalable attributes.

type ITable

type ITable interface {
	awscdk.IResource
	// Adds an IAM policy statement associated with this table to an IAM principal's policy.
	//
	// If `encryptionKey` is present, appropriate grants to the key needs to be added
	// separately using the `table.encryptionKey.grant*` methods.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantFullAccess(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantReadData(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM principal to all data read/write operations to this table.
	//
	// BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan,
	// BatchWriteItem, PutItem, UpdateItem, DeleteItem
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantReadWriteData(grantee awsiam.IGrantable) awsiam.Grant
	// Adds an IAM policy statement associated with this table's stream to an IAM principal's policy.
	//
	// If `encryptionKey` is present, appropriate grants to the key needs to be added
	// separately using the `table.encryptionKey.grant*` methods.
	GrantStream(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantStreamRead(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM Principal to list streams attached to current dynamodb table.
	GrantTableListStreams(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantWriteData(grantee awsiam.IGrantable) awsiam.Grant
	// Metric for the number of Errors executing all Lambdas.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the conditional check failed requests.
	MetricConditionalCheckFailedRequests(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the consumed read capacity units.
	MetricConsumedReadCapacityUnits(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the consumed write capacity units.
	MetricConsumedWriteCapacityUnits(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the successful request latency.
	MetricSuccessfulRequestLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the system errors this table.
	MetricSystemErrorsForOperations(props *SystemErrorsForOperationsMetricOptions) awscloudwatch.IMetric
	// Metric for throttled requests.
	// Deprecated: use `metricThrottledRequestsForOperations`.
	MetricThrottledRequests(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for throttled requests.
	MetricThrottledRequestsForOperations(props *OperationsMetricOptions) awscloudwatch.IMetric
	// Metric for the user errors.
	MetricUserErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Optional KMS encryption key associated with this table.
	EncryptionKey() awskms.IKey
	// Arn of the dynamodb table.
	TableArn() *string
	// Table name of the dynamodb table.
	TableName() *string
	// ARN of the table's stream, if there is one.
	TableStreamArn() *string
}

An interface that represents a DynamoDB Table - either created with the CDK, or an existing one.

func Table_FromTableArn

func Table_FromTableArn(scope constructs.Construct, id *string, tableArn *string) ITable

Creates a Table construct that represents an external table via table arn.

func Table_FromTableAttributes

func Table_FromTableAttributes(scope constructs.Construct, id *string, attrs *TableAttributes) ITable

Creates a Table construct that represents an external table.

func Table_FromTableName

func Table_FromTableName(scope constructs.Construct, id *string, tableName *string) ITable

Creates a Table construct that represents an external table via table name.

type LocalSecondaryIndexProps

type LocalSecondaryIndexProps struct {
	// The name of the secondary index.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The non-key attributes that are projected into the secondary index.
	NonKeyAttributes *[]*string `field:"optional" json:"nonKeyAttributes" yaml:"nonKeyAttributes"`
	// The set of attributes that are projected into the secondary index.
	ProjectionType ProjectionType `field:"optional" json:"projectionType" yaml:"projectionType"`
	// The attribute of a sort key for the local secondary index.
	SortKey *Attribute `field:"required" json:"sortKey" yaml:"sortKey"`
}

Properties for a local secondary index.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

localSecondaryIndexProps := &LocalSecondaryIndexProps{
	IndexName: jsii.String("indexName"),
	SortKey: &Attribute{
		Name: jsii.String("name"),
		Type: awscdk.Aws_dynamodb.AttributeType_BINARY,
	},

	// the properties below are optional
	NonKeyAttributes: []*string{
		jsii.String("nonKeyAttributes"),
	},
	ProjectionType: awscdk.*Aws_dynamodb.ProjectionType_KEYS_ONLY,
}

type Operation

type Operation string

Supported DynamoDB table operations.

Example:

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})
const (
	// GetItem.
	Operation_GET_ITEM Operation = "GET_ITEM"
	// BatchGetItem.
	Operation_BATCH_GET_ITEM Operation = "BATCH_GET_ITEM"
	// Scan.
	Operation_SCAN Operation = "SCAN"
	// Query.
	Operation_QUERY Operation = "QUERY"
	// GetRecords.
	Operation_GET_RECORDS Operation = "GET_RECORDS"
	// PutItem.
	Operation_PUT_ITEM Operation = "PUT_ITEM"
	// DeleteItem.
	Operation_DELETE_ITEM Operation = "DELETE_ITEM"
	// UpdateItem.
	Operation_UPDATE_ITEM Operation = "UPDATE_ITEM"
	// BatchWriteItem.
	Operation_BATCH_WRITE_ITEM Operation = "BATCH_WRITE_ITEM"
	// TransactWriteItems.
	Operation_TRANSACT_WRITE_ITEMS Operation = "TRANSACT_WRITE_ITEMS"
	// TransactGetItems.
	Operation_TRANSACT_GET_ITEMS Operation = "TRANSACT_GET_ITEMS"
	// ExecuteTransaction.
	Operation_EXECUTE_TRANSACTION Operation = "EXECUTE_TRANSACTION"
	// BatchExecuteStatement.
	Operation_BATCH_EXECUTE_STATEMENT Operation = "BATCH_EXECUTE_STATEMENT"
	// ExecuteStatement.
	Operation_EXECUTE_STATEMENT Operation = "EXECUTE_STATEMENT"
)

type OperationsMetricOptions added in v2.44.0

type OperationsMetricOptions struct {
	// Account which this metric comes from.
	Account *string `field:"optional" json:"account" yaml:"account"`
	// The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The `Color` class has a set of standard colors that can be used here.
	Color *string `field:"optional" json:"color" yaml:"color"`
	// Dimensions of the metric.
	DimensionsMap *map[string]*string `field:"optional" json:"dimensionsMap" yaml:"dimensionsMap"`
	// Label for this metric when added to a Graph in a Dashboard.
	//
	// You can use [dynamic labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html)
	// to show summary information about the entire displayed time series
	// in the legend. For example, if you use:
	//
	// “`
	// [max: ${MAX}] MyMetric
	// “`
	//
	// As the metric label, the maximum value in the visible range will
	// be shown next to the time series name in the graph's legend.
	Label *string `field:"optional" json:"label" yaml:"label"`
	// The period over which the specified statistic is applied.
	Period awscdk.Duration `field:"optional" json:"period" yaml:"period"`
	// Region which this metric comes from.
	Region *string `field:"optional" json:"region" yaml:"region"`
	// What function to use for aggregating.
	//
	// Use the `aws_cloudwatch.Stats` helper class to construct valid input strings.
	//
	// Can be one of the following:
	//
	// - "Minimum" | "min"
	// - "Maximum" | "max"
	// - "Average" | "avg"
	// - "Sum" | "sum"
	// - "SampleCount | "n"
	// - "pNN.NN"
	// - "tmNN.NN" | "tm(NN.NN%:NN.NN%)"
	// - "iqm"
	// - "wmNN.NN" | "wm(NN.NN%:NN.NN%)"
	// - "tcNN.NN" | "tc(NN.NN%:NN.NN%)"
	// - "tsNN.NN" | "ts(NN.NN%:NN.NN%)"
	Statistic *string `field:"optional" json:"statistic" yaml:"statistic"`
	// Unit used to filter the metric stream.
	//
	// Only refer to datums emitted to the metric stream with the given unit and
	// ignore all others. Only useful when datums are being emitted to the same
	// metric stream under different units.
	//
	// The default is to use all matric datums in the stream, regardless of unit,
	// which is recommended in nearly all cases.
	//
	// CloudWatch does not honor this property for graphs.
	Unit awscloudwatch.Unit `field:"optional" json:"unit" yaml:"unit"`
	// The operations to apply the metric to.
	Operations *[]Operation `field:"optional" json:"operations" yaml:"operations"`
}

Options for configuring metrics that considers multiple operations.

Example:

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})

type ProjectionType

type ProjectionType string

The set of attributes that are projected into the index. See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Projection.html

const (
	// Only the index and primary keys are projected into the index.
	ProjectionType_KEYS_ONLY ProjectionType = "KEYS_ONLY"
	// Only the specified table attributes are projected into the index.
	//
	// The list of projected attributes is in `nonKeyAttributes`.
	ProjectionType_INCLUDE ProjectionType = "INCLUDE"
	// All of the table attributes are projected into the index.
	ProjectionType_ALL ProjectionType = "ALL"
)

type SchemaOptions

type SchemaOptions struct {
	// Partition key attribute definition.
	PartitionKey *Attribute `field:"required" json:"partitionKey" yaml:"partitionKey"`
	// Sort key attribute definition.
	SortKey *Attribute `field:"optional" json:"sortKey" yaml:"sortKey"`
}

Represents the table schema attributes.

Example:

var table table

schema := table.Schema()
partitionKey := schema.PartitionKey
sortKey := schema.SortKey

type SecondaryIndexProps

type SecondaryIndexProps struct {
	// The name of the secondary index.
	IndexName *string `field:"required" json:"indexName" yaml:"indexName"`
	// The non-key attributes that are projected into the secondary index.
	NonKeyAttributes *[]*string `field:"optional" json:"nonKeyAttributes" yaml:"nonKeyAttributes"`
	// The set of attributes that are projected into the secondary index.
	ProjectionType ProjectionType `field:"optional" json:"projectionType" yaml:"projectionType"`
}

Properties for a secondary index.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

secondaryIndexProps := &SecondaryIndexProps{
	IndexName: jsii.String("indexName"),

	// the properties below are optional
	NonKeyAttributes: []*string{
		jsii.String("nonKeyAttributes"),
	},
	ProjectionType: awscdk.Aws_dynamodb.ProjectionType_KEYS_ONLY,
}

type StreamViewType

type StreamViewType string

When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.

Example:

import eventsources "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var fn function

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	Stream: dynamodb.StreamViewType_NEW_IMAGE,
})
fn.AddEventSource(eventsources.NewDynamoEventSource(table, &DynamoEventSourceProps{
	StartingPosition: lambda.StartingPosition_LATEST,
	Filters: []map[string]interface{}{
		lambda.FilterCriteria_Filter(map[string]interface{}{
			"eventName": lambda.FilterRule_isEqual(jsii.String("INSERT")),
		}),
	},
}))

See: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_StreamSpecification.html

const (
	// The entire item, as it appears after it was modified, is written to the stream.
	StreamViewType_NEW_IMAGE StreamViewType = "NEW_IMAGE"
	// The entire item, as it appeared before it was modified, is written to the stream.
	StreamViewType_OLD_IMAGE StreamViewType = "OLD_IMAGE"
	// Both the new and the old item images of the item are written to the stream.
	StreamViewType_NEW_AND_OLD_IMAGES StreamViewType = "NEW_AND_OLD_IMAGES"
	// Only the key attributes of the modified item are written to the stream.
	StreamViewType_KEYS_ONLY StreamViewType = "KEYS_ONLY"
)

type SystemErrorsForOperationsMetricOptions

type SystemErrorsForOperationsMetricOptions struct {
	// Account which this metric comes from.
	Account *string `field:"optional" json:"account" yaml:"account"`
	// The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The `Color` class has a set of standard colors that can be used here.
	Color *string `field:"optional" json:"color" yaml:"color"`
	// Dimensions of the metric.
	DimensionsMap *map[string]*string `field:"optional" json:"dimensionsMap" yaml:"dimensionsMap"`
	// Label for this metric when added to a Graph in a Dashboard.
	//
	// You can use [dynamic labels](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/graph-dynamic-labels.html)
	// to show summary information about the entire displayed time series
	// in the legend. For example, if you use:
	//
	// “`
	// [max: ${MAX}] MyMetric
	// “`
	//
	// As the metric label, the maximum value in the visible range will
	// be shown next to the time series name in the graph's legend.
	Label *string `field:"optional" json:"label" yaml:"label"`
	// The period over which the specified statistic is applied.
	Period awscdk.Duration `field:"optional" json:"period" yaml:"period"`
	// Region which this metric comes from.
	Region *string `field:"optional" json:"region" yaml:"region"`
	// What function to use for aggregating.
	//
	// Use the `aws_cloudwatch.Stats` helper class to construct valid input strings.
	//
	// Can be one of the following:
	//
	// - "Minimum" | "min"
	// - "Maximum" | "max"
	// - "Average" | "avg"
	// - "Sum" | "sum"
	// - "SampleCount | "n"
	// - "pNN.NN"
	// - "tmNN.NN" | "tm(NN.NN%:NN.NN%)"
	// - "iqm"
	// - "wmNN.NN" | "wm(NN.NN%:NN.NN%)"
	// - "tcNN.NN" | "tc(NN.NN%:NN.NN%)"
	// - "tsNN.NN" | "ts(NN.NN%:NN.NN%)"
	Statistic *string `field:"optional" json:"statistic" yaml:"statistic"`
	// Unit used to filter the metric stream.
	//
	// Only refer to datums emitted to the metric stream with the given unit and
	// ignore all others. Only useful when datums are being emitted to the same
	// metric stream under different units.
	//
	// The default is to use all matric datums in the stream, regardless of unit,
	// which is recommended in nearly all cases.
	//
	// CloudWatch does not honor this property for graphs.
	Unit awscloudwatch.Unit `field:"optional" json:"unit" yaml:"unit"`
	// The operations to apply the metric to.
	Operations *[]Operation `field:"optional" json:"operations" yaml:"operations"`
}

Options for configuring a system errors metric that considers multiple operations.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

systemErrorsForOperationsMetricOptions := &SystemErrorsForOperationsMetricOptions{
	Account: jsii.String("account"),
	Color: jsii.String("color"),
	DimensionsMap: map[string]*string{
		"dimensionsMapKey": jsii.String("dimensionsMap"),
	},
	Label: jsii.String("label"),
	Operations: []operation{
		awscdk.Aws_dynamodb.*operation_GET_ITEM,
	},
	Period: cdk.Duration_Minutes(jsii.Number(30)),
	Region: jsii.String("region"),
	Statistic: jsii.String("statistic"),
	Unit: awscdk.Aws_cloudwatch.Unit_SECONDS,
}

type Table

type Table interface {
	awscdk.Resource
	ITable
	// KMS encryption key, if this table uses a customer-managed encryption key.
	EncryptionKey() awskms.IKey
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *awscdk.ResourceEnvironment
	// Whether this table has indexes.
	HasIndex() *bool
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	RegionalArns() *[]*string
	// The stack in which this resource is defined.
	Stack() awscdk.Stack
	// Arn of the dynamodb table.
	TableArn() *string
	// Table name of the dynamodb table.
	TableName() *string
	// ARN of the table's stream, if there is one.
	TableStreamArn() *string
	// Add a global secondary index of table.
	AddGlobalSecondaryIndex(props *GlobalSecondaryIndexProps)
	// Add a local secondary index of table.
	AddLocalSecondaryIndex(props *LocalSecondaryIndexProps)
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Enable read capacity scaling for the given GSI.
	//
	// Returns: An object to configure additional AutoScaling settings for this attribute.
	AutoScaleGlobalSecondaryIndexReadCapacity(indexName *string, props *EnableScalingProps) IScalableTableAttribute
	// Enable write capacity scaling for the given GSI.
	//
	// Returns: An object to configure additional AutoScaling settings for this attribute.
	AutoScaleGlobalSecondaryIndexWriteCapacity(indexName *string, props *EnableScalingProps) IScalableTableAttribute
	// Enable read capacity scaling for this table.
	//
	// Returns: An object to configure additional AutoScaling settings.
	AutoScaleReadCapacity(props *EnableScalingProps) IScalableTableAttribute
	// Enable write capacity scaling for this table.
	//
	// Returns: An object to configure additional AutoScaling settings for this attribute.
	AutoScaleWriteCapacity(props *EnableScalingProps) IScalableTableAttribute
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Adds an IAM policy statement associated with this table to an IAM principal's policy.
	//
	// If `encryptionKey` is present, appropriate grants to the key needs to be added
	// separately using the `table.encryptionKey.grant*` methods.
	Grant(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantFullAccess(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantReadData(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM principal to all data read/write operations to this table.
	//
	// BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan,
	// BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantReadWriteData(grantee awsiam.IGrantable) awsiam.Grant
	// Adds an IAM policy statement associated with this table's stream to an IAM principal's policy.
	//
	// If `encryptionKey` is present, appropriate grants to the key needs to be added
	// separately using the `table.encryptionKey.grant*` methods.
	GrantStream(grantee awsiam.IGrantable, actions ...*string) awsiam.Grant
	// Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantStreamRead(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM Principal to list streams attached to current dynamodb table.
	GrantTableListStreams(grantee awsiam.IGrantable) awsiam.Grant
	// Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.
	//
	// Appropriate grants will also be added to the customer-managed KMS key
	// if one was configured.
	GrantWriteData(grantee awsiam.IGrantable) awsiam.Grant
	// Return the given named metric for this Table.
	//
	// By default, the metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the conditional check failed requests this table.
	//
	// By default, the metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricConditionalCheckFailedRequests(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the consumed read capacity units this table.
	//
	// By default, the metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricConsumedReadCapacityUnits(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the consumed write capacity units this table.
	//
	// By default, the metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricConsumedWriteCapacityUnits(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the successful request latency this table.
	//
	// By default, the metric will be calculated as an average over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricSuccessfulRequestLatency(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Metric for the system errors this table.
	//
	// This will sum errors across all possible operations.
	// Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricSystemErrorsForOperations(props *SystemErrorsForOperationsMetricOptions) awscloudwatch.IMetric
	// How many requests are throttled on this table.
	//
	// Default: sum over 5 minutes.
	// Deprecated: Do not use this function. It returns an invalid metric. Use `metricThrottledRequestsForOperation` instead.
	MetricThrottledRequests(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// How many requests are throttled on this table, for the given operation.
	//
	// Default: sum over 5 minutes.
	MetricThrottledRequestsForOperation(operation *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// How many requests are throttled on this table.
	//
	// This will sum errors across all possible operations.
	// Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricThrottledRequestsForOperations(props *OperationsMetricOptions) awscloudwatch.IMetric
	// Metric for the user errors.
	//
	// Note that this metric reports user errors across all
	// the tables in the account and region the table resides in.
	//
	// By default, the metric will be calculated as a sum over a period of 5 minutes.
	// You can customize this by using the `statistic` and `period` properties.
	MetricUserErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
	// Get schema attributes of table or index.
	//
	// Returns: Schema of table or index.
	Schema(indexName *string) *SchemaOptions
	// Returns a string representation of this construct.
	ToString() *string
}

Provides a DynamoDB table.

Example:

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})

func NewTable

func NewTable(scope constructs.Construct, id *string, props *TableProps) Table

type TableAttributes

type TableAttributes struct {
	// KMS encryption key, if this table uses a customer-managed encryption key.
	EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"`
	// The name of the global indexes set for this Table.
	//
	// Note that you need to set either this property,
	// or `localIndexes`,
	// if you want methods like grantReadData()
	// to grant permissions for indexes as well as the table itself.
	GlobalIndexes *[]*string `field:"optional" json:"globalIndexes" yaml:"globalIndexes"`
	// If set to true, grant methods always grant permissions for all indexes.
	//
	// If false is provided, grant methods grant the permissions
	// only when `globalIndexes` or `localIndexes` is specified.
	GrantIndexPermissions *bool `field:"optional" json:"grantIndexPermissions" yaml:"grantIndexPermissions"`
	// The name of the local indexes set for this Table.
	//
	// Note that you need to set either this property,
	// or `globalIndexes`,
	// if you want methods like grantReadData()
	// to grant permissions for indexes as well as the table itself.
	LocalIndexes *[]*string `field:"optional" json:"localIndexes" yaml:"localIndexes"`
	// The ARN of the dynamodb table.
	//
	// One of this, or `tableName`, is required.
	TableArn *string `field:"optional" json:"tableArn" yaml:"tableArn"`
	// The table name of the dynamodb table.
	//
	// One of this, or `tableArn`, is required.
	TableName *string `field:"optional" json:"tableName" yaml:"tableName"`
	// The ARN of the table's stream.
	TableStreamArn *string `field:"optional" json:"tableStreamArn" yaml:"tableStreamArn"`
}

Reference to a dynamodb table.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var key key

tableAttributes := &TableAttributes{
	EncryptionKey: key,
	GlobalIndexes: []*string{
		jsii.String("globalIndexes"),
	},
	GrantIndexPermissions: jsii.Boolean(false),
	LocalIndexes: []*string{
		jsii.String("localIndexes"),
	},
	TableArn: jsii.String("tableArn"),
	TableName: jsii.String("tableName"),
	TableStreamArn: jsii.String("tableStreamArn"),
}

type TableClass added in v2.11.0

type TableClass string

DynamoDB's table class.

Example:

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	TableClass: dynamodb.TableClass_STANDARD_INFREQUENT_ACCESS,
})

See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.TableClasses.html

const (
	// Default table class for DynamoDB.
	TableClass_STANDARD TableClass = "STANDARD"
	// Table class for DynamoDB that reduces storage costs compared to existing DynamoDB Standard tables.
	TableClass_STANDARD_INFREQUENT_ACCESS TableClass = "STANDARD_INFREQUENT_ACCESS"
)

type TableEncryption

type TableEncryption string

What kind of server-side encryption to apply to this table.

Example:

table := dynamodb.NewTable(this, jsii.String("MyTable"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	Encryption: dynamodb.TableEncryption_CUSTOMER_MANAGED,
})

// You can access the CMK that was added to the stack on your behalf by the Table construct via:
tableEncryptionKey := table.EncryptionKey
const (
	// Server-side KMS encryption with a master key owned by AWS.
	TableEncryption_DEFAULT TableEncryption = "DEFAULT"
	// Server-side KMS encryption with a customer master key managed by customer.
	//
	// If `encryptionKey` is specified, this key will be used, otherwise, one will be defined.
	//
	// > **NOTE**: if `encryptionKey` is not specified and the `Table` construct creates
	// > a KMS key for you, the key will be created with default permissions. If you are using
	// > CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables.
	// > If you are using CDKv1, make sure the feature flag `@aws-cdk/aws-kms:defaultKeyPolicies`
	// > is set to `true` in your `cdk.json`.
	TableEncryption_CUSTOMER_MANAGED TableEncryption = "CUSTOMER_MANAGED"
	// Server-side KMS encryption with a master key managed by AWS.
	TableEncryption_AWS_MANAGED TableEncryption = "AWS_MANAGED"
)

type TableOptions

type TableOptions struct {
	// Partition key attribute definition.
	PartitionKey *Attribute `field:"required" json:"partitionKey" yaml:"partitionKey"`
	// Sort key attribute definition.
	SortKey *Attribute `field:"optional" json:"sortKey" yaml:"sortKey"`
	// Specify how you are charged for read and write throughput and how you manage capacity.
	BillingMode BillingMode `field:"optional" json:"billingMode" yaml:"billingMode"`
	// Whether CloudWatch contributor insights is enabled.
	ContributorInsightsEnabled *bool `field:"optional" json:"contributorInsightsEnabled" yaml:"contributorInsightsEnabled"`
	// Enables deletion protection for the table.
	DeletionProtection *bool `field:"optional" json:"deletionProtection" yaml:"deletionProtection"`
	// Whether server-side encryption with an AWS managed customer master key is enabled.
	//
	// This property cannot be set if `serverSideEncryption` is set.
	//
	// > **NOTE**: if you set this to `CUSTOMER_MANAGED` and `encryptionKey` is not
	// > specified, the key that the Tablet generates for you will be created with
	// > default permissions. If you are using CDKv2, these permissions will be
	// > sufficient to enable the key for use with DynamoDB tables.  If you are
	// > using CDKv1, make sure the feature flag
	// > `@aws-cdk/aws-kms:defaultKeyPolicies` is set to `true` in your `cdk.json`.
	Encryption TableEncryption `field:"optional" json:"encryption" yaml:"encryption"`
	// External KMS key to use for table encryption.
	//
	// This property can only be set if `encryption` is set to `TableEncryption.CUSTOMER_MANAGED`.
	EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"`
	// Whether point-in-time recovery is enabled.
	PointInTimeRecovery *bool `field:"optional" json:"pointInTimeRecovery" yaml:"pointInTimeRecovery"`
	// The read capacity for the table.
	//
	// Careful if you add Global Secondary Indexes, as
	// those will share the table's provisioned throughput.
	//
	// Can only be provided if billingMode is Provisioned.
	ReadCapacity *float64 `field:"optional" json:"readCapacity" yaml:"readCapacity"`
	// The removal policy to apply to the DynamoDB Table.
	RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"`
	// Regions where replica tables will be created.
	ReplicationRegions *[]*string `field:"optional" json:"replicationRegions" yaml:"replicationRegions"`
	// The timeout for a table replication operation in a single region.
	ReplicationTimeout awscdk.Duration `field:"optional" json:"replicationTimeout" yaml:"replicationTimeout"`
	// When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.
	Stream StreamViewType `field:"optional" json:"stream" yaml:"stream"`
	// Specify the table class.
	TableClass TableClass `field:"optional" json:"tableClass" yaml:"tableClass"`
	// The name of TTL attribute.
	TimeToLiveAttribute *string `field:"optional" json:"timeToLiveAttribute" yaml:"timeToLiveAttribute"`
	// Indicates whether CloudFormation stack waits for replication to finish.
	//
	// If set to false, the CloudFormation resource will mark the resource as
	// created and replication will be completed asynchronously. This property is
	// ignored if replicationRegions property is not set.
	//
	// WARNING:
	// DO NOT UNSET this property if adding/removing multiple replicationRegions
	// in one deployment, as CloudFormation only supports one region replication
	// at a time. CDK overcomes this limitation by waiting for replication to
	// finish before starting new replicationRegion.
	//
	// If the custom resource which handles replication has a physical resource
	// ID with the format `region` instead of `tablename-region` (this would happen
	// if the custom resource hasn't received an event since v1.91.0), DO NOT SET
	// this property to false without making a change to the table name.
	// This will cause the existing replicas to be deleted.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-replicas
	//
	WaitForReplicationToFinish *bool `field:"optional" json:"waitForReplicationToFinish" yaml:"waitForReplicationToFinish"`
	// The write capacity for the table.
	//
	// Careful if you add Global Secondary Indexes, as
	// those will share the table's provisioned throughput.
	//
	// Can only be provided if billingMode is Provisioned.
	WriteCapacity *float64 `field:"optional" json:"writeCapacity" yaml:"writeCapacity"`
}

Properties of a DynamoDB Table.

Use `TableProps` for all table properties.

Example:

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var key key

tableOptions := &TableOptions{
	PartitionKey: &Attribute{
		Name: jsii.String("name"),
		Type: awscdk.Aws_dynamodb.AttributeType_BINARY,
	},

	// the properties below are optional
	BillingMode: awscdk.*Aws_dynamodb.BillingMode_PAY_PER_REQUEST,
	ContributorInsightsEnabled: jsii.Boolean(false),
	DeletionProtection: jsii.Boolean(false),
	Encryption: awscdk.*Aws_dynamodb.TableEncryption_DEFAULT,
	EncryptionKey: key,
	PointInTimeRecovery: jsii.Boolean(false),
	ReadCapacity: jsii.Number(123),
	RemovalPolicy: cdk.RemovalPolicy_DESTROY,
	ReplicationRegions: []*string{
		jsii.String("replicationRegions"),
	},
	ReplicationTimeout: cdk.Duration_Minutes(jsii.Number(30)),
	SortKey: &Attribute{
		Name: jsii.String("name"),
		Type: awscdk.*Aws_dynamodb.AttributeType_BINARY,
	},
	Stream: awscdk.*Aws_dynamodb.StreamViewType_NEW_IMAGE,
	TableClass: awscdk.*Aws_dynamodb.TableClass_STANDARD,
	TimeToLiveAttribute: jsii.String("timeToLiveAttribute"),
	WaitForReplicationToFinish: jsii.Boolean(false),
	WriteCapacity: jsii.Number(123),
}

type TableProps

type TableProps struct {
	// Partition key attribute definition.
	PartitionKey *Attribute `field:"required" json:"partitionKey" yaml:"partitionKey"`
	// Sort key attribute definition.
	SortKey *Attribute `field:"optional" json:"sortKey" yaml:"sortKey"`
	// Specify how you are charged for read and write throughput and how you manage capacity.
	BillingMode BillingMode `field:"optional" json:"billingMode" yaml:"billingMode"`
	// Whether CloudWatch contributor insights is enabled.
	ContributorInsightsEnabled *bool `field:"optional" json:"contributorInsightsEnabled" yaml:"contributorInsightsEnabled"`
	// Enables deletion protection for the table.
	DeletionProtection *bool `field:"optional" json:"deletionProtection" yaml:"deletionProtection"`
	// Whether server-side encryption with an AWS managed customer master key is enabled.
	//
	// This property cannot be set if `serverSideEncryption` is set.
	//
	// > **NOTE**: if you set this to `CUSTOMER_MANAGED` and `encryptionKey` is not
	// > specified, the key that the Tablet generates for you will be created with
	// > default permissions. If you are using CDKv2, these permissions will be
	// > sufficient to enable the key for use with DynamoDB tables.  If you are
	// > using CDKv1, make sure the feature flag
	// > `@aws-cdk/aws-kms:defaultKeyPolicies` is set to `true` in your `cdk.json`.
	Encryption TableEncryption `field:"optional" json:"encryption" yaml:"encryption"`
	// External KMS key to use for table encryption.
	//
	// This property can only be set if `encryption` is set to `TableEncryption.CUSTOMER_MANAGED`.
	EncryptionKey awskms.IKey `field:"optional" json:"encryptionKey" yaml:"encryptionKey"`
	// Whether point-in-time recovery is enabled.
	PointInTimeRecovery *bool `field:"optional" json:"pointInTimeRecovery" yaml:"pointInTimeRecovery"`
	// The read capacity for the table.
	//
	// Careful if you add Global Secondary Indexes, as
	// those will share the table's provisioned throughput.
	//
	// Can only be provided if billingMode is Provisioned.
	ReadCapacity *float64 `field:"optional" json:"readCapacity" yaml:"readCapacity"`
	// The removal policy to apply to the DynamoDB Table.
	RemovalPolicy awscdk.RemovalPolicy `field:"optional" json:"removalPolicy" yaml:"removalPolicy"`
	// Regions where replica tables will be created.
	ReplicationRegions *[]*string `field:"optional" json:"replicationRegions" yaml:"replicationRegions"`
	// The timeout for a table replication operation in a single region.
	ReplicationTimeout awscdk.Duration `field:"optional" json:"replicationTimeout" yaml:"replicationTimeout"`
	// When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.
	Stream StreamViewType `field:"optional" json:"stream" yaml:"stream"`
	// Specify the table class.
	TableClass TableClass `field:"optional" json:"tableClass" yaml:"tableClass"`
	// The name of TTL attribute.
	TimeToLiveAttribute *string `field:"optional" json:"timeToLiveAttribute" yaml:"timeToLiveAttribute"`
	// Indicates whether CloudFormation stack waits for replication to finish.
	//
	// If set to false, the CloudFormation resource will mark the resource as
	// created and replication will be completed asynchronously. This property is
	// ignored if replicationRegions property is not set.
	//
	// WARNING:
	// DO NOT UNSET this property if adding/removing multiple replicationRegions
	// in one deployment, as CloudFormation only supports one region replication
	// at a time. CDK overcomes this limitation by waiting for replication to
	// finish before starting new replicationRegion.
	//
	// If the custom resource which handles replication has a physical resource
	// ID with the format `region` instead of `tablename-region` (this would happen
	// if the custom resource hasn't received an event since v1.91.0), DO NOT SET
	// this property to false without making a change to the table name.
	// This will cause the existing replicas to be deleted.
	// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-globaltable.html#cfn-dynamodb-globaltable-replicas
	//
	WaitForReplicationToFinish *bool `field:"optional" json:"waitForReplicationToFinish" yaml:"waitForReplicationToFinish"`
	// The write capacity for the table.
	//
	// Careful if you add Global Secondary Indexes, as
	// those will share the table's provisioned throughput.
	//
	// Can only be provided if billingMode is Provisioned.
	WriteCapacity *float64 `field:"optional" json:"writeCapacity" yaml:"writeCapacity"`
	// Kinesis Data Stream to capture item-level changes for the table.
	KinesisStream awskinesis.IStream `field:"optional" json:"kinesisStream" yaml:"kinesisStream"`
	// Enforces a particular physical table name.
	TableName *string `field:"optional" json:"tableName" yaml:"tableName"`
}

Properties for a DynamoDB Table.

Example:

import cloudwatch "github.com/aws/aws-cdk-go/awscdk"

table := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
})

metric := table.metricThrottledRequestsForOperations(&OperationsMetricOptions{
	Operations: []operation{
		dynamodb.*operation_PUT_ITEM,
	},
	Period: awscdk.Duration_Minutes(jsii.Number(1)),
})

cloudwatch.NewAlarm(this, jsii.String("Alarm"), &AlarmProps{
	Metric: metric,
	EvaluationPeriods: jsii.Number(1),
	Threshold: jsii.Number(1),
})

type UtilizationScalingProps

type UtilizationScalingProps struct {
	// Indicates whether scale in by the target tracking policy is disabled.
	//
	// If the value is true, scale in is disabled and the target tracking policy
	// won't remove capacity from the scalable resource. Otherwise, scale in is
	// enabled and the target tracking policy can remove capacity from the
	// scalable resource.
	DisableScaleIn *bool `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
	// A name for the scaling policy.
	PolicyName *string `field:"optional" json:"policyName" yaml:"policyName"`
	// Period after a scale in activity completes before another scale in activity can start.
	ScaleInCooldown awscdk.Duration `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
	// Period after a scale out activity completes before another scale out activity can start.
	ScaleOutCooldown awscdk.Duration `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
	// Target utilization percentage for the attribute.
	TargetUtilizationPercent *float64 `field:"required" json:"targetUtilizationPercent" yaml:"targetUtilizationPercent"`
}

Properties for enabling DynamoDB utilization tracking.

Example:

globalTable := dynamodb.NewTable(this, jsii.String("Table"), &TableProps{
	PartitionKey: &Attribute{
		Name: jsii.String("id"),
		Type: dynamodb.AttributeType_STRING,
	},
	ReplicationRegions: []*string{
		jsii.String("us-east-1"),
		jsii.String("us-east-2"),
		jsii.String("us-west-2"),
	},
	BillingMode: dynamodb.BillingMode_PROVISIONED,
})

globalTable.AutoScaleWriteCapacity(&EnableScalingProps{
	MinCapacity: jsii.Number(1),
	MaxCapacity: jsii.Number(10),
}).ScaleOnUtilization(&UtilizationScalingProps{
	TargetUtilizationPercent: jsii.Number(75),
})

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL