class AWS::DynamoDB::Item

def delete(options = {})

Options Hash: (**options)
  • :unless_exists (String, Symbol, Array) -- A name
  • :if (Hash) -- Designates a conditional delete.

Parameters:
  • options (Hash) -- Options for deleting the item.
def delete(options = {})
  client_opts = item_key_options(self)
  expected = expect_conditions(options)
  client_opts[:expected] = expected unless expected.empty?
  client_opts[:return_values] = options[:return].to_s.upcase if
    options[:return]
  resp = client.delete_item(client_opts)
  values_from_response_hash(resp.data["Attributes"]) if
    options[:return] and resp.data["Attributes"]
end