DynamoDbClient

Amazon DynamoDB

Amazon DynamoDB is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability. DynamoDB lets you offload the administrative burdens of operating and scaling a distributed database, so that you don't have to worry about hardware provisioning, setup and configuration, replication, software patching, or cluster scaling.

With DynamoDB, you can create database tables that can store and retrieve any amount of data, and serve any level of request traffic. You can scale up or scale down your tables' throughput capacity without downtime or performance degradation, and use the Amazon Web Services Management Console to monitor resource utilization and performance metrics.

DynamoDB automatically spreads the data and traffic for your tables over a sufficient number of servers to handle your throughput and storage requirements, while maintaining consistent and fast performance. All of your data is stored on solid state disks (SSDs) and automatically replicated across multiple Availability Zones in an Amazon Web Services Region, providing built-in high availability and data durability.

Properties

Link copied to clipboard
abstract override val config: DynamoDbClient.Config

DynamoDbClient's configuration

Functions

Link copied to clipboard

This operation allows you to perform batch reads or writes on data stored in DynamoDB, using PartiQL. Each read statement in a BatchExecuteStatement must specify an equality condition on all key attributes. This enforces that each SELECT statement in a batch returns at most a single item. For more information, see Running batch operations with PartiQL for DynamoDB .

Link copied to clipboard

The BatchGetItem operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key.

Link copied to clipboard

The BatchWriteItem operation puts or deletes multiple items in one or more tables. A single call to BatchWriteItem can transmit up to 16MB of data over the network, consisting of up to 25 item put or delete operations. While individual items can be up to 400 KB once stored, it's important to note that an item's representation might be greater than 400KB while being sent in DynamoDB's JSON format for the API call. For more details on this distinction, see Naming Rules and Data Types.

Link copied to clipboard

Creates a backup for an existing table.

Link copied to clipboard

Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided Regions.

Link copied to clipboard
abstract suspend fun createTable(input: CreateTableRequest): CreateTableResponse

The CreateTable operation adds a new table to your account. In an Amazon Web Services account, table names must be unique within each Region. That is, you can have two tables with same name if you create the tables in different Regions.

Link copied to clipboard

Deletes an existing backup of a table.

Link copied to clipboard
abstract suspend fun deleteItem(input: DeleteItemRequest): DeleteItemResponse

Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value.

Link copied to clipboard

Deletes the resource-based policy attached to the resource, which can be a table or stream.

Link copied to clipboard
abstract suspend fun deleteTable(input: DeleteTableRequest): DeleteTableResponse

The DeleteTable operation deletes a table and all of its items. After a DeleteTable request, the specified table is in the DELETING state until DynamoDB completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException. If the specified table does not exist, DynamoDB returns a ResourceNotFoundException. If table is already in the DELETING state, no error is returned.

Link copied to clipboard

Describes an existing backup of a table.

Link copied to clipboard

Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are ENABLED on all tables at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus will be set to ENABLED.

Link copied to clipboard

Returns information about contributor insights for a given table or global secondary index.

Link copied to clipboard
abstract suspend fun describeEndpoints(input: DescribeEndpointsRequest = DescribeEndpointsRequest { }): DescribeEndpointsResponse

Returns the regional endpoint information. For more information on policy permissions, please see Internetwork traffic privacy.

Link copied to clipboard

Describes an existing table export.

Link copied to clipboard

Returns information about the specified global table.

Link copied to clipboard

Describes Region-specific settings for a global table.

Link copied to clipboard

Represents the properties of the import.

Link copied to clipboard

Returns information about the status of Kinesis streaming.

Link copied to clipboard
abstract suspend fun describeLimits(input: DescribeLimitsRequest = DescribeLimitsRequest { }): DescribeLimitsResponse

Returns the current provisioned-capacity quotas for your Amazon Web Services account in a Region, both for the Region as a whole and for any one DynamoDB table that you create there.

Link copied to clipboard

Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.

Link copied to clipboard

Describes auto scaling settings across replicas of the global table at once.

Link copied to clipboard

Gives a description of the Time to Live (TTL) status on the specified table.

Link copied to clipboard

Stops replication from the DynamoDB table to the Kinesis data stream. This is done without deleting either of the resources.

