Skip to content

Batch Execute Statement

dynamodb_batch_execute_statement R Documentation

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

Description

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

The entire batch must consist of either read statements or write statements, you cannot mix both in one batch.

A HTTP 200 response does not mean that all statements in the BatchExecuteStatement succeeded. Error details for individual statements can be found under the Error field of the BatchStatementResponse for each statement.

Usage

dynamodb_batch_execute_statement(Statements, ReturnConsumedCapacity)

Arguments

Statements

[required] The list of PartiQL statements representing the batch to run.

ReturnConsumedCapacity

Determines the level of detail about either provisioned or on-demand throughput consumption that is returned in the response:

  • INDEXES - The response includes the aggregate ConsumedCapacity for the operation, together with ConsumedCapacity for each table and secondary index that was accessed.

    Note that some operations, such as get_item and batch_get_item, do not access any indexes at all. In these cases, specifying INDEXES will only return ConsumedCapacity information for table(s).

  • TOTAL - The response includes only the aggregate ConsumedCapacity for the operation.

  • NONE - No ConsumedCapacity details are included in the response.

Value

A list with the following syntax:

list(
  Responses = list(
    list(
      Error = list(
        Code = "ConditionalCheckFailed"|"ItemCollectionSizeLimitExceeded"|"RequestLimitExceeded"|"ValidationError"|"ProvisionedThroughputExceeded"|"TransactionConflict"|"ThrottlingError"|"InternalServerError"|"ResourceNotFound"|"AccessDenied"|"DuplicateItem",
        Message = "string",
        Item = list(
          list(
            S = "string",
            N = "string",
            B = raw,
            SS = list(
              "string"
            ),
            NS = list(
              "string"
            ),
            BS = list(
              raw
            ),
            M = list(
              list()
            ),
            L = list(
              list()
            ),
            NULL = TRUE|FALSE,
            BOOL = TRUE|FALSE
          )
        )
      ),
      TableName = "string",
      Item = list(
        list(
          S = "string",
          N = "string",
          B = raw,
          SS = list(
            "string"
          ),
          NS = list(
            "string"
          ),
          BS = list(
            raw
          ),
          M = list(
            list()
          ),
          L = list(
            list()
          ),
          NULL = TRUE|FALSE,
          BOOL = TRUE|FALSE
        )
      )
    )
  ),
  ConsumedCapacity = list(
    list(
      TableName = "string",
      CapacityUnits = 123.0,
      ReadCapacityUnits = 123.0,
      WriteCapacityUnits = 123.0,
      Table = list(
        ReadCapacityUnits = 123.0,
        WriteCapacityUnits = 123.0,
        CapacityUnits = 123.0
      ),
      LocalSecondaryIndexes = list(
        list(
          ReadCapacityUnits = 123.0,
          WriteCapacityUnits = 123.0,
          CapacityUnits = 123.0
        )
      ),
      GlobalSecondaryIndexes = list(
        list(
          ReadCapacityUnits = 123.0,
          WriteCapacityUnits = 123.0,
          CapacityUnits = 123.0
        )
      )
    )
  )
)

Request syntax

svc$batch_execute_statement(
  Statements = list(
    list(
      Statement = "string",
      Parameters = list(
        list(
          S = "string",
          N = "string",
          B = raw,
          SS = list(
            "string"
          ),
          NS = list(
            "string"
          ),
          BS = list(
            raw
          ),
          M = list(
            list()
          ),
          L = list(
            list()
          ),
          NULL = TRUE|FALSE,
          BOOL = TRUE|FALSE
        )
      ),
      ConsistentRead = TRUE|FALSE,
      ReturnValuesOnConditionCheckFailure = "ALL_OLD"|"NONE"
    )
  ),
  ReturnConsumedCapacity = "INDEXES"|"TOTAL"|"NONE"
)