

支援終止通知：2025 年 9 月 15 日， AWS 將停止對 Amazon Lex V1 的支援。2025 年 9 月 15 日之後，您將無法再存取 Amazon Lex V1 主控台或 Amazon Lex V1 資源。如果您使用的是 Amazon Lex V2，請改參閱 [Amazon Lex V2 指南](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html)。

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

# GetBot
<a name="API_GetBot"></a>

傳回特定機器人的中繼資料資訊。您必須提供機器人名稱和機器人版本或別名。

 這項操作需要 `lex:GetBot` 動作的許可。

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

```
GET /bots/name/versions/versionoralias HTTP/1.1
```

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

請求會使用下列 URI 參數。

 ** [name](#API_GetBot_RequestSyntax) **   <a name="lex-GetBot-request-uri-name"></a>
機器人的名稱。名稱區分大小寫。  
長度限制：長度下限為 2。長度上限為 50。  
模式：`^([A-Za-z]_?)+$`  
必要：是

 ** [versionoralias](#API_GetBot_RequestSyntax) **   <a name="lex-GetBot-request-uri-versionOrAlias"></a>
機器人的版本或別名。  
必要：是

## 請求主體
<a name="API_GetBot_RequestBody"></a>

請求沒有請求主體。

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

```
HTTP/1.1 200
Content-type: application/json

{
   "abortStatement": { 
      "messages": [ 
         { 
            "content": "string",
            "contentType": "string",
            "groupNumber": number
         }
      ],
      "responseCard": "string"
   },
   "checksum": "string",
   "childDirected": boolean,
   "clarificationPrompt": { 
      "maxAttempts": number,
      "messages": [ 
         { 
            "content": "string",
            "contentType": "string",
            "groupNumber": number
         }
      ],
      "responseCard": "string"
   },
   "createdDate": number,
   "description": "string",
   "detectSentiment": boolean,
   "enableModelImprovements": boolean,
   "failureReason": "string",
   "idleSessionTTLInSeconds": number,
   "intents": [ 
      { 
         "intentName": "string",
         "intentVersion": "string"
      }
   ],
   "lastUpdatedDate": number,
   "locale": "string",
   "name": "string",
   "nluIntentConfidenceThreshold": number,
   "status": "string",
   "version": "string",
   "voiceId": "string"
}
```

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

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

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

 ** [abortStatement](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-abortStatement"></a>
當使用者選擇結束對話而不完成對話時，Amazon Lex 傳回的訊息。如需詳細資訊，請參閱[PutBot](API_PutBot.md)。  
類型：[Statement](API_Statement.md) 物件

 ** [checksum](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-checksum"></a>
用於識別機器人`$LATEST`版本特定修訂的機器人總和檢查碼。  
類型：字串

 ** [childDirected](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-childDirected"></a>
對於使用 Amazon Lex Model Building Service 建立的每個 Amazon Lex 機器人，您必須指定您對 Amazon Lex 的使用是否與網站、程式或其他應用程式相關，而該網站、程式或其他應用程式全部或部分針對 13 以下兒童，並在 `false` `childDirected` 欄位中指定 `true` 或 以遵守兒童線上隱私權保護法 (COPPA)。透過`true`在 `childDirected` 欄位中指定 ，您確認使用 Amazon Lex **與**網站、程式或其他應用程式相關，而該網站、程式或其他應用程式全部或部分以 13 以下兒童為目標，且受到 COPPA 的約束。透過`false`在 `childDirected` 欄位中指定 ，您確認 Amazon Lex 的使用與網站、程式或其他應用程式**無關**，而該網站、程式或其他應用程式全部或部分針對 13 以下且受 COPPA 約束的 兒童。您無法為 `childDirected` 欄位指定預設值，該值無法準確反映您對 Amazon Lex 的使用是否與網站、程式或其他應用程式相關，而該網站、程式或其他應用程式是針對或部分針對未滿 13 歲且受 COPPA 規範的 13 歲兒童。  
如果您使用 Amazon Lex 與網站、程式或其他應用程式有關，而該網站、程式或其他應用程式全部或部分導向至未滿 13 歲的孩童，則您必須根據 COPPA 取得任何必要的可驗證父系同意。如需將 Amazon Lex 與網站、程式或其他應用程式搭配使用的相關資訊，而這些網站、程式或其他應用程式全部或部分針對未滿 13 歲的孩童，請參閱 [Amazon Lex 常見問答集。](https://aws.amazon.com/lex/faqs#data-security)  
類型：布林值

 ** [clarificationPrompt](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-clarificationPrompt"></a>
當 Amazon Lex 不了解使用者的請求時，會使用的訊息。如需詳細資訊，請參閱[PutBot](API_PutBot.md)。  
類型：[Prompt](API_Prompt.md) 物件

 ** [createdDate](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-createdDate"></a>
機器人建立的日期。  
類型：Timestamp

 ** [description](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-description"></a>
機器人的描述。  
類型：字串  
長度限制：長度下限為 0。長度上限為 200。

 ** [detectSentiment](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-detectSentiment"></a>
指出是否應將使用者表達用語傳送至 Amazon Comprehend 進行情緒分析。  
類型：布林值

 ** [enableModelImprovements](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-enableModelImprovements"></a>
指出機器人是否使用準確性改進。 `true` 指出機器人正在使用改進，否則是 `false`。  
類型：布林值

 ** [failureReason](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-failureReason"></a>
如果 `status`是 `FAILED`，Amazon Lex 會說明建置機器人失敗的原因。  
類型：字串

 ** [idleSessionTTLInSeconds](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-idleSessionTTLInSeconds"></a>
Amazon Lex 保留對話中所收集資料的秒數上限。如需詳細資訊，請參閱[PutBot](API_PutBot.md)。  
類型：整數  
有效範圍：最小值為 60。最大值為 86400。

 ** [intents](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-intents"></a>
`intent` 物件的陣列。如需詳細資訊，請參閱[PutBot](API_PutBot.md)。  
類型：[Intent](API_Intent.md) 物件陣列

 ** [lastUpdatedDate](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-lastUpdatedDate"></a>
機器人更新的日期。當您建立資源時，建立日期和上次更新日期相同。  
類型：Timestamp

 ** [locale](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-locale"></a>
 機器人的目標地區設定。  
類型：字串  
有效值:`de-DE | en-AU | en-GB | en-IN | en-US | es-419 | es-ES | es-US | fr-FR | fr-CA | it-IT | ja-JP | ko-KR` 

 ** [name](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-name"></a>
機器人的名稱。  
類型：字串  
長度限制：長度下限為 2。長度上限為 50。  
模式：`^([A-Za-z]_?)+$`

 ** [nluIntentConfidenceThreshold](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-nluIntentConfidenceThreshold"></a>
在 [PostContent](https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostContent.html) 或 [PostText](https://docs.aws.amazon.com/lex/latest/dg/API_runtime_PostText.html) 回應中傳回替代意圖時`AMAZON.KendraSearchIntent`，決定 Amazon Lex 插入 `AMAZON.FallbackIntent`、 或兩者位置的分數。如果所有意圖的可信度分數都低於此值，`AMAZON.FallbackIntent`則會插入 。只有在為機器人設定時，`AMAZON.KendraSearchIntent`才會插入 。  
類型：Double  
有效範圍：最小值為 0。最大值為 1。

 ** [status](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-status"></a>
機器人的狀態。  
當狀態為 `BUILDING` Amazon Lex 時，正在建置機器人以供測試和使用。  
如果機器人的狀態為 `READY_BASIC_TESTING`，您可以使用機器人意圖中指定的確切表達用語來測試機器人。當機器人準備好進行完整測試或執行時，狀態為 `READY`。  
如果建置機器人發生問題，狀態為 ， `FAILED` 欄位會`failureReason`說明機器人未建置的原因。  
如果機器人已儲存但未建置，則狀態為 `NOT_BUILT`。  
類型：字串  
有效值:`BUILDING | READY | READY_BASIC_TESTING | FAILED | NOT_BUILT` 

 ** [version](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-version"></a>
機器人的版本。對於新的機器人，版本一律為 `$LATEST`。  
類型：字串  
長度限制：長度下限為 1。長度上限為 64。  
模式：`\$LATEST|[0-9]+`

 ** [voiceId](#API_GetBot_ResponseSyntax) **   <a name="lex-GetBot-response-voiceId"></a>
Amazon Lex 用來與使用者進行語音互動的 Amazon Polly 語音 ID。如需詳細資訊，請參閱[PutBot](API_PutBot.md)。  
類型：字串

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

 ** BadRequestException **   
請求格式不正確。例如，值無效或缺少必要欄位。請檢查欄位值，然後再試一次。  
HTTP 狀態碼：400

 ** InternalFailureException **   
發生內部 Amazon Lex 錯誤。請再次嘗試您的請求。  
HTTP 狀態碼：500

 ** LimitExceededException **   
請求超過限制。請再次嘗試您的請求。  
HTTP 狀態碼：429

 ** NotFoundException **   
找不到請求中指定的資源。請檢查資源，然後再試一次。  
HTTP 狀態碼：404

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

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