

지원 종료 공지: 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) 참조하세요.

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

# 3단계: 의도 생성(AWS CLI)
<a name="gs-cli-create-order-flowers"></a>

`OrderFlowersBot` 봇에 대한 의도를 생성하고 세 개의 슬롯 또는 파라미터를 제공합니다. 다음 슬롯은 봇이 의도를 이행하도록 합니다.
+ `FlowerType`은 주문 가능한 꽃의 종류를 지정하는 사용자 지정 슬롯 유형입니다.
+ `AMAZON.DATE` 및 `AMAZON.TIME`은 사용자로부터 꽃 배송 날짜 및 시간을 얻는 데 사용되는 기본 제공 슬롯 유형입니다.

이 연습에서 명령을 실행하려면 명령이 실행될 리전을 알아야 합니다. 리전 목록은 [모델 구축 할당량](gl-limits.md#gl-limits-model-building)을 참조하십시오.

**`OrderFlowers` 의도를 생성하려면(AWS CLI)**

1. **OrderFlowers.json**라는 이름의 텍스트 파일을 만듭니다. [OrderFlowers.json](gs-cli-create-order-flowers-json.md)의 JSON 코드를 텍스트 파일에 복사합니다.

1. 에서 [PutIntent](API_PutIntent.md) 작업을 AWS CLI호출하여 의도를 생성합니다. 다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

   ```
   aws lex-models put-intent \
      --region region \
      --name OrderFlowers \
      --cli-input-json file://OrderFlowers.json
   ```

   서버가 다음과 같이 응답합니다.

## 다음 단계
<a name="gs-create-next-4"></a>

[4단계: 봇 생성(AWS CLI)](gs-cli-create-order-flowers-bot.md)

# OrderFlowers.json
<a name="gs-cli-create-order-flowers-json"></a>

다음 코드는 `OrderFlowers` 의도를 생성하는 데 필요한 JSON 데이터입니다.

```
{
    "confirmationPrompt": {
        "maxAttempts": 2,
        "messages": [
            {
                "content": "Okay, your {FlowerType} will be ready for pickup by {PickupTime} on {PickupDate}.  Does this sound okay?",
                "contentType": "PlainText"
            }
        ]
    },
    "name": "OrderFlowers",
    "rejectionStatement": {
        "messages": [
            {
                "content": "Okay, I will not place your order.",
                "contentType": "PlainText"
            }
        ]
    },
    "sampleUtterances": [
        "I would like to pick up flowers",
        "I would like to order some flowers"
    ],
    "slots": [
        {
            "slotType": "FlowerTypes",
            "name": "FlowerType",
            "slotConstraint": "Required",
            "valueElicitationPrompt": {
                "maxAttempts": 2,
                "messages": [
                    {
                        "content": "What type of flowers would you like to order?",
                        "contentType": "PlainText"
                    }
                ]
            },
            "priority": 1,
            "slotTypeVersion": "$LATEST",
            "sampleUtterances": [
                "I would like to order {FlowerType}"
            ],
            "description": "The type of flowers to pick up"
        },
        {
            "slotType": "AMAZON.DATE",
            "name": "PickupDate",
            "slotConstraint": "Required",
            "valueElicitationPrompt": {
                "maxAttempts": 2,
                "messages": [
                    {
                        "content": "What day do you want the {FlowerType} to be picked up?",
                        "contentType": "PlainText"
                    }
                ]
            },
            "priority": 2,
            "description": "The date to pick up the flowers"
        },
        {
            "slotType": "AMAZON.TIME",
            "name": "PickupTime",
            "slotConstraint": "Required",
            "valueElicitationPrompt": {
                "maxAttempts": 2,
                "messages": [
                    {
                        "content": "Pick up the {FlowerType} at what time on {PickupDate}?",
                        "contentType": "PlainText"
                    }
                ]
            },
            "priority": 3,
            "description": "The time to pick up the flowers"
        }
    ],
    "fulfillmentActivity": {
        "type": "ReturnIntent"
    },
    "description": "Intent to order a bouquet of flowers for pick up"
}
```