java - Using NOT_CONTAINS in conditional write via DynamoDBMapper -


i want update record in dynamodb table based on below condition states "update record when attribute value belongs none of values specified in list".

code snippet:

attributevalue inprogressstatus = new attributevalue("in_progress"); attributevalue successstatus = new attributevalue("success");  expectedattributevalue expectedattributevalue = new expectedattributevalue(); expectedattributevalue.setattributevaluelist(arrays.aslist(inprogressstatus, successstatus)); expectedattributevalue.setcomparisonoperator(comparisonoperator.not_contains); 

while executing conditional update receiving following exception:

com.amazonaws.amazonserviceexception: 1 or more parameter values invalid:  invalid number of argument(s) not_contains comparisonoperator (service: null; status code: 400; error code: validationexception; request id: null). 

please let me know how can achieve functionality using not_contains operator.

not_contains can have single attributevalue , have two. refer documentation dynamodb conditions including not_contains @ http://docs.aws.amazon.com/amazondynamodb/latest/apireference/api_condition.html.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -