Conditional Batch Write Operation
BatchResult batchCheckAndMutate(BatchRequest request)
Function
A conditional batch write operation consumes its corresponding write quota.
Method parameters
request : BatchRequest : required
BatchRequest includes a list of tables available for PutRequest, RemoveRequest
1.items : List< BatchRequestItem > : required
BatchRequestItem includes BatchOp and Request
The enumeration type BatchOp (PUT, REMOVE) specifies the operation type of the request,
Correspondingly, use conditional putRequest and removeRequest to construct Request parameter
Method return value
batchResult : BatchResult
BatchResult includes a list with BatchResultItems that represents the execution result of each request of the batch
items : List< BatchResultItem >
Returns the result of each sub-operation
Exception error code
INTERNAL_ERROR(1): Server exception
ACCESS_DENIED(4): User does not have read permission for this table
VALIDATION_FAILED(5): The request parameter setting in batchRequest is incorrect
THROUGHPUT_EXCEED(8): The current read/write speed has exceeded the read/write quota for this table
RESOURCE_NOT_FOUND(9): Specified table does not exist
Limitation
Each sub-operation must be the same table
The range of sub-operands for a batch operation is [ 1, 100 ]