:doc:`Instance <index>` / Action / reset_attribute

***************
reset_attribute
***************



.. py:method:: EC2.Instance.reset_attribute(**kwargs)

  

  Resets an attribute of an instance to its default value. To reset the ``kernel`` or ``ramdisk``, the instance must be in a stopped state. To reset the ``sourceDestCheck``, the instance can be either running or stopped.

   

  The ``sourceDestCheck`` attribute controls whether source/destination checking is enabled. The default value is ``true``, which means checking is enabled. This value must be ``false`` for a NAT instance to perform NAT. For more information, see `NAT instances <https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html>`__ in the *Amazon VPC User Guide*.

  

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


  **Request Syntax**
  ::

    response = instance.reset_attribute(
        DryRun=True|False,
        Attribute='instanceType'|'kernel'|'ramdisk'|'userData'|'disableApiTermination'|'instanceInitiatedShutdownBehavior'|'rootDeviceName'|'blockDeviceMapping'|'productCodes'|'sourceDestCheck'|'groupSet'|'ebsOptimized'|'sriovNetSupport'|'enaSupport'|'enclaveOptions'|'disableApiStop'
    )
    
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the operation, 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``.

    

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

    The attribute to reset.

     

    .. warning::

       

      You can only reset the following attributes: ``kernel`` | ``ramdisk`` | ``sourceDestCheck``.

      

    

  
  
  :returns: None