:doc:`CostOptimizationHub <../../cost-optimization-hub>` / Client / update_preferences

******************
update_preferences
******************



.. py:method:: CostOptimizationHub.Client.update_preferences(**kwargs)

  

  Updates a set of preferences for an account in order to add account-specific preferences into the service. These preferences impact how the savings associated with recommendations are presented.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cost-optimization-hub-2022-07-26/UpdatePreferences>`_  


  **Request Syntax**
  ::

    response = client.update_preferences(
        savingsEstimationMode='BeforeDiscounts'|'AfterDiscounts',
        memberAccountDiscountVisibility='All'|'None',
        preferredCommitment={
            'term': 'OneYear'|'ThreeYears',
            'paymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront'
        }
    )
    
  :type savingsEstimationMode: string
  :param savingsEstimationMode: 

    Sets the "savings estimation mode" preference.

    

  
  :type memberAccountDiscountVisibility: string
  :param memberAccountDiscountVisibility: 

    Sets the "member account discount visibility" preference.

    

  
  :type preferredCommitment: dict
  :param preferredCommitment: 

    Sets the preferences for how Reserved Instances and Savings Plans cost-saving opportunities are prioritized in terms of payment option and term length.

    

  
    - **term** *(string) --* 

      The preferred length of the commitment period. If the value is null, it will default to ``ThreeYears`` (highest savings) where applicable.

      

    
    - **paymentOption** *(string) --* 

      The preferred upfront payment structure for commitments. If the value is null, it will default to ``AllUpfront`` (highest savings) where applicable.

      

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

    
    ::

      {
          'savingsEstimationMode': 'BeforeDiscounts'|'AfterDiscounts',
          'memberAccountDiscountVisibility': 'All'|'None',
          'preferredCommitment': {
              'term': 'OneYear'|'ThreeYears',
              'paymentOption': 'AllUpfront'|'PartialUpfront'|'NoUpfront'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **savingsEstimationMode** *(string) --* 

        Shows the status of the "savings estimation mode" preference.

        
      

      - **memberAccountDiscountVisibility** *(string) --* 

        Shows the status of the "member account discount visibility" preference.

        
      

      - **preferredCommitment** *(dict) --* 

        Shows the updated preferences for how Reserved Instances and Savings Plans cost-saving opportunities are prioritized in terms of payment option and term length.

        
        

        - **term** *(string) --* 

          The preferred length of the commitment period. If the value is null, it will default to ``ThreeYears`` (highest savings) where applicable.

          
        

        - **paymentOption** *(string) --* 

          The preferred upfront payment structure for commitments. If the value is null, it will default to ``AllUpfront`` (highest savings) where applicable.

          
    
  
  **Exceptions**
  
  *   :py:class:`CostOptimizationHub.Client.exceptions.ValidationException`

  
  *   :py:class:`CostOptimizationHub.Client.exceptions.InternalServerException`

  
  *   :py:class:`CostOptimizationHub.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CostOptimizationHub.Client.exceptions.ThrottlingException`

  