SimpleDB / Client / delete_attributes

delete_attributes#

SimpleDB.Client.delete_attributes(**kwargs)#

Deletes one or more attributes associated with an item. If all attributes of the item are deleted, the item is deleted.

DeleteAttributes is an idempotent operation; running it multiple times on the same item or attribute does not result in an error response.

Because Amazon SimpleDB makes multiple copies of item data and uses an eventual consistency update model, performing a GetAttributes or Select operation (read) immediately after a DeleteAttributes or PutAttributes operation (write) might not return updated item data.

See also: AWS API Documentation

Request Syntax

response = client.delete_attributes(
    DomainName='string',
    ItemName='string',
    Attributes=[
        {
            'Name': 'string',
            'AlternateNameEncoding': 'string',
            'Value': 'string',
            'AlternateValueEncoding': 'string'
        },
    ],
    Expected={
        'Name': 'string',
        'Value': 'string',
        'Exists': True|False
    }
)
Parameters:
  • DomainName (string) – [REQUIRED] The name of the domain in which to perform the operation.

  • ItemName (string) – [REQUIRED] The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.

  • Attributes (list) –

    A list of Attributes. Similar to columns on a spreadsheet, attributes represent categories of data that can be assigned to items.

    • (dict) –

      • Name (string) – [REQUIRED] The name of the attribute.

      • AlternateNameEncoding (string) –

      • Value (string) – [REQUIRED] The value of the attribute.

      • AlternateValueEncoding (string) –

  • Expected (dict) –

    The update condition which, if specified, determines whether the specified attributes will be deleted or not. The update condition must be satisfied in order for this request to be processed and the attributes to be deleted.

    • Name (string) –

      The name of the attribute involved in the condition.

    • Value (string) –

      The value of an attribute. This value can only be specified when the Exists parameter is equal to true.

    • Exists (boolean) –

      A value specifying whether or not the specified attribute must exist with the specified value in order for the update condition to be satisfied. Specify true if the attribute must exist for the update condition to be satisfied. Specify false if the attribute should not exist in order for the update condition to be satisfied.

Returns:

None

Exceptions