AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

DynamoDB

import "github.com/aws/aws-sdk-go/service/dynamodb"

type DynamoDB struct { *client.Client }

DynamoDB provides the API operation methods for making requests to Amazon DynamoDB. See this package's package overview docs for details on the service.

DynamoDB methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

BatchGetItem

func (c *DynamoDB) BatchGetItem(input *BatchGetItemInput) (*BatchGetItemOutput, error)

BatchGetItem API operation for Amazon DynamoDB.

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

A single operation can retrieve up to 16 MB of data, which can contain as many as 100 items. BatchGetItem will return 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 UnprocessedKeys. You can use this value to retry the operation starting with the next item to get.

If you request more than 100 items BatchGetItem will return a ValidationException with the message "Too many items requested for the BatchGetItem call".

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 UnprocessedKeys 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 data set.

If none of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then BatchGetItem will return a ProvisionedThroughputExceededException. If at least one of the items is successfully processed, then BatchGetItem completes successfully, while returning the keys of the unread items in UnprocessedKeys.

If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, we strongly recommend that you use an exponential backoff algorithm. 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.

For more information, see Batch Operations and Error Handling (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations) in the Amazon DynamoDB Developer Guide.

By default, BatchGetItem performs eventually consistent reads on every table in the request. If you want strongly consistent reads instead, you can set ConsistentRead to true for any or all tables.

