:doc:`EC2 <../../ec2>` / Client / reset_image_attribute

*********************
reset_image_attribute
*********************



.. py:method:: EC2.Client.reset_image_attribute(**kwargs)

  

  Resets an attribute of an AMI to its default value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetImageAttribute>`_  


  **Request Syntax**
  ::

    response = client.reset_image_attribute(
        Attribute='launchPermission',
        ImageId='string',
        DryRun=True|False
    )
    
  :type Attribute: string
  :param Attribute: **[REQUIRED]** 

    The attribute to reset (currently you can only reset the launch permission attribute).

    

  
  :type ImageId: string
  :param ImageId: **[REQUIRED]** 

    The ID of the AMI.

    

  
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

  
  
  :returns: None

  **Examples**

  This example resets the launchPermission attribute for the specified AMI. By default, AMIs are private.
  ::

    response = client.reset_image_attribute(
        Attribute='launchPermission',
        ImageId='ami-5731123e',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  