UNPKG

@aws-sdk/client-dynamodb

Version:

AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native

1,014 lines (996 loc) 126 kB
import { DynamoDBClient } from "./DynamoDBClient"; import { BatchExecuteStatementCommand, BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput, } from "./commands/BatchExecuteStatementCommand"; import { BatchGetItemCommand, BatchGetItemCommandInput, BatchGetItemCommandOutput, } from "./commands/BatchGetItemCommand"; import { BatchWriteItemCommand, BatchWriteItemCommandInput, BatchWriteItemCommandOutput, } from "./commands/BatchWriteItemCommand"; import { CreateBackupCommand, CreateBackupCommandInput, CreateBackupCommandOutput, } from "./commands/CreateBackupCommand"; import { CreateGlobalTableCommand, CreateGlobalTableCommandInput, CreateGlobalTableCommandOutput, } from "./commands/CreateGlobalTableCommand"; import { CreateTableCommand, CreateTableCommandInput, CreateTableCommandOutput } from "./commands/CreateTableCommand"; import { DeleteBackupCommand, DeleteBackupCommandInput, DeleteBackupCommandOutput, } from "./commands/DeleteBackupCommand"; import { DeleteItemCommand, DeleteItemCommandInput, DeleteItemCommandOutput } from "./commands/DeleteItemCommand"; import { DeleteTableCommand, DeleteTableCommandInput, DeleteTableCommandOutput } from "./commands/DeleteTableCommand"; import { DescribeBackupCommand, DescribeBackupCommandInput, DescribeBackupCommandOutput, } from "./commands/DescribeBackupCommand"; import { DescribeContinuousBackupsCommand, DescribeContinuousBackupsCommandInput, DescribeContinuousBackupsCommandOutput, } from "./commands/DescribeContinuousBackupsCommand"; import { DescribeContributorInsightsCommand, DescribeContributorInsightsCommandInput, DescribeContributorInsightsCommandOutput, } from "./commands/DescribeContributorInsightsCommand"; import { DescribeEndpointsCommand, DescribeEndpointsCommandInput, DescribeEndpointsCommandOutput, } from "./commands/DescribeEndpointsCommand"; import { DescribeExportCommand, DescribeExportCommandInput, DescribeExportCommandOutput, } from "./commands/DescribeExportCommand"; import { DescribeGlobalTableCommand, DescribeGlobalTableCommandInput, DescribeGlobalTableCommandOutput, } from "./commands/DescribeGlobalTableCommand"; import { DescribeGlobalTableSettingsCommand, DescribeGlobalTableSettingsCommandInput, DescribeGlobalTableSettingsCommandOutput, } from "./commands/DescribeGlobalTableSettingsCommand"; import { DescribeKinesisStreamingDestinationCommand, DescribeKinesisStreamingDestinationCommandInput, DescribeKinesisStreamingDestinationCommandOutput, } from "./commands/DescribeKinesisStreamingDestinationCommand"; import { DescribeLimitsCommand, DescribeLimitsCommandInput, DescribeLimitsCommandOutput, } from "./commands/DescribeLimitsCommand"; import { DescribeTableCommand, DescribeTableCommandInput, DescribeTableCommandOutput, } from "./commands/DescribeTableCommand"; import { DescribeTableReplicaAutoScalingCommand, DescribeTableReplicaAutoScalingCommandInput, DescribeTableReplicaAutoScalingCommandOutput, } from "./commands/DescribeTableReplicaAutoScalingCommand"; import { DescribeTimeToLiveCommand, DescribeTimeToLiveCommandInput, DescribeTimeToLiveCommandOutput, } from "./commands/DescribeTimeToLiveCommand"; import { DisableKinesisStreamingDestinationCommand, DisableKinesisStreamingDestinationCommandInput, DisableKinesisStreamingDestinationCommandOutput, } from "./commands/DisableKinesisStreamingDestinationCommand"; import { EnableKinesisStreamingDestinationCommand, EnableKinesisStreamingDestinationCommandInput, EnableKinesisStreamingDestinationCommandOutput, } from "./commands/EnableKinesisStreamingDestinationCommand"; import { ExecuteStatementCommand, ExecuteStatementCommandInput, ExecuteStatementCommandOutput, } from "./commands/ExecuteStatementCommand"; import { ExecuteTransactionCommand, ExecuteTransactionCommandInput, ExecuteTransactionCommandOutput, } from "./commands/ExecuteTransactionCommand"; import { ExportTableToPointInTimeCommand, ExportTableToPointInTimeCommandInput, ExportTableToPointInTimeCommandOutput, } from "./commands/ExportTableToPointInTimeCommand"; import { GetItemCommand, GetItemCommandInput, GetItemCommandOutput } from "./commands/GetItemCommand"; import { ListBackupsCommand, ListBackupsCommandInput, ListBackupsCommandOutput } from "./commands/ListBackupsCommand"; import { ListContributorInsightsCommand, ListContributorInsightsCommandInput, ListContributorInsightsCommandOutput, } from "./commands/ListContributorInsightsCommand"; import { ListExportsCommand, ListExportsCommandInput, ListExportsCommandOutput } from "./commands/ListExportsCommand"; import { ListGlobalTablesCommand, ListGlobalTablesCommandInput, ListGlobalTablesCommandOutput, } from "./commands/ListGlobalTablesCommand"; import { ListTablesCommand, ListTablesCommandInput, ListTablesCommandOutput } from "./commands/ListTablesCommand"; import { ListTagsOfResourceCommand, ListTagsOfResourceCommandInput, ListTagsOfResourceCommandOutput, } from "./commands/ListTagsOfResourceCommand"; import { PutItemCommand, PutItemCommandInput, PutItemCommandOutput } from "./commands/PutItemCommand"; import { QueryCommand, QueryCommandInput, QueryCommandOutput } from "./commands/QueryCommand"; import { RestoreTableFromBackupCommand, RestoreTableFromBackupCommandInput, RestoreTableFromBackupCommandOutput, } from "./commands/RestoreTableFromBackupCommand"; import { RestoreTableToPointInTimeCommand, RestoreTableToPointInTimeCommandInput, RestoreTableToPointInTimeCommandOutput, } from "./commands/RestoreTableToPointInTimeCommand"; import { ScanCommand, ScanCommandInput, ScanCommandOutput } from "./commands/ScanCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { TransactGetItemsCommand, TransactGetItemsCommandInput, TransactGetItemsCommandOutput, } from "./commands/TransactGetItemsCommand"; import { TransactWriteItemsCommand, TransactWriteItemsCommandInput, TransactWriteItemsCommandOutput, } from "./commands/TransactWriteItemsCommand"; import { UntagResourceCommand, UntagResourceCommandInput, UntagResourceCommandOutput, } from "./commands/UntagResourceCommand"; import { UpdateContinuousBackupsCommand, UpdateContinuousBackupsCommandInput, UpdateContinuousBackupsCommandOutput, } from "./commands/UpdateContinuousBackupsCommand"; import { UpdateContributorInsightsCommand, UpdateContributorInsightsCommandInput, UpdateContributorInsightsCommandOutput, } from "./commands/UpdateContributorInsightsCommand"; import { UpdateGlobalTableCommand, UpdateGlobalTableCommandInput, UpdateGlobalTableCommandOutput, } from "./commands/UpdateGlobalTableCommand"; import { UpdateGlobalTableSettingsCommand, UpdateGlobalTableSettingsCommandInput, UpdateGlobalTableSettingsCommandOutput, } from "./commands/UpdateGlobalTableSettingsCommand"; import { UpdateItemCommand, UpdateItemCommandInput, UpdateItemCommandOutput } from "./commands/UpdateItemCommand"; import { UpdateTableCommand, UpdateTableCommandInput, UpdateTableCommandOutput } from "./commands/UpdateTableCommand"; import { UpdateTableReplicaAutoScalingCommand, UpdateTableReplicaAutoScalingCommandInput, UpdateTableReplicaAutoScalingCommandOutput, } from "./commands/UpdateTableReplicaAutoScalingCommand"; import { UpdateTimeToLiveCommand, UpdateTimeToLiveCommandInput, UpdateTimeToLiveCommandOutput, } from "./commands/UpdateTimeToLiveCommand"; import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; /** * <fullname>Amazon DynamoDB</fullname> * * * <p>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.</p> * * <p>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 AWS Management * Console to monitor resource utilization and performance metrics.</p> * * <p>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 AWS region, providing * built-in high availability and data durability. </p> */ export class DynamoDB extends DynamoDBClient { /** * <p> * This operation allows you to perform batch reads and writes on data stored in DynamoDB, using PartiQL. * </p> */ public batchExecuteStatement( args: BatchExecuteStatementCommandInput, options?: __HttpHandlerOptions ): Promise<BatchExecuteStatementCommandOutput>; public batchExecuteStatement( args: BatchExecuteStatementCommandInput, cb: (err: any, data?: BatchExecuteStatementCommandOutput) => void ): void; public batchExecuteStatement( args: BatchExecuteStatementCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchExecuteStatementCommandOutput) => void ): void; public batchExecuteStatement( args: BatchExecuteStatementCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: BatchExecuteStatementCommandOutput) => void), cb?: (err: any, data?: BatchExecuteStatementCommandOutput) => void ): Promise<BatchExecuteStatementCommandOutput> | void { const command = new BatchExecuteStatementCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>The <code>BatchGetItem</code> operation returns the attributes of one or more items from one or * more tables. You identify requested items by primary key.</p> * <p>A single operation can retrieve up to 16 MB of data, which can contain as many as 100 * items. <code>BatchGetItem</code> returns a partial result if the response size limit is * exceeded, the table's provisioned throughput is exceeded, or an internal processing * failure occurs. If a partial result is returned, the operation returns a value for * <code>UnprocessedKeys</code>. You can use this value to retry the operation starting * with the next item to get.</p> * <important> * <p>If you request more than 100 items, <code>BatchGetItem</code> returns a * <code>ValidationException</code> with the message "Too many items requested for * the BatchGetItem call."</p> * </important> * <p>For example, if you ask to retrieve 100 items, but each individual item is 300 KB in * size, the system returns 52 items (so as not to exceed the 16 MB limit). It also returns * an appropriate <code>UnprocessedKeys</code> value so you can get the next page of * results. If desired, your application can include its own logic to assemble the pages of * results into one dataset.</p> * <p>If <i>none</i> of the items can be processed due to insufficient * provisioned throughput on all of the tables in the request, then * <code>BatchGetItem</code> returns a * <code>ProvisionedThroughputExceededException</code>. If <i>at least * one</i> of the items is successfully processed, then * <code>BatchGetItem</code> completes successfully, while returning the keys of the * unread items in <code>UnprocessedKeys</code>.</p> * <important> * <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those * items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. * If you retry the batch operation immediately, the underlying read or write requests can * still fail due to throttling on the individual tables. If you delay the batch operation * using exponential backoff, the individual requests in the batch are much more likely to * succeed.</p> * <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations">Batch * Operations and Error Handling</a> in the <i>Amazon DynamoDB Developer Guide</i>.</p> * </important> * <p>By default, <code>BatchGetItem</code> performs eventually consistent reads on every table in the * request. If you want strongly consistent reads instead, you can set <code>ConsistentRead</code> to * <code>true</code> for any or all tables.</p> * <p>In order to minimize response latency, <code>BatchGetItem</code> retrieves items in parallel.</p> * <p>When designing your application, keep in mind that DynamoDB does not return items in any * particular order. To help parse the response by item, include the primary key values for the * items in your request in the <code>ProjectionExpression</code> parameter.</p> * <p>If a requested item does not exist, it is not returned in the result. Requests for * nonexistent items consume the minimum read capacity units according to the type of read. * For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations">Working with Tables</a> in the <i>Amazon DynamoDB Developer * Guide</i>.</p> */ public batchGetItem( args: BatchGetItemCommandInput, options?: __HttpHandlerOptions ): Promise<BatchGetItemCommandOutput>; public batchGetItem(args: BatchGetItemCommandInput, cb: (err: any, data?: BatchGetItemCommandOutput) => void): void; public batchGetItem( args: BatchGetItemCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetItemCommandOutput) => void ): void; public batchGetItem( args: BatchGetItemCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: BatchGetItemCommandOutput) => void), cb?: (err: any, data?: BatchGetItemCommandOutput) => void ): Promise<BatchGetItemCommandOutput> | void { const command = new BatchGetItemCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>The <code>BatchWriteItem</code> operation puts or deletes multiple items in one or more * tables. A single call to <code>BatchWriteItem</code> can write up to 16 MB of data, * which can comprise as many as 25 put or delete requests. Individual items to be written * can be as large as 400 KB.</p> * <note> * <p> * <code>BatchWriteItem</code> cannot update items. To update items, use the <code>UpdateItem</code> * action.</p> * </note> * <p>The individual <code>PutItem</code> and <code>DeleteItem</code> operations specified in * <code>BatchWriteItem</code> are atomic; however <code>BatchWriteItem</code> as a whole is not. If any * requested operations fail because the table's provisioned throughput is exceeded or an * internal processing failure occurs, the failed operations are returned in the * <code>UnprocessedItems</code> response parameter. You can investigate and optionally resend the * requests. Typically, you would call <code>BatchWriteItem</code> in a loop. Each iteration would * check for unprocessed items and submit a new <code>BatchWriteItem</code> request with those * unprocessed items until all items have been processed.</p> * <p>If <i>none</i> of the items can be processed due to insufficient * provisioned throughput on all of the tables in the request, then * <code>BatchWriteItem</code> returns a * <code>ProvisionedThroughputExceededException</code>.</p> * <important> * <p>If DynamoDB returns any unprocessed items, you should retry the batch operation on those * items. However, <i>we strongly recommend that you use an exponential backoff algorithm</i>. * If you retry the batch operation immediately, the underlying read or write requests can * still fail due to throttling on the individual tables. If you delay the batch operation * using exponential backoff, the individual requests in the batch are much more likely to * succeed.</p> * <p>For more information, see <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#Programming.Errors.BatchOperations">Batch Operations and Error Handling</a> in the <i>Amazon DynamoDB * Developer Guide</i>.</p> * </important> * * <p>With <code>BatchWriteItem</code>, you can efficiently write or delete large amounts of * data, such as from Amazon EMR, or copy data from another database into DynamoDB. In * order to improve performance with these large-scale operations, * <code>BatchWriteItem</code> does not behave in the same way as individual * <code>PutItem</code> and <code>DeleteItem</code> calls would. For example, you * cannot specify conditions on individual put and delete requests, and * <code>BatchWriteItem</code> does not return deleted items in the response.</p> * <p>If you use a programming language that supports concurrency, you can use * threads to write items in parallel. Your application must include the necessary logic to * manage the threads. With languages that don't support threading, you must update * or delete the specified items one at a time. In both situations, <code>BatchWriteItem</code> * performs the specified put and delete operations in * parallel, giving you the power of the thread pool approach without having to introduce * complexity into your application.</p> * <p>Parallel processing reduces latency, but each specified put and delete request consumes the same number of write capacity units whether it is processed in parallel or not. Delete operations on nonexistent items consume one write capacity unit.</p> * <p>If one or more of the following is true, DynamoDB rejects the entire batch write operation:</p> * <ul> * <li> * <p>One or more tables specified in the <code>BatchWriteItem</code> request does not exist.</p> * </li> * <li> * <p>Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.</p> * </li> * <li> * <p>You try to perform multiple operations on the same item in the same <code>BatchWriteItem</code> * request. For example, you cannot put and delete the same item in the same * <code>BatchWriteItem</code> request. </p> * </li> * <li> * <p> * Your request contains at least two items with identical hash and range keys (which essentially is two put operations). * </p> * </li> * <li> * <p>There are more than 25 requests in the batch.</p> * </li> * <li> * <p>Any individual item in a batch exceeds 400 KB.</p> * </li> * <li> * <p>The total request size exceeds 16 MB.</p> * </li> * </ul> */ public batchWriteItem( args: BatchWriteItemCommandInput, options?: __HttpHandlerOptions ): Promise<BatchWriteItemCommandOutput>; public batchWriteItem( args: BatchWriteItemCommandInput, cb: (err: any, data?: BatchWriteItemCommandOutput) => void ): void; public batchWriteItem( args: BatchWriteItemCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchWriteItemCommandOutput) => void ): void; public batchWriteItem( args: BatchWriteItemCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: BatchWriteItemCommandOutput) => void), cb?: (err: any, data?: BatchWriteItemCommandOutput) => void ): Promise<BatchWriteItemCommandOutput> | void { const command = new BatchWriteItemCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Creates a backup for an existing table.</p> * <p> Each time you create an on-demand backup, the entire table data is backed up. There * is no limit to the number of on-demand backups that can be taken. </p> * <p> When you create an on-demand backup, a time marker of the request is cataloged, and * the backup is created asynchronously, by applying all changes until the time of the * request to the last full table snapshot. Backup requests are processed instantaneously * and become available for restore within minutes. </p> * <p>You can call <code>CreateBackup</code> at a maximum rate of 50 times per second.</p> * <p>All backups in DynamoDB work without consuming any provisioned throughput on the table.</p> * <p> If you submit a backup request on 2018-12-14 at 14:25:00, the backup is guaranteed * to contain all data committed to the table up to 14:24:00, and data committed after * 14:26:00 will not be. The backup might contain data modifications made between 14:24:00 * and 14:26:00. On-demand backup does not support causal consistency. </p> * <p> * Along with data, the following are also included on the backups: * </p> * <ul> * <li> * <p>Global secondary indexes (GSIs)</p> * </li> * <li> * <p>Local secondary indexes (LSIs)</p> * </li> * <li> * <p>Streams</p> * </li> * <li> * <p>Provisioned read and write capacity</p> * </li> * </ul> */ public createBackup( args: CreateBackupCommandInput, options?: __HttpHandlerOptions ): Promise<CreateBackupCommandOutput>; public createBackup(args: CreateBackupCommandInput, cb: (err: any, data?: CreateBackupCommandOutput) => void): void; public createBackup( args: CreateBackupCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateBackupCommandOutput) => void ): void; public createBackup( args: CreateBackupCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateBackupCommandOutput) => void), cb?: (err: any, data?: CreateBackupCommandOutput) => void ): Promise<CreateBackupCommandOutput> | void { const command = new CreateBackupCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>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. </p> * <note> * <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> * </note> * * <p>If you want to add a new replica table to a global table, each of the following conditions * must be true:</p> * <ul> * <li> * <p>The table must have the same primary key as all of the other replicas.</p> * </li> * <li> * <p>The table must have the same name as all of the other replicas.</p> * </li> * <li> * <p>The table must have DynamoDB Streams enabled, with the stream containing both the new and the old * images of the item.</p> * </li> * <li> * <p>None of the replica tables in the global table can contain any data.</p> * </li> * </ul> * <p> * If global secondary indexes are specified, then the following conditions must also be met: * </p> * <ul> * <li> * <p> * The global secondary indexes must have the same name. * </p> * </li> * <li> * <p> * The global secondary indexes must have the same hash key and sort key (if present). * </p> * </li> * </ul> * <p> * If local secondary indexes are specified, then the following conditions must also be met: * </p> * <ul> * <li> * <p> * The local secondary indexes must have the same name. * </p> * </li> * <li> * <p> * The local secondary indexes must have the same hash key and sort key (if present). * </p> * </li> * </ul> * * <important> * <p> * Write capacity settings should be set consistently across your replica tables and * secondary indexes. DynamoDB strongly recommends enabling auto scaling to manage the write * capacity settings for all of your global tables replicas and indexes. * </p> * <p> * If you prefer to manage write capacity settings manually, you should provision equal * replicated write capacity units to your replica tables. You should also provision * equal replicated write capacity units to matching secondary indexes across * your global table. * </p> * </important> */ public createGlobalTable( args: CreateGlobalTableCommandInput, options?: __HttpHandlerOptions ): Promise<CreateGlobalTableCommandOutput>; public createGlobalTable( args: CreateGlobalTableCommandInput, cb: (err: any, data?: CreateGlobalTableCommandOutput) => void ): void; public createGlobalTable( args: CreateGlobalTableCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateGlobalTableCommandOutput) => void ): void; public createGlobalTable( args: CreateGlobalTableCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateGlobalTableCommandOutput) => void), cb?: (err: any, data?: CreateGlobalTableCommandOutput) => void ): Promise<CreateGlobalTableCommandOutput> | void { const command = new CreateGlobalTableCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>The <code>CreateTable</code> operation adds a new table to your account. In an AWS * 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.</p> * <p> * <code>CreateTable</code> is an asynchronous operation. Upon receiving a <code>CreateTable</code> request, * DynamoDB immediately returns a response with a <code>TableStatus</code> of <code>CREATING</code>. After * the table is created, DynamoDB sets the <code>TableStatus</code> to <code>ACTIVE</code>. You can * perform read and write operations only on an <code>ACTIVE</code> table. </p> * <p>You can optionally define secondary indexes on the new table, as part of the <code>CreateTable</code> * operation. If you want to create multiple tables with secondary indexes on them, you must create the * tables sequentially. Only one table with secondary indexes can be in the <code>CREATING</code> state at * any given time.</p> * <p>You can use the <code>DescribeTable</code> action to check the table status.</p> */ public createTable(args: CreateTableCommandInput, options?: __HttpHandlerOptions): Promise<CreateTableCommandOutput>; public createTable(args: CreateTableCommandInput, cb: (err: any, data?: CreateTableCommandOutput) => void): void; public createTable( args: CreateTableCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateTableCommandOutput) => void ): void; public createTable( args: CreateTableCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateTableCommandOutput) => void), cb?: (err: any, data?: CreateTableCommandOutput) => void ): Promise<CreateTableCommandOutput> | void { const command = new CreateTableCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Deletes an existing backup of a table.</p> * <p>You can call <code>DeleteBackup</code> at a maximum rate of 10 times per second.</p> */ public deleteBackup( args: DeleteBackupCommandInput, options?: __HttpHandlerOptions ): Promise<DeleteBackupCommandOutput>; public deleteBackup(args: DeleteBackupCommandInput, cb: (err: any, data?: DeleteBackupCommandOutput) => void): void; public deleteBackup( args: DeleteBackupCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteBackupCommandOutput) => void ): void; public deleteBackup( args: DeleteBackupCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteBackupCommandOutput) => void), cb?: (err: any, data?: DeleteBackupCommandOutput) => void ): Promise<DeleteBackupCommandOutput> | void { const command = new DeleteBackupCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>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.</p> * <p>In addition to deleting an item, you can also return the item's attribute values in the same * operation, using the <code>ReturnValues</code> parameter.</p> * <p>Unless you specify conditions, the <code>DeleteItem</code> is an idempotent operation; running it * multiple times on the same item or attribute does <i>not</i> result in an error response.</p> * <p>Conditional deletes are useful for deleting items only if specific conditions are met. If those conditions are met, DynamoDB performs the delete. Otherwise, the item is not deleted.</p> */ public deleteItem(args: DeleteItemCommandInput, options?: __HttpHandlerOptions): Promise<DeleteItemCommandOutput>; public deleteItem(args: DeleteItemCommandInput, cb: (err: any, data?: DeleteItemCommandOutput) => void): void; public deleteItem( args: DeleteItemCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteItemCommandOutput) => void ): void; public deleteItem( args: DeleteItemCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteItemCommandOutput) => void), cb?: (err: any, data?: DeleteItemCommandOutput) => void ): Promise<DeleteItemCommandOutput> | void { const command = new DeleteItemCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>The <code>DeleteTable</code> operation deletes a table and all of its items. After a * <code>DeleteTable</code> request, the specified table is in the <code>DELETING</code> state until * DynamoDB completes the deletion. If the table is in the <code>ACTIVE</code> state, you can delete * it. If a table is in <code>CREATING</code> or <code>UPDATING</code> states, then DynamoDB returns * a <code>ResourceInUseException</code>. If the specified table does not exist, DynamoDB returns a * <code>ResourceNotFoundException</code>. If table is already in the <code>DELETING</code> state, no * error is returned. </p> * <note> * <p>DynamoDB might continue to accept data read and write operations, such as <code>GetItem</code> and * <code>PutItem</code>, on a table in the <code>DELETING</code> state until the table deletion is * complete.</p> * </note> * <p>When you delete a table, any indexes on that table are also deleted.</p> * <p>If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes * into the <code>DISABLED</code> state, and the stream is automatically deleted after 24 hours.</p> * * <p>Use the <code>DescribeTable</code> action to check the status of the table. </p> */ public deleteTable(args: DeleteTableCommandInput, options?: __HttpHandlerOptions): Promise<DeleteTableCommandOutput>; public deleteTable(args: DeleteTableCommandInput, cb: (err: any, data?: DeleteTableCommandOutput) => void): void; public deleteTable( args: DeleteTableCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteTableCommandOutput) => void ): void; public deleteTable( args: DeleteTableCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteTableCommandOutput) => void), cb?: (err: any, data?: DeleteTableCommandOutput) => void ): Promise<DeleteTableCommandOutput> | void { const command = new DeleteTableCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Describes an existing backup of a table.</p> * <p>You can call <code>DescribeBackup</code> at a maximum rate of 10 times per second.</p> */ public describeBackup( args: DescribeBackupCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeBackupCommandOutput>; public describeBackup( args: DescribeBackupCommandInput, cb: (err: any, data?: DescribeBackupCommandOutput) => void ): void; public describeBackup( args: DescribeBackupCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeBackupCommandOutput) => void ): void; public describeBackup( args: DescribeBackupCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeBackupCommandOutput) => void), cb?: (err: any, data?: DescribeBackupCommandOutput) => void ): Promise<DescribeBackupCommandOutput> | void { const command = new DescribeBackupCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Checks the status of continuous backups and point in time recovery on the specified table. * Continuous backups are <code>ENABLED</code> on all tables at table creation. * If point in time recovery is enabled, <code>PointInTimeRecoveryStatus</code> will be set to ENABLED.</p> * <p> After continuous backups and point in time recovery are enabled, you can restore to any * point in time within <code>EarliestRestorableDateTime</code> and * <code>LatestRestorableDateTime</code>. </p> * <p> * <code>LatestRestorableDateTime</code> is typically 5 minutes before the current time. You can restore your table to any point * in time during the last 35 days. * </p> * <p>You can call <code>DescribeContinuousBackups</code> at a maximum rate of 10 times per second.</p> */ public describeContinuousBackups( args: DescribeContinuousBackupsCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeContinuousBackupsCommandOutput>; public describeContinuousBackups( args: DescribeContinuousBackupsCommandInput, cb: (err: any, data?: DescribeContinuousBackupsCommandOutput) => void ): void; public describeContinuousBackups( args: DescribeContinuousBackupsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeContinuousBackupsCommandOutput) => void ): void; public describeContinuousBackups( args: DescribeContinuousBackupsCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeContinuousBackupsCommandOutput) => void), cb?: (err: any, data?: DescribeContinuousBackupsCommandOutput) => void ): Promise<DescribeContinuousBackupsCommandOutput> | void { const command = new DescribeContinuousBackupsCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Returns information about contributor insights, for a given table or global secondary index.</p> */ public describeContributorInsights( args: DescribeContributorInsightsCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeContributorInsightsCommandOutput>; public describeContributorInsights( args: DescribeContributorInsightsCommandInput, cb: (err: any, data?: DescribeContributorInsightsCommandOutput) => void ): void; public describeContributorInsights( args: DescribeContributorInsightsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeContributorInsightsCommandOutput) => void ): void; public describeContributorInsights( args: DescribeContributorInsightsCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeContributorInsightsCommandOutput) => void), cb?: (err: any, data?: DescribeContributorInsightsCommandOutput) => void ): Promise<DescribeContributorInsightsCommandOutput> | void { const command = new DescribeContributorInsightsCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Returns the regional endpoint information.</p> */ public describeEndpoints( args: DescribeEndpointsCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeEndpointsCommandOutput>; public describeEndpoints( args: DescribeEndpointsCommandInput, cb: (err: any, data?: DescribeEndpointsCommandOutput) => void ): void; public describeEndpoints( args: DescribeEndpointsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeEndpointsCommandOutput) => void ): void; public describeEndpoints( args: DescribeEndpointsCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeEndpointsCommandOutput) => void), cb?: (err: any, data?: DescribeEndpointsCommandOutput) => void ): Promise<DescribeEndpointsCommandOutput> | void { const command = new DescribeEndpointsCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Describes an existing table export.</p> */ public describeExport( args: DescribeExportCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeExportCommandOutput>; public describeExport( args: DescribeExportCommandInput, cb: (err: any, data?: DescribeExportCommandOutput) => void ): void; public describeExport( args: DescribeExportCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeExportCommandOutput) => void ): void; public describeExport( args: DescribeExportCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeExportCommandOutput) => void), cb?: (err: any, data?: DescribeExportCommandOutput) => void ): Promise<DescribeExportCommandOutput> | void { const command = new DescribeExportCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Returns information about the specified global table.</p> * <note> * <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables. * If you are using global tables <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V2.html">Version 2019.11.21</a> you can use <a href="https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DescribeTable.html">DescribeTable</a> instead.</p> * </note> */ public describeGlobalTable( args: DescribeGlobalTableCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeGlobalTableCommandOutput>; public describeGlobalTable( args: DescribeGlobalTableCommandInput, cb: (err: any, data?: DescribeGlobalTableCommandOutput) => void ): void; public describeGlobalTable( args: DescribeGlobalTableCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeGlobalTableCommandOutput) => void ): void; public describeGlobalTable( args: DescribeGlobalTableCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeGlobalTableCommandOutput) => void), cb?: (err: any, data?: DescribeGlobalTableCommandOutput) => void ): Promise<DescribeGlobalTableCommandOutput> | void { const command = new DescribeGlobalTableCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Describes Region-specific settings for a global table.</p> * <note> * <p>This operation only applies to <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/globaltables.V1.html">Version 2017.11.29</a> of global tables.</p> * </note> */ public describeGlobalTableSettings( args: DescribeGlobalTableSettingsCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeGlobalTableSettingsCommandOutput>; public describeGlobalTableSettings( args: DescribeGlobalTableSettingsCommandInput, cb: (err: any, data?: DescribeGlobalTableSettingsCommandOutput) => void ): void; public describeGlobalTableSettings( args: DescribeGlobalTableSettingsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeGlobalTableSettingsCommandOutput) => void ): void; public describeGlobalTableSettings( args: DescribeGlobalTableSettingsCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeGlobalTableSettingsCommandOutput) => void), cb?: (err: any, data?: DescribeGlobalTableSettingsCommandOutput) => void ): Promise<DescribeGlobalTableSettingsCommandOutput> | void { const command = new DescribeGlobalTableSettingsCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Returns information about the status of Kinesis streaming.</p> */ public describeKinesisStreamingDestination( args: DescribeKinesisStreamingDestinationCommandInput, options?: __HttpHandlerOptions ): Promise<DescribeKinesisStreamingDestinationCommandOutput>; public describeKinesisStreamingDestination( args: DescribeKinesisStreamingDestinationCommandInput, cb: (err: any, data?: DescribeKinesisStreamingDestinationCommandOutput) => void ): void; public describeKinesisStreamingDestination( args: DescribeKinesisStreamingDestinationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeKinesisStreamingDestinationCommandOutput) => void ): void; public describeKinesisStreamingDestination( args: DescribeKinesisStreamingDestinationCommandInput, optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeKinesisStreamingDestinationCommandOutput) => void), cb?: (err: any, data?: DescribeKinesisStreamingDestinationCommandOutput) => void ): Promise<DescribeKinesisStreamingDestinationCommandOutput> | void { const command = new DescribeKinesisStreamingDestinationCommand(args); if (typeof optionsOrCb === "function") { this.send(command, optionsOrCb); } else if (typeof cb === "function") { if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); this.send(command, optionsOrCb || {}, cb); } else { return this.send(command, optionsOrCb); } } /** * <p>Returns the current provisioned-capacity quotas for your AWS account in a Region, both * for the Region as a whole and for any one DynamoDB table that you create there.</p> * <p>When you establish an AWS account, the account has initial quotas on the maximum read * capacity units and write capacity u