:doc:`TimestreamQuery <../../timestream-query>` / Client / update_account_settings

***********************
update_account_settings
***********************



.. py:method:: TimestreamQuery.Client.update_account_settings(**kwargs)

  

  Transitions your account to use TCUs for query pricing and modifies the maximum query compute units that you've configured. If you reduce the value of ``MaxQueryTCU`` to a desired configuration, the new value can take up to 24 hours to be effective.

   

  .. note::

    

    After you've transitioned your account to use TCUs for query pricing, you can't transition to using bytes scanned for query pricing.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/UpdateAccountSettings>`_  


  **Request Syntax**
  ::

    response = client.update_account_settings(
        MaxQueryTCU=123,
        QueryPricingModel='BYTES_SCANNED'|'COMPUTE_UNITS',
        QueryCompute={
            'ComputeMode': 'ON_DEMAND'|'PROVISIONED',
            'ProvisionedCapacity': {
                'TargetQueryTCU': 123,
                'NotificationConfiguration': {
                    'SnsConfiguration': {
                        'TopicArn': 'string'
                    },
                    'RoleArn': 'string'
                }
            }
        }
    )
    
  :type MaxQueryTCU: integer
  :param MaxQueryTCU: 

    The maximum number of compute units the service will use at any point in time to serve your queries. To run queries, you must set a minimum capacity of 4 TCU. You can set the maximum number of TCU in multiples of 4, for example, 4, 8, 16, 32, and so on. The maximum value supported for ``MaxQueryTCU`` is 1000. To request an increase to this soft limit, contact Amazon Web Services Support. For information about the default quota for maxQueryTCU, see Default quotas. This configuration is applicable only for on-demand usage of Timestream Compute Units (TCUs).

     

    The maximum value supported for ``MaxQueryTCU`` is 1000. To request an increase to this soft limit, contact Amazon Web Services Support. For information about the default quota for ``maxQueryTCU``, see `Default quotas <https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.default>`__.

    

  
  :type QueryPricingModel: string
  :param QueryPricingModel: 

    The pricing model for queries in an account.

     

    .. note::

      

      The ``QueryPricingModel`` parameter is used by several Timestream operations; however, the ``UpdateAccountSettings`` API operation doesn't recognize any values other than ``COMPUTE_UNITS``.

      

    

  
  :type QueryCompute: dict
  :param QueryCompute: 

    Modifies the query compute settings configured in your account, including the query pricing model and provisioned Timestream Compute Units (TCUs) in your account.

     

    .. note::

      

      This API is idempotent, meaning that making the same request multiple times will have the same effect as making the request once.

      

    

  
    - **ComputeMode** *(string) --* 

      The mode in which Timestream Compute Units (TCUs) are allocated and utilized within an account. Note that in the Asia Pacific (Mumbai) region, the API operation only recognizes the value ``PROVISIONED``.

      

    
    - **ProvisionedCapacity** *(dict) --* 

      Configuration object that contains settings for provisioned Timestream Compute Units (TCUs) in your account.

      

    
      - **TargetQueryTCU** *(integer) --* **[REQUIRED]** 

        The target compute capacity for querying data, specified in Timestream Compute Units (TCUs).

        

      
      - **NotificationConfiguration** *(dict) --* 

        Configuration settings for notifications related to the provisioned capacity update.

        

      
        - **SnsConfiguration** *(dict) --* 

          Details on SNS that are required to send the notification.

          

        
          - **TopicArn** *(string) --* **[REQUIRED]** 

            SNS topic ARN that the scheduled query status notifications will be sent to.

            

          
        
        - **RoleArn** *(string) --* **[REQUIRED]** 

          An Amazon Resource Name (ARN) that grants Timestream permission to publish notifications. This field is only visible if SNS Topic is provided when updating the account settings.

          

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

    
    ::

      {
          'MaxQueryTCU': 123,
          'QueryPricingModel': 'BYTES_SCANNED'|'COMPUTE_UNITS',
          'QueryCompute': {
              'ComputeMode': 'ON_DEMAND'|'PROVISIONED',
              'ProvisionedCapacity': {
                  'ActiveQueryTCU': 123,
                  'NotificationConfiguration': {
                      'SnsConfiguration': {
                          'TopicArn': 'string'
                      },
                      'RoleArn': 'string'
                  },
                  'LastUpdate': {
                      'TargetQueryTCU': 123,
                      'Status': 'PENDING'|'FAILED'|'SUCCEEDED',
                      'StatusMessage': 'string'
                  }
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **MaxQueryTCU** *(integer) --* 

        The configured maximum number of compute units the service will use at any point in time to serve your queries.

        
      

      - **QueryPricingModel** *(string) --* 

        The pricing model for an account.

        
      

      - **QueryCompute** *(dict) --* 

        Confirms the updated account settings for querying data in your account.

        
        

        - **ComputeMode** *(string) --* 

          The mode in which Timestream Compute Units (TCUs) are allocated and utilized within an account. Note that in the Asia Pacific (Mumbai) region, the API operation only recognizes the value ``PROVISIONED``.

          
        

        - **ProvisionedCapacity** *(dict) --* 

          Configuration object that contains settings for provisioned Timestream Compute Units (TCUs) in your account.

          
          

          - **ActiveQueryTCU** *(integer) --* 

            The number of Timestream Compute Units (TCUs) provisioned in the account. This field is only visible when the compute mode is ``PROVISIONED``.

            
          

          - **NotificationConfiguration** *(dict) --* 

            An object that contains settings for notifications that are sent whenever the provisioned capacity settings are modified. This field is only visible when the compute mode is ``PROVISIONED``.

            
            

            - **SnsConfiguration** *(dict) --* 

              Details on SNS that are required to send the notification.

              
              

              - **TopicArn** *(string) --* 

                SNS topic ARN that the scheduled query status notifications will be sent to.

                
          
            

            - **RoleArn** *(string) --* 

              An Amazon Resource Name (ARN) that grants Timestream permission to publish notifications. This field is only visible if SNS Topic is provided when updating the account settings.

              
        
          

          - **LastUpdate** *(dict) --* 

            Information about the last update to the provisioned capacity settings.

            
            

            - **TargetQueryTCU** *(integer) --* 

              The number of TimeStream Compute Units (TCUs) requested in the last account settings update.

              
            

            - **Status** *(string) --* 

              The status of the last update. Can be either ``PENDING``, ``FAILED``, or ``SUCCEEDED``.

              
            

            - **StatusMessage** *(string) --* 

              Error message describing the last account settings update status, visible only if an error occurred.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`TimestreamQuery.Client.exceptions.AccessDeniedException`

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

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

  
  *   :py:class:`TimestreamQuery.Client.exceptions.ValidationException`

  
  *   :py:class:`TimestreamQuery.Client.exceptions.InvalidEndpointException`

  