

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# Lex V2에서 봇 가져오기 및 내보내기
<a name="importing-exporting"></a>

봇 정의, 봇 로캘 또는 사용자 지정 어휘를 내보낸 다음 다시 가져와서 새 리소스를 생성하거나 AWS 계정의 기존 리소스를 덮어쓸 수 있습니다. 예를 들어 테스트 계정에서 봇을 내보낸 다음 프로덕션 계정에서 봇 사본을 만들 수 있습니다. 한 AWS 리전에서 다른 리전으로 봇을 복사할 수도 있습니다.

내보낸 리소스를 가져오기 전에 해당 리소스의 리소스를 변경할 수 있습니다. 예를 들어 봇을 내보낸 다음 슬롯의 JSON 파일을 편집하여 특정 슬롯에서 슬롯 값 유도 발화를 추가하거나 제거할 수 있습니다. 정의 편집을 마친 후 수정된 파일을 가져올 수 있습니다.

**Topics**
+ [

# Lex V2에서 봇 내보내기
](export.md)
+ [

# Lex V2에서 봇 가져오기
](import.md)
+ [

# 가져오거나 내보낼 때 암호 사용
](import-export-password.md)
+ [

# Lex V2에서 봇을 가져오고 내보내는 JSON 형식
](import-export-format.md)

# Lex V2에서 봇 내보내기
<a name="export"></a>

콘솔이나 `CreatExport` 작업을 사용하여 봇, 봇 로캘 또는 사용자 지정 어휘를 내보냅니다. 내보낼 리소스를 지정하고 내보내기를 시작할 때 .zip 파일을 보호하는 데 도움이 되는 선택적 암호를 제공할 수 있습니다. .zip 파일을 다운로드한 후에는 암호를 사용하여 파일에 액세스해야 사용할 수 있습니다. 자세한 내용은 [가져오거나 내보낼 때 암호 사용](import-export-password.md) 단원을 참조하세요.

내보내기는 비동기식 작업입니다. 내보내기를 시작한 후에는 콘솔 또는 `DescribeExport` 작업을 사용하여 내보내기 진행 상황을 모니터링할 수 있습니다. 내보내기가 완료되면 콘솔 또는 `DescribeExport` 작업에 `COMPLETED` 상태가 표시되고 콘솔이 내보내기 .zip 파일을 브라우저에 다운로드합니다. `DescribeExport` 작업을 사용하는 경우 Amazon Lex V2는 내보내기 결과를 다운로드할 수 있는 미리 서명된 Amazon S3 URL을 제공합니다. 다운로드 URL은 5분 동안만 사용할 수 있지만 `DescribeExport` 작업을 다시 호출하여 새 URL을 가져올 수 있습니다.

콘솔 또는 `ListExports` 작업을 통해 리소스의 내보내기 기록을 볼 수 있습니다. 결과에는 내보내기가 현재 상태와 함께 표시됩니다. 기록에서 7일 동안 내보내기가 가능합니다.

봇 또는 봇 로캘 `Draft` 버전을 내보내는 경우 내보내기가 진행되는 동안 봇 또는 봇 로캘의 `Draft` 버전이 변경될 수 있기 때문에 JSON 파일의 정의가 일치하지 않는 상태가 될 수 있습니다. 내보내는 동안 `Draft` 버전이 변경되면 변경 내용이 내보내기 파일에 포함되지 않을 수 있습니다.

봇 로캘을 내보내는 경우 Amazon Lex는 로캘, 사용자 지정 어휘, 의도, 슬롯 유형, 슬롯 등 로캘을 정의하는 모든 정보를 내보냅니다.

봇을 내보내는 경우 Amazon Lex는 의도, 슬롯 유형, 슬롯을 포함하여 봇에 대해 정의된 모든 로캘을 내보냅니다. 다음 항목은 봇과 함께 내보낼 수 없습니다.
+ 봇 별칭
+ 봇과 관련된 역할 ARN
+ 봇 및 봇 별칭과 관련된 태그
+ 봇 별칭과 연결된 Lambda 코드 후크

