Skip to content

Commit

Permalink
r/aws_lexv2models_slot_type(doc): add value_selection_setting example…
Browse files Browse the repository at this point in the history
…, tidy
  • Loading branch information
jar-b committed Sep 10, 2024
1 parent 50dc809 commit 76ffa8c
Showing 1 changed file with 38 additions and 18 deletions.
56 changes: 38 additions & 18 deletions website/docs/r/lexv2models_slot_type.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,62 @@ Terraform resource for managing an AWS Lex V2 Models Slot Type.
### Basic Usage

```terraform
resource "aws_iam_role_policy_attachment" "test" {
role = aws_iam_role.test.name
policy_arn = "arn:${data.aws_partition.current.partition}:iam::aws:policy/AmazonLexFullAccess"
}
resource "aws_lexv2models_bot" "test" {
name = "testbot"
resource "aws_lexv2models_bot" "example" {
name = "example"
idle_session_ttl_in_seconds = 60
role_arn = aws_iam_role.test.arn
role_arn = aws_iam_role.example.arn
data_privacy {
child_directed = true
}
}
resource "aws_lexv2models_bot_locale" "test" {
resource "aws_lexv2models_bot_locale" "example" {
locale_id = "en_US"
bot_id = aws_lexv2models_bot.test.id
bot_id = aws_lexv2models_bot.example.id
bot_version = "DRAFT"
n_lu_intent_confidence_threshold = 0.7
}
resource "aws_lexv2models_bot_version" "test" {
bot_id = aws_lexv2models_bot.test.id
resource "aws_lexv2models_bot_version" "example" {
bot_id = aws_lexv2models_bot.example.id
locale_specification = {
(aws_lexv2models_bot_locale.test.locale_id) = {
(aws_lexv2models_bot_locale.example.locale_id) = {
source_bot_version = "DRAFT"
}
}
}
resource "aws_lexv2models_slot_type" "test" {
bot_id = aws_lexv2models_bot.test.id
bot_version = aws_lexv2models_bot_locale.test.bot_version
name = "test"
locale_id = aws_lexv2models_bot_locale.test.locale_id
resource "aws_lexv2models_slot_type" "example" {
bot_id = aws_lexv2models_bot.example.id
bot_version = aws_lexv2models_bot_locale.example.bot_version
name = "example"
locale_id = aws_lexv2models_bot_locale.example.locale_id
}
```

### `value_selection_setting` Usage

```terraform
resource "aws_lexv2models_slot_type" "example" {
bot_id = aws_lexv2models_bot.example.id
bot_version = aws_lexv2models_bot_locale.example.bot_version
name = "example"
locale_id = aws_lexv2models_bot_locale.example.locale_id
value_selection_setting {
resolution_strategy = "OriginalValue"
advanced_recognition_setting {
audio_recognition_strategy = "UseSlotValuesAsCustomVocabulary"
}
}
slot_type_values {
sample_value {
value = "exampleValue"
}
}
}
```

Expand Down

0 comments on commit 76ffa8c

Please sign in to comment.