

# x-amazon-apigateway-integration.requestTemplates オブジェクト
<a name="api-gateway-swagger-extensions-integration-requestTemplates"></a>

 指定された MIME タイプのリクエストペイロード用のマッピングテンプレートを指定します。


| プロパティ名 | タイプ | 説明 | 
| --- | --- | --- | 
| MIME type | string |   MIME タイプの例の 1 つが `application/json` です。マッピングテンプレート作成の詳細については、「[API Gateway での REST API のテンプレート変換のマッピング](models-mappings.md)」を参照してください。  | 

## x-amazon-apigateway-integration.requestTemplates の例
<a name="api-gateway-swagger-extensions-request-template-example"></a>

 次の例では、`application/json` および `application/xml` の MIME タイプのリクエストペイロード用のマッピングテンプレートが設定されています。

```
"requestTemplates" : {
    "application/json" : "#set ($root=$input.path('$')) { \"stage\": \"$root.name\", \"user-id\": \"$root.key\" }",
    "application/xml" : "#set ($root=$input.path('$')) <stage>$root.name</stage> "
}
```