봇을 가져올 때 역할 ARN과 태그가 요청 파라미터로 입력됩니다. 필요한 경우, 가져오기 후에 봇 별칭을 생성하고 Lambda 코드 후크를 할당해야 합니다.

콘솔 또는 `DeleteExport` 작업을 사용하여 내보내기 및 관련 .zip 파일을 제거할 수 있습니다.

콘솔을 사용하여 봇을 내보내는 예는 [Lex V2 봇 내보내기(콘솔)](export-console.md)을 참조하세요.

## Lex V2에서 봇을 내보내는 데 필요한 IAM 권한
<a name="export-permissions"></a>

봇, 봇 로캘, 사용자 지정 어휘를 내보내려면 내보내기를 실행하는 사용자에게 다음과 같은 IAM 권한이 있어야 합니다.


| API |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html) | Resource | 
| --- | --- | --- | 
| [CreateExport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateExport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html) | 봇 | 
| [UpdateExport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_UpdateExport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html) | 봇 | 
| [DescribeExport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_DescribeExport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html) | 봇 | 
| 사용자 지정 어휘를 위한 [DescribeExport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_DescribeExport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html)  | bot | 
| [DeleteExport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_DeleteExport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html) | 봇 | 
| [ListExports](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_ListExports.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/export.html) | \$1 | 