Link copied to clipboard

Starts table data replication to the specified Kinesis data stream at a timestamp chosen during the enable workflow. If this operation doesn't return results immediately, use DescribeKinesisStreamingDestination to check if streaming to the Kinesis data stream is ACTIVE.

Link copied to clipboard

This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL.

Link copied to clipboard

This operation allows you to perform transactional reads or writes on data stored in DynamoDB, using PartiQL.

Link copied to clipboard

Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.

Link copied to clipboard
abstract suspend fun getItem(input: GetItemRequest): GetItemResponse

The GetItem operation returns a set of attributes for the item with the given primary key. If there is no matching item, GetItem does not return any data and there will be no Item element in the response.

Link copied to clipboard

Returns the resource-based policy document attached to the resource, which can be a table or stream, in JSON format.

Link copied to clipboard
abstract suspend fun importTable(input: ImportTableRequest): ImportTableResponse

Imports table data from an S3 bucket.

Link copied to clipboard
abstract suspend fun listBackups(input: ListBackupsRequest = ListBackupsRequest { }): ListBackupsResponse

List DynamoDB backups that are associated with an Amazon Web Services account and weren't made with Amazon Web Services Backup. To list these backups for a given table, specify TableName. ListBackups returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a maximum number of entries to be returned in a page.

Link copied to clipboard
abstract suspend fun listContributorInsights(input: ListContributorInsightsRequest = ListContributorInsightsRequest { }): ListContributorInsightsResponse

Returns a list of ContributorInsightsSummary for a table and all its global secondary indexes.

Link copied to clipboard
abstract suspend fun listExports(input: ListExportsRequest = ListExportsRequest { }): ListExportsResponse

Lists completed exports within the past 90 days.

Link copied to clipboard
abstract suspend fun listGlobalTables(input: ListGlobalTablesRequest = ListGlobalTablesRequest { }): ListGlobalTablesResponse

Lists all global tables that have a replica in the specified Region.

Link copied to clipboard
abstract suspend fun listImports(input: ListImportsRequest = ListImportsRequest { }): ListImportsResponse

Lists completed imports within the past 90 days.

Link copied to clipboard
abstract suspend fun listTables(input: ListTablesRequest = ListTablesRequest { }): ListTablesResponse

Returns an array of table names associated with the current account and endpoint. The output from ListTables is paginated, with each page returning a maximum of 100 table names.

Link copied to clipboard

List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource up to 10 times per second, per account.

Link copied to clipboard
abstract suspend fun putItem(input: PutItemRequest): PutItemResponse

Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the ReturnValues parameter.

Link copied to clipboard

Attaches a resource-based policy document to the resource, which can be a table or stream. When you attach a resource-based policy using this API, the policy application is eventually consistent.

Link copied to clipboard
abstract suspend fun query(input: QueryRequest): QueryResponse

You must provide the name of the partition key attribute and a single value for that attribute. Query returns all items with that partition key value. Optionally, you can provide a sort key attribute and use a comparison operator to refine the search results.

Link copied to clipboard

Creates a new table from an existing backup. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

Link copied to clipboard

Restores the specified table to the specified point in time within EarliestRestorableDateTime and LatestRestorableDateTime. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

Link copied to clipboard
abstract suspend fun scan(input: ScanRequest): ScanResponse

The Scan operation returns one or more items and item attributes by accessing every item in a table or a secondary index. To have DynamoDB return fewer items, you can provide a FilterExpression operation.

Link copied to clipboard
abstract suspend fun tagResource(input: TagResourceRequest): TagResourceResponse

Associate a set of tags with an Amazon DynamoDB resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking. You can call TagResource up to five times per second, per account.

Link copied to clipboard

TransactGetItems is a synchronous operation that atomically retrieves multiple items from one or more tables (but not from indexes) in a single account and Region. A TransactGetItems call can contain up to 100 TransactGetItem objects, each of which contains a Get structure that specifies an item to retrieve from a table in the account and Region. A call to TransactGetItems cannot retrieve items from tables in more than one Amazon Web Services account or Region. The aggregate size of the items in the transaction cannot exceed 4 MB.

Link copied to clipboard

