ExecuteStatement
This operation allows you to perform reads and singleton writes on data stored in DynamoDB, using PartiQL.
Request Syntax
{
"ConsistentRead": boolean
,
"NextToken": "string
",
"Parameters": [
{
"B": blob
,
"BOOL": boolean
,
"BS": [ blob
],
"L": [
"AttributeValue"
],
"M": {
"string
" : "AttributeValue"
},
"N": "string
",
"NS": [ "string
" ],
"NULL": boolean
,
"S": "string
",
"SS": [ "string
" ]
}
],
"Statement": "string
"
}
Request Parameters
The request accepts the following data in JSON format.
In the following list, the required parameters are described first.
- Statement
-
The PartiQL statement representing the operation to run.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 8192.
Required: Yes
- ConsistentRead
-
The consistency of a read operation. If set to
true
, then a strongly consistent read is used; otherwise, an eventually consistent read is used.Type: Boolean
Required: No
- NextToken
-
Set this value to get remaining results, if
NextToken
was returned in the statement response.Type: String
Length Constraints: Minimum length of 1. Maximum length of 32768.
Required: No
- Parameters
-
The parameters for the PartiQL statement, if any.
Type: Array of AttributeValue objects
Array Members: Minimum number of 1 item.
Required: No
Response Syntax
{
"Items": [
{
"string" : {
"B": blob,
"BOOL": boolean,
"BS": [ blob ],
"L": [
"AttributeValue"
],
"M": {
"string" : "AttributeValue"
},
"N": "string",
"NS": [ "string" ],
"NULL": boolean,
"S": "string",
"SS": [ "string" ]
}
}
],
"NextToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- Items
-
If a read operation was used, this property will contain the result of the reade operation; a map of attribute names and their values. For the write operations this value will be empty.
Type: Array of string to AttributeValue object maps
Key Length Constraints: Maximum length of 65535.
- NextToken
-
If the response of a read request exceeds the response payload limit DynamoDB will set this value in the response. If set, you can use that this value in the subsequent request to get the remaining results.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 32768.
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConditionalCheckFailedException
-
A condition specified in the operation could not be evaluated.
HTTP Status Code: 400
- DuplicateItemException
-
There was an attempt to insert an item with the same primary key as an item that already exists in the DynamoDB table.
HTTP Status Code: 400
- InternalServerError
-
An error occurred on the server side.
HTTP Status Code: 500
- ItemCollectionSizeLimitExceededException
-
An item collection is too large. This exception is only returned for tables that have one or more local secondary indexes.
HTTP Status Code: 400
- ProvisionedThroughputExceededException
-
Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests and use exponential backoff. For more information, go to Error Retries and Exponential Backoff in the Amazon DynamoDB Developer Guide.
HTTP Status Code: 400
- RequestLimitExceeded
-
Throughput exceeds the current throughput quota for your account. Please contact AWS Support at AWS Support
to request a quota increase. HTTP Status Code: 400
- 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
.HTTP Status Code: 400
- TransactionConflictException
-
Operation was rejected because there is an ongoing transaction for the item.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: