

如需與 Amazon Timestream for LiveAnalytics 類似的功能，請考慮使用 Amazon Timestream for InfluxDB。它提供簡化的資料擷取和單一位數毫秒查詢回應時間，以進行即時分析。[在這裡](https://docs.aws.amazon.com//timestream/latest/developerguide/timestream-for-influxdb.html)進一步了解。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# UpdateAccountSettings
<a name="API_query_UpdateAccountSettings"></a>

轉換您的帳戶以使用 TCUs進行查詢定價，並修改您設定的最大查詢運算單位。如果您將 的值減少`MaxQueryTCU`為所需的組態，則新值最多可能需要 24 小時才會生效。

**注意**  
將帳戶轉換為使用 TCUs進行查詢定價之後，您就無法轉換為使用掃描的位元組進行查詢定價。

## 請求語法
<a name="API_query_UpdateAccountSettings_RequestSyntax"></a>

```
{
   "MaxQueryTCU": number,
   "QueryCompute": { 
      "ComputeMode": "string",
      "ProvisionedCapacity": { 
         "NotificationConfiguration": { 
            "RoleArn": "string",
            "SnsConfiguration": { 
               "TopicArn": "string"
            }
         },
         "TargetQueryTCU": number
      }
   },
   "QueryPricingModel": "string"
}
```

## 請求參數
<a name="API_query_UpdateAccountSettings_RequestParameters"></a>

如需所有動作的一般參數資訊，請參閱《[Common Parameters](CommonParameters.md)》。

請求接受採用 JSON 格式的下列資料。

 ** [MaxQueryTCU](#API_query_UpdateAccountSettings_RequestSyntax) **   <a name="timestream-query_UpdateAccountSettings-request-MaxQueryTCU"></a>
服務在任何時間點將用於服務查詢的運算單位數量上限。若要執行查詢，您必須將最小容量設定為 4 TCU。您可以在 4 的倍數中設定 TCU 數量上限，例如 4、8、16、32 等。支援的最大值`MaxQueryTCU`為 1000。若要請求提高此軟性限制，請聯絡 AWS Support。如需 maxQueryTCU 預設配額的相關資訊，請參閱預設配額。此組態僅適用於 Timestream Compute Units (TCUs 的隨需用量。  
支援的最大值`MaxQueryTCU`為 1000。若要請求提高此軟性限制，請聯絡 AWS Support。如需 的預設配額的相關資訊`maxQueryTCU`，請參閱[預設配額](https://docs.aws.amazon.com/timestream/latest/developerguide/ts-limits.html#limits.default)。  
類型：整數  
必要：否

 ** [QueryCompute](#API_query_UpdateAccountSettings_RequestSyntax) **   <a name="timestream-query_UpdateAccountSettings-request-QueryCompute"></a>
修改帳戶中設定的查詢運算設定，包括查詢定價模型和帳戶中佈建的 Timestream 運算單位 TCUs)。QueryCompute 僅適用於亞太區域 （孟買） 區域。  
此 API 是等冪的，這表示多次提出相同的請求會與提出一次請求具有相同的效果。
類型：[QueryComputeRequest](API_query_QueryComputeRequest.md) 物件  
必要：否

 ** [QueryPricingModel](#API_query_UpdateAccountSettings_RequestSyntax) **   <a name="timestream-query_UpdateAccountSettings-request-QueryPricingModel"></a>
帳戶中查詢的定價模型。  
`QueryPricingModel` 參數由數個 Timestream 操作使用；不過，`UpdateAccountSettings`API 操作無法辨識 以外的任何值`COMPUTE_UNITS`。
類型：字串  
有效值:`BYTES_SCANNED | COMPUTE_UNITS`   
必要：否

## 回應語法
<a name="API_query_UpdateAccountSettings_ResponseSyntax"></a>

```
{
   "MaxQueryTCU": number,
   "QueryCompute": { 
      "ComputeMode": "string",
      "ProvisionedCapacity": { 
         "ActiveQueryTCU": number,
         "LastUpdate": { 
            "Status": "string",
            "StatusMessage": "string",
            "TargetQueryTCU": number
         },
         "NotificationConfiguration": { 
            "RoleArn": "string",
            "SnsConfiguration": { 
               "TopicArn": "string"
            }
         }
      }
   },
   "QueryPricingModel": "string"
}
```

## 回應元素
<a name="API_query_UpdateAccountSettings_ResponseElements"></a>

如果動作成功，則服務傳回 HTTP 200 回應。

服務會傳回下列 JSON 格式的資料。

 ** [MaxQueryTCU](#API_query_UpdateAccountSettings_ResponseSyntax) **   <a name="timestream-query_UpdateAccountSettings-response-MaxQueryTCU"></a>
服務在任何時間點將用於服務查詢的已設定運算單位數量上限。  
類型：整數

 ** [QueryCompute](#API_query_UpdateAccountSettings_ResponseSyntax) **   <a name="timestream-query_UpdateAccountSettings-response-QueryCompute"></a>
確認更新的帳戶設定，以查詢帳戶中的資料。QueryCompute 僅適用於亞太區域 （孟買） 區域。  
類型：[QueryComputeResponse](API_query_QueryComputeResponse.md) 物件

 ** [QueryPricingModel](#API_query_UpdateAccountSettings_ResponseSyntax) **   <a name="timestream-query_UpdateAccountSettings-response-QueryPricingModel"></a>
帳戶的定價模型。  
類型：字串  
有效值:`BYTES_SCANNED | COMPUTE_UNITS` 

## 錯誤
<a name="API_query_UpdateAccountSettings_Errors"></a>

如需所有動作常見錯誤的資訊，請參閱[常見錯誤](CommonErrors.md)。

 ** AccessDeniedException **   
您沒有存取帳戶設定的必要許可。  
HTTP 狀態碼：400

 ** InternalServerException **   
處理請求時發生內部伺服器錯誤。  
HTTP 狀態碼：400

 ** InvalidEndpointException **   
請求的端點無效。  
HTTP 狀態碼：400

 ** ThrottlingException **   
請求因請求過多而受到限流。  
HTTP 狀態碼：400

 ** ValidationException **   
 無效或格式不正確的請求。  
HTTP 狀態碼：400

## 另請參閱
<a name="API_query_UpdateAccountSettings_SeeAlso"></a>

如需在其中一種語言特定 AWS SDKs中使用此 API 的詳細資訊，請參閱下列內容：
+  [AWS 命令列界面 V2](https://docs.aws.amazon.com/goto/cli2/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 .NET V4 的 SDK](https://docs.aws.amazon.com/goto/DotNetSDKV4/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 C\$1\$1 的 SDK](https://docs.aws.amazon.com/goto/SdkForCpp/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 Go 的 SDK v2](https://docs.aws.amazon.com/goto/SdkForGoV2/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 Java V2 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaV2/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 JavaScript V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 Kotlin 的 SDK](https://docs.aws.amazon.com/goto/SdkForKotlin/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 PHP V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForPHPV3/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 Python 的 SDK](https://docs.aws.amazon.com/goto/boto3/timestream-query-2018-11-01/UpdateAccountSettings) 
+  [AWS 適用於 Ruby V3 的 SDK](https://docs.aws.amazon.com/goto/SdkForRubyV3/timestream-query-2018-11-01/UpdateAccountSettings) 