TransactWriteItems is a synchronous write operation that groups up to 100 action requests. These actions can target items in different tables, but not in different Amazon Web Services accounts or Regions, and no two actions can target the same item. For example, you cannot both ConditionCheck and Update the same item. The aggregate size of the items in the transaction cannot exceed 4 MB.

Link copied to clipboard

Removes the association of tags from an Amazon DynamoDB resource. You can call UntagResource up to five times per second, per account.

Link copied to clipboard

UpdateContinuousBackups enables or disables point in time recovery for the specified table. A successful UpdateContinuousBackups call returns the current ContinuousBackupsDescription. Continuous backups are ENABLED on all tables at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus will be set to ENABLED.

Link copied to clipboard

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 Amazon Web Services Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an Amazon Web Services managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.

Link copied to clipboard

Adds or removes replicas in the specified global table. The global table must already exist to be able to use this operation. Any replica to be added must be empty, have the same name as the global table, have the same key schema, have DynamoDB Streams enabled, and have the same provisioned and maximum write capacity units.

Link copied to clipboard

Updates settings for a global table.

Link copied to clipboard
abstract suspend fun updateItem(input: UpdateItemRequest): UpdateItemResponse

Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values).

Link copied to clipboard

The command to update the Kinesis stream destination.

Link copied to clipboard
abstract suspend fun updateTable(input: UpdateTableRequest): UpdateTableResponse

Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.

Link copied to clipboard

Updates auto scaling settings on your global tables at once.

Link copied to clipboard

The UpdateTimeToLive method enables or disables Time to Live (TTL) for the specified table. A successful UpdateTimeToLive call returns the current TimeToLiveSpecification. It can take up to one hour for the change to fully process. Any additional UpdateTimeToLive calls for the same table during this one hour duration result in a ValidationException.

Inherited functions

Link copied to clipboard

This operation allows you to perform batch reads or writes on data stored in DynamoDB, using PartiQL. Each read statement in a BatchExecuteStatement must specify an equality condition on all key attributes. This enforces that each SELECT statement in a batch returns at most a single item. For more information, see Running batch operations with PartiQL for DynamoDB .

Link copied to clipboard

The BatchGetItem operation returns the attributes of one or more items from one or more tables. You identify requested items by primary key.

Link copied to clipboard

The BatchWriteItem operation puts or deletes multiple items in one or more tables. A single call to BatchWriteItem can transmit up to 16MB of data over the network, consisting of up to 25 item put or delete operations. While individual items can be up to 400 KB once stored, it's important to note that an item's representation might be greater than 400KB while being sent in DynamoDB's JSON format for the API call. For more details on this distinction, see Naming Rules and Data Types.

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard

Creates a backup for an existing table.

Link copied to clipboard

Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided Regions.

Link copied to clipboard
inline suspend fun DynamoDbClient.createTable(crossinline block: CreateTableRequest.Builder.() -> Unit): CreateTableResponse

The CreateTable operation adds a new table to your account. In an Amazon Web Services account, table names must be unique within each Region. That is, you can have two tables with same name if you create the tables in different Regions.

Link copied to clipboard

Deletes an existing backup of a table.

Link copied to clipboard
inline suspend fun DynamoDbClient.deleteItem(crossinline block: DeleteItemRequest.Builder.() -> Unit): DeleteItemResponse

Deletes a single item in a table by primary key. You can perform a conditional delete operation that deletes the item if it exists, or if it has an expected attribute value.

Link copied to clipboard

Deletes the resource-based policy attached to the resource, which can be a table or stream.

Link copied to clipboard
inline suspend fun DynamoDbClient.deleteTable(crossinline block: DeleteTableRequest.Builder.() -> Unit): DeleteTableResponse

The DeleteTable operation deletes a table and all of its items. After a DeleteTable request, the specified table is in the DELETING state until DynamoDB completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException. If the specified table does not exist, DynamoDB returns a ResourceNotFoundException. If table is already in the DELETING state, no error is returned.

Link copied to clipboard

Describes an existing backup of a table.

Link copied to clipboard

Checks the status of continuous backups and point in time recovery on the specified table. Continuous backups are ENABLED on all tables at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus will be set to ENABLED.

Link copied to clipboard

Returns information about contributor insights for a given table or global secondary index.

Link copied to clipboard

