Skip to content

update_account_settings async

update_account_settings(
    *,
    config_overrides: Optional[AsyncTimestreamQueryClientConfig] = None,
    max_query_tcu: Optional[MaxQueryCapacity] = None,
    query_pricing_model: Optional[QueryPricingModel] = None,
    query_compute: Optional[QueryComputeRequest] = None,
) -> UpdateAccountSettingsResponse

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.

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

Parameters:

  • max_query_tcu (Optional[MaxQueryCapacity], default: None ) –

    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.

  • query_pricing_model (Optional[QueryPricingModel], default: None ) –

    The pricing model for queries in an account.

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

  • query_compute (Optional[QueryComputeRequest], default: None ) –

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

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

Raises:

Source code in docs_src/capo_timestream_query/_services/async_timestream_query.py
async def update_account_settings(
    self,
    *,
    config_overrides: Optional[AsyncTimestreamQueryClientConfig] = None,
    max_query_tcu: Optional[
        "capo_timestream_query.types.max_query_capacity.MaxQueryCapacity"
    ] = None,
    query_pricing_model: Optional[
        "capo_timestream_query.types.query_pricing_model.QueryPricingModel"
    ] = None,
    query_compute: Optional[
        "capo_timestream_query.types.query_compute_request.QueryComputeRequest"
    ] = None,
) -> "capo_timestream_query.types.update_account_settings_response.UpdateAccountSettingsResponse":
    """<p>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 <code>MaxQueryTCU</code> to a desired configuration, the new value can take up to 24 hours to be effective.</p> <note> <p>After you've transitioned your account to use TCUs for query pricing, you can't transition to using bytes scanned for query pricing.</p> </note>

    Args:
        max_query_tcu: <p>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 <code>MaxQueryTCU</code> 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).</p> <p>The maximum value supported for <code>MaxQueryTCU</code> is 1000. To request an increase to this soft limit, contact Amazon Web Services Support. For information about the default quota for <code>maxQueryTCU</code>, see <a href="https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.default">Default quotas</a>.</p>
        query_pricing_model: <p>The pricing model for queries in an account.</p> <note> <p>The <code>QueryPricingModel</code> parameter is used by several Timestream operations; however, the <code>UpdateAccountSettings</code> API operation doesn't recognize any values other than <code>COMPUTE_UNITS</code>.</p> </note>
        query_compute: <p>Modifies the query compute settings configured in your account, including the query pricing model and provisioned Timestream Compute Units (TCUs) in your account.</p> <note> <p>This API is idempotent, meaning that making the same request multiple times will have the same effect as making the request once.</p> </note>

    Raises:
        capo_timestream_query.errors.access_denied_exception.AccessDeniedException: <p>You do not have the necessary permissions to access the account settings.</p>
        capo_timestream_query.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request.</p>
        capo_timestream_query.errors.invalid_endpoint_exception.InvalidEndpointException: <p>The requested endpoint is invalid.</p>
        capo_timestream_query.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to excessive requests.</p>
        capo_timestream_query.errors.validation_exception.ValidationException: <p> Invalid or malformed request. </p>
        capo_timestream_query.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_timestream_query.types.update_account_settings_request.UpdateAccountSettingsRequest]",
    ) -> AsyncOperationResponse[
        "capo_timestream_query.types.update_account_settings_response.UpdateAccountSettingsResponse"
    ]:
        import capo_timestream_query._operations.timestream_20181101.update_account_settings

        (
            output,
            http_response,
        ) = await capo_timestream_query._operations.timestream_20181101.update_account_settings.async_update_account_settings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateAccountSettings")
    )
    input_: capo_timestream_query.types.update_account_settings_request.UpdateAccountSettingsRequest = {}
    if max_query_tcu is not None:
        input_["max_query_tcu"] = max_query_tcu
    if query_pricing_model is not None:
        input_["query_pricing_model"] = query_pricing_model
    if query_compute is not None:
        input_["query_compute"] = query_compute

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output