github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/bot.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package lex 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an Amazon Lex Bot resource. For more information see 16 // [Amazon Lex: How It Works](https://docs.aws.amazon.com/lex/latest/dg/how-it-works.html) 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := lex.NewBot(ctx, "order_flowers_bot", &lex.BotArgs{ 34 // AbortStatement: &lex.BotAbortStatementArgs{ 35 // Messages: lex.BotAbortStatementMessageArray{ 36 // &lex.BotAbortStatementMessageArgs{ 37 // Content: pulumi.String("Sorry, I am not able to assist at this time"), 38 // ContentType: pulumi.String("PlainText"), 39 // }, 40 // }, 41 // }, 42 // ChildDirected: pulumi.Bool(false), 43 // ClarificationPrompt: &lex.BotClarificationPromptArgs{ 44 // MaxAttempts: pulumi.Int(2), 45 // Messages: lex.BotClarificationPromptMessageArray{ 46 // &lex.BotClarificationPromptMessageArgs{ 47 // Content: pulumi.String("I didn't understand you, what would you like to do?"), 48 // ContentType: pulumi.String("PlainText"), 49 // }, 50 // }, 51 // }, 52 // CreateVersion: pulumi.Bool(false), 53 // Description: pulumi.String("Bot to order flowers on the behalf of a user"), 54 // IdleSessionTtlInSeconds: pulumi.Int(600), 55 // Intents: lex.BotIntentArray{ 56 // &lex.BotIntentArgs{ 57 // IntentName: pulumi.String("OrderFlowers"), 58 // IntentVersion: pulumi.String("1"), 59 // }, 60 // }, 61 // Locale: pulumi.String("en-US"), 62 // Name: pulumi.String("OrderFlowers"), 63 // ProcessBehavior: pulumi.String("BUILD"), 64 // VoiceId: pulumi.String("Salli"), 65 // }) 66 // if err != nil { 67 // return err 68 // } 69 // return nil 70 // }) 71 // } 72 // 73 // ``` 74 // <!--End PulumiCodeChooser --> 75 // 76 // ## Import 77 // 78 // Using `pulumi import`, import bots using their name. For example: 79 // 80 // ```sh 81 // $ pulumi import aws:lex/bot:Bot order_flowers_bot OrderFlowers 82 // ``` 83 type Bot struct { 84 pulumi.CustomResourceState 85 86 // The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement. 87 AbortStatement BotAbortStatementOutput `pulumi:"abortStatement"` 88 Arn pulumi.StringOutput `pulumi:"arn"` 89 // Checksum identifying the version of the bot that was created. The checksum is not 90 // included as an argument because the resource will add it automatically when updating the bot. 91 Checksum pulumi.StringOutput `pulumi:"checksum"` 92 // By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected). 93 ChildDirected pulumi.BoolOutput `pulumi:"childDirected"` 94 // The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt. 95 ClarificationPrompt BotClarificationPromptPtrOutput `pulumi:"clarificationPrompt"` 96 // Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`. 97 CreateVersion pulumi.BoolPtrOutput `pulumi:"createVersion"` 98 // The date when the bot version was created. 99 CreatedDate pulumi.StringOutput `pulumi:"createdDate"` 100 // A description of the bot. Must be less than or equal to 200 characters in length. 101 Description pulumi.StringPtrOutput `pulumi:"description"` 102 // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`. 103 DetectSentiment pulumi.BoolPtrOutput `pulumi:"detectSentiment"` 104 // Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). 105 EnableModelImprovements pulumi.BoolPtrOutput `pulumi:"enableModelImprovements"` 106 // If status is FAILED, Amazon Lex provides the reason that it failed to build the bot. 107 FailureReason pulumi.StringOutput `pulumi:"failureReason"` 108 // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is `300`. Must be a number between 60 and 86400 (inclusive). 109 IdleSessionTtlInSeconds pulumi.IntPtrOutput `pulumi:"idleSessionTtlInSeconds"` 110 // A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects. 111 Intents BotIntentArrayOutput `pulumi:"intents"` 112 // The date when the $LATEST version of this bot was updated. 113 LastUpdatedDate pulumi.StringOutput `pulumi:"lastUpdatedDate"` 114 // Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. 115 Locale pulumi.StringPtrOutput `pulumi:"locale"` 116 // The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length. 117 Name pulumi.StringOutput `pulumi:"name"` 118 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. 119 NluIntentConfidenceThreshold pulumi.Float64PtrOutput `pulumi:"nluIntentConfidenceThreshold"` 120 // If you set the `processBehavior` element to `BUILD`, Amazon Lex builds the bot so that it can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Default is `SAVE`. 121 ProcessBehavior pulumi.StringPtrOutput `pulumi:"processBehavior"` 122 // When you send a request to create or update a bot, Amazon Lex sets the status response 123 // element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can't 124 // build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the 125 // failureReason response element. 126 Status pulumi.StringOutput `pulumi:"status"` 127 // The version of the bot. 128 Version pulumi.StringOutput `pulumi:"version"` 129 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide. 130 VoiceId pulumi.StringOutput `pulumi:"voiceId"` 131 } 132 133 // NewBot registers a new resource with the given unique name, arguments, and options. 134 func NewBot(ctx *pulumi.Context, 135 name string, args *BotArgs, opts ...pulumi.ResourceOption) (*Bot, error) { 136 if args == nil { 137 return nil, errors.New("missing one or more required arguments") 138 } 139 140 if args.AbortStatement == nil { 141 return nil, errors.New("invalid value for required argument 'AbortStatement'") 142 } 143 if args.ChildDirected == nil { 144 return nil, errors.New("invalid value for required argument 'ChildDirected'") 145 } 146 if args.Intents == nil { 147 return nil, errors.New("invalid value for required argument 'Intents'") 148 } 149 opts = internal.PkgResourceDefaultOpts(opts) 150 var resource Bot 151 err := ctx.RegisterResource("aws:lex/bot:Bot", name, args, &resource, opts...) 152 if err != nil { 153 return nil, err 154 } 155 return &resource, nil 156 } 157 158 // GetBot gets an existing Bot resource's state with the given name, ID, and optional 159 // state properties that are used to uniquely qualify the lookup (nil if not required). 160 func GetBot(ctx *pulumi.Context, 161 name string, id pulumi.IDInput, state *BotState, opts ...pulumi.ResourceOption) (*Bot, error) { 162 var resource Bot 163 err := ctx.ReadResource("aws:lex/bot:Bot", name, id, state, &resource, opts...) 164 if err != nil { 165 return nil, err 166 } 167 return &resource, nil 168 } 169 170 // Input properties used for looking up and filtering Bot resources. 171 type botState struct { 172 // The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement. 173 AbortStatement *BotAbortStatement `pulumi:"abortStatement"` 174 Arn *string `pulumi:"arn"` 175 // Checksum identifying the version of the bot that was created. The checksum is not 176 // included as an argument because the resource will add it automatically when updating the bot. 177 Checksum *string `pulumi:"checksum"` 178 // By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected). 179 ChildDirected *bool `pulumi:"childDirected"` 180 // The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt. 181 ClarificationPrompt *BotClarificationPrompt `pulumi:"clarificationPrompt"` 182 // Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`. 183 CreateVersion *bool `pulumi:"createVersion"` 184 // The date when the bot version was created. 185 CreatedDate *string `pulumi:"createdDate"` 186 // A description of the bot. Must be less than or equal to 200 characters in length. 187 Description *string `pulumi:"description"` 188 // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`. 189 DetectSentiment *bool `pulumi:"detectSentiment"` 190 // Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). 191 EnableModelImprovements *bool `pulumi:"enableModelImprovements"` 192 // If status is FAILED, Amazon Lex provides the reason that it failed to build the bot. 193 FailureReason *string `pulumi:"failureReason"` 194 // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is `300`. Must be a number between 60 and 86400 (inclusive). 195 IdleSessionTtlInSeconds *int `pulumi:"idleSessionTtlInSeconds"` 196 // A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects. 197 Intents []BotIntent `pulumi:"intents"` 198 // The date when the $LATEST version of this bot was updated. 199 LastUpdatedDate *string `pulumi:"lastUpdatedDate"` 200 // Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. 201 Locale *string `pulumi:"locale"` 202 // The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length. 203 Name *string `pulumi:"name"` 204 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. 205 NluIntentConfidenceThreshold *float64 `pulumi:"nluIntentConfidenceThreshold"` 206 // If you set the `processBehavior` element to `BUILD`, Amazon Lex builds the bot so that it can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Default is `SAVE`. 207 ProcessBehavior *string `pulumi:"processBehavior"` 208 // When you send a request to create or update a bot, Amazon Lex sets the status response 209 // element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can't 210 // build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the 211 // failureReason response element. 212 Status *string `pulumi:"status"` 213 // The version of the bot. 214 Version *string `pulumi:"version"` 215 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide. 216 VoiceId *string `pulumi:"voiceId"` 217 } 218 219 type BotState struct { 220 // The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement. 221 AbortStatement BotAbortStatementPtrInput 222 Arn pulumi.StringPtrInput 223 // Checksum identifying the version of the bot that was created. The checksum is not 224 // included as an argument because the resource will add it automatically when updating the bot. 225 Checksum pulumi.StringPtrInput 226 // By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected). 227 ChildDirected pulumi.BoolPtrInput 228 // The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt. 229 ClarificationPrompt BotClarificationPromptPtrInput 230 // Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`. 231 CreateVersion pulumi.BoolPtrInput 232 // The date when the bot version was created. 233 CreatedDate pulumi.StringPtrInput 234 // A description of the bot. Must be less than or equal to 200 characters in length. 235 Description pulumi.StringPtrInput 236 // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`. 237 DetectSentiment pulumi.BoolPtrInput 238 // Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). 239 EnableModelImprovements pulumi.BoolPtrInput 240 // If status is FAILED, Amazon Lex provides the reason that it failed to build the bot. 241 FailureReason pulumi.StringPtrInput 242 // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is `300`. Must be a number between 60 and 86400 (inclusive). 243 IdleSessionTtlInSeconds pulumi.IntPtrInput 244 // A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects. 245 Intents BotIntentArrayInput 246 // The date when the $LATEST version of this bot was updated. 247 LastUpdatedDate pulumi.StringPtrInput 248 // Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. 249 Locale pulumi.StringPtrInput 250 // The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length. 251 Name pulumi.StringPtrInput 252 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. 253 NluIntentConfidenceThreshold pulumi.Float64PtrInput 254 // If you set the `processBehavior` element to `BUILD`, Amazon Lex builds the bot so that it can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Default is `SAVE`. 255 ProcessBehavior pulumi.StringPtrInput 256 // When you send a request to create or update a bot, Amazon Lex sets the status response 257 // element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can't 258 // build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the 259 // failureReason response element. 260 Status pulumi.StringPtrInput 261 // The version of the bot. 262 Version pulumi.StringPtrInput 263 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide. 264 VoiceId pulumi.StringPtrInput 265 } 266 267 func (BotState) ElementType() reflect.Type { 268 return reflect.TypeOf((*botState)(nil)).Elem() 269 } 270 271 type botArgs struct { 272 // The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement. 273 AbortStatement BotAbortStatement `pulumi:"abortStatement"` 274 // By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected). 275 ChildDirected bool `pulumi:"childDirected"` 276 // The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt. 277 ClarificationPrompt *BotClarificationPrompt `pulumi:"clarificationPrompt"` 278 // Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`. 279 CreateVersion *bool `pulumi:"createVersion"` 280 // A description of the bot. Must be less than or equal to 200 characters in length. 281 Description *string `pulumi:"description"` 282 // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`. 283 DetectSentiment *bool `pulumi:"detectSentiment"` 284 // Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). 285 EnableModelImprovements *bool `pulumi:"enableModelImprovements"` 286 // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is `300`. Must be a number between 60 and 86400 (inclusive). 287 IdleSessionTtlInSeconds *int `pulumi:"idleSessionTtlInSeconds"` 288 // A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects. 289 Intents []BotIntent `pulumi:"intents"` 290 // Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. 291 Locale *string `pulumi:"locale"` 292 // The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length. 293 Name *string `pulumi:"name"` 294 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. 295 NluIntentConfidenceThreshold *float64 `pulumi:"nluIntentConfidenceThreshold"` 296 // If you set the `processBehavior` element to `BUILD`, Amazon Lex builds the bot so that it can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Default is `SAVE`. 297 ProcessBehavior *string `pulumi:"processBehavior"` 298 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide. 299 VoiceId *string `pulumi:"voiceId"` 300 } 301 302 // The set of arguments for constructing a Bot resource. 303 type BotArgs struct { 304 // The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement. 305 AbortStatement BotAbortStatementInput 306 // By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected). 307 ChildDirected pulumi.BoolInput 308 // The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt. 309 ClarificationPrompt BotClarificationPromptPtrInput 310 // Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`. 311 CreateVersion pulumi.BoolPtrInput 312 // A description of the bot. Must be less than or equal to 200 characters in length. 313 Description pulumi.StringPtrInput 314 // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`. 315 DetectSentiment pulumi.BoolPtrInput 316 // Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). 317 EnableModelImprovements pulumi.BoolPtrInput 318 // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is `300`. Must be a number between 60 and 86400 (inclusive). 319 IdleSessionTtlInSeconds pulumi.IntPtrInput 320 // A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects. 321 Intents BotIntentArrayInput 322 // Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. 323 Locale pulumi.StringPtrInput 324 // The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length. 325 Name pulumi.StringPtrInput 326 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. 327 NluIntentConfidenceThreshold pulumi.Float64PtrInput 328 // If you set the `processBehavior` element to `BUILD`, Amazon Lex builds the bot so that it can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Default is `SAVE`. 329 ProcessBehavior pulumi.StringPtrInput 330 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide. 331 VoiceId pulumi.StringPtrInput 332 } 333 334 func (BotArgs) ElementType() reflect.Type { 335 return reflect.TypeOf((*botArgs)(nil)).Elem() 336 } 337 338 type BotInput interface { 339 pulumi.Input 340 341 ToBotOutput() BotOutput 342 ToBotOutputWithContext(ctx context.Context) BotOutput 343 } 344 345 func (*Bot) ElementType() reflect.Type { 346 return reflect.TypeOf((**Bot)(nil)).Elem() 347 } 348 349 func (i *Bot) ToBotOutput() BotOutput { 350 return i.ToBotOutputWithContext(context.Background()) 351 } 352 353 func (i *Bot) ToBotOutputWithContext(ctx context.Context) BotOutput { 354 return pulumi.ToOutputWithContext(ctx, i).(BotOutput) 355 } 356 357 // BotArrayInput is an input type that accepts BotArray and BotArrayOutput values. 358 // You can construct a concrete instance of `BotArrayInput` via: 359 // 360 // BotArray{ BotArgs{...} } 361 type BotArrayInput interface { 362 pulumi.Input 363 364 ToBotArrayOutput() BotArrayOutput 365 ToBotArrayOutputWithContext(context.Context) BotArrayOutput 366 } 367 368 type BotArray []BotInput 369 370 func (BotArray) ElementType() reflect.Type { 371 return reflect.TypeOf((*[]*Bot)(nil)).Elem() 372 } 373 374 func (i BotArray) ToBotArrayOutput() BotArrayOutput { 375 return i.ToBotArrayOutputWithContext(context.Background()) 376 } 377 378 func (i BotArray) ToBotArrayOutputWithContext(ctx context.Context) BotArrayOutput { 379 return pulumi.ToOutputWithContext(ctx, i).(BotArrayOutput) 380 } 381 382 // BotMapInput is an input type that accepts BotMap and BotMapOutput values. 383 // You can construct a concrete instance of `BotMapInput` via: 384 // 385 // BotMap{ "key": BotArgs{...} } 386 type BotMapInput interface { 387 pulumi.Input 388 389 ToBotMapOutput() BotMapOutput 390 ToBotMapOutputWithContext(context.Context) BotMapOutput 391 } 392 393 type BotMap map[string]BotInput 394 395 func (BotMap) ElementType() reflect.Type { 396 return reflect.TypeOf((*map[string]*Bot)(nil)).Elem() 397 } 398 399 func (i BotMap) ToBotMapOutput() BotMapOutput { 400 return i.ToBotMapOutputWithContext(context.Background()) 401 } 402 403 func (i BotMap) ToBotMapOutputWithContext(ctx context.Context) BotMapOutput { 404 return pulumi.ToOutputWithContext(ctx, i).(BotMapOutput) 405 } 406 407 type BotOutput struct{ *pulumi.OutputState } 408 409 func (BotOutput) ElementType() reflect.Type { 410 return reflect.TypeOf((**Bot)(nil)).Elem() 411 } 412 413 func (o BotOutput) ToBotOutput() BotOutput { 414 return o 415 } 416 417 func (o BotOutput) ToBotOutputWithContext(ctx context.Context) BotOutput { 418 return o 419 } 420 421 // The message that Amazon Lex uses to abort a conversation. Attributes are documented under statement. 422 func (o BotOutput) AbortStatement() BotAbortStatementOutput { 423 return o.ApplyT(func(v *Bot) BotAbortStatementOutput { return v.AbortStatement }).(BotAbortStatementOutput) 424 } 425 426 func (o BotOutput) Arn() pulumi.StringOutput { 427 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 428 } 429 430 // Checksum identifying the version of the bot that was created. The checksum is not 431 // included as an argument because the resource will add it automatically when updating the bot. 432 func (o BotOutput) Checksum() pulumi.StringOutput { 433 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.Checksum }).(pulumi.StringOutput) 434 } 435 436 // By specifying true, you confirm that your use of Amazon Lex is related to a website, program, or other application that is directed or targeted, in whole or in part, to children under age 13 and subject to COPPA. For more information see the [Amazon Lex FAQ](https://aws.amazon.com/lex/faqs#data-security) and the [Amazon Lex PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-childDirected). 437 func (o BotOutput) ChildDirected() pulumi.BoolOutput { 438 return o.ApplyT(func(v *Bot) pulumi.BoolOutput { return v.ChildDirected }).(pulumi.BoolOutput) 439 } 440 441 // The message that Amazon Lex uses when it doesn't understand the user's request. Attributes are documented under prompt. 442 func (o BotOutput) ClarificationPrompt() BotClarificationPromptPtrOutput { 443 return o.ApplyT(func(v *Bot) BotClarificationPromptPtrOutput { return v.ClarificationPrompt }).(BotClarificationPromptPtrOutput) 444 } 445 446 // Determines if a new bot version is created when the initial resource is created and on each update. Defaults to `false`. 447 func (o BotOutput) CreateVersion() pulumi.BoolPtrOutput { 448 return o.ApplyT(func(v *Bot) pulumi.BoolPtrOutput { return v.CreateVersion }).(pulumi.BoolPtrOutput) 449 } 450 451 // The date when the bot version was created. 452 func (o BotOutput) CreatedDate() pulumi.StringOutput { 453 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.CreatedDate }).(pulumi.StringOutput) 454 } 455 456 // A description of the bot. Must be less than or equal to 200 characters in length. 457 func (o BotOutput) Description() pulumi.StringPtrOutput { 458 return o.ApplyT(func(v *Bot) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 459 } 460 461 // When set to true user utterances are sent to Amazon Comprehend for sentiment analysis. If you don't specify detectSentiment, the default is `false`. 462 func (o BotOutput) DetectSentiment() pulumi.BoolPtrOutput { 463 return o.ApplyT(func(v *Bot) pulumi.BoolPtrOutput { return v.DetectSentiment }).(pulumi.BoolPtrOutput) 464 } 465 466 // Set to `true` to enable access to natural language understanding improvements. When you set the `enableModelImprovements` parameter to true you can use the `nluIntentConfidenceThreshold` parameter to configure confidence scores. For more information, see [Confidence Scores](https://docs.aws.amazon.com/lex/latest/dg/confidence-scores.html). You can only set the `enableModelImprovements` parameter in certain Regions. If you set the parameter to true, your bot has access to accuracy improvements. For more information see the [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-enableModelImprovements). 467 func (o BotOutput) EnableModelImprovements() pulumi.BoolPtrOutput { 468 return o.ApplyT(func(v *Bot) pulumi.BoolPtrOutput { return v.EnableModelImprovements }).(pulumi.BoolPtrOutput) 469 } 470 471 // If status is FAILED, Amazon Lex provides the reason that it failed to build the bot. 472 func (o BotOutput) FailureReason() pulumi.StringOutput { 473 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.FailureReason }).(pulumi.StringOutput) 474 } 475 476 // The maximum time in seconds that Amazon Lex retains the data gathered in a conversation. Default is `300`. Must be a number between 60 and 86400 (inclusive). 477 func (o BotOutput) IdleSessionTtlInSeconds() pulumi.IntPtrOutput { 478 return o.ApplyT(func(v *Bot) pulumi.IntPtrOutput { return v.IdleSessionTtlInSeconds }).(pulumi.IntPtrOutput) 479 } 480 481 // A set of Intent objects. Each intent represents a command that a user can express. Attributes are documented under intent. Can have up to 250 Intent objects. 482 func (o BotOutput) Intents() BotIntentArrayOutput { 483 return o.ApplyT(func(v *Bot) BotIntentArrayOutput { return v.Intents }).(BotIntentArrayOutput) 484 } 485 486 // The date when the $LATEST version of this bot was updated. 487 func (o BotOutput) LastUpdatedDate() pulumi.StringOutput { 488 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.LastUpdatedDate }).(pulumi.StringOutput) 489 } 490 491 // Specifies the target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot. For available locales, see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-locale). Default is `en-US`. 492 func (o BotOutput) Locale() pulumi.StringPtrOutput { 493 return o.ApplyT(func(v *Bot) pulumi.StringPtrOutput { return v.Locale }).(pulumi.StringPtrOutput) 494 } 495 496 // The name of the bot that you want to create, case sensitive. Must be between 2 and 50 characters in length. 497 func (o BotOutput) Name() pulumi.StringOutput { 498 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 499 } 500 501 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents in a PostContent or PostText response. AMAZON.FallbackIntent and AMAZON.KendraSearchIntent are only inserted if they are configured for the bot. For more information see [Amazon Lex Bot PutBot API Docs](https://docs.aws.amazon.com/lex/latest/dg/API_PutBot.html#lex-PutBot-request-nluIntentConfidenceThreshold) This value requires `enableModelImprovements` to be set to `true` and the default is `0`. Must be a float between 0 and 1. 502 func (o BotOutput) NluIntentConfidenceThreshold() pulumi.Float64PtrOutput { 503 return o.ApplyT(func(v *Bot) pulumi.Float64PtrOutput { return v.NluIntentConfidenceThreshold }).(pulumi.Float64PtrOutput) 504 } 505 506 // If you set the `processBehavior` element to `BUILD`, Amazon Lex builds the bot so that it can be run. If you set the element to `SAVE` Amazon Lex saves the bot, but doesn't build it. Default is `SAVE`. 507 func (o BotOutput) ProcessBehavior() pulumi.StringPtrOutput { 508 return o.ApplyT(func(v *Bot) pulumi.StringPtrOutput { return v.ProcessBehavior }).(pulumi.StringPtrOutput) 509 } 510 511 // When you send a request to create or update a bot, Amazon Lex sets the status response 512 // element to BUILDING. After Amazon Lex builds the bot, it sets status to READY. If Amazon Lex can't 513 // build the bot, it sets status to FAILED. Amazon Lex returns the reason for the failure in the 514 // failureReason response element. 515 func (o BotOutput) Status() pulumi.StringOutput { 516 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 517 } 518 519 // The version of the bot. 520 func (o BotOutput) Version() pulumi.StringOutput { 521 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput) 522 } 523 524 // The Amazon Polly voice ID that you want Amazon Lex to use for voice interactions with the user. The locale configured for the voice must match the locale of the bot. For more information, see [Available Voices](http://docs.aws.amazon.com/polly/latest/dg/voicelist.html) in the Amazon Polly Developer Guide. 525 func (o BotOutput) VoiceId() pulumi.StringOutput { 526 return o.ApplyT(func(v *Bot) pulumi.StringOutput { return v.VoiceId }).(pulumi.StringOutput) 527 } 528 529 type BotArrayOutput struct{ *pulumi.OutputState } 530 531 func (BotArrayOutput) ElementType() reflect.Type { 532 return reflect.TypeOf((*[]*Bot)(nil)).Elem() 533 } 534 535 func (o BotArrayOutput) ToBotArrayOutput() BotArrayOutput { 536 return o 537 } 538 539 func (o BotArrayOutput) ToBotArrayOutputWithContext(ctx context.Context) BotArrayOutput { 540 return o 541 } 542 543 func (o BotArrayOutput) Index(i pulumi.IntInput) BotOutput { 544 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Bot { 545 return vs[0].([]*Bot)[vs[1].(int)] 546 }).(BotOutput) 547 } 548 549 type BotMapOutput struct{ *pulumi.OutputState } 550 551 func (BotMapOutput) ElementType() reflect.Type { 552 return reflect.TypeOf((*map[string]*Bot)(nil)).Elem() 553 } 554 555 func (o BotMapOutput) ToBotMapOutput() BotMapOutput { 556 return o 557 } 558 559 func (o BotMapOutput) ToBotMapOutputWithContext(ctx context.Context) BotMapOutput { 560 return o 561 } 562 563 func (o BotMapOutput) MapIndex(k pulumi.StringInput) BotOutput { 564 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Bot { 565 return vs[0].(map[string]*Bot)[vs[1].(string)] 566 }).(BotOutput) 567 } 568 569 func init() { 570 pulumi.RegisterInputType(reflect.TypeOf((*BotInput)(nil)).Elem(), &Bot{}) 571 pulumi.RegisterInputType(reflect.TypeOf((*BotArrayInput)(nil)).Elem(), BotArray{}) 572 pulumi.RegisterInputType(reflect.TypeOf((*BotMapInput)(nil)).Elem(), BotMap{}) 573 pulumi.RegisterOutputType(BotOutput{}) 574 pulumi.RegisterOutputType(BotArrayOutput{}) 575 pulumi.RegisterOutputType(BotMapOutput{}) 576 }