IAM 정책 예제는 [사용자가 봇과 봇 로캘을 내보낼 수 있도록 허용](security_iam_id-based-policy-examples.md#security_iam_id-based-policy-examples-export) 단원을 참조하세요.

# Lex V2 봇 내보내기(콘솔)
<a name="export-console"></a>

봇 목록, 버전 목록 또는 버전 세부 정보 페이지에서 봇을 내보낼 수 있습니다. 버전을 선택하면 Amazon Lex V2가 해당 버전을 내보냅니다. 다음 지침에서는 봇 목록에서 봇 내보내기를 시작한다고 가정하지만 한 버전으로 시작할 때도 단계는 동일합니다.

**콘솔을 사용하여 봇을 내보내려면**

1. AWS Management Console에 로그인하고 [https://console.aws.amazon.com/lexv2/home](https://console.aws.amazon.com/lexv2/home) Amazon Lex V2 콘솔을 엽니다.

1. 봇 목록에서 내보낼 봇을 선택합니다.

1. **작업**에서 **내보내기**를 선택합니다.

1. 봇 버전, 플랫폼, 내보내기 형식을 선택합니다.

1. (선택 사항) .zip 파일의 암호를 입력합니다. 암호를 제공하면 출력 아카이브를 보호하는 데 도움이 됩니다.

1. **내보내기**를 선택합니다.

내보내기를 시작하면 봇 목록으로 돌아갑니다. 내보내기 진행 상황을 모니터링하려면 **가져오기 및 내보내기 기록** 목록을 사용하세요. 내보내기 상태가 **완료**일 때 콘솔은 .zip 파일을 컴퓨터에 자동으로 다운로드합니다.

내보내기를 다시 다운로드하려면 가져오기 및 내보내기 목록에서 내보내기를 선택한 다음 **다운로드**를 선택합니다. 다운로드한 .zip 파일에 대한 암호를 입력할 수 있습니다.

**봇 언어를 내보내려면**

1. AWS Management Console에 로그인하고 [https://console.aws.amazon.com/lexv2/home](https://console.aws.amazon.com/lexv2/home) Amazon Lex V2 콘솔을 엽니다.

1. 봇 목록에서 내보내려는 언어의 봇을 선택합니다.

1. **언어 추가**에서 **언어 보기**를 선택합니다.

1. **모든 언어** 목록에서 내보낼 언어를 선택합니다.

1. **작업**에서 **내보내기**를 선택합니다.

1. 봇 버전, 플랫폼, 형식을 선택합니다.

1. (선택 사항) .zip 파일의 암호를 입력합니다. 암호를 제공하면 출력 아카이브를 보호하는 데 도움이 됩니다.

1. **내보내기**를 선택합니다.

내보내기를 시작한 후, 언어 목록으로 돌아갑니다. 내보내기 진행 상황을 모니터링하려면 **가져오기 및 내보내기 기록** 목록을 사용하세요. 내보내기 상태가 **완료**일 때 콘솔은 .zip 파일을 컴퓨터에 자동으로 다운로드합니다.

내보내기를 다시 다운로드하려면 가져오기 및 내보내기 목록에서 내보내기를 선택한 다음 **다운로드**를 선택합니다. 다운로드한 .zip 파일에 대한 암호를 입력할 수 있습니다.

# Lex V2에서 봇 가져오기
<a name="import"></a>

콘솔을 사용하여 이전에 내보낸 봇, 봇 로캘 또는 사용자 지정 어휘를 가져오려면 로컬 컴퓨터의 파일 위치와 파일 잠금을 해제하는 데 필요한 선택적 암호를 입력합니다. 예제는 [Lex V2 봇 가져오기(콘솔)](import-console.md) 섹션을 참조하세요.

API를 사용하는 경우 리소스 가져오기는 3단계 프로세스로 이루어집니다.

1. `CreateUploadUrl` 작업을 사용하여 업로드 URL을 생성합니다. 콘솔을 사용할 때는 업로드 URL을 생성할 필요가 없습니다.

1. 리소스 정의가 포함된 .zip 파일을 업로드합니다.

1. `StartImport` 작업과 함께 가져오기를 시작합니다.

업로드 URL은 쓰기 권한이 있는 미리 서명된 Amazon S3 URL입니다. URL은 생성된 후 5분 동안 사용할 수 있습니다. .zip 파일을 암호로 보호하는 경우 가져오기를 시작할 때 암호를 입력해야 합니다. 자세한 내용은 [가져오거나 내보낼 때 암호 사용](import-export-password.md) 단원을 참조하세요.

가져오기는 비동기식 프로세스입니다. 콘솔 또는 `DescribeImport` 작업을 사용하여 가져오기 진행률을 모니터링할 수 있습니다.

봇 또는 봇 로캘을 가져올 때 가져오기 파일의 리소스 이름과 Amazon Lex V2의 기존 리소스 이름 간에 충돌이 발생할 수 있습니다. Amazon Lex V2는 다음과 같은 세 가지 방법으로 충돌을 처리할 수 있습니다.
+ **충돌 시 실패** – 가져오기가 중지되고 가져오기 .zip 파일에서 리소스를 가져오지 않습니다.
+ **덮어쓰기** – Amazon Lex V2는 .가져오기 .zip 파일에서 모든 리소스를 가져오고 기존 리소스를 가져오기 파일의 정의로 바꿉니다.
+ **추가** – Amazon Lex V2는 가져오기 .zip 파일에서 모든 리소스를 가져와서 가져오기 파일의 정의를 사용하여 기존 리소스에 추가합니다. 이 기능은 봇 로캘에만 사용 가능합니다.

콘솔 또는 `ListImports` 작업을 사용하여 리소스에 대한 가져오기 목록을 볼 수 있습니다. 가져오기는 7일 동안 목록에 남아 있습니다. 콘솔 또는 `DescribeImport` 작업을 사용하여 특정 가져오기에 대한 세부 정보를 볼 수 있습니다.

콘솔 또는 `DeleteImport` 작업을 사용하여 가져오기 및 관련 .zip 파일을 제거할 수도 있습니다.

콘솔을 사용하여 봇을 가져오는 예는 [Lex V2 봇 가져오기(콘솔)](import-console.md)을 참조하세요.

## 가져오는 데 필요한 IAM 권한
<a name="import-permissions"></a>

봇, 봇 로캘, 사용자 지정 어휘를 가져오려면 가져오기를 실행하는 사용자에게 다음과 같은 IAM 권한이 있어야 합니다.


| API | 필수 IAM 작업 | Resource | 
| --- | --- | --- | 
| [CreateUploadUrl](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateUploadUrl.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html) | \$1 | 
| 봇 및 봇 로캘에 대한 [StartImport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_StartImport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html) | 
| 사용자 지정 어휘를 위한 [StartImport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_StartImport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html)  | bot | 
| [DescribeImport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_DescribeImport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html) | 봇 | 
| [DeleteImport](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_DeleteImport.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html) | 봇 | 
| [ListImports](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_ListImports.html) | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/lexv2/latest/dg/import.html) | \$1 | 

IAM 정책 예제는 [사용자가 봇과 봇 로캘을 가져오도록 허용](security_iam_id-based-policy-examples.md#security_iam_id-based-policy-examples-import) 단원을 참조하세요.

# Lex V2 봇 가져오기(콘솔)
<a name="import-console"></a>

**콘솔을 사용하여 봇을 가져오려면**

1. AWS Management Console에 로그인하고 [https://console.aws.amazon.com/lexv2/home](https://console.aws.amazon.com/lexv2/home) Amazon Lex V2 콘솔을 엽니다.

1. **작업**에서 **가져오기**를 선택합니다.

1. **입력 파일**에서 봇의 이름을 지정한 다음 봇을 정의하는 JSON 파일이 들어 있는 .zip 파일을 선택합니다.

1. .zip 파일이 암호로 보호된 경우에는 .zip 파일의 암호를 입력합니다. 아카이브를 암호로 보호하는 것은 선택 사항이지만 콘텐츠를 보호하는 데 도움이 됩니다.

1. 봇에 대한 권한을 정의하는 IAM 역할을 생성하거나 입력합니다.

1. 봇이 COPPA(Children's Online Privacy Protection Act, 어린이 온라인 사생활 보호법)의 적용을 받는지 여부를 표시합니다.

1. 봇에 대한 유휴 시간 제한 설정을 입력합니다. 값을 입력하지 않으면 zip 파일의 값이 사용됩니다. .zip 파일에 시간 제한 설정이 포함되어 있지 않은 경우 Amazon Lex V2는 기본값인 300초(5분)를 사용합니다.

1. (선택 사항) 봇에 대한 태그를 추가합니다.

1. 이름이 같은 기존 봇을 덮어쓰는 것에 대해 경고할지 여부를 선택합니다. 경고를 활성화한 경우 가져오는 봇이 기존 봇을 덮어쓰는 경우 경고 메시지가 표시되고 봇은 가져오지 않습니다. 경고를 비활성화하면 가져온 봇이 기존 봇을 같은 이름으로 대체합니다.

1. **가져오기**를 선택합니다.

가져오기를 시작하면 봇 목록으로 돌아갑니다. 가져오기 진행 상황을 모니터링하려면 **가져오기 및 내보내기 기록** 목록을 사용하세요. 가져오기 상태가 **완료**이면 봇 목록에서 봇을 선택하여 봇을 수정하거나 빌드할 수 있습니다.

**봇 언어를 가져오려면**

1. AWS Management Console에 로그인하고 [https://console.aws.amazon.com/lexv2/home](https://console.aws.amazon.com/lexv2/home) Amazon Lex V2 콘솔을 엽니다.

1. 봇 목록에서 언어를 가져올 봇을 선택합니다.

1. **언어 추가**에서 **언어 보기**를 선택합니다.

1. **작업**에서 **가져오기**를 선택합니다.

1. **입력 파일**에서 가져올 언어가 포함된 파일을 선택합니다. .zip 파일을 보호한 경우 암호에 **암호**를 입력합니다.

1. **언어**에서 가져올 언어를 선택합니다. 언어가 가져오기 파일의 언어와 일치하지 않아도 됩니다. 한 언어에서 다른 언어로 의도를 복사할 수 있습니다.

1. **음성**에서 음성 상호 작용에 사용할 Amazon Polly 음성을 선택하거나 텍스트 전용 봇의 경우 **없음**을 선택합니다.

1. **신뢰도 점수 임곗값**에 Amazon Lex V2가 대체 의도를 반환할 때 `AMAZON.FallbackIntent`를 삽입하거나 `AMAZON.KendraSearchIntent`를 삽입하거나 둘 다 삽입하는 임곗값을 입력합니다.

1. 기존 언어를 덮어쓰는 것에 대해 경고할지 여부를 선택합니다. 경고를 활성화한 경우 가져오는 언어가 기존 언어를 덮어쓰는 경우 경고 메시지가 표시되고 해당 언어는 가져오지 않습니다. 경고를 비활성화하면 가져온 언어가 기존 언어를 대체합니다.

1. **가져오기**를 선택하여 가져오기를 시작합니다.

가져오기를 시작하면 언어 목록으로 돌아갑니다. 가져오기 진행 상황을 모니터링하려면 **가져오기 및 내보내기 기록** 목록을 사용하세요. 가져오기 상태가 **완료**이면 봇 목록에서 언어를 선택하여 봇을 수정하거나 빌드할 수 있습니다.

# 가져오거나 내보낼 때 암호 사용
<a name="import-export-password"></a>

Amazon Lex V2는 표준 .zip 파일 압축을 사용하여 내보내기 아카이브를 암호로 보호하거나 보호된 가져오기 아카이브를 읽을 수 있습니다. 가져오기 및 내보내기 아카이브는 항상 암호로 보호해야 합니다.

Amazon Lex V2는 내보내기 아카이브를 S3 버킷으로 전송하며, 미리 서명된 S3 URL을 통해 사용할 수 있습니다. URL은 5분 동안만 사용할 수 있습니다. 아카이브는 다운로드 URL에 액세스할 수 있는 모든 사람이 사용할 수 있습니다. 아카이브의 데이터를 보호하려면 리소스를 내보낼 때 암호를 입력하세요. URL 만료 후 아카이브를 가져와야 하는 경우 콘솔 또는 `DescribeExport` 작업을 사용하여 새 URL을 가져올 수 있습니다.

내보내기 아카이브의 암호를 분실한 경우 가져오기 및 내보내기 기록 테이블에서 **다운로드**를 선택하거나 `UpdateExport` 작업을 사용하여 기존 파일에 대한 새 암호를 만들 수 있습니다. 내보내기 기록 테이블에서 **다운로드**를 선택하고 암호를 제공하지 않는 경우 Amazon Lex V2는 보호되지 않은 zip 파일을 다운로드합니다.

# Lex V2에서 봇을 가져오고 내보내는 JSON 형식
<a name="import-export-format"></a>

리소스의 일부를 설명하는 JSON 구조가 포함된 .zip 파일을 사용하여 Amazon Lex V2에서 봇, 봇 로캘 또는 사용자 지정 어휘를 가져오고 내보냅니다. 리소스를 내보내면 Amazon Lex V2에서 .zip 파일을 생성하고 Amazon S3의 사전 서명된 URL을 사용하여 사용할 수 있도록 합니다. 리소스를 가져올 때는 JSON 구조가 포함된 .zip 파일을 생성하여 S3의 사전 서명된 URL에 업로드해야 합니다.

Amazon Lex는 봇을 내보낼 때 .zip 파일에 다음과 같은 디렉터리 구조를 생성합니다. 봇 로캘을 내보내는 경우 해당 로캘 아래의 구조만 내보냅니다. 사용자 지정 어휘를 내보내는 경우 사용자 지정 어휘 아래의 구조만 내보내집니다.

```
BotName_BotVersion_ExportID_LexJson.zip
            -or-
BotName_BotVersion_LocaleId_ExportId_LEX_JSON.zip
        --> manifest.json
        --> BotName
        ----> Bot.json
        ----> BotLocales
        ------> Locale_A
        --------> BotLocale.json
        --------> Intents
        ----------> Intent_A
        ------------> Intent.json
        ------------> Slots
        --------------> Slot_A
        ----------------> Slot.json
        --------------> Slot_B
        ----------------> Slot.json
        ----------> Intent_B
                       ...
        --------> SlotTypes
        ----------> SlotType_A
        ------------> SlotType.json
        ----------> SlotType_B
                        ...
        --------> CustomVocabulary
        ------------> CustomVocabulary.json

        ------> Locale_B
                        ...
```

## 매니페스트 파일 구조
<a name="json-manifest"></a>

매니페스트 파일에는 내보내기 파일의 메타데이터가 들어 있습니다.

```
{
    "metadata": {
        "schemaVersion": "1.0",
        "fileFormat": "LexJson",
        "resourceType": "Bot | BotLocale | CustomVocabulary"
    }
}
```

## 못 파일 구조
<a name="json-bot"></a>

봇 파일에는 봇에 대한 구성 정보가 포함되어 있습니다.

```
{
    "name": "BotName",
    "identifier": "identifier",
    "version": "number",
    "description": "description",
    "dataPrivacy": {
        "childDirected": true | false
    },
    "idleSessionTTLInSeconds": seconds
}
```

## 봇 로캘 파일 구조
<a name="json-bot-locale"></a>

봇 로캘 파일에는 봇의 로캘 또는 언어에 대한 설명이 들어 있습니다. 봇을 내보내는 경우 .zip 파일에 둘 이상의 봇 로캘 파일이 있을 수 있습니다. 봇 로캘을 내보내는 경우 zip 파일에는 로캘이 하나뿐입니다.

```
{
    "name": "locale name",
    "identifier": "locale ID",
    "version": "number",
    "description": "description",
    "voiceSettings": {
        "voiceId": "voice",
        "engine": "standard | neural
    },
    "nluConfidenceThreshold": number
}
```

## 의도 파일 구조
<a name="json-intent"></a>

의도 파일에는 의도의 구성 정보가 들어 있습니다. .zip 파일에는 특정 로캘의 각 의도에 대한 의도 파일이 하나씩 있습니다.

다음은 샘플 BookTrip 봇의 BookCar 의도에 대한 JSON 구조의 예시입니다. 의도의 JSON 구조 전체 예시는 [CreateIntent](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateIntent.html) 작업을 참조하세요.

```
{
    "name": "BookCar",
    "identifier": "891RWHHICO",
    "description": "Intent to book a car.",
    "parentIntentSignature": null,
    "sampleUtterances": [
        {
            "utterance": "Book a car"
        },
        {
            "utterance": "Reserve a car"
        },
        {
            "utterance": "Make a car reservation"
        }
    ],
    "intentConfirmationSetting": {
        "confirmationPrompt": {
            "messageGroupList": [
                {
                    "message": {
                        "plainTextMessage": {
                            "value": "OK, I have you down for a {CarType} hire in {PickUpCity} from {PickUpDate} to {ReturnDate}.  Should I book the reservation?"
                        },
                        "ssmlMessage": null,
                        "customPayload": null,
                        "imageResponseCard": null
                    },
                    "variations": null
                }
            ],
            "maxRetries": 2
        },
        "declinationResponse": {
            "messageGroupList": [
                {
                    "message": {
                        "plainTextMessage": {
                            "value": "OK, I have cancelled your reservation in progress."
                        },
                        "ssmlMessage": null,
                        "customPayload": null,
                        "imageResponseCard": null
                    },
                    "variations": null
                }
            ]
        }
    },
    "intentClosingSetting": null,
    "inputContexts": null,
    "outputContexts": null,
    "kendraConfiguration": null,
    "dialogCodeHook": null,
    "fulfillmentCodeHook": null,
    "slotPriorities": [
        {
            "slotName": "DriverAge",
            "priority": 4
        },
        {
            "slotName": "PickUpDate",
            "priority": 2
        },
        {
            "slotName": "ReturnDate",
            "priority": 3
        },
        {
            "slotName": "PickUpCity",
            "priority": 1
        },
        {
            "slotName": "CarType",
            "priority": 5
        }
    ]
}
```

## 슬롯 파일 구조
<a name="json-slot"></a>

슬롯 파일에는 의도의 슬롯에 대한 구성 정보가 들어 있습니다. .zip 파일에는 특정 로캘의 의도에 대해 정의된 각 슬롯에 대한 슬롯 파일이 하나씩 있습니다.

다음은 고객이 BookTrip 예시 봇의 BookCar 의도에서 대여하려는 자동차 유형을 선택할 수 있는 슬롯의 JSON 구조입니다. 슬롯의 JSON 구조의 전체 예는 [CreateSlot](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateSlot.html) 작업을 참조하세요.

```
{
    "name": "CarType",
    "identifier": "KDHJWNGZGC",
    "description": "Type of car being reserved.",
    "multipleValuesSetting": {
        "allowMutlipleValues": false
    },
    "slotTypeName": "CarTypeValues",
    "obfuscationSetting": null,
    "slotConstraint": "Required",
    "defaultValueSpec": null,
    "slotValueElicitationSetting": {
        "promptSpecification": {
            "messageGroupList": [
                {
                    "message": {
                        "plainTextMessage": {
                            "value": "What type of car would you like to rent?  Our most popular options are economy, midsize, and luxury"
                        },
                        "ssmlMessage": null,
                        "customPayload": null,
                        "imageResponseCard": null
                    },
                    "variations": null
                }
            ],
            "maxRetries": 2
        },
        "sampleValueElicitingUtterances": null,
        "waitAndContinueSpecification": null,
    }
}
```

다음 예는 복합 슬롯의 JSON 구조를 보여줍니다.

```
{
  "name": "CarType",
  "identifier": "KDHJWNGZGC",
  "description": "Type of car being reserved.",
  "multipleValuesSetting": {
      "allowMutlipleValues": false
  },
  "slotTypeName": "CarTypeValues",
  "obfuscationSetting": null,
  "slotConstraint": "Required",
  "defaultValueSpec": null,
  "slotValueElicitationSetting": {
      "promptSpecification": {
          "messageGroupList": [
              {
                  "message": {
                      "plainTextMessage": {
                          "value": "What type of car would you like to rent?  Our most popular options are economy, midsize, and luxury"
                      },
                      "ssmlMessage": null,
                      "customPayload": null,
                      "imageResponseCard": null
                  },
                  "variations": null
              }
          ],
          "maxRetries": 2
      },
      "sampleValueElicitingUtterances": null,
      "waitAndContinueSpecification": null,
  },
  "subSlotSetting": {
    "slotSpecifications": {
      "firstname": {
        "valueElicitationSetting": {
          "promptSpecification": {
            "allowInterrupt": false,
            "messageGroupsList": [
              {
                "message": {
                  "imageResponseCard": null,
                  "ssmlMessage": null,
                  "customPayload": null,
                  "plainTextMessage": {
                    "value": "please provide firstname"
                  }
                },
                "variations": null
              }
            ],
            "maxRetries": 2,
            "messageSelectionStrategy": "Random"
          },
          "defaultValueSpecification": null,
          "sampleUtterances": [
            {
              "utterance": "my name is {firstName}"
            }
          ],
          "waitAndContinueSpecification": null
        },
        "slotTypeId": "AMAZON.FirstName"
      },
      "eyeColor": {
        "valueElicitationSetting": {
          "promptSpecification": {
            "allowInterrupt": false,
            "messageGroupsList": [
              {
                "message": {
                  "imageResponseCard": null,
                  "ssmlMessage": null,
                  "customPayload": null,
                  "plainTextMessage": {
                    "value": "please provide eye color"
                  }
                },
                "variations": null
              }
            ],
            "maxRetries": 2,
            "messageSelectionStrategy": "Random"
          },
          "defaultValueSpecification": null,
          "sampleUtterances": [
            {
              "utterance": "eye color is {eyeColor}"
            },
            {
              "utterance": "I have eyeColor eyes"
            }
          ],
          "waitAndContinueSpecification": null
        },
        "slotTypeId": "7FEVCB2PQE"
      }
    },
    "expression": "(firstname OR eyeColor)"
  }
}
```

## 슬롯 유형 파일 구조
<a name="json-slot-type"></a>

슬롯 유형 파일에는 언어 또는 로캘에서 사용되는 사용자 지정 슬롯 유형에 대한 구성 정보가 들어 있습니다. .zip 파일에는 특정 로캘의 각 사용자 지정 슬롯 유형에 대해 하나의 슬롯 유형 파일이 있습니다.

다음은 BookTrip 예시 봇에서 사용할 수 있는 자동차 유형을 나열하는 슬롯 유형의 JSON 구조입니다. 슬롯 유형에 대한 JSON 구조의 전체 예는 [CreateSlotType](https://docs.aws.amazon.com/lexv2/latest/APIReference/API_CreateSlotType.html) 작업을 참조하세요.

```
{
    "name": "CarTypeValues",
    "identifier": "T1YUHGD9ZR",
    "description": "Enumeration representing possible types of cars available for hire",
    "slotTypeValues": [{
        "synonyms": null,
        "sampleValue": {
            "value": "economy"
        }
    }, {
        "synonyms": null,
        "sampleValue": {
            "value": "standard"
        }
    }, {
        "synonyms": null,
        "sampleValue": {
            "value": "midsize"
        }
    }, {
        "synonyms": null,
        "sampleValue": {
            "value": "full size"
        }
    }, {
        "synonyms": null,
        "sampleValue": {
            "value": "luxury"
        }
    }, {
        "synonyms": null,
        "sampleValue": {
            "value": "minivan"
        }
    }],
    "parentSlotTypeSignature": null,
    "valueSelectionSetting": {
        "resolutionStrategy": "TOP_RESOLUTION",
        "advancedRecognitionSetting": {
            "audioRecognitionStrategy": "UseSlotValuesAsCustomVocabulary"
        },
        "regexFilter": null
    }
}
```

다음 예시는 복합 슬롯 유형의 JSON 구조를 보여줍니다.

```
{
  "name": "CarCompositeType",
  "identifier": "TPA3CC9V",
  "description": null,
  "slotTypeValues": null,
  "parentSlotTypeSignature": null,
  "valueSelectionSetting": {
    "regexFilter": null,
    "resolutionStrategy": "CONCATENATION"
  },
  "compositeSlotTypeSetting": {
    "subSlots": [
      {
        "name": "model",
        "slotTypeId": "MODELTYPEID" # custom slot type Id for model
      },
      {
        "name": "city",
        "slotTypeId": "AMAZON.City"
      },
      {
        "name": "country",
        "slotTypeId": "AMAZON.Country"
      },
      {
        "name": "make",
        "slotTypeId": "MAKETYPEID" # custom slot type Id for make
      }
    ]
  }
}
```

다음은 사용자 지정 문법을 사용하여 고객의 말을 이해하는 슬롯 유형입니다. 자세한 내용은 [문법 슬롯 유형](building-srgs.md) 단원을 참조하세요.

```
{
  "name": "custom_grammar",
  "identifier": "7KEAQIQKPX",
  "description": "Slot type using a custom grammar",
  "slotTypeValues": null,
  "parentSlotTypeSignature": null,
  "valueSelectionSetting": null,
  "externalSourceSetting": {
    "grammarSlotTypeSetting": {
      "source": {
        "kmsKeyArn": "arn:aws:kms:Region:123456789012:alias/customer-grxml-key",
        "s3BucketName": "grxml-test",
        "s3ObjectKey": "grxml_files/grammar.grxml"
      }
    }
  }
}
```

## 사용자 지정 어휘 파일 구조
<a name="json-custom-vocab"></a>

사용자 지정 어휘 파일에는 단일 언어 또는 로캘에 대한 사용자 지정 어휘의 항목이 포함되어 있습니다. .zip 파일에는 사용자 지정 어휘가 있는 각 로캘에 대한 사용자 지정 어휘 파일이 하나씩 있습니다.

다음은 식당 주문을 받는 봇을 위한 사용자 지정 어휘 파일입니다. 봇에는 로캘당 하나의 파일이 있습니다.

```
{
    "customVocabularyItems": [
        {
            "weight": 3,
            "phrase": "wafers"
        },
        {
            "weight": null,
            "phrase": "extra large"
        },
        {
            "weight": null,
            "phrase": "cremini mushroom soup"
        },
        {
            "weight": null,
            "phrase": "ramen"
        },
        {
            "weight": null,
            "phrase": "orzo"
        }
    ]
}
```