

支援終止通知：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)。

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

# GetImport
<a name="API_GetImport"></a>

取得從 `StartImport`操作開始之匯入任務的相關資訊。

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

```
GET /imports/importId HTTP/1.1
```

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

請求會使用下列 URI 參數。

 ** [importId](#API_GetImport_RequestSyntax) **   <a name="lex-GetImport-request-uri-importId"></a>
要傳回之匯入任務資訊的識別符。  
必要：是

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

請求沒有請求主體。

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

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

{
   "createdDate": number,
   "failureReason": [ "string" ],
   "importId": "string",
   "importStatus": "string",
   "mergeStrategy": "string",
   "name": "string",
   "resourceType": "string"
}
```

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

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

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

 ** [createdDate](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-createdDate"></a>
建立匯入任務的日期和時間的時間戳記。  
類型：Timestamp

 ** [failureReason](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-failureReason"></a>
描述匯入任務無法完成原因的字串。  
類型：字串陣列

 ** [importId](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-importId"></a>
特定匯入任務的識別符。  
類型：字串

 ** [importStatus](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-importStatus"></a>
匯入任務的狀態。如果狀態為 `FAILED`，您可以從 `failureReason` 欄位取得失敗的原因。  
類型：字串  
有效值:`IN_PROGRESS | COMPLETE | FAILED` 

 ** [mergeStrategy](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-mergeStrategy"></a>
當現有資源與匯入檔案中的資源發生衝突時所採取的動作。  
類型：字串  
有效值:`OVERWRITE_LATEST | FAIL_ON_CONFLICT` 

 ** [name](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-name"></a>
提供給匯入任務的名稱。  
類型：字串  
長度限制：長度下限為 1。長度上限為 100。  
模式：`[a-zA-Z_]+`

 ** [resourceType](#API_GetImport_ResponseSyntax) **   <a name="lex-GetImport-response-resourceType"></a>
匯入的資源類型。  
類型：字串  
有效值:`BOT | INTENT | SLOT_TYPE` 

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

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

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

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

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

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

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