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

***********************************
modify_default_credit_specification
***********************************



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

  

  Modifies the default credit option for CPU usage of burstable performance instances. The default credit option is set at the account level per Amazon Web Services Region, and is specified per instance family. All new burstable performance instances in the account launch using the default credit option.

   

  ``ModifyDefaultCreditSpecification`` is an asynchronous operation, which works at an Amazon Web Services Region level and modifies the credit option for each Availability Zone. All zones in a Region are updated within five minutes. But if instances are launched during this operation, they might not get the new credit option until the zone is updated. To verify whether the update has occurred, you can call ``GetDefaultCreditSpecification`` and check ``DefaultCreditSpecification`` for updates.

   

  For more information, see `Burstable performance instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html>`__ in the *Amazon EC2 User Guide*.

  

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


  **Request Syntax**
  ::

    response = client.modify_default_credit_specification(
        DryRun=True|False,
        InstanceFamily='t2'|'t3'|'t3a'|'t4g',
        CpuCredits='string'
    )
    
  :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 InstanceFamily: string
  :param InstanceFamily: **[REQUIRED]** 

    The instance family.

    

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

    The credit option for CPU usage of the instance family.

     

    Valid Values: ``standard`` | ``unlimited``

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'InstanceFamilyCreditSpecification': {
              'InstanceFamily': 't2'|'t3'|'t3a'|'t4g',
              'CpuCredits': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **InstanceFamilyCreditSpecification** *(dict) --* 

        The default credit option for CPU usage of the instance family.

        
        

        - **InstanceFamily** *(string) --* 

          The instance family.

          
        

        - **CpuCredits** *(string) --* 

          The default credit option for CPU usage of the instance family. Valid values are ``standard`` and ``unlimited``.

          
    
  