In order to minimize response latency, BatchGetItem retrieves items in parallel.

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 ProjectionExpression parameter.

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 Capacity Units Calculations (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#CapacityUnitCalculations) in the Amazon DynamoDB Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation BatchGetItem for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem

Example

DynamoDB BatchGetItem shared00

To retrieve multiple items from a table

This example reads multiple items from the Music table using a batch of three GetItem requests. Only the AlbumTitle attribute is returned.

{ svc := dynamodb.New(session.New()) input := &dynamodb.BatchGetItemInput{ RequestItems: map[string]*dynamodb.KeysAndAttributes{ "Music": { Keys: []map[string]*dynamodb.AttributeValue{ { "Artist": &dynamodb.AttributeValue{ S: aws.String("No One You Know"), }, "SongTitle": &dynamodb.AttributeValue{ S: aws.String("Call Me Today"), }, }, { "Artist": &dynamodb.AttributeValue{ S: aws.String("Acme Band"), }, "SongTitle": &dynamodb.AttributeValue{ S: aws.String("Happy Day"), }, }, { "Artist": &dynamodb.AttributeValue{ S: aws.String("No One You Know"), }, "SongTitle": &dynamodb.AttributeValue{ S: aws.String("Scared of My Shadow"), }, }, }, ProjectionExpression: aws.String("AlbumTitle"), }, }, } result, err := svc.BatchGetItem(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

BatchGetItemPages

func (c *DynamoDB) BatchGetItemPages(input *BatchGetItemInput, fn func(*BatchGetItemOutput, bool) bool) error

BatchGetItemPages iterates over the pages of a BatchGetItem operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See BatchGetItem method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a BatchGetItem operation. pageNum := 0 err := client.BatchGetItemPages(params, func(page *BatchGetItemOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

BatchGetItemPagesWithContext

func (c *DynamoDB) BatchGetItemPagesWithContext(ctx aws.Context, input *BatchGetItemInput, fn func(*BatchGetItemOutput, bool) bool, opts ...request.Option) error

BatchGetItemPagesWithContext same as BatchGetItemPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

BatchGetItemRequest

func (c *DynamoDB) BatchGetItemRequest(input *BatchGetItemInput) (req *request.Request, output *BatchGetItemOutput)

BatchGetItemRequest generates a "aws/request.Request" representing the client's request for the BatchGetItem operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See BatchGetItem for more information on using the BatchGetItem API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the BatchGetItemRequest method. req, resp := client.BatchGetItemRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchGetItem

BatchGetItemWithContext

func (c *DynamoDB) BatchGetItemWithContext(ctx aws.Context, input *BatchGetItemInput, opts ...request.Option) (*BatchGetItemOutput, error)

BatchGetItemWithContext is the same as BatchGetItem with the addition of the ability to pass a context and additional request options.

See BatchGetItem for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

BatchWriteItem

func (c *DynamoDB) BatchWriteItem(input *BatchWriteItemInput) (*BatchWriteItemOutput, error)

BatchWriteItem API operation for Amazon DynamoDB.

The BatchWriteItem operation puts or deletes multiple items in one or more tables. A single call to BatchWriteItem 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.

BatchWriteItem cannot update items. To update items, use the UpdateItem action.

The individual PutItem and DeleteItem operations specified in BatchWriteItem are atomic; however BatchWriteItem 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 UnprocessedItems response parameter. You can investigate and optionally resend the requests. Typically, you would call BatchWriteItem in a loop. Each iteration would check for unprocessed items and submit a new BatchWriteItem request with those unprocessed items until all items have been processed.

Note that if none of the items can be processed due to insufficient provisioned throughput on all of the tables in the request, then BatchWriteItem will return a ProvisionedThroughputExceededException.

If DynamoDB returns any unprocessed items, you should retry the batch operation on those items. However, we strongly recommend that you use an exponential backoff algorithm. 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.

For more information, see Batch Operations and Error Handling (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ErrorHandling.html#BatchOperations) in the Amazon DynamoDB Developer Guide.

With BatchWriteItem, you can efficiently write or delete large amounts of data, such as from Amazon Elastic MapReduce (EMR), or copy data from another database into DynamoDB. In order to improve performance with these large-scale operations, BatchWriteItem does not behave in the same way as individual PutItem and DeleteItem calls would. For example, you cannot specify conditions on individual put and delete requests, and BatchWriteItem does not return deleted items in the response.

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, BatchWriteItem 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.

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.

If one or more of the following is true, DynamoDB rejects the entire batch write operation:

  • One or more tables specified in the BatchWriteItem request does not exist.

  • Primary key attributes specified on an item in the request do not match those in the corresponding table's primary key schema.

  • You try to perform multiple operations on the same item in the same BatchWriteItem request. For example, you cannot put and delete the same item in the same BatchWriteItem request.

  • Your request contains at least two items with identical hash and range keys (which essentially is two put operations).

  • There are more than 25 requests in the batch.

  • Any individual item in a batch exceeds 400 KB.

  • The total request size exceeds 16 MB.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation BatchWriteItem for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException" An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem

Example

DynamoDB BatchWriteItem shared00

To add multiple items to a table

This example adds three new items to the Music table using a batch of three PutItem requests.

{ svc := dynamodb.New(session.New()) input := &dynamodb.BatchWriteItemInput{ RequestItems: map[string][]*dynamodb.WriteRequest{ "Music": { { PutRequest: &dynamodb.PutRequest{ Item: map[string]*dynamodb.AttributeValue{ "AlbumTitle": { S: aws.String("Somewhat Famous"), }, "Artist": { S: aws.String("No One You Know"), }, "SongTitle": { S: aws.String("Call Me Today"), }, }, }, }, { PutRequest: &dynamodb.PutRequest{ Item: map[string]*dynamodb.AttributeValue{ "AlbumTitle": { S: aws.String("Songs About Life"), }, "Artist": { S: aws.String("Acme Band"), }, "SongTitle": { S: aws.String("Happy Day"), }, }, }, }, { PutRequest: &dynamodb.PutRequest{ Item: map[string]*dynamodb.AttributeValue{ "AlbumTitle": { S: aws.String("Blue Sky Blues"), }, "Artist": { S: aws.String("No One You Know"), }, "SongTitle": { S: aws.String("Scared of My Shadow"), }, }, }, }, }, }, } result, err := svc.BatchWriteItem(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeItemCollectionSizeLimitExceededException: fmt.Println(dynamodb.ErrCodeItemCollectionSizeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

BatchWriteItemRequest

func (c *DynamoDB) BatchWriteItemRequest(input *BatchWriteItemInput) (req *request.Request, output *BatchWriteItemOutput)

BatchWriteItemRequest generates a "aws/request.Request" representing the client's request for the BatchWriteItem operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See BatchWriteItem for more information on using the BatchWriteItem API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the BatchWriteItemRequest method. req, resp := client.BatchWriteItemRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/BatchWriteItem

BatchWriteItemWithContext

func (c *DynamoDB) BatchWriteItemWithContext(ctx aws.Context, input *BatchWriteItemInput, opts ...request.Option) (*BatchWriteItemOutput, error)

BatchWriteItemWithContext is the same as BatchWriteItem with the addition of the ability to pass a context and additional request options.

See BatchWriteItem for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateBackup

func (c *DynamoDB) CreateBackup(input *CreateBackupInput) (*CreateBackupOutput, error)

CreateBackup API operation for Amazon DynamoDB.

Creates a backup for an existing table.

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.

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.

You can call CreateBackup at a maximum rate of 50 times per second.

All backups in DynamoDB work without consuming any provisioned throughput on the table.

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 may or may not contain data modifications made between 14:24:00 and 14:26:00. On-Demand Backup does not support causal consistency.

Along with data, the following are also included on the backups:

  • Global secondary indexes (GSIs)

  • Local secondary indexes (LSIs)

  • Streams

  • Provisioned read and write capacity

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation CreateBackup for usage and error information.

Returned Error Codes:

  • ErrCodeTableNotFoundException "TableNotFoundException" A source table with the name TableName does not currently exist within the subscriber's account.

  • ErrCodeTableInUseException "TableInUseException" A target table with the specified name is either being created or deleted.

  • ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException" Backups have not yet been enabled for this table.

  • ErrCodeBackupInUseException "BackupInUseException" There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup

CreateBackupRequest

func (c *DynamoDB) CreateBackupRequest(input *CreateBackupInput) (req *request.Request, output *CreateBackupOutput)

CreateBackupRequest generates a "aws/request.Request" representing the client's request for the CreateBackup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateBackup for more information on using the CreateBackup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateBackupRequest method. req, resp := client.CreateBackupRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateBackup

CreateBackupWithContext

func (c *DynamoDB) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, opts ...request.Option) (*CreateBackupOutput, error)

CreateBackupWithContext is the same as CreateBackup with the addition of the ability to pass a context and additional request options.

See CreateBackup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateGlobalTable

func (c *DynamoDB) CreateGlobalTable(input *CreateGlobalTableInput) (*CreateGlobalTableOutput, error)

CreateGlobalTable API operation for Amazon DynamoDB.

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.

If you want to add a new replica table to a global table, each of the following conditions must be true:

  • The table must have the same primary key as all of the other replicas.

  • The table must have the same name as all of the other replicas.

  • The table must have DynamoDB Streams enabled, with the stream containing both the new and the old images of the item.

  • None of the replica tables in the global table can contain any data.

If global secondary indexes are specified, then the following conditions must also be met:

  • The global secondary indexes must have the same name.

  • The global secondary indexes must have the same hash key and sort key

(if present).

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.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation CreateGlobalTable for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

  • ErrCodeGlobalTableAlreadyExistsException "GlobalTableAlreadyExistsException" The specified global table already exists.

  • ErrCodeTableNotFoundException "TableNotFoundException" A source table with the name TableName does not currently exist within the subscriber's account.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable

CreateGlobalTableRequest

func (c *DynamoDB) CreateGlobalTableRequest(input *CreateGlobalTableInput) (req *request.Request, output *CreateGlobalTableOutput)

CreateGlobalTableRequest generates a "aws/request.Request" representing the client's request for the CreateGlobalTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateGlobalTable for more information on using the CreateGlobalTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateGlobalTableRequest method. req, resp := client.CreateGlobalTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateGlobalTable

CreateGlobalTableWithContext

func (c *DynamoDB) CreateGlobalTableWithContext(ctx aws.Context, input *CreateGlobalTableInput, opts ...request.Option) (*CreateGlobalTableOutput, error)

CreateGlobalTableWithContext is the same as CreateGlobalTable with the addition of the ability to pass a context and additional request options.

See CreateGlobalTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

CreateTable

func (c *DynamoDB) CreateTable(input *CreateTableInput) (*CreateTableOutput, error)

CreateTable API operation for Amazon DynamoDB.

The CreateTable 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.

CreateTable is an asynchronous operation. Upon receiving a CreateTable request, DynamoDB immediately returns a response with a TableStatus of CREATING. After the table is created, DynamoDB sets the TableStatus to ACTIVE. You can perform read and write operations only on an ACTIVE table.

You can optionally define secondary indexes on the new table, as part of the CreateTable 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 CREATING state at any given time.

You can use the DescribeTable action to check the table status.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation CreateTable for usage and error information.

Returned Error Codes:

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable

Example

DynamoDB CreateTable shared00

To create a table

This example creates a table named Music.

{ svc := dynamodb.New(session.New()) input := &dynamodb.CreateTableInput{ AttributeDefinitions: []*dynamodb.AttributeDefinition{ { AttributeName: aws.String("Artist"), AttributeType: aws.String("S"), }, { AttributeName: aws.String("SongTitle"), AttributeType: aws.String("S"), }, }, KeySchema: []*dynamodb.KeySchemaElement{ { AttributeName: aws.String("Artist"), KeyType: aws.String("HASH"), }, { AttributeName: aws.String("SongTitle"), KeyType: aws.String("RANGE"), }, }, ProvisionedThroughput: &dynamodb.ProvisionedThroughput{ ReadCapacityUnits: aws.Int64(5), WriteCapacityUnits: aws.Int64(5), }, TableName: aws.String("Music"), } result, err := svc.CreateTable(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeResourceInUseException: fmt.Println(dynamodb.ErrCodeResourceInUseException, aerr.Error()) case dynamodb.ErrCodeLimitExceededException: fmt.Println(dynamodb.ErrCodeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateTableRequest

func (c *DynamoDB) CreateTableRequest(input *CreateTableInput) (req *request.Request, output *CreateTableOutput)

CreateTableRequest generates a "aws/request.Request" representing the client's request for the CreateTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateTable for more information on using the CreateTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateTableRequest method. req, resp := client.CreateTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/CreateTable

CreateTableWithContext

func (c *DynamoDB) CreateTableWithContext(ctx aws.Context, input *CreateTableInput, opts ...request.Option) (*CreateTableOutput, error)

CreateTableWithContext is the same as CreateTable with the addition of the ability to pass a context and additional request options.

See CreateTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteBackup

func (c *DynamoDB) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error)

DeleteBackup API operation for Amazon DynamoDB.

Deletes an existing backup of a table.

You can call DeleteBackup at a maximum rate of 10 times per second.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DeleteBackup for usage and error information.

Returned Error Codes:

  • ErrCodeBackupNotFoundException "BackupNotFoundException" Backup not found for the given BackupARN.

  • ErrCodeBackupInUseException "BackupInUseException" There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup

DeleteBackupRequest

func (c *DynamoDB) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput)

DeleteBackupRequest generates a "aws/request.Request" representing the client's request for the DeleteBackup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteBackup for more information on using the DeleteBackup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteBackupRequest method. req, resp := client.DeleteBackupRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteBackup

DeleteBackupWithContext

func (c *DynamoDB) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error)

DeleteBackupWithContext is the same as DeleteBackup with the addition of the ability to pass a context and additional request options.

See DeleteBackup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteItem

func (c *DynamoDB) DeleteItem(input *DeleteItemInput) (*DeleteItemOutput, error)

DeleteItem API operation for Amazon DynamoDB.

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.

In addition to deleting an item, you can also return the item's attribute values in the same operation, using the ReturnValues parameter.

Unless you specify conditions, the DeleteItem is an idempotent operation; running it multiple times on the same item or attribute does not result in an error response.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DeleteItem for usage and error information.

Returned Error Codes:

  • ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException" A condition specified in the operation could not be evaluated.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException" An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.

  • ErrCodeTransactionConflictException "TransactionConflictException" Operation was rejected because there is an ongoing transaction for the item.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem

Example

DynamoDB DeleteItem shared00

To delete an item

This example deletes an item from the Music table.

{ svc := dynamodb.New(session.New()) input := &dynamodb.DeleteItemInput{ Key: map[string]*dynamodb.AttributeValue{ "Artist": { S: aws.String("No One You Know"), }, "SongTitle": { S: aws.String("Scared of My Shadow"), }, }, TableName: aws.String("Music"), } result, err := svc.DeleteItem(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeConditionalCheckFailedException: fmt.Println(dynamodb.ErrCodeConditionalCheckFailedException, aerr.Error()) case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeItemCollectionSizeLimitExceededException: fmt.Println(dynamodb.ErrCodeItemCollectionSizeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeTransactionConflictException: fmt.Println(dynamodb.ErrCodeTransactionConflictException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteItemRequest

func (c *DynamoDB) DeleteItemRequest(input *DeleteItemInput) (req *request.Request, output *DeleteItemOutput)

DeleteItemRequest generates a "aws/request.Request" representing the client's request for the DeleteItem operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteItem for more information on using the DeleteItem API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteItemRequest method. req, resp := client.DeleteItemRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteItem

DeleteItemWithContext

func (c *DynamoDB) DeleteItemWithContext(ctx aws.Context, input *DeleteItemInput, opts ...request.Option) (*DeleteItemOutput, error)

DeleteItemWithContext is the same as DeleteItem with the addition of the ability to pass a context and additional request options.

See DeleteItem for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DeleteTable

func (c *DynamoDB) DeleteTable(input *DeleteTableInput) (*DeleteTableOutput, error)

DeleteTable API operation for Amazon DynamoDB.

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.

DynamoDB might continue to accept data read and write operations, such as GetItem and PutItem, on a table in the DELETING state until the table deletion is complete.

When you delete a table, any indexes on that table are also deleted.

If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the DISABLED state, and the stream is automatically deleted after 24 hours.

Use the DescribeTable action to check the status of the table.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DeleteTable for usage and error information.

Returned Error Codes:

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable

Example

DynamoDB DeleteTable shared00

To delete a table

This example deletes the Music table.

{ svc := dynamodb.New(session.New()) input := &dynamodb.DeleteTableInput{ TableName: aws.String("Music"), } result, err := svc.DeleteTable(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeResourceInUseException: fmt.Println(dynamodb.ErrCodeResourceInUseException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeLimitExceededException: fmt.Println(dynamodb.ErrCodeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteTableRequest

func (c *DynamoDB) DeleteTableRequest(input *DeleteTableInput) (req *request.Request, output *DeleteTableOutput)

DeleteTableRequest generates a "aws/request.Request" representing the client's request for the DeleteTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteTable for more information on using the DeleteTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteTableRequest method. req, resp := client.DeleteTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DeleteTable

DeleteTableWithContext

func (c *DynamoDB) DeleteTableWithContext(ctx aws.Context, input *DeleteTableInput, opts ...request.Option) (*DeleteTableOutput, error)

DeleteTableWithContext is the same as DeleteTable with the addition of the ability to pass a context and additional request options.

See DeleteTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeBackup

func (c *DynamoDB) DescribeBackup(input *DescribeBackupInput) (*DescribeBackupOutput, error)

DescribeBackup API operation for Amazon DynamoDB.

Describes an existing backup of a table.

You can call DescribeBackup at a maximum rate of 10 times per second.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeBackup for usage and error information.

Returned Error Codes:

  • ErrCodeBackupNotFoundException "BackupNotFoundException" Backup not found for the given BackupARN.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup

DescribeBackupRequest

func (c *DynamoDB) DescribeBackupRequest(input *DescribeBackupInput) (req *request.Request, output *DescribeBackupOutput)

DescribeBackupRequest generates a "aws/request.Request" representing the client's request for the DescribeBackup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeBackup for more information on using the DescribeBackup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeBackupRequest method. req, resp := client.DescribeBackupRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeBackup

DescribeBackupWithContext

func (c *DynamoDB) DescribeBackupWithContext(ctx aws.Context, input *DescribeBackupInput, opts ...request.Option) (*DescribeBackupOutput, error)

DescribeBackupWithContext is the same as DescribeBackup with the addition of the ability to pass a context and additional request options.

See DescribeBackup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeContinuousBackups

func (c *DynamoDB) DescribeContinuousBackups(input *DescribeContinuousBackupsInput) (*DescribeContinuousBackupsOutput, error)

DescribeContinuousBackups API operation for Amazon DynamoDB.

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.

Once continuous backups and point in time recovery are enabled, you can restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.

LatestRestorableDateTime is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days.

You can call DescribeContinuousBackups at a maximum rate of 10 times per second.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeContinuousBackups for usage and error information.

Returned Error Codes:

  • ErrCodeTableNotFoundException "TableNotFoundException" A source table with the name TableName does not currently exist within the subscriber's account.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups

DescribeContinuousBackupsRequest

func (c *DynamoDB) DescribeContinuousBackupsRequest(input *DescribeContinuousBackupsInput) (req *request.Request, output *DescribeContinuousBackupsOutput)

DescribeContinuousBackupsRequest generates a "aws/request.Request" representing the client's request for the DescribeContinuousBackups operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeContinuousBackups for more information on using the DescribeContinuousBackups API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeContinuousBackupsRequest method. req, resp := client.DescribeContinuousBackupsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeContinuousBackups

DescribeContinuousBackupsWithContext

func (c *DynamoDB) DescribeContinuousBackupsWithContext(ctx aws.Context, input *DescribeContinuousBackupsInput, opts ...request.Option) (*DescribeContinuousBackupsOutput, error)

DescribeContinuousBackupsWithContext is the same as DescribeContinuousBackups with the addition of the ability to pass a context and additional request options.

See DescribeContinuousBackups for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeEndpoints

func (c *DynamoDB) DescribeEndpoints(input *DescribeEndpointsInput) (*DescribeEndpointsOutput, error)

DescribeEndpoints API operation for Amazon DynamoDB.

Returns the regional endpoint information.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeEndpoints for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints

DescribeEndpointsRequest

func (c *DynamoDB) DescribeEndpointsRequest(input *DescribeEndpointsInput) (req *request.Request, output *DescribeEndpointsOutput)

DescribeEndpointsRequest generates a "aws/request.Request" representing the client's request for the DescribeEndpoints operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeEndpoints for more information on using the DescribeEndpoints API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeEndpointsRequest method. req, resp := client.DescribeEndpointsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeEndpoints

DescribeEndpointsWithContext

func (c *DynamoDB) DescribeEndpointsWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.Option) (*DescribeEndpointsOutput, error)

DescribeEndpointsWithContext is the same as DescribeEndpoints with the addition of the ability to pass a context and additional request options.

See DescribeEndpoints for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeGlobalTable

func (c *DynamoDB) DescribeGlobalTable(input *DescribeGlobalTableInput) (*DescribeGlobalTableOutput, error)

DescribeGlobalTable API operation for Amazon DynamoDB.

Returns information about the specified global table.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeGlobalTable for usage and error information.

Returned Error Codes:

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

  • ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" The specified global table does not exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable

DescribeGlobalTableRequest

func (c *DynamoDB) DescribeGlobalTableRequest(input *DescribeGlobalTableInput) (req *request.Request, output *DescribeGlobalTableOutput)

DescribeGlobalTableRequest generates a "aws/request.Request" representing the client's request for the DescribeGlobalTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeGlobalTable for more information on using the DescribeGlobalTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeGlobalTableRequest method. req, resp := client.DescribeGlobalTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTable

DescribeGlobalTableSettings

func (c *DynamoDB) DescribeGlobalTableSettings(input *DescribeGlobalTableSettingsInput) (*DescribeGlobalTableSettingsOutput, error)

DescribeGlobalTableSettings API operation for Amazon DynamoDB.

Describes region specific settings for a global table.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeGlobalTableSettings for usage and error information.

Returned Error Codes:

  • ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" The specified global table does not exist.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings

DescribeGlobalTableSettingsRequest

func (c *DynamoDB) DescribeGlobalTableSettingsRequest(input *DescribeGlobalTableSettingsInput) (req *request.Request, output *DescribeGlobalTableSettingsOutput)

DescribeGlobalTableSettingsRequest generates a "aws/request.Request" representing the client's request for the DescribeGlobalTableSettings operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeGlobalTableSettings for more information on using the DescribeGlobalTableSettings API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeGlobalTableSettingsRequest method. req, resp := client.DescribeGlobalTableSettingsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeGlobalTableSettings

DescribeGlobalTableSettingsWithContext

func (c *DynamoDB) DescribeGlobalTableSettingsWithContext(ctx aws.Context, input *DescribeGlobalTableSettingsInput, opts ...request.Option) (*DescribeGlobalTableSettingsOutput, error)

DescribeGlobalTableSettingsWithContext is the same as DescribeGlobalTableSettings with the addition of the ability to pass a context and additional request options.

See DescribeGlobalTableSettings for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeGlobalTableWithContext

func (c *DynamoDB) DescribeGlobalTableWithContext(ctx aws.Context, input *DescribeGlobalTableInput, opts ...request.Option) (*DescribeGlobalTableOutput, error)

DescribeGlobalTableWithContext is the same as DescribeGlobalTable with the addition of the ability to pass a context and additional request options.

See DescribeGlobalTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeLimits

func (c *DynamoDB) DescribeLimits(input *DescribeLimitsInput) (*DescribeLimitsOutput, error)

DescribeLimits API operation for Amazon DynamoDB.

Returns the current provisioned-capacity limits for your AWS account in a region, both for the region as a whole and for any one DynamoDB table that you create there.

When you establish an AWS account, the account has initial limits on the maximum read capacity units and write capacity units that you can provision across all of your DynamoDB tables in a given region. Also, there are per-table limits that apply when you create a table there. For more information, see Limits (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html) page in the Amazon DynamoDB Developer Guide.

Although you can increase these limits by filing a case at AWS Support Center (https://console.aws.amazon.com/support/home#/), obtaining the increase is not instantaneous. The DescribeLimits action lets you write code to compare the capacity you are currently using to those limits imposed by your account so that you have enough time to apply for an increase before you hit a limit.

For example, you could use one of the AWS SDKs to do the following:

Call DescribeLimits for a particular region to obtain your current account limits on provisioned capacity there.

Create a variable to hold the aggregate read capacity units provisioned for all your tables in that region, and one to hold the aggregate write capacity units. Zero them both.

Call ListTables to obtain a list of all your DynamoDB tables.

For each table name listed by ListTables, do the following:

Call DescribeTable with the table name.

Use the data returned by DescribeTable to add the read capacity units and write capacity units provisioned for the table itself to your variables.

If the table has one or more global secondary indexes (GSIs), loop over these GSIs and add their provisioned capacity values to your variables as well.

Report the account limits for that region returned by DescribeLimits, along with the total current provisioned capacity levels you have calculated.

This will let you see whether you are getting close to your account-level limits.

The per-table limits apply only when you are creating a new table. They restrict the sum of the provisioned capacity of the new table itself and all its global secondary indexes.

For existing tables and their GSIs, DynamoDB will not let you increase provisioned capacity extremely rapidly, but the only upper limit that applies is that the aggregate provisioned capacity over all your tables and GSIs cannot exceed either of the per-account limits.

DescribeLimits should only be called periodically. You can expect throttling errors if you call it more than once in a minute.

The DescribeLimits Request element has no content.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeLimits for usage and error information.

Returned Error Codes:

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits

Example

DynamoDB DescribeLimits shared00

To determine capacity limits per table and account, in the current AWS region

The following example returns the maximum read and write capacity units per table, and for the AWS account, in the current AWS region.

{ svc := dynamodb.New(session.New()) input := &dynamodb.DescribeLimitsInput{} result, err := svc.DescribeLimits(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeLimitsRequest

func (c *DynamoDB) DescribeLimitsRequest(input *DescribeLimitsInput) (req *request.Request, output *DescribeLimitsOutput)

DescribeLimitsRequest generates a "aws/request.Request" representing the client's request for the DescribeLimits operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeLimits for more information on using the DescribeLimits API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeLimitsRequest method. req, resp := client.DescribeLimitsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeLimits

DescribeLimitsWithContext

func (c *DynamoDB) DescribeLimitsWithContext(ctx aws.Context, input *DescribeLimitsInput, opts ...request.Option) (*DescribeLimitsOutput, error)

DescribeLimitsWithContext is the same as DescribeLimits with the addition of the ability to pass a context and additional request options.

See DescribeLimits for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeTable

func (c *DynamoDB) DescribeTable(input *DescribeTableInput) (*DescribeTableOutput, error)

DescribeTable API operation for Amazon DynamoDB.

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.

If you issue a DescribeTable request immediately after a CreateTable request, DynamoDB might return a ResourceNotFoundException. This is because DescribeTable uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the DescribeTable request again.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeTable for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable

Example

DynamoDB DescribeTable shared00

To describe a table

This example describes the Music table.

{ svc := dynamodb.New(session.New()) input := &dynamodb.DescribeTableInput{ TableName: aws.String("Music"), } result, err := svc.DescribeTable(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeTableRequest

func (c *DynamoDB) DescribeTableRequest(input *DescribeTableInput) (req *request.Request, output *DescribeTableOutput)

DescribeTableRequest generates a "aws/request.Request" representing the client's request for the DescribeTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeTable for more information on using the DescribeTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeTableRequest method. req, resp := client.DescribeTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTable

DescribeTableWithContext

func (c *DynamoDB) DescribeTableWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.Option) (*DescribeTableOutput, error)

DescribeTableWithContext is the same as DescribeTable with the addition of the ability to pass a context and additional request options.

See DescribeTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

DescribeTimeToLive

func (c *DynamoDB) DescribeTimeToLive(input *DescribeTimeToLiveInput) (*DescribeTimeToLiveOutput, error)

DescribeTimeToLive API operation for Amazon DynamoDB.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation DescribeTimeToLive for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive

DescribeTimeToLiveRequest

func (c *DynamoDB) DescribeTimeToLiveRequest(input *DescribeTimeToLiveInput) (req *request.Request, output *DescribeTimeToLiveOutput)

DescribeTimeToLiveRequest generates a "aws/request.Request" representing the client's request for the DescribeTimeToLive operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeTimeToLive for more information on using the DescribeTimeToLive API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeTimeToLiveRequest method. req, resp := client.DescribeTimeToLiveRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/DescribeTimeToLive

DescribeTimeToLiveWithContext

func (c *DynamoDB) DescribeTimeToLiveWithContext(ctx aws.Context, input *DescribeTimeToLiveInput, opts ...request.Option) (*DescribeTimeToLiveOutput, error)

DescribeTimeToLiveWithContext is the same as DescribeTimeToLive with the addition of the ability to pass a context and additional request options.

See DescribeTimeToLive for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

GetItem

func (c *DynamoDB) GetItem(input *GetItemInput) (*GetItemOutput, error)

GetItem API operation for Amazon DynamoDB.

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.

GetItem provides an eventually consistent read by default. If your application requires a strongly consistent read, set ConsistentRead to true. Although a strongly consistent read might take more time than an eventually consistent read, it always returns the last updated value.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation GetItem for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem

Example

DynamoDB GetItem shared00

To read an item from a table

This example retrieves an item from the Music table. The table has a partition key and a sort key (Artist and SongTitle), so you must specify both of these attributes.

{ svc := dynamodb.New(session.New()) input := &dynamodb.GetItemInput{ Key: map[string]*dynamodb.AttributeValue{ "Artist": { S: aws.String("Acme Band"), }, "SongTitle": { S: aws.String("Happy Day"), }, }, TableName: aws.String("Music"), } result, err := svc.GetItem(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetItemRequest

func (c *DynamoDB) GetItemRequest(input *GetItemInput) (req *request.Request, output *GetItemOutput)

GetItemRequest generates a "aws/request.Request" representing the client's request for the GetItem operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See GetItem for more information on using the GetItem API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the GetItemRequest method. req, resp := client.GetItemRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/GetItem

GetItemWithContext

func (c *DynamoDB) GetItemWithContext(ctx aws.Context, input *GetItemInput, opts ...request.Option) (*GetItemOutput, error)

GetItemWithContext is the same as GetItem with the addition of the ability to pass a context and additional request options.

See GetItem for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListBackups

func (c *DynamoDB) ListBackups(input *ListBackupsInput) (*ListBackupsOutput, error)

ListBackups API operation for Amazon DynamoDB.

List backups associated with an AWS account. To list backups for a given table, specify TableName. ListBackups returns a paginated list of results with at most 1MB worth of items in a page. You can also specify a limit for the maximum number of entries to be returned in a page.

In the request, start time is inclusive but end time is exclusive. Note that these limits are for the time at which the original backup was requested.

You can call ListBackups a maximum of 5 times per second.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation ListBackups for usage and error information.

Returned Error Codes:

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups

ListBackupsRequest

func (c *DynamoDB) ListBackupsRequest(input *ListBackupsInput) (req *request.Request, output *ListBackupsOutput)

ListBackupsRequest generates a "aws/request.Request" representing the client's request for the ListBackups operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListBackups for more information on using the ListBackups API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListBackupsRequest method. req, resp := client.ListBackupsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListBackups

ListBackupsWithContext

func (c *DynamoDB) ListBackupsWithContext(ctx aws.Context, input *ListBackupsInput, opts ...request.Option) (*ListBackupsOutput, error)

ListBackupsWithContext is the same as ListBackups with the addition of the ability to pass a context and additional request options.

See ListBackups for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListGlobalTables

func (c *DynamoDB) ListGlobalTables(input *ListGlobalTablesInput) (*ListGlobalTablesOutput, error)

ListGlobalTables API operation for Amazon DynamoDB.

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

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation ListGlobalTables for usage and error information.

Returned Error Codes:

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables

ListGlobalTablesRequest

func (c *DynamoDB) ListGlobalTablesRequest(input *ListGlobalTablesInput) (req *request.Request, output *ListGlobalTablesOutput)

ListGlobalTablesRequest generates a "aws/request.Request" representing the client's request for the ListGlobalTables operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListGlobalTables for more information on using the ListGlobalTables API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListGlobalTablesRequest method. req, resp := client.ListGlobalTablesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListGlobalTables

ListGlobalTablesWithContext

func (c *DynamoDB) ListGlobalTablesWithContext(ctx aws.Context, input *ListGlobalTablesInput, opts ...request.Option) (*ListGlobalTablesOutput, error)

ListGlobalTablesWithContext is the same as ListGlobalTables with the addition of the ability to pass a context and additional request options.

See ListGlobalTables for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTables

func (c *DynamoDB) ListTables(input *ListTablesInput) (*ListTablesOutput, error)

ListTables API operation for Amazon DynamoDB.

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.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation ListTables for usage and error information.

Returned Error Codes:

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables

Example

DynamoDB ListTables shared00

To list tables

This example lists all of the tables associated with the current AWS account and endpoint.

{ svc := dynamodb.New(session.New()) input := &dynamodb.ListTablesInput{} result, err := svc.ListTables(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListTablesPages

func (c *DynamoDB) ListTablesPages(input *ListTablesInput, fn func(*ListTablesOutput, bool) bool) error

ListTablesPages iterates over the pages of a ListTables operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListTables method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListTables operation. pageNum := 0 err := client.ListTablesPages(params, func(page *ListTablesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListTablesPagesWithContext

func (c *DynamoDB) ListTablesPagesWithContext(ctx aws.Context, input *ListTablesInput, fn func(*ListTablesOutput, bool) bool, opts ...request.Option) error

ListTablesPagesWithContext same as ListTablesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTablesRequest

func (c *DynamoDB) ListTablesRequest(input *ListTablesInput) (req *request.Request, output *ListTablesOutput)

ListTablesRequest generates a "aws/request.Request" representing the client's request for the ListTables operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListTables for more information on using the ListTables API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListTablesRequest method. req, resp := client.ListTablesRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTables

ListTablesWithContext

func (c *DynamoDB) ListTablesWithContext(ctx aws.Context, input *ListTablesInput, opts ...request.Option) (*ListTablesOutput, error)

ListTablesWithContext is the same as ListTables with the addition of the ability to pass a context and additional request options.

See ListTables for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ListTagsOfResource

func (c *DynamoDB) ListTagsOfResource(input *ListTagsOfResourceInput) (*ListTagsOfResourceOutput, error)

ListTagsOfResource API operation for Amazon DynamoDB.

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

For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) in the Amazon DynamoDB Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation ListTagsOfResource for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource

ListTagsOfResourceRequest

func (c *DynamoDB) ListTagsOfResourceRequest(input *ListTagsOfResourceInput) (req *request.Request, output *ListTagsOfResourceOutput)

ListTagsOfResourceRequest generates a "aws/request.Request" representing the client's request for the ListTagsOfResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See ListTagsOfResource for more information on using the ListTagsOfResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ListTagsOfResourceRequest method. req, resp := client.ListTagsOfResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ListTagsOfResource

ListTagsOfResourceWithContext

func (c *DynamoDB) ListTagsOfResourceWithContext(ctx aws.Context, input *ListTagsOfResourceInput, opts ...request.Option) (*ListTagsOfResourceOutput, error)

ListTagsOfResourceWithContext is the same as ListTagsOfResource with the addition of the ability to pass a context and additional request options.

See ListTagsOfResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

PutItem

func (c *DynamoDB) PutItem(input *PutItemInput) (*PutItemOutput, error)

PutItem API operation for Amazon DynamoDB.

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.

This topic provides general information about the PutItem API.

For information on how to call the PutItem API using the AWS SDK in specific languages, see the following:

PutItem in the AWS Command Line Interface (https://docs.aws.amazon.com/goto/aws-cli/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for .NET (https://docs.aws.amazon.com/goto/DotNetSDKV3/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for C++ (https://docs.aws.amazon.com/goto/SdkForCpp/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for Go (https://docs.aws.amazon.com/goto/SdkForGoV1/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for Java (https://docs.aws.amazon.com/goto/SdkForJava/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for JavaScript (https://docs.aws.amazon.com/goto/AWSJavaScriptSDK/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for PHP V3 (https://docs.aws.amazon.com/goto/SdkForPHPV3/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for Python (https://docs.aws.amazon.com/goto/boto3/dynamodb-2012-08-10/PutItem)

PutItem in the AWS SDK for Ruby V2 (https://docs.aws.amazon.com/goto/SdkForRubyV2/dynamodb-2012-08-10/PutItem)

When you add an item, the primary key attribute(s) are the only required attributes. Attribute values cannot be null. String and Binary type attributes must have lengths greater than zero. Set type attributes cannot be empty. Requests with empty values will be rejected with a ValidationException exception.

To prevent a new item from replacing an existing item, use a conditional expression that contains the attribute_not_exists function with the name of the attribute being used as the partition key for the table. Since every record must contain that attribute, the attribute_not_exists function will only succeed if no matching item exists.

For more information about PutItem, see Working with Items (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithItems.html) in the Amazon DynamoDB Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation PutItem for usage and error information.

Returned Error Codes:

  • ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException" A condition specified in the operation could not be evaluated.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException" An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.

  • ErrCodeTransactionConflictException "TransactionConflictException" Operation was rejected because there is an ongoing transaction for the item.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/PutItem

Example

DynamoDB PutItem shared00

To add an item to a table

This example adds a new item to the Music table.

{ svc := dynamodb.New(session.New()) input := &dynamodb.PutItemInput{ Item: map[string]*dynamodb.AttributeValue{ "AlbumTitle": { S: aws.String("Somewhat Famous"), }, "Artist": { S: aws.String("No One You Know"), }, "SongTitle": { S: aws.String("Call Me Today"), }, }, ReturnConsumedCapacity: aws.String("TOTAL"), TableName: aws.String("Music"), } result, err := svc.PutItem(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeConditionalCheckFailedException: fmt.Println(dynamodb.ErrCodeConditionalCheckFailedException, aerr.Error()) case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeItemCollectionSizeLimitExceededException: fmt.Println(dynamodb.ErrCodeItemCollectionSizeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeTransactionConflictException: fmt.Println(dynamodb.ErrCodeTransactionConflictException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

PutItemRequest

func (c *DynamoDB) PutItemRequest(input *PutItemInput) (req *request.Request, output *PutItemOutput)

PutItemRequest generates a "aws/request.Request" representing the client's request for the PutItem operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See PutItem for more information on using the PutItem API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the PutItemRequest method. req, resp := client.PutItemRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/PutItem

PutItemWithContext

func (c *DynamoDB) PutItemWithContext(ctx aws.Context, input *PutItemInput, opts ...request.Option) (*PutItemOutput, error)

PutItemWithContext is the same as PutItem with the addition of the ability to pass a context and additional request options.

See PutItem for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

Query

func (c *DynamoDB) Query(input *QueryInput) (*QueryOutput, error)

Query API operation for Amazon DynamoDB.

The Query operation finds items based on primary key values. You can query any table or secondary index that has a composite primary key (a partition key and a sort key).

Use the KeyConditionExpression parameter to provide a specific value for the partition key. The Query operation will return all of the items from the table or index with that partition key value. You can optionally narrow the scope of the Query operation by specifying a sort key value and a comparison operator in KeyConditionExpression. To further refine the Query results, you can optionally provide a FilterExpression. A FilterExpression determines which items within the results should be returned to you. All of the other results are discarded.

A Query operation always returns a result set. If no matching items are found, the result set will be empty. Queries that do not return results consume the minimum number of read capacity units for that type of read operation.

DynamoDB calculates the number of read capacity units consumed based on item size, not on the amount of data that is returned to an application. The number of capacity units consumed will be the same whether you request all of the attributes (the default behavior) or just some of them (using a projection expression). The number will also be the same whether or not you use a FilterExpression.

Query results are always sorted by the sort key value. If the data type of the sort key is Number, the results are returned in numeric order; otherwise, the results are returned in order of UTF-8 bytes. By default, the sort order is ascending. To reverse the order, set the ScanIndexForward parameter to false.

A single Query operation will read up to the maximum number of items set (if using the Limit parameter) or a maximum of 1 MB of data and then apply any filtering to the results using FilterExpression. If LastEvaluatedKey is present in the response, you will need to paginate the result set. For more information, see Paginating the Results (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html#Query.Pagination) in the Amazon DynamoDB Developer Guide.

FilterExpression is applied after a Query finishes, but before the results are returned. A FilterExpression cannot contain partition key or sort key attributes. You need to specify those attributes in the KeyConditionExpression.

A Query operation can return an empty result set and a LastEvaluatedKey if all the items read for the page of results are filtered out.

You can query a table, a local secondary index, or a global secondary index. For a query on a table or on a local secondary index, you can set the ConsistentRead parameter to true and obtain a strongly consistent result. Global secondary indexes support eventually consistent reads only, so do not specify ConsistentRead when querying a global secondary index.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation Query for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query

Example

DynamoDB Query shared00

To query an item

This example queries items in the Music table. The table has a partition key and sort key (Artist and SongTitle), but this query only specifies the partition key value. It returns song titles by the artist named "No One You Know".

{ svc := dynamodb.New(session.New()) input := &dynamodb.QueryInput{ ExpressionAttributeValues: map[string]*dynamodb.AttributeValue{ ":v1": { S: aws.String("No One You Know"), }, }, KeyConditionExpression: aws.String("Artist = :v1"), ProjectionExpression: aws.String("SongTitle"), TableName: aws.String("Music"), } result, err := svc.Query(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

QueryPages

func (c *DynamoDB) QueryPages(input *QueryInput, fn func(*QueryOutput, bool) bool) error

QueryPages iterates over the pages of a Query operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See Query method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a Query operation. pageNum := 0 err := client.QueryPages(params, func(page *QueryOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

QueryPagesWithContext

func (c *DynamoDB) QueryPagesWithContext(ctx aws.Context, input *QueryInput, fn func(*QueryOutput, bool) bool, opts ...request.Option) error

QueryPagesWithContext same as QueryPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

QueryRequest

func (c *DynamoDB) QueryRequest(input *QueryInput) (req *request.Request, output *QueryOutput)

QueryRequest generates a "aws/request.Request" representing the client's request for the Query operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See Query for more information on using the Query API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the QueryRequest method. req, resp := client.QueryRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Query

QueryWithContext

func (c *DynamoDB) QueryWithContext(ctx aws.Context, input *QueryInput, opts ...request.Option) (*QueryOutput, error)

QueryWithContext is the same as Query with the addition of the ability to pass a context and additional request options.

See Query for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

RestoreTableFromBackup

func (c *DynamoDB) RestoreTableFromBackup(input *RestoreTableFromBackupInput) (*RestoreTableFromBackupOutput, error)

RestoreTableFromBackup API operation for Amazon DynamoDB.

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

You can call RestoreTableFromBackup at a maximum rate of 10 times per second.

You must manually set up the following on the restored table:

  • Auto scaling policies

  • IAM policies

  • Cloudwatch metrics and alarms

  • Tags

  • Stream settings

  • Time to Live (TTL) settings

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation RestoreTableFromBackup for usage and error information.

Returned Error Codes:

  • ErrCodeTableAlreadyExistsException "TableAlreadyExistsException" A target table with the specified name already exists.

  • ErrCodeTableInUseException "TableInUseException" A target table with the specified name is either being created or deleted.

  • ErrCodeBackupNotFoundException "BackupNotFoundException" Backup not found for the given BackupARN.

  • ErrCodeBackupInUseException "BackupInUseException" There is another ongoing conflicting backup control plane operation on the table. The backup is either being created, deleted or restored to a table.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup

RestoreTableFromBackupRequest

func (c *DynamoDB) RestoreTableFromBackupRequest(input *RestoreTableFromBackupInput) (req *request.Request, output *RestoreTableFromBackupOutput)

RestoreTableFromBackupRequest generates a "aws/request.Request" representing the client's request for the RestoreTableFromBackup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RestoreTableFromBackup for more information on using the RestoreTableFromBackup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RestoreTableFromBackupRequest method. req, resp := client.RestoreTableFromBackupRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableFromBackup

RestoreTableFromBackupWithContext

func (c *DynamoDB) RestoreTableFromBackupWithContext(ctx aws.Context, input *RestoreTableFromBackupInput, opts ...request.Option) (*RestoreTableFromBackupOutput, error)

RestoreTableFromBackupWithContext is the same as RestoreTableFromBackup with the addition of the ability to pass a context and additional request options.

See RestoreTableFromBackup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

RestoreTableToPointInTime

func (c *DynamoDB) RestoreTableToPointInTime(input *RestoreTableToPointInTimeInput) (*RestoreTableToPointInTimeOutput, error)

RestoreTableToPointInTime API operation for Amazon DynamoDB.

Restores the specified table to the specified point in time within EarliestRestorableDateTime and LatestRestorableDateTime. You can restore your table to any point in time during the last 35 days. Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account.

When you restore using point in time recovery, DynamoDB restores your table data to the state based on the selected date and time (day:hour:minute:second) to a new table.

Along with data, the following are also included on the new restored table using point in time recovery:

  • Global secondary indexes (GSIs)

  • Local secondary indexes (LSIs)

  • Provisioned read and write capacity

  • Encryption settings

All these settings come from the current settings of the source table at

the time of restore.

You must manually set up the following on the restored table:

  • Auto scaling policies

  • IAM policies

  • Cloudwatch metrics and alarms

  • Tags

  • Stream settings

  • Time to Live (TTL) settings

  • Point in time recovery settings

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation RestoreTableToPointInTime for usage and error information.

Returned Error Codes:

  • ErrCodeTableAlreadyExistsException "TableAlreadyExistsException" A target table with the specified name already exists.

  • ErrCodeTableNotFoundException "TableNotFoundException" A source table with the name TableName does not currently exist within the subscriber's account.

  • ErrCodeTableInUseException "TableInUseException" A target table with the specified name is either being created or deleted.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInvalidRestoreTimeException "InvalidRestoreTimeException" An invalid restore time was specified. RestoreDateTime must be between EarliestRestorableDateTime and LatestRestorableDateTime.

  • ErrCodePointInTimeRecoveryUnavailableException "PointInTimeRecoveryUnavailableException" Point in time recovery has not yet been enabled for this source table.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime

RestoreTableToPointInTimeRequest

func (c *DynamoDB) RestoreTableToPointInTimeRequest(input *RestoreTableToPointInTimeInput) (req *request.Request, output *RestoreTableToPointInTimeOutput)

RestoreTableToPointInTimeRequest generates a "aws/request.Request" representing the client's request for the RestoreTableToPointInTime operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See RestoreTableToPointInTime for more information on using the RestoreTableToPointInTime API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the RestoreTableToPointInTimeRequest method. req, resp := client.RestoreTableToPointInTimeRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/RestoreTableToPointInTime

RestoreTableToPointInTimeWithContext

func (c *DynamoDB) RestoreTableToPointInTimeWithContext(ctx aws.Context, input *RestoreTableToPointInTimeInput, opts ...request.Option) (*RestoreTableToPointInTimeOutput, error)

RestoreTableToPointInTimeWithContext is the same as RestoreTableToPointInTime with the addition of the ability to pass a context and additional request options.

See RestoreTableToPointInTime for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

Scan

func (c *DynamoDB) Scan(input *ScanInput) (*ScanOutput, error)

Scan API operation for Amazon DynamoDB.

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.

If the total number of scanned items exceeds the maximum data set size limit of 1 MB, the scan stops and results are returned to the user as a LastEvaluatedKey value to continue the scan in a subsequent operation. The results also include the number of items exceeding the limit. A scan can result in no table data meeting the filter criteria.

A single Scan operation will read up to the maximum number of items set (if using the Limit parameter) or a maximum of 1 MB of data and then apply any filtering to the results using FilterExpression. If LastEvaluatedKey is present in the response, you will need to paginate the result set. For more information, see Paginating the Results (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.Pagination) in the Amazon DynamoDB Developer Guide.

Scan operations proceed sequentially; however, for faster performance on a large table or secondary index, applications can request a parallel Scan operation by providing the Segment and TotalSegments parameters. For more information, see Parallel Scan (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html#Scan.ParallelScan) in the Amazon DynamoDB Developer Guide.

Scan uses eventually consistent reads when accessing the data in a table; therefore, the result set might not include the changes to data in the table immediately before the operation began. If you need a consistent copy of the data, as of the time that the Scan begins, you can set the ConsistentRead parameter to true.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation Scan for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan

Example

DynamoDB Scan shared00

To scan a table

This example scans the entire Music table, and then narrows the results to songs by the artist "No One You Know". For each item, only the album title and song title are returned.

{ svc := dynamodb.New(session.New()) input := &dynamodb.ScanInput{ ExpressionAttributeNames: map[string]*string{ "AT": aws.String("AlbumTitle"), "ST": aws.String("SongTitle"), }, ExpressionAttributeValues: map[string]*dynamodb.AttributeValue{ ":a": { S: aws.String("No One You Know"), }, }, FilterExpression: aws.String("Artist = :a"), ProjectionExpression: aws.String("#ST, #AT"), TableName: aws.String("Music"), } result, err := svc.Scan(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ScanPages

func (c *DynamoDB) ScanPages(input *ScanInput, fn func(*ScanOutput, bool) bool) error

ScanPages iterates over the pages of a Scan operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See Scan method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a Scan operation. pageNum := 0 err := client.ScanPages(params, func(page *ScanOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ScanPagesWithContext

func (c *DynamoDB) ScanPagesWithContext(ctx aws.Context, input *ScanInput, fn func(*ScanOutput, bool) bool, opts ...request.Option) error

ScanPagesWithContext same as ScanPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

ScanRequest

func (c *DynamoDB) ScanRequest(input *ScanInput) (req *request.Request, output *ScanOutput)

ScanRequest generates a "aws/request.Request" representing the client's request for the Scan operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See Scan for more information on using the Scan API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the ScanRequest method. req, resp := client.ScanRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/Scan

ScanWithContext

func (c *DynamoDB) ScanWithContext(ctx aws.Context, input *ScanInput, opts ...request.Option) (*ScanOutput, error)

ScanWithContext is the same as Scan with the addition of the ability to pass a context and additional request options.

See Scan for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TagResource

func (c *DynamoDB) TagResource(input *TagResourceInput) (*TagResourceOutput, error)

TagResource API operation for Amazon DynamoDB.

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 5 times per second, per account.

For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) in the Amazon DynamoDB Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation TagResource for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TagResource

TagResourceRequest

func (c *DynamoDB) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput)

TagResourceRequest generates a "aws/request.Request" representing the client's request for the TagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TagResource for more information on using the TagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TagResourceRequest method. req, resp := client.TagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TagResource

TagResourceWithContext

func (c *DynamoDB) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error)

TagResourceWithContext is the same as TagResource with the addition of the ability to pass a context and additional request options.

See TagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TransactGetItems

func (c *DynamoDB) TransactGetItems(input *TransactGetItemsInput) (*TransactGetItemsOutput, error)

TransactGetItems API operation for Amazon DynamoDB.

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 10 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 AWS account or region.

DynamoDB rejects the entire TransactGetItems request if any of the following is true:

  • A conflicting operation is in the process of updating an item to be read.

  • There is insufficient provisioned capacity for the transaction to be completed.

  • There is a user error, such as an invalid data format.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation TransactGetItems for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeTransactionCanceledException "TransactionCanceledException" The entire transaction request was rejected.

DynamoDB rejects a TransactWriteItems request under the following circumstances:
  • A condition in one of the condition expressions is not met.

  • A table in the TransactWriteItems request is in a different account or region.

  • More than one action in the TransactWriteItems operation targets the same item.

  • There is insufficient provisioned capacity for the transaction to be completed.

  • An item size becomes too large (larger than 400 KB), or a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.

  • There is a user error, such as an invalid data format.

DynamoDB rejects a TransactGetItems request under the following circumstances:
  • There is an ongoing TransactGetItems operation that conflicts with a concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. In this case the TransactGetItems operation fails with a TransactionCanceledException.

  • A table in the TransactGetItems request is in a different account or region.

  • There is insufficient provisioned capacity for the transaction to be completed.

  • There is a user error, such as an invalid data format.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems

TransactGetItemsRequest

func (c *DynamoDB) TransactGetItemsRequest(input *TransactGetItemsInput) (req *request.Request, output *TransactGetItemsOutput)

TransactGetItemsRequest generates a "aws/request.Request" representing the client's request for the TransactGetItems operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TransactGetItems for more information on using the TransactGetItems API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TransactGetItemsRequest method. req, resp := client.TransactGetItemsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactGetItems

TransactGetItemsWithContext

func (c *DynamoDB) TransactGetItemsWithContext(ctx aws.Context, input *TransactGetItemsInput, opts ...request.Option) (*TransactGetItemsOutput, error)

TransactGetItemsWithContext is the same as TransactGetItems with the addition of the ability to pass a context and additional request options.

See TransactGetItems for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

TransactWriteItems

func (c *DynamoDB) TransactWriteItems(input *TransactWriteItemsInput) (*TransactWriteItemsOutput, error)

TransactWriteItems API operation for Amazon DynamoDB.

TransactWriteItems is a synchronous write operation that groups up to 10 action requests. These actions can target items in different tables, but not in different AWS accounts or regions, and no two actions can target the same item. For example, you cannot both ConditionCheck and Update the same item.

The actions are completed atomically so that either all of them succeed, or all of them fail. They are defined by the following objects:

  • Put  —   Initiates a PutItem operation to write a new item. This structure specifies the primary key of the item to be written, the name of the table to write it in, an optional condition expression that must be satisfied for the write to succeed, a list of the item's attributes, and a field indicating whether or not to retrieve the item's attributes if the condition is not met.

  • Update  —   Initiates an UpdateItem operation to update an existing item. This structure specifies the primary key of the item to be updated, the name of the table where it resides, an optional condition expression that must be satisfied for the update to succeed, an expression that defines one or more attributes to be updated, and a field indicating whether or not to retrieve the item's attributes if the condition is not met.

  • Delete  —   Initiates a DeleteItem operation to delete an existing item. This structure specifies the primary key of the item to be deleted, the name of the table where it resides, an optional condition expression that must be satisfied for the deletion to succeed, and a field indicating whether or not to retrieve the item's attributes if the condition is not met.

  • ConditionCheck  —   Applies a condition to an item that is not being modified by the transaction. This structure specifies the primary key of the item to be checked, the name of the table where it resides, a condition expression that must be satisfied for the transaction to succeed, and a field indicating whether or not to retrieve the item's attributes if the condition is not met.

DynamoDB rejects the entire TransactWriteItems request if any of the following is true:

  • A condition in one of the condition expressions is not met.

  • A conflicting operation is in the process of updating the same item.

  • There is insufficient provisioned capacity for the transaction to be completed.

  • An item size becomes too large (bigger than 400 KB), a Local Secondary Index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.

  • There is a user error, such as an invalid data format.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation TransactWriteItems for usage and error information.

Returned Error Codes:

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeTransactionCanceledException "TransactionCanceledException" The entire transaction request was rejected.

DynamoDB rejects a TransactWriteItems request under the following circumstances:
  • A condition in one of the condition expressions is not met.

  • A table in the TransactWriteItems request is in a different account or region.

  • More than one action in the TransactWriteItems operation targets the same item.

  • There is insufficient provisioned capacity for the transaction to be completed.

  • An item size becomes too large (larger than 400 KB), or a local secondary index (LSI) becomes too large, or a similar validation error occurs because of changes made by the transaction.

  • There is a user error, such as an invalid data format.

DynamoDB rejects a TransactGetItems request under the following circumstances:
  • There is an ongoing TransactGetItems operation that conflicts with a concurrent PutItem, UpdateItem, DeleteItem or TransactWriteItems request. In this case the TransactGetItems operation fails with a TransactionCanceledException.

  • A table in the TransactGetItems request is in a different account or region.

  • There is insufficient provisioned capacity for the transaction to be completed.

  • There is a user error, such as an invalid data format.

  • ErrCodeTransactionInProgressException "TransactionInProgressException" The transaction with the given request token is already in progress.

  • ErrCodeIdempotentParameterMismatchException "IdempotentParameterMismatchException" DynamoDB rejected the request because you retried a request with a different payload but with an idempotent token that was already used.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems

TransactWriteItemsRequest

func (c *DynamoDB) TransactWriteItemsRequest(input *TransactWriteItemsInput) (req *request.Request, output *TransactWriteItemsOutput)

TransactWriteItemsRequest generates a "aws/request.Request" representing the client's request for the TransactWriteItems operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See TransactWriteItems for more information on using the TransactWriteItems API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the TransactWriteItemsRequest method. req, resp := client.TransactWriteItemsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/TransactWriteItems

TransactWriteItemsWithContext

func (c *DynamoDB) TransactWriteItemsWithContext(ctx aws.Context, input *TransactWriteItemsInput, opts ...request.Option) (*TransactWriteItemsOutput, error)

TransactWriteItemsWithContext is the same as TransactWriteItems with the addition of the ability to pass a context and additional request options.

See TransactWriteItems for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UntagResource

func (c *DynamoDB) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error)

UntagResource API operation for Amazon DynamoDB.

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

For an overview on tagging DynamoDB resources, see Tagging for DynamoDB (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html) in the Amazon DynamoDB Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UntagResource for usage and error information.

Returned Error Codes:

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource

UntagResourceRequest

func (c *DynamoDB) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput)

UntagResourceRequest generates a "aws/request.Request" representing the client's request for the UntagResource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UntagResource for more information on using the UntagResource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UntagResourceRequest method. req, resp := client.UntagResourceRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UntagResource

UntagResourceWithContext

func (c *DynamoDB) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error)

UntagResourceWithContext is the same as UntagResource with the addition of the ability to pass a context and additional request options.

See UntagResource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateContinuousBackups

func (c *DynamoDB) UpdateContinuousBackups(input *UpdateContinuousBackupsInput) (*UpdateContinuousBackupsOutput, error)

UpdateContinuousBackups API operation for Amazon DynamoDB.

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.

Once continuous backups and point in time recovery are enabled, you can restore to any point in time within EarliestRestorableDateTime and LatestRestorableDateTime.

LatestRestorableDateTime is typically 5 minutes before the current time. You can restore your table to any point in time during the last 35 days..

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UpdateContinuousBackups for usage and error information.

Returned Error Codes:

  • ErrCodeTableNotFoundException "TableNotFoundException" A source table with the name TableName does not currently exist within the subscriber's account.

  • ErrCodeContinuousBackupsUnavailableException "ContinuousBackupsUnavailableException" Backups have not yet been enabled for this table.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups

UpdateContinuousBackupsRequest

func (c *DynamoDB) UpdateContinuousBackupsRequest(input *UpdateContinuousBackupsInput) (req *request.Request, output *UpdateContinuousBackupsOutput)

UpdateContinuousBackupsRequest generates a "aws/request.Request" representing the client's request for the UpdateContinuousBackups operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateContinuousBackups for more information on using the UpdateContinuousBackups API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateContinuousBackupsRequest method. req, resp := client.UpdateContinuousBackupsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateContinuousBackups

UpdateContinuousBackupsWithContext

func (c *DynamoDB) UpdateContinuousBackupsWithContext(ctx aws.Context, input *UpdateContinuousBackupsInput, opts ...request.Option) (*UpdateContinuousBackupsOutput, error)

UpdateContinuousBackupsWithContext is the same as UpdateContinuousBackups with the addition of the ability to pass a context and additional request options.

See UpdateContinuousBackups for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateGlobalTable

func (c *DynamoDB) UpdateGlobalTable(input *UpdateGlobalTableInput) (*UpdateGlobalTableOutput, error)

UpdateGlobalTable API operation for Amazon DynamoDB.

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, must have the same name as the global table, must have the same key schema, and must have DynamoDB Streams enabled and must have same provisioned and maximum write capacity units.

Although you can use UpdateGlobalTable to add replicas and remove replicas in a single request, for simplicity we recommend that you issue separate requests for adding or removing replicas.

If global secondary indexes are specified, then the following conditions must also be met:

  • The global secondary indexes must have the same name.

  • The global secondary indexes must have the same hash key and sort key

(if present).
  • The global secondary indexes must have the same provisioned and maximum write capacity units.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UpdateGlobalTable for usage and error information.

Returned Error Codes:

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

  • ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" The specified global table does not exist.

  • ErrCodeReplicaAlreadyExistsException "ReplicaAlreadyExistsException" The specified replica is already part of the global table.

  • ErrCodeReplicaNotFoundException "ReplicaNotFoundException" The specified replica is no longer part of the global table.

  • ErrCodeTableNotFoundException "TableNotFoundException" A source table with the name TableName does not currently exist within the subscriber's account.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable

UpdateGlobalTableRequest

func (c *DynamoDB) UpdateGlobalTableRequest(input *UpdateGlobalTableInput) (req *request.Request, output *UpdateGlobalTableOutput)

UpdateGlobalTableRequest generates a "aws/request.Request" representing the client's request for the UpdateGlobalTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateGlobalTable for more information on using the UpdateGlobalTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateGlobalTableRequest method. req, resp := client.UpdateGlobalTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTable

UpdateGlobalTableSettings

func (c *DynamoDB) UpdateGlobalTableSettings(input *UpdateGlobalTableSettingsInput) (*UpdateGlobalTableSettingsOutput, error)

UpdateGlobalTableSettings API operation for Amazon DynamoDB.

Updates settings for a global table.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UpdateGlobalTableSettings for usage and error information.

Returned Error Codes:

  • ErrCodeGlobalTableNotFoundException "GlobalTableNotFoundException" The specified global table does not exist.

  • ErrCodeReplicaNotFoundException "ReplicaNotFoundException" The specified replica is no longer part of the global table.

  • ErrCodeIndexNotFoundException "IndexNotFoundException" The operation tried to access a nonexistent index.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings

UpdateGlobalTableSettingsRequest

func (c *DynamoDB) UpdateGlobalTableSettingsRequest(input *UpdateGlobalTableSettingsInput) (req *request.Request, output *UpdateGlobalTableSettingsOutput)

UpdateGlobalTableSettingsRequest generates a "aws/request.Request" representing the client's request for the UpdateGlobalTableSettings operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateGlobalTableSettings for more information on using the UpdateGlobalTableSettings API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateGlobalTableSettingsRequest method. req, resp := client.UpdateGlobalTableSettingsRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateGlobalTableSettings

UpdateGlobalTableSettingsWithContext

func (c *DynamoDB) UpdateGlobalTableSettingsWithContext(ctx aws.Context, input *UpdateGlobalTableSettingsInput, opts ...request.Option) (*UpdateGlobalTableSettingsOutput, error)

UpdateGlobalTableSettingsWithContext is the same as UpdateGlobalTableSettings with the addition of the ability to pass a context and additional request options.

See UpdateGlobalTableSettings for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateGlobalTableWithContext

func (c *DynamoDB) UpdateGlobalTableWithContext(ctx aws.Context, input *UpdateGlobalTableInput, opts ...request.Option) (*UpdateGlobalTableOutput, error)

UpdateGlobalTableWithContext is the same as UpdateGlobalTable with the addition of the ability to pass a context and additional request options.

See UpdateGlobalTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateItem

func (c *DynamoDB) UpdateItem(input *UpdateItemInput) (*UpdateItemOutput, error)

UpdateItem API operation for Amazon DynamoDB.

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).

You can also return the item's attribute values in the same UpdateItem operation using the ReturnValues parameter.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UpdateItem for usage and error information.

Returned Error Codes:

  • ErrCodeConditionalCheckFailedException "ConditionalCheckFailedException" A condition specified in the operation could not be evaluated.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeItemCollectionSizeLimitExceededException "ItemCollectionSizeLimitExceededException" An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.

  • ErrCodeTransactionConflictException "TransactionConflictException" Operation was rejected because there is an ongoing transaction for the item.

  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem

Example

DynamoDB UpdateItem shared00

To update an item in a table

This example updates an item in the Music table. It adds a new attribute (Year) and modifies the AlbumTitle attribute. All of the attributes in the item, as they appear after the update, are returned in the response.

{ svc := dynamodb.New(session.New()) input := &dynamodb.UpdateItemInput{ ExpressionAttributeNames: map[string]*string{ "#AT": aws.String("AlbumTitle"), "#Y": aws.String("Year"), }, ExpressionAttributeValues: map[string]*dynamodb.AttributeValue{ ":t": { S: aws.String("Louder Than Ever"), }, ":y": { N: aws.String("2015"), }, }, Key: map[string]*dynamodb.AttributeValue{ "Artist": { S: aws.String("Acme Band"), }, "SongTitle": { S: aws.String("Happy Day"), }, }, ReturnValues: aws.String("ALL_NEW"), TableName: aws.String("Music"), UpdateExpression: aws.String("SET #Y = :y, #AT = :t"), } result, err := svc.UpdateItem(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeConditionalCheckFailedException: fmt.Println(dynamodb.ErrCodeConditionalCheckFailedException, aerr.Error()) case dynamodb.ErrCodeProvisionedThroughputExceededException: fmt.Println(dynamodb.ErrCodeProvisionedThroughputExceededException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeItemCollectionSizeLimitExceededException: fmt.Println(dynamodb.ErrCodeItemCollectionSizeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeTransactionConflictException: fmt.Println(dynamodb.ErrCodeTransactionConflictException, aerr.Error()) case dynamodb.ErrCodeRequestLimitExceeded: fmt.Println(dynamodb.ErrCodeRequestLimitExceeded, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateItemRequest

func (c *DynamoDB) UpdateItemRequest(input *UpdateItemInput) (req *request.Request, output *UpdateItemOutput)

UpdateItemRequest generates a "aws/request.Request" representing the client's request for the UpdateItem operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateItem for more information on using the UpdateItem API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateItemRequest method. req, resp := client.UpdateItemRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateItem

UpdateItemWithContext

func (c *DynamoDB) UpdateItemWithContext(ctx aws.Context, input *UpdateItemInput, opts ...request.Option) (*UpdateItemOutput, error)

UpdateItemWithContext is the same as UpdateItem with the addition of the ability to pass a context and additional request options.

See UpdateItem for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateTable

func (c *DynamoDB) UpdateTable(input *UpdateTableInput) (*UpdateTableOutput, error)

UpdateTable API operation for Amazon DynamoDB.

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

You can only perform one of the following operations at once:

  • Modify the provisioned throughput settings of the table.

  • Enable or disable Streams on the table.

  • Remove a global secondary index from the table.

  • Create a new global secondary index on the table. Once the index begins backfilling, you can use UpdateTable to perform other operations.

UpdateTable is an asynchronous operation; while it is executing, the table status changes from ACTIVE to UPDATING. While it is UPDATING, you cannot issue another UpdateTable request. When the table returns to the ACTIVE state, the UpdateTable operation is complete.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UpdateTable for usage and error information.

Returned Error Codes:

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable

Example

DynamoDB UpdateTable shared00

To modify a table's provisioned throughput

This example increases the provisioned read and write capacity on the Music table.

{ svc := dynamodb.New(session.New()) input := &dynamodb.UpdateTableInput{ ProvisionedThroughput: &dynamodb.ProvisionedThroughput{ ReadCapacityUnits: aws.Int64(10), WriteCapacityUnits: aws.Int64(10), }, TableName: aws.String("MusicCollection"), } result, err := svc.UpdateTable(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case dynamodb.ErrCodeResourceInUseException: fmt.Println(dynamodb.ErrCodeResourceInUseException, aerr.Error()) case dynamodb.ErrCodeResourceNotFoundException: fmt.Println(dynamodb.ErrCodeResourceNotFoundException, aerr.Error()) case dynamodb.ErrCodeLimitExceededException: fmt.Println(dynamodb.ErrCodeLimitExceededException, aerr.Error()) case dynamodb.ErrCodeInternalServerError: fmt.Println(dynamodb.ErrCodeInternalServerError, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

UpdateTableRequest

func (c *DynamoDB) UpdateTableRequest(input *UpdateTableInput) (req *request.Request, output *UpdateTableOutput)

UpdateTableRequest generates a "aws/request.Request" representing the client's request for the UpdateTable operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateTable for more information on using the UpdateTable API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateTableRequest method. req, resp := client.UpdateTableRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTable

UpdateTableWithContext

func (c *DynamoDB) UpdateTableWithContext(ctx aws.Context, input *UpdateTableInput, opts ...request.Option) (*UpdateTableOutput, error)

UpdateTableWithContext is the same as UpdateTable with the addition of the ability to pass a context and additional request options.

See UpdateTable for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

UpdateTimeToLive

func (c *DynamoDB) UpdateTimeToLive(input *UpdateTimeToLiveInput) (*UpdateTimeToLiveOutput, error)

UpdateTimeToLive API operation for Amazon DynamoDB.

The UpdateTimeToLive method will enable or disable TTL for the specified table. A successful UpdateTimeToLive call returns the current TimeToLiveSpecification; it may 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.

TTL compares the current time in epoch time format to the time stored in the TTL attribute of an item. If the epoch time value stored in the attribute is less than the current time, the item is marked as expired and subsequently deleted.

The epoch time format is the number of seconds elapsed since 12:00:00 AM January 1st, 1970 UTC.

DynamoDB deletes expired items on a best-effort basis to ensure availability of throughput for other data operations.

DynamoDB typically deletes expired items within two days of expiration. The exact duration within which an item gets deleted after expiration is specific to the nature of the workload. Items that have expired and not been deleted will still show up in reads, queries, and scans.

As items are deleted, they are removed from any Local Secondary Index and Global Secondary Index immediately in the same eventually consistent way as a standard delete operation.

For more information, see Time To Live (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html) in the Amazon DynamoDB Developer Guide.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon DynamoDB's API operation UpdateTimeToLive for usage and error information.

Returned Error Codes:

  • ErrCodeResourceInUseException "ResourceInUseException" The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

  • ErrCodeResourceNotFoundException "ResourceNotFoundException" The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

  • ErrCodeLimitExceededException "LimitExceededException" There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, RestoreTableFromBackup, and RestoreTableToPointInTime. For tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously. The total limit of tables in the ACTIVE state is 250.
  • ErrCodeInternalServerError "InternalServerError" An error occurred on the server side.

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive

UpdateTimeToLiveRequest

func (c *DynamoDB) UpdateTimeToLiveRequest(input *UpdateTimeToLiveInput) (req *request.Request, output *UpdateTimeToLiveOutput)

UpdateTimeToLiveRequest generates a "aws/request.Request" representing the client's request for the UpdateTimeToLive operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See UpdateTimeToLive for more information on using the UpdateTimeToLive API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the UpdateTimeToLiveRequest method. req, resp := client.UpdateTimeToLiveRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }

See also, https://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/UpdateTimeToLive

UpdateTimeToLiveWithContext

func (c *DynamoDB) UpdateTimeToLiveWithContext(ctx aws.Context, input *UpdateTimeToLiveInput, opts ...request.Option) (*UpdateTimeToLiveOutput, error)

UpdateTimeToLiveWithContext is the same as UpdateTimeToLive with the addition of the ability to pass a context and additional request options.

See UpdateTimeToLive for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

See Also

For more information about using this API, see AWS API Documentation.

WaitUntilTableExists

func (c *DynamoDB) WaitUntilTableExists(input *DescribeTableInput) error

WaitUntilTableExists uses the DynamoDB API operation DescribeTable to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

WaitUntilTableExistsWithContext

func (c *DynamoDB) WaitUntilTableExistsWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.WaiterOption) error

WaitUntilTableExistsWithContext is an extended version of WaitUntilTableExists. With the support for passing in a context and options to configure the Waiter and the underlying request options.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

WaitUntilTableNotExists

func (c *DynamoDB) WaitUntilTableNotExists(input *DescribeTableInput) error

WaitUntilTableNotExists uses the DynamoDB API operation DescribeTable to wait for a condition to be met before returning. If the condition is not met within the max attempt window, an error will be returned.

WaitUntilTableNotExistsWithContext

func (c *DynamoDB) WaitUntilTableNotExistsWithContext(ctx aws.Context, input *DescribeTableInput, opts ...request.WaiterOption) error

WaitUntilTableNotExistsWithContext is an extended version of WaitUntilTableNotExists. With the support for passing in a context and options to configure the Waiter and the underlying request options.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

On this page: