Complete the code to specify the operation type for a TransactGetItems request.
{
"TransactItems": [
{
"[1]": {
"Key": {"Id": {"S": "123"}},
"TableName": "Users"
}
}
]
}The TransactGetItems request requires the operation type to be Get for each item to retrieve.
Complete the code to specify the primary key attribute name in the Key object.
{
"TransactItems": [
{
"Get": {
"Key": {"[1]": {"S": "abc123"}},
"TableName": "Orders"
}
}
]
}The primary key attribute for the Orders table is typically OrderId, which identifies the item to get.
Fix the error in the TransactGetItems request by completing the missing field.
{
"TransactItems": [
{
"Get": {
"Key": {"UserId": {"S": "user789"}},
"[1]": "Customers"
}
}
]
}The TableName field is required to specify which table to get the item from.
Fill both blanks to create a TransactGetItems request with two items from different tables.
{
"TransactItems": [
{
"[1]": {
"Key": {"Id": {"S": "101"}},
"TableName": "Products"
}
},
{
"[2]": {
"Key": {"UserId": {"S": "u202"}},
"TableName": "Users"
}
}
]
}Both items in a TransactGetItems request must use the Get operation to retrieve data.
Fill all three blanks to build a TransactGetItems request with condition expression and projection expression.
{
"TransactItems": [
{
"Get": {
"Key": {"OrderId": {"S": "ord303"}},
"TableName": "Orders",
"[1]": "attribute_exists(OrderId)",
"[2]": "OrderDate, TotalAmount",
"[3]": "OrdersIndex"
}
}
]
}The ConditionExpression ensures the item exists, ProjectionExpression limits returned attributes, and IndexName specifies the index to query.