TimestreamQuery / Client / update_account_settings

update_account_settings#

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

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'
            }
        }
    }
)
Parameters:
  • MaxQueryTCU (integer) –

    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.

  • QueryPricingModel (string) –

    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.

  • QueryCompute (dict) –

    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.

Return type:

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