github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/v2modelsBotLocale.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 // Resource for managing an AWS Lex V2 Models Bot Locale. 16 // 17 // ## Example Usage 18 // 19 // ### Basic Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := lex.NewV2modelsBotLocale(ctx, "example", &lex.V2modelsBotLocaleArgs{ 35 // BotId: pulumi.Any(exampleAwsLexv2modelsBot.Id), 36 // BotVersion: pulumi.String("DRAFT"), 37 // LocaleId: pulumi.String("en_US"), 38 // NLuIntentConfidenceThreshold: pulumi.Float64(0.7), 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 // 50 // ### Voice Settings 51 // 52 // <!--Start PulumiCodeChooser --> 53 // ```go 54 // package main 55 // 56 // import ( 57 // 58 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lex" 59 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 60 // 61 // ) 62 // 63 // func main() { 64 // pulumi.Run(func(ctx *pulumi.Context) error { 65 // _, err := lex.NewV2modelsBotLocale(ctx, "example", &lex.V2modelsBotLocaleArgs{ 66 // BotId: pulumi.Any(exampleAwsLexv2modelsBot.Id), 67 // BotVersion: pulumi.String("DRAFT"), 68 // LocaleId: pulumi.String("en_US"), 69 // NLuIntentConfidenceThreshold: pulumi.Float64(0.7), 70 // VoiceSettings: &lex.V2modelsBotLocaleVoiceSettingsArgs{ 71 // VoiceId: pulumi.String("Kendra"), 72 // Engine: pulumi.String("standard"), 73 // }, 74 // }) 75 // if err != nil { 76 // return err 77 // } 78 // return nil 79 // }) 80 // } 81 // 82 // ``` 83 // <!--End PulumiCodeChooser --> 84 // 85 // ## Import 86 // 87 // Using `pulumi import`, import Lex V2 Models Bot Locale using the `id`. For example: 88 // 89 // ```sh 90 // $ pulumi import aws:lex/v2modelsBotLocale:V2modelsBotLocale example en_US,abcd-12345678,1 91 // ``` 92 type V2modelsBotLocale struct { 93 pulumi.CustomResourceState 94 95 // Identifier of the bot to create the locale for. 96 BotId pulumi.StringOutput `pulumi:"botId"` 97 // Version of the bot to create the locale for. This can only be the draft version of the bot. 98 BotVersion pulumi.StringOutput `pulumi:"botVersion"` 99 // Description of the bot locale. Use this to help identify the bot locale in lists. 100 Description pulumi.StringPtrOutput `pulumi:"description"` 101 // Identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html) 102 LocaleId pulumi.StringOutput `pulumi:"localeId"` 103 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. 104 // 105 // The following arguments are optional: 106 NLuIntentConfidenceThreshold pulumi.Float64Output `pulumi:"nLuIntentConfidenceThreshold"` 107 // Specified locale name. 108 Name pulumi.StringOutput `pulumi:"name"` 109 Timeouts V2modelsBotLocaleTimeoutsPtrOutput `pulumi:"timeouts"` 110 // Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. See `voiceSettings`. 111 VoiceSettings V2modelsBotLocaleVoiceSettingsPtrOutput `pulumi:"voiceSettings"` 112 } 113 114 // NewV2modelsBotLocale registers a new resource with the given unique name, arguments, and options. 115 func NewV2modelsBotLocale(ctx *pulumi.Context, 116 name string, args *V2modelsBotLocaleArgs, opts ...pulumi.ResourceOption) (*V2modelsBotLocale, error) { 117 if args == nil { 118 return nil, errors.New("missing one or more required arguments") 119 } 120 121 if args.BotId == nil { 122 return nil, errors.New("invalid value for required argument 'BotId'") 123 } 124 if args.BotVersion == nil { 125 return nil, errors.New("invalid value for required argument 'BotVersion'") 126 } 127 if args.LocaleId == nil { 128 return nil, errors.New("invalid value for required argument 'LocaleId'") 129 } 130 if args.NLuIntentConfidenceThreshold == nil { 131 return nil, errors.New("invalid value for required argument 'NLuIntentConfidenceThreshold'") 132 } 133 opts = internal.PkgResourceDefaultOpts(opts) 134 var resource V2modelsBotLocale 135 err := ctx.RegisterResource("aws:lex/v2modelsBotLocale:V2modelsBotLocale", name, args, &resource, opts...) 136 if err != nil { 137 return nil, err 138 } 139 return &resource, nil 140 } 141 142 // GetV2modelsBotLocale gets an existing V2modelsBotLocale resource's state with the given name, ID, and optional 143 // state properties that are used to uniquely qualify the lookup (nil if not required). 144 func GetV2modelsBotLocale(ctx *pulumi.Context, 145 name string, id pulumi.IDInput, state *V2modelsBotLocaleState, opts ...pulumi.ResourceOption) (*V2modelsBotLocale, error) { 146 var resource V2modelsBotLocale 147 err := ctx.ReadResource("aws:lex/v2modelsBotLocale:V2modelsBotLocale", name, id, state, &resource, opts...) 148 if err != nil { 149 return nil, err 150 } 151 return &resource, nil 152 } 153 154 // Input properties used for looking up and filtering V2modelsBotLocale resources. 155 type v2modelsBotLocaleState struct { 156 // Identifier of the bot to create the locale for. 157 BotId *string `pulumi:"botId"` 158 // Version of the bot to create the locale for. This can only be the draft version of the bot. 159 BotVersion *string `pulumi:"botVersion"` 160 // Description of the bot locale. Use this to help identify the bot locale in lists. 161 Description *string `pulumi:"description"` 162 // Identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html) 163 LocaleId *string `pulumi:"localeId"` 164 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. 165 // 166 // The following arguments are optional: 167 NLuIntentConfidenceThreshold *float64 `pulumi:"nLuIntentConfidenceThreshold"` 168 // Specified locale name. 169 Name *string `pulumi:"name"` 170 Timeouts *V2modelsBotLocaleTimeouts `pulumi:"timeouts"` 171 // Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. See `voiceSettings`. 172 VoiceSettings *V2modelsBotLocaleVoiceSettings `pulumi:"voiceSettings"` 173 } 174 175 type V2modelsBotLocaleState struct { 176 // Identifier of the bot to create the locale for. 177 BotId pulumi.StringPtrInput 178 // Version of the bot to create the locale for. This can only be the draft version of the bot. 179 BotVersion pulumi.StringPtrInput 180 // Description of the bot locale. Use this to help identify the bot locale in lists. 181 Description pulumi.StringPtrInput 182 // Identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html) 183 LocaleId pulumi.StringPtrInput 184 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. 185 // 186 // The following arguments are optional: 187 NLuIntentConfidenceThreshold pulumi.Float64PtrInput 188 // Specified locale name. 189 Name pulumi.StringPtrInput 190 Timeouts V2modelsBotLocaleTimeoutsPtrInput 191 // Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. See `voiceSettings`. 192 VoiceSettings V2modelsBotLocaleVoiceSettingsPtrInput 193 } 194 195 func (V2modelsBotLocaleState) ElementType() reflect.Type { 196 return reflect.TypeOf((*v2modelsBotLocaleState)(nil)).Elem() 197 } 198 199 type v2modelsBotLocaleArgs struct { 200 // Identifier of the bot to create the locale for. 201 BotId string `pulumi:"botId"` 202 // Version of the bot to create the locale for. This can only be the draft version of the bot. 203 BotVersion string `pulumi:"botVersion"` 204 // Description of the bot locale. Use this to help identify the bot locale in lists. 205 Description *string `pulumi:"description"` 206 // Identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html) 207 LocaleId string `pulumi:"localeId"` 208 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. 209 // 210 // The following arguments are optional: 211 NLuIntentConfidenceThreshold float64 `pulumi:"nLuIntentConfidenceThreshold"` 212 // Specified locale name. 213 Name *string `pulumi:"name"` 214 Timeouts *V2modelsBotLocaleTimeouts `pulumi:"timeouts"` 215 // Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. See `voiceSettings`. 216 VoiceSettings *V2modelsBotLocaleVoiceSettings `pulumi:"voiceSettings"` 217 } 218 219 // The set of arguments for constructing a V2modelsBotLocale resource. 220 type V2modelsBotLocaleArgs struct { 221 // Identifier of the bot to create the locale for. 222 BotId pulumi.StringInput 223 // Version of the bot to create the locale for. This can only be the draft version of the bot. 224 BotVersion pulumi.StringInput 225 // Description of the bot locale. Use this to help identify the bot locale in lists. 226 Description pulumi.StringPtrInput 227 // Identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html) 228 LocaleId pulumi.StringInput 229 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. 230 // 231 // The following arguments are optional: 232 NLuIntentConfidenceThreshold pulumi.Float64Input 233 // Specified locale name. 234 Name pulumi.StringPtrInput 235 Timeouts V2modelsBotLocaleTimeoutsPtrInput 236 // Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. See `voiceSettings`. 237 VoiceSettings V2modelsBotLocaleVoiceSettingsPtrInput 238 } 239 240 func (V2modelsBotLocaleArgs) ElementType() reflect.Type { 241 return reflect.TypeOf((*v2modelsBotLocaleArgs)(nil)).Elem() 242 } 243 244 type V2modelsBotLocaleInput interface { 245 pulumi.Input 246 247 ToV2modelsBotLocaleOutput() V2modelsBotLocaleOutput 248 ToV2modelsBotLocaleOutputWithContext(ctx context.Context) V2modelsBotLocaleOutput 249 } 250 251 func (*V2modelsBotLocale) ElementType() reflect.Type { 252 return reflect.TypeOf((**V2modelsBotLocale)(nil)).Elem() 253 } 254 255 func (i *V2modelsBotLocale) ToV2modelsBotLocaleOutput() V2modelsBotLocaleOutput { 256 return i.ToV2modelsBotLocaleOutputWithContext(context.Background()) 257 } 258 259 func (i *V2modelsBotLocale) ToV2modelsBotLocaleOutputWithContext(ctx context.Context) V2modelsBotLocaleOutput { 260 return pulumi.ToOutputWithContext(ctx, i).(V2modelsBotLocaleOutput) 261 } 262 263 // V2modelsBotLocaleArrayInput is an input type that accepts V2modelsBotLocaleArray and V2modelsBotLocaleArrayOutput values. 264 // You can construct a concrete instance of `V2modelsBotLocaleArrayInput` via: 265 // 266 // V2modelsBotLocaleArray{ V2modelsBotLocaleArgs{...} } 267 type V2modelsBotLocaleArrayInput interface { 268 pulumi.Input 269 270 ToV2modelsBotLocaleArrayOutput() V2modelsBotLocaleArrayOutput 271 ToV2modelsBotLocaleArrayOutputWithContext(context.Context) V2modelsBotLocaleArrayOutput 272 } 273 274 type V2modelsBotLocaleArray []V2modelsBotLocaleInput 275 276 func (V2modelsBotLocaleArray) ElementType() reflect.Type { 277 return reflect.TypeOf((*[]*V2modelsBotLocale)(nil)).Elem() 278 } 279 280 func (i V2modelsBotLocaleArray) ToV2modelsBotLocaleArrayOutput() V2modelsBotLocaleArrayOutput { 281 return i.ToV2modelsBotLocaleArrayOutputWithContext(context.Background()) 282 } 283 284 func (i V2modelsBotLocaleArray) ToV2modelsBotLocaleArrayOutputWithContext(ctx context.Context) V2modelsBotLocaleArrayOutput { 285 return pulumi.ToOutputWithContext(ctx, i).(V2modelsBotLocaleArrayOutput) 286 } 287 288 // V2modelsBotLocaleMapInput is an input type that accepts V2modelsBotLocaleMap and V2modelsBotLocaleMapOutput values. 289 // You can construct a concrete instance of `V2modelsBotLocaleMapInput` via: 290 // 291 // V2modelsBotLocaleMap{ "key": V2modelsBotLocaleArgs{...} } 292 type V2modelsBotLocaleMapInput interface { 293 pulumi.Input 294 295 ToV2modelsBotLocaleMapOutput() V2modelsBotLocaleMapOutput 296 ToV2modelsBotLocaleMapOutputWithContext(context.Context) V2modelsBotLocaleMapOutput 297 } 298 299 type V2modelsBotLocaleMap map[string]V2modelsBotLocaleInput 300 301 func (V2modelsBotLocaleMap) ElementType() reflect.Type { 302 return reflect.TypeOf((*map[string]*V2modelsBotLocale)(nil)).Elem() 303 } 304 305 func (i V2modelsBotLocaleMap) ToV2modelsBotLocaleMapOutput() V2modelsBotLocaleMapOutput { 306 return i.ToV2modelsBotLocaleMapOutputWithContext(context.Background()) 307 } 308 309 func (i V2modelsBotLocaleMap) ToV2modelsBotLocaleMapOutputWithContext(ctx context.Context) V2modelsBotLocaleMapOutput { 310 return pulumi.ToOutputWithContext(ctx, i).(V2modelsBotLocaleMapOutput) 311 } 312 313 type V2modelsBotLocaleOutput struct{ *pulumi.OutputState } 314 315 func (V2modelsBotLocaleOutput) ElementType() reflect.Type { 316 return reflect.TypeOf((**V2modelsBotLocale)(nil)).Elem() 317 } 318 319 func (o V2modelsBotLocaleOutput) ToV2modelsBotLocaleOutput() V2modelsBotLocaleOutput { 320 return o 321 } 322 323 func (o V2modelsBotLocaleOutput) ToV2modelsBotLocaleOutputWithContext(ctx context.Context) V2modelsBotLocaleOutput { 324 return o 325 } 326 327 // Identifier of the bot to create the locale for. 328 func (o V2modelsBotLocaleOutput) BotId() pulumi.StringOutput { 329 return o.ApplyT(func(v *V2modelsBotLocale) pulumi.StringOutput { return v.BotId }).(pulumi.StringOutput) 330 } 331 332 // Version of the bot to create the locale for. This can only be the draft version of the bot. 333 func (o V2modelsBotLocaleOutput) BotVersion() pulumi.StringOutput { 334 return o.ApplyT(func(v *V2modelsBotLocale) pulumi.StringOutput { return v.BotVersion }).(pulumi.StringOutput) 335 } 336 337 // Description of the bot locale. Use this to help identify the bot locale in lists. 338 func (o V2modelsBotLocaleOutput) Description() pulumi.StringPtrOutput { 339 return o.ApplyT(func(v *V2modelsBotLocale) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 340 } 341 342 // Identifier of the language and locale that the bot will be used in. The string must match one of the supported locales. All of the intents, slot types, and slots used in the bot must have the same locale. For more information, see Supported languages (https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html) 343 func (o V2modelsBotLocaleOutput) LocaleId() pulumi.StringOutput { 344 return o.ApplyT(func(v *V2modelsBotLocale) pulumi.StringOutput { return v.LocaleId }).(pulumi.StringOutput) 345 } 346 347 // Determines the threshold where Amazon Lex will insert the AMAZON.FallbackIntent, AMAZON.KendraSearchIntent, or both when returning alternative intents. 348 // 349 // The following arguments are optional: 350 func (o V2modelsBotLocaleOutput) NLuIntentConfidenceThreshold() pulumi.Float64Output { 351 return o.ApplyT(func(v *V2modelsBotLocale) pulumi.Float64Output { return v.NLuIntentConfidenceThreshold }).(pulumi.Float64Output) 352 } 353 354 // Specified locale name. 355 func (o V2modelsBotLocaleOutput) Name() pulumi.StringOutput { 356 return o.ApplyT(func(v *V2modelsBotLocale) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 357 } 358 359 func (o V2modelsBotLocaleOutput) Timeouts() V2modelsBotLocaleTimeoutsPtrOutput { 360 return o.ApplyT(func(v *V2modelsBotLocale) V2modelsBotLocaleTimeoutsPtrOutput { return v.Timeouts }).(V2modelsBotLocaleTimeoutsPtrOutput) 361 } 362 363 // Amazon Polly voice ID that Amazon Lex uses for voice interaction with the user. See `voiceSettings`. 364 func (o V2modelsBotLocaleOutput) VoiceSettings() V2modelsBotLocaleVoiceSettingsPtrOutput { 365 return o.ApplyT(func(v *V2modelsBotLocale) V2modelsBotLocaleVoiceSettingsPtrOutput { return v.VoiceSettings }).(V2modelsBotLocaleVoiceSettingsPtrOutput) 366 } 367 368 type V2modelsBotLocaleArrayOutput struct{ *pulumi.OutputState } 369 370 func (V2modelsBotLocaleArrayOutput) ElementType() reflect.Type { 371 return reflect.TypeOf((*[]*V2modelsBotLocale)(nil)).Elem() 372 } 373 374 func (o V2modelsBotLocaleArrayOutput) ToV2modelsBotLocaleArrayOutput() V2modelsBotLocaleArrayOutput { 375 return o 376 } 377 378 func (o V2modelsBotLocaleArrayOutput) ToV2modelsBotLocaleArrayOutputWithContext(ctx context.Context) V2modelsBotLocaleArrayOutput { 379 return o 380 } 381 382 func (o V2modelsBotLocaleArrayOutput) Index(i pulumi.IntInput) V2modelsBotLocaleOutput { 383 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *V2modelsBotLocale { 384 return vs[0].([]*V2modelsBotLocale)[vs[1].(int)] 385 }).(V2modelsBotLocaleOutput) 386 } 387 388 type V2modelsBotLocaleMapOutput struct{ *pulumi.OutputState } 389 390 func (V2modelsBotLocaleMapOutput) ElementType() reflect.Type { 391 return reflect.TypeOf((*map[string]*V2modelsBotLocale)(nil)).Elem() 392 } 393 394 func (o V2modelsBotLocaleMapOutput) ToV2modelsBotLocaleMapOutput() V2modelsBotLocaleMapOutput { 395 return o 396 } 397 398 func (o V2modelsBotLocaleMapOutput) ToV2modelsBotLocaleMapOutputWithContext(ctx context.Context) V2modelsBotLocaleMapOutput { 399 return o 400 } 401 402 func (o V2modelsBotLocaleMapOutput) MapIndex(k pulumi.StringInput) V2modelsBotLocaleOutput { 403 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *V2modelsBotLocale { 404 return vs[0].(map[string]*V2modelsBotLocale)[vs[1].(string)] 405 }).(V2modelsBotLocaleOutput) 406 } 407 408 func init() { 409 pulumi.RegisterInputType(reflect.TypeOf((*V2modelsBotLocaleInput)(nil)).Elem(), &V2modelsBotLocale{}) 410 pulumi.RegisterInputType(reflect.TypeOf((*V2modelsBotLocaleArrayInput)(nil)).Elem(), V2modelsBotLocaleArray{}) 411 pulumi.RegisterInputType(reflect.TypeOf((*V2modelsBotLocaleMapInput)(nil)).Elem(), V2modelsBotLocaleMap{}) 412 pulumi.RegisterOutputType(V2modelsBotLocaleOutput{}) 413 pulumi.RegisterOutputType(V2modelsBotLocaleArrayOutput{}) 414 pulumi.RegisterOutputType(V2modelsBotLocaleMapOutput{}) 415 }