Returns the regional endpoint information. For more information on policy permissions, please see Internetwork traffic privacy.

Link copied to clipboard

Describes an existing table export.

Link copied to clipboard

Returns information about the specified global table.

Link copied to clipboard

Describes Region-specific settings for a global table.

Link copied to clipboard

Represents the properties of the import.

Link copied to clipboard

Returns information about the status of Kinesis streaming.

Link copied to clipboard

Returns the current provisioned-capacity quotas for your Amazon Web Services account in a Region, both for the Region as a whole and for any one DynamoDB table that you create there.

Link copied to clipboard

Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.

Link copied to clipboard

Describes auto scaling settings across replicas of the global table at once.

Link copied to clipboard

Gives a description of the Time to Live (TTL) status on the specified table.

Link copied to clipboard

Stops replication from the DynamoDB table to the Kinesis data stream. This is done without deleting either of the resources.

Link copied to clipboard

Starts table data replication to the specified Kinesis data stream at a timestamp chosen during the enable workflow. If this operation doesn't return results immediately, use DescribeKinesisStreamingDestination to check if streaming to the Kinesis data stream is ACTIVE.

Link copied to clipboard

This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL.

Link copied to clipboard

This operation allows you to perform transactional reads or writes on data stored in DynamoDB, using PartiQL.

Link copied to clipboard

Exports table data to an S3 bucket. The table must have point in time recovery enabled, and you can export data from any time within the point in time recovery window.

Link copied to clipboard
inline suspend fun DynamoDbClient.getItem(crossinline block: GetItemRequest.Builder.() -> Unit): GetItemResponse

The GetItem operation returns a set of attributes for the item with the given primary key. If there is no matching item, GetItem does not return any data and there will be no Item element in the response.

Link copied to clipboard

Returns the resource-based policy document attached to the resource, which can be a table or stream, in JSON format.

Link copied to clipboard
inline suspend fun DynamoDbClient.importTable(crossinline block: ImportTableRequest.Builder.() -> Unit): ImportTableResponse

Imports table data from an S3 bucket.

Link copied to clipboard
inline suspend fun DynamoDbClient.listBackups(crossinline block: ListBackupsRequest.Builder.() -> Unit): ListBackupsResponse

List DynamoDB backups that are associated with an Amazon Web Services account and weren't made with Amazon Web Services Backup. To list these backups for a given table, specify TableName. ListBackups returns a paginated list of results with at most 1 MB worth of items in a page. You can also specify a maximum number of entries to be returned in a page.

Link copied to clipboard

Returns a list of ContributorInsightsSummary for a table and all its global secondary indexes.

Link copied to clipboard
inline suspend fun DynamoDbClient.listExports(crossinline block: ListExportsRequest.Builder.() -> Unit): ListExportsResponse

Lists completed exports within the past 90 days.

Link copied to clipboard
Link copied to clipboard

Lists all global tables that have a replica in the specified Region.

Link copied to clipboard
inline suspend fun DynamoDbClient.listImports(crossinline block: ListImportsRequest.Builder.() -> Unit): ListImportsResponse

Lists completed imports within the past 90 days.

Link copied to clipboard
Link copied to clipboard
inline suspend fun DynamoDbClient.listTables(crossinline block: ListTablesRequest.Builder.() -> Unit): ListTablesResponse

Returns an array of table names associated with the current account and endpoint. The output from ListTables is paginated, with each page returning a maximum of 100 table names.

Link copied to clipboard
Link copied to clipboard

List all tags on an Amazon DynamoDB resource. You can call ListTagsOfResource up to 10 times per second, per account.

Link copied to clipboard
inline suspend fun DynamoDbClient.putItem(crossinline block: PutItemRequest.Builder.() -> Unit): PutItemResponse

