Building API Operations
To use the NoSQL Workbench to build DynamoDB CRUD APIs choose Interface-based operations at the top right corner of the NoSQL Workbench.
Choose Data plane operations drop-down, and then choose the operation that you want to build.

You can perform the following operations in the operation builder.
Get Item
To run or generate code for a Get Item
operation, do the
following.
-
Specify the partition key value.
-
If you want to add a projection expression , do the following:
-
Choose Projection expression.
-
Choose the + (plus sign) next to Projection expression.
-
Specify the Attribute name,.
-
-
If you want to generate code, choose Generate code.
Select your desired language from the displayed tabs. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about this operation, see PutItem in the Amazon DynamoDB API Reference.
Put Item
To run or generate code for a Put Item
operation, do the
following.
-
Specify the partition key value.
-
Specify the sort key value, if one exists.
-
If you want to add non-key attributes, do the following:
-
Choose the + (plus sign) next to Other attributes.
-
Specify the Attribute name, Type, and Value.
-
-
If a condition expression must be satisfied for the
Put Item
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition Expressions.
-
-
If you want to generate code, choose Generate code.
Select your desired language from the displayed tabs. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about this operation, see PutItem in the Amazon DynamoDB API Reference.
Update Item
To run or generate code for an Update Item
operation, do the
following:
-
Enter the partition key value.
-
Enter the sort key value, if one exists.
-
In Update expression, choose the expression in the list.
-
Choose the + (plus sign) for the expression.
-
Enter the attribute name and attribute value for the selected expression.
-
If you want to add more expressions, choose another expression in the Update Expression drop-down list, and then select the +.
-
If a condition expression must be satisfied for the
Update Item
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition Expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about this operation, see UpdateItem in the Amazon DynamoDB API Reference.
Delete Item
To run or generate code for a Delete Item
operation, do the
following.
-
Enter the partition key value.
-
Enter the sort key value, if one exists.
-
If a condition expression must be satisfied for the
Delete Item
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition Expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about this operation, see DeleteItem in the Amazon DynamoDB API Reference.
Query
To run or generate code for a Query
operation, do the following.
-
Specify the partition key value.
-
If a sort key is needed for the
Query
operation:-
Select Sort key.
-
Specify the comparison operator, attribute type, and attribute value.
-
-
If not all the attributes should be returned with the operation result, select Projection expression.
-
Choose the + (plus sign).
-
Enter the attribute to return with the query result.
-
If more attributes are needed, choose the + .
-
If a condition expression must be satisfied for the
Query
operation to succeed, do the following:-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition Expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about this operation, see Query in the Amazon DynamoDB API Reference.
Scan
To run or generate code for a Scan
operation, do the following.
-
If not all the attributes should be returned with the operation result, select Projection expression.
-
Choose the + (plus sign).
-
Specify the attribute to return with the query result.
-
If more attributes are needed, choose the + again.
-
If a condition expression must be satisfied for the scan operation to succeed, do the following:
-
Choose Condition.
-
Specify the attribute name, comparison operator, attribute type, and attribute value.
-
If other conditions are needed, choose Condition again.
For more information, see Condition Expressions.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
TransactGetItems
To run or generate code for a TransactGetItems
operation, do the
following.
-
Choose the + (plus sign).
-
Follow the instructions for the Get Item operation.
When you are done specifying the details of the operation, choose the + (plus sign) if you want to add more operations.
To change the order of actions, choose an action in the list on the left side, and then choose the up or down arrows to move it up or down in the list.
To delete an action, choose the action in the list, and then choose the Delete (trash can) icon.
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about transactions, see Amazon DynamoDB Transactions.
TransactWriteItems
To run or generate code for a TransactWriteItems
operation, do the
following.
-
In the Actions drop-down list, choose the operation that you want.
-
For
DeleteItem
, follow the instructions for the Delete Item operation. -
For
PutItem
, follow the instructions for the Put Item operation. -
For
UpdateItem
, follow the instructions for the Update Item operation.
When you are done specifying the details of the operation, choose the + button.
To change the order of actions, choose an action in the list on the left side, and then choose the up or down arrows to move it up or down in the list.
To delete an action, choose the action in the list, and then choose the Delete (trash can) icon.
-
-
If you want to generate code, choose Generate code.
Choose the tab for the language that you want. You can now copy this code and use it in your application.
-
If you want the operation to be run immediately, choose Run.
For more information about transactions, see Amazon DynamoDB Transactions.