:doc:`SimpleDB <../../sdb>` / Client / delete_attributes

*****************
delete_attributes
*****************



.. py:method:: 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 <https://docs.aws.amazon.com/goto/WebAPI/sdb-2009-04-15/DeleteAttributes>`_  


  **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
        }
    )
    
  :type DomainName: string
  :param DomainName: **[REQUIRED]** The name of the domain in which to perform the operation.

  
  :type ItemName: string
  :param ItemName: **[REQUIRED]** The name of the item. Similar to rows on a spreadsheet, items represent individual objects that contain one or more value-attribute pairs.

  
  :type Attributes: list
  :param Attributes: 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) --* 

      
    

  :type Expected: dict
  :param Expected: 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**
  
  *   :py:class:`SimpleDB.Client.exceptions.InvalidParameterValue`

  
  *   :py:class:`SimpleDB.Client.exceptions.MissingParameter`

  
  *   :py:class:`SimpleDB.Client.exceptions.NoSuchDomain`

  
  *   :py:class:`SimpleDB.Client.exceptions.AttributeDoesNotExist`

  