Creates a new item, or replaces an old item with a new item. If an item that has the same primary key as the new item already exists in the specified table, the new item completely replaces the existing item. You can perform a conditional put operation (add a new item if one with the specified primary key doesn't exist), or replace an existing item if it has certain attribute values. You can return the item's attribute values in the same operation, using the ReturnValues parameter.

Link copied to clipboard

Attaches a resource-based policy document to the resource, which can be a table or stream. When you attach a resource-based policy using this API, the policy application is eventually consistent.

Link copied to clipboard
inline suspend fun DynamoDbClient.query(crossinline block: QueryRequest.Builder.() -> Unit): QueryResponse

You must provide the name of the partition key attribute and a single value for that attribute. Query returns all items with that partition key value. Optionally, you can provide a sort key attribute and use a comparison operator to refine the search results.

Link copied to clipboard
Link copied to clipboard

Creates a new table from an existing backup. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

Link copied to clipboard

Restores the specified table to the specified point in time within EarliestRestorableDateTime and LatestRestorableDateTime. You can restore your table to any point in time in the last 35 days. You can set the recovery period to any value between 1 and 35 days. Any number of users can execute up to 50 concurrent restores (any type of restore) in a given account.

Link copied to clipboard
inline suspend fun DynamoDbClient.scan(crossinline block: ScanRequest.Builder.() -> Unit): ScanResponse

The Scan operation returns one or more items and item attributes by accessing every item in a table or a secondary index. To have DynamoDB return fewer items, you can provide a FilterExpression operation.

Link copied to clipboard

Paginate over ScanResponse results.

Link copied to clipboard
inline suspend fun DynamoDbClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse

Associate a set of tags with an Amazon DynamoDB resource. You can then activate these user-defined tags so that they appear on the Billing and Cost Management console for cost allocation tracking. You can call TagResource up to five times per second, per account.

Link copied to clipboard

TransactGetItems is a synchronous operation that atomically retrieves multiple items from one or more tables (but not from indexes) in a single account and Region. A TransactGetItems call can contain up to 100 TransactGetItem objects, each of which contains a Get structure that specifies an item to retrieve from a table in the account and Region. A call to TransactGetItems cannot retrieve items from tables in more than one Amazon Web Services account or Region. The aggregate size of the items in the transaction cannot exceed 4 MB.

Link copied to clipboard

TransactWriteItems is a synchronous write operation that groups up to 100 action requests. These actions can target items in different tables, but not in different Amazon Web Services accounts or Regions, and no two actions can target the same item. For example, you cannot both ConditionCheck and Update the same item. The aggregate size of the items in the transaction cannot exceed 4 MB.

Link copied to clipboard

Removes the association of tags from an Amazon DynamoDB resource. You can call UntagResource up to five times per second, per account.

Link copied to clipboard

UpdateContinuousBackups enables or disables point in time recovery for the specified table. A successful UpdateContinuousBackups call returns the current ContinuousBackupsDescription. Continuous backups are ENABLED on all tables at table creation. If point in time recovery is enabled, PointInTimeRecoveryStatus will be set to ENABLED.

Link copied to clipboard

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 Amazon Web Services Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an Amazon Web Services managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.

Link copied to clipboard

Adds or removes replicas in the specified global table. The global table must already exist to be able to use this operation. Any replica to be added must be empty, have the same name as the global table, have the same key schema, have DynamoDB Streams enabled, and have the same provisioned and maximum write capacity units.

Link copied to clipboard

Updates settings for a global table.

Link copied to clipboard
inline suspend fun DynamoDbClient.updateItem(crossinline block: UpdateItemRequest.Builder.() -> Unit): UpdateItemResponse

Edits an existing item's attributes, or adds a new item to the table if it does not already exist. You can put, delete, or add attribute values. You can also perform a conditional update on an existing item (insert a new attribute name-value pair if it doesn't exist, or replace an existing name-value pair if it has certain expected attribute values).

Link copied to clipboard

The command to update the Kinesis stream destination.

Link copied to clipboard
inline suspend fun DynamoDbClient.updateTable(crossinline block: UpdateTableRequest.Builder.() -> Unit): UpdateTableResponse

Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.

Link copied to clipboard

Updates auto scaling settings on your global tables at once.

Link copied to clipboard

The UpdateTimeToLive method enables or disables Time to Live (TTL) for the specified table. A successful UpdateTimeToLive call returns the current TimeToLiveSpecification. It can take up to one hour for the change to fully process. Any additional UpdateTimeToLive calls for the same table during this one hour duration result in a ValidationException.

Link copied to clipboard

Create a copy of the client with one or more configuration values overridden. This method allows the caller to perform scoped config overrides for one or more client operations.