You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::DynamoDB::Types::Update

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing Update as input to an Aws::Client method, you can use a vanilla Hash:

{
  key: { # required
    "AttributeName" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  },
  update_expression: "UpdateExpression", # required
  table_name: "TableName", # required
  condition_expression: "ConditionExpression",
  expression_attribute_names: {
    "ExpressionAttributeNameVariable" => "AttributeName",
  },
  expression_attribute_values: {
    "ExpressionAttributeValueVariable" => "value", # value <Hash,Array,String,Numeric,Boolean,IO,Set,nil>
  },
  return_values_on_condition_check_failure: "ALL_OLD", # accepts ALL_OLD, NONE
}

Represents a request to perform an UpdateItem operation.

Returned by:

Instance Attribute Summary collapse

Instance Attribute Details

#condition_expressionString

A condition that must be satisfied in order for a conditional update to succeed.

Returns:

  • (String)

    A condition that must be satisfied in order for a conditional update to succeed.

#expression_attribute_namesHash<String,String>

One or more substitution tokens for attribute names in an expression.

Returns:

  • (Hash<String,String>)

    One or more substitution tokens for attribute names in an expression.

#expression_attribute_valuesHash<String,Types::AttributeValue>

One or more values that can be substituted in an expression.

Returns:

#keyHash<String,Types::AttributeValue>

The primary key of the item to be updated. Each element consists of an attribute name and a value for that attribute.

Returns:

#return_values_on_condition_check_failureString

Use ReturnValuesOnConditionCheckFailure to get the item attributes if the Update condition fails. For ReturnValuesOnConditionCheckFailure, the valid values are: NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW.

Possible values:

  • ALL_OLD
  • NONE

Returns:

  • (String)

    Use ReturnValuesOnConditionCheckFailure to get the item attributes if the Update condition fails.

#table_nameString

Name of the table for the UpdateItem request.

Returns:

  • (String)

    Name of the table for the UpdateItem request.

#update_expressionString

An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.

Returns:

  • (String)

    An expression that defines one or more attributes to be updated, the action to be performed on them, and new value(s) for them.