-
Notifications
You must be signed in to change notification settings - Fork 853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ReturnValuesOnConditionCheckFailure member to Update & Put Enhanced Request #4442
Comments
@masakiasanuma thank you for reaching out. Request acknowledged. Community note: add a 👍 reaction to the original description to help us prioritize this request. |
Hi @debora-ito, thank you for picking this up! Just curious, is there an average ETA for the completion of these kind of requests? I want to determine if it's worth implementing a workaround for now or if I should just wait until this feature request is completed. Thanks! |
Hi, I'd like to start working on it if possible |
Hi @breader124, it seems like they have not started working on this yet as they might not have enough bandwidth to prioritize this request over others. If you have the time, I would very much appreciate it if you could implement this feature! |
…e related changes (aws#4442)
…ure in DynamoDB Enhanced operations (#4708) * Add returnValuesOnConditionCheckFailure param to UpdateItemEnhancedRequest (#4442) * Add returnValuesOnConditionCheckFailure param to DeleteItemEnhancedRequest (#4442) * Add returnValuesOnConditionCheckFailure param to PutItemEnhancedRequest (#4442) * Cover returnValuesOnConditionCheckFailure changes with integration tests (#4442) * Document new returnValuesOnConditionCheckFailure related API (#4442) * Extend changelog by description of returnValuesOnConditionCheckFailure related changes (#4442) * Fix minor codestyle issues (#4442) --------- Co-authored-by: anirudh9391 <anirudh93@gmail.com>
This is now supported, via #4708. Available in version |
|
Thank you @debora-ito and @breader124! |
Describe the feature
Currently, only UpdateItemRequest and PutItemRequest using the non-enhanced Dynamo DB client allows you to set the
ReturnValuesOnConditionCheckFailure
member to make theConditionalCheckFailedException
to return the failed item. I want this member to be added to theUpdateItemEnhancedRequest
andPutItemEnhancedRequest
so that this feature can be used with the enhanced Dynamo DB client.Use Case
My service currently uses multiple conditions when creating & updating items, and there's no way to differentiate which condition failed without retrieving & checking the item that failed in the
ConditionalCheckFailedException
object. With theReturnValuesOnConditionCheckFailure
feature, my service will be able to throw specific exceptions based on which condition failed, allowing the service clients to handle exceptions more clearly.Proposed Solution
Add an optional
returnValuesOnConditionCheckFailure
member toUpdateItemEnhancedRequest.builder
andPutItemEnhancedRequest.builder
that takes in the ReturnValuesOnConditionCheckFailure Enum. When this member is set toALL_OLD
, it will append the failed/old item as aMap<String, AttributeValue>
in the ConditionalCheckFailedException object.Other Information
I believe this was a recent feature added based on the announcement date, which might be the reason this was not added to the Enhanced requests yet.
Somewhat similar to this issue, but I specifically need the value to be returned on
ConditionalCheckFailedException
. TheReturnValues
attribute does not return the item in the exception object, it only returns when the operation succeeds.Acknowledgements
AWS Java SDK version used
2
JDK version used
17
Operating System and version
AL2
The text was updated successfully, but these errors were encountered: