

サポート終了通知: 2025 年 9 月 15 日、 AWS は Amazon Lex V1 のサポートを終了します。 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)を参照してください。

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# GetIntent
<a name="API_GetIntent"></a>

 インテントに関する情報を返します。インテント名に加えて、インテントバージョンを指定する必要があります。

 このオペレーションには `lex:GetIntent` アクションを実行するアクセス許可が必要です。

## リクエストの構文
<a name="API_GetIntent_RequestSyntax"></a>

```
GET /intents/name/versions/version HTTP/1.1
```

## URI リクエストパラメータ
<a name="API_GetIntent_RequestParameters"></a>

リクエストでは、次の URI パラメータを使用します。

 ** [name](#API_GetIntent_RequestSyntax) **   <a name="lex-GetIntent-request-uri-name"></a>
インテントの名前。名前は、大文字と小文字が区別されます。  
長さの制限：最小長 1、最大長は 100 です。  
パターン: `^([A-Za-z]_?)+$`   
必須: はい

 ** [version](#API_GetIntent_RequestSyntax) **   <a name="lex-GetIntent-request-uri-version"></a>
インテントのバージョン。  
長さの制限：最小長 1、最大長 64  
パターン: `\$LATEST|[0-9]+`   
必須: はい

## リクエストボディ
<a name="API_GetIntent_RequestBody"></a>

リクエストにリクエスト本文がありません。

## レスポンスの構文
<a name="API_GetIntent_ResponseSyntax"></a>

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

{
   "checksum": "string",
   "conclusionStatement": { 
      "messages": [ 
         { 
            "content": "string",
            "contentType": "string",
            "groupNumber": number
         }
      ],
      "responseCard": "string"
   },
   "confirmationPrompt": { 
      "maxAttempts": number,
      "messages": [ 
         { 
            "content": "string",
            "contentType": "string",
            "groupNumber": number
         }
      ],
      "responseCard": "string"
   },
   "createdDate": number,
   "description": "string",
   "dialogCodeHook": { 
      "messageVersion": "string",
      "uri": "string"
   },
   "followUpPrompt": { 
      "prompt": { 
         "maxAttempts": number,
         "messages": [ 
            { 
               "content": "string",
               "contentType": "string",
               "groupNumber": number
            }
         ],
         "responseCard": "string"
      },
      "rejectionStatement": { 
         "messages": [ 
            { 
               "content": "string",
               "contentType": "string",
               "groupNumber": number
            }
         ],
         "responseCard": "string"
      }
   },
   "fulfillmentActivity": { 
      "codeHook": { 
         "messageVersion": "string",
         "uri": "string"
      },
      "type": "string"
   },
   "inputContexts": [ 
      { 
         "name": "string"
      }
   ],
   "kendraConfiguration": { 
      "kendraIndex": "string",
      "queryFilterString": "string",
      "role": "string"
   },
   "lastUpdatedDate": number,
   "name": "string",
   "outputContexts": [ 
      { 
         "name": "string",
         "timeToLiveInSeconds": number,
         "turnsToLive": number
      }
   ],
   "parentIntentSignature": "string",
   "rejectionStatement": { 
      "messages": [ 
         { 
            "content": "string",
            "contentType": "string",
            "groupNumber": number
         }
      ],
      "responseCard": "string"
   },
   "sampleUtterances": [ "string" ],
   "slots": [ 
      { 
         "defaultValueSpec": { 
            "defaultValueList": [ 
               { 
                  "defaultValue": "string"
               }
            ]
         },
         "description": "string",
         "name": "string",
         "obfuscationSetting": "string",
         "priority": number,
         "responseCard": "string",
         "sampleUtterances": [ "string" ],
         "slotConstraint": "string",
         "slotType": "string",
         "slotTypeVersion": "string",
         "valueElicitationPrompt": { 
            "maxAttempts": number,
            "messages": [ 
               { 
                  "content": "string",
                  "contentType": "string",
                  "groupNumber": number
               }
            ],
            "responseCard": "string"
         }
      }
   ],
   "version": "string"
}
```

## レスポンス要素
<a name="API_GetIntent_ResponseElements"></a>

アクションが成功すると、サービスは HTTP 200 レスポンスを返します。

サービスから以下のデータが JSON 形式で返されます。

 ** [checksum](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-checksum"></a>
インテントのチェックサム。  
タイプ: 文字列

 ** [conclusionStatement](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-conclusionStatement"></a>
`fulfillmentActivity` 要素で指定された Lambda 関数がインテントを達成すると、Amazon Lex はこのステートメントをユーザーに伝えます。  
型: [Statement](API_Statement.md) オブジェクト

 ** [confirmationPrompt](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-confirmationPrompt"></a>
これがボットに定義されている場合、Amazon Lex がユーザーのインテントを達成する前の確認に使用するプロンプトです。詳細については、「[PutIntent](API_PutIntent.md)」を参照してください。  
型: [Prompt](API_Prompt.md) オブジェクト

 ** [createdDate](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-createdDate"></a>
インテントが作成された日付。  
型: タイムスタンプ

 ** [description](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-description"></a>
インテントの説明。  
タイプ: 文字列  
長さの制約: 最小長は 0 です。最大長は 200 です。

 ** [dialogCodeHook](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-dialogCodeHook"></a>
これがボットに定義されている場合、Amazon Lex は各ユーザー入力に対してこの Lambda 関数を呼び出します。詳細については、「[PutIntent](API_PutIntent.md)」を参照してください。  
型: [CodeHook](API_CodeHook.md) オブジェクト

 ** [followUpPrompt](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-followUpPrompt"></a>
これが定義されている場合、Amazon Lex はこのプロンプトを使用して、インテントが達成された後に追加のユーザーアクティビティを要求します。詳細については、「[PutIntent](API_PutIntent.md)」を参照してください。  
型: [FollowUpPrompt](API_FollowUpPrompt.md) オブジェクト

 ** [fulfillmentActivity](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-fulfillmentActivity"></a>
インテントがどのように達成されるのかを説明します。詳細については、「[PutIntent](API_PutIntent.md)」を参照してください。  
型: [FulfillmentActivity](API_FulfillmentActivity.md) オブジェクト

 ** [inputContexts](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-inputContexts"></a>
Amazon Lex がユーザーとの会話の中でインテントを選択するためのアクティブなコンテキストをリストアップした `InputContext` オブジェクトの配列です。  
型: [InputContext](API_InputContext.md) オブジェクトの配列  
配列メンバー: 最小数は 0 項目です。最大数は 5 項目です。

 ** [kendraConfiguration](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-kendraConfiguration"></a>
`AMAZON.KendraSearchIntent` インテントで Amazon Kendra インデックスに接続するための設定情報 (項目がある場合)。  
型: [KendraConfiguration](API_KendraConfiguration.md) オブジェクト

 ** [lastUpdatedDate](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-lastUpdatedDate"></a>
インテントが更新された日付。リソースを作成する場合、作成日と最終更新日は同じ日付になります。  
型: タイムスタンプ

 ** [name](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-name"></a>
インテントの名前。  
タイプ: 文字列  
長さの制約: 最小長は 1 です。最大長は 100 です。  
パターン: `^([A-Za-z]_?)+$` 

 ** [outputContexts](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-outputContexts"></a>
`OutputContext` オブジェクトの配列で、インテントが達成されたときにアクティブになるコンテキストを列挙します。  
型: [OutputContext](API_OutputContext.md) オブジェクトの配列  
の配列メンバー: 最小数は 0 項目です。最大数は 10 項目です。

 ** [parentIntentSignature](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-parentIntentSignature"></a>
組み込みインテントの一意の識別子。  
タイプ: 文字列

 ** [rejectionStatement](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-rejectionStatement"></a>
ユーザーが `confirmationPrompt` で定義された質問に「いいえ」と答えた場合、Amazon Lex はインテントがキャンセルされたことを確認するためにこのステートメントを返します。  
型: [Statement](API_Statement.md) オブジェクト

 ** [sampleUtterances](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-sampleUtterances"></a>
インテント用に構成されたサンプル発話の配列。  
型: 文字列の配列  
配列メンバー: 最小数は 0 項目です。最大数は 1500 項目です。  
長さの制限：最小長 1、最大長は 200 です。

 ** [slots](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-slots"></a>
インテント用に設定されたインテントスロットの配列。  
型: [Slot](API_Slot.md) オブジェクトの配列  
配列メンバー: 最小数は 0 項目です。最大数は 100 項目です。

 ** [version](#API_GetIntent_ResponseSyntax) **   <a name="lex-GetIntent-response-version"></a>
インテントのバージョン。  
タイプ: 文字列  
長さの制約: 最小長は 1 です。最大長 64  
パターン: `\$LATEST|[0-9]+` 

## エラー
<a name="API_GetIntent_Errors"></a>

 ** BadRequestException **   
リクエストが適切にフォーマットされていません。例えば、値が無効であったり、必須項目が設定されていない場合です。フィールドの値を確認して、再度お試しください。  
HTTP ステータスコード: 400

 ** InternalFailureException **   
Amazon Lex 内部エラーが発生しました。リクエストを再試行してください。  
HTTP ステータスコード: 500

 ** LimitExceededException **   
リクエストが制限を超えました。リクエストを再試行してください。  
HTTP ステータスコード: 429

 ** NotFoundException **   
リクエストで指定されたリソースは見つかりませんでした。リソースを確認して、もう一度お試しください。  
HTTP ステータスコード: 404

## 以下の資料も参照してください。
<a name="API_GetIntent_SeeAlso"></a>

言語固有の AWS SDKs のいずれかでこの API を使用する方法の詳細については、以下を参照してください。
+  [AWS コマンドラインインターフェイス V2](https://docs.aws.amazon.com/goto/cli2/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/lex-models-2017-04-19/GetIntent) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/lex-models-2017-04-19/GetIntent) 