github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lex/v2modelsSlot.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 Slot. 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.NewV2modelsSlot(ctx, "example", &lex.V2modelsSlotArgs{ 35 // BotId: pulumi.Any(exampleAwsLexv2modelsBot.Id), 36 // BotVersion: pulumi.Any(exampleAwsLexv2modelsBotVersion.BotVersion), 37 // IntentId: pulumi.Any(exampleAwsLexv2modelsIntent.Id), 38 // LocaleId: pulumi.Any(exampleAwsLexv2modelsBotLocale.LocaleId), 39 // Name: pulumi.String("example"), 40 // }) 41 // if err != nil { 42 // return err 43 // } 44 // return nil 45 // }) 46 // } 47 // 48 // ``` 49 // <!--End PulumiCodeChooser --> 50 // 51 // ## Import 52 // 53 // Using `pulumi import`, import Lex V2 Models Slot using the `id`. For example: 54 // 55 // ```sh 56 // $ pulumi import aws:lex/v2modelsSlot:V2modelsSlot example bot-1234,1,intent-5678,en-US,slot-9012 57 // ``` 58 type V2modelsSlot struct { 59 pulumi.CustomResourceState 60 61 // Identifier of the bot associated with the slot. 62 BotId pulumi.StringOutput `pulumi:"botId"` 63 // Version of the bot associated with the slot. 64 BotVersion pulumi.StringOutput `pulumi:"botVersion"` 65 // Description of the slot. 66 Description pulumi.StringPtrOutput `pulumi:"description"` 67 // Identifier of the intent that contains the slot. 68 IntentId pulumi.StringOutput `pulumi:"intentId"` 69 // Identifier of the language and locale that the slot will be used in. 70 LocaleId pulumi.StringOutput `pulumi:"localeId"` 71 // Whether the slot returns multiple values in one response. See the `multipleValuesSetting` argument reference below. 72 MultipleValuesSettings V2modelsSlotMultipleValuesSettingArrayOutput `pulumi:"multipleValuesSettings"` 73 // Name of the slot. 74 Name pulumi.StringOutput `pulumi:"name"` 75 // Determines how slot values are used in Amazon CloudWatch logs. See the `obfuscationSetting` argument reference below. 76 ObfuscationSettings V2modelsSlotObfuscationSettingArrayOutput `pulumi:"obfuscationSettings"` 77 // Unique identifier associated with the slot. 78 SlotId pulumi.StringOutput `pulumi:"slotId"` 79 // Unique identifier for the slot type associated with this slot. 80 SlotTypeId pulumi.StringPtrOutput `pulumi:"slotTypeId"` 81 Timeouts V2modelsSlotTimeoutsPtrOutput `pulumi:"timeouts"` 82 // Prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot. 83 // 84 // The following arguments are optional: 85 ValueElicitationSetting V2modelsSlotValueElicitationSettingPtrOutput `pulumi:"valueElicitationSetting"` 86 } 87 88 // NewV2modelsSlot registers a new resource with the given unique name, arguments, and options. 89 func NewV2modelsSlot(ctx *pulumi.Context, 90 name string, args *V2modelsSlotArgs, opts ...pulumi.ResourceOption) (*V2modelsSlot, error) { 91 if args == nil { 92 return nil, errors.New("missing one or more required arguments") 93 } 94 95 if args.BotId == nil { 96 return nil, errors.New("invalid value for required argument 'BotId'") 97 } 98 if args.BotVersion == nil { 99 return nil, errors.New("invalid value for required argument 'BotVersion'") 100 } 101 if args.IntentId == nil { 102 return nil, errors.New("invalid value for required argument 'IntentId'") 103 } 104 if args.LocaleId == nil { 105 return nil, errors.New("invalid value for required argument 'LocaleId'") 106 } 107 opts = internal.PkgResourceDefaultOpts(opts) 108 var resource V2modelsSlot 109 err := ctx.RegisterResource("aws:lex/v2modelsSlot:V2modelsSlot", name, args, &resource, opts...) 110 if err != nil { 111 return nil, err 112 } 113 return &resource, nil 114 } 115 116 // GetV2modelsSlot gets an existing V2modelsSlot resource's state with the given name, ID, and optional 117 // state properties that are used to uniquely qualify the lookup (nil if not required). 118 func GetV2modelsSlot(ctx *pulumi.Context, 119 name string, id pulumi.IDInput, state *V2modelsSlotState, opts ...pulumi.ResourceOption) (*V2modelsSlot, error) { 120 var resource V2modelsSlot 121 err := ctx.ReadResource("aws:lex/v2modelsSlot:V2modelsSlot", name, id, state, &resource, opts...) 122 if err != nil { 123 return nil, err 124 } 125 return &resource, nil 126 } 127 128 // Input properties used for looking up and filtering V2modelsSlot resources. 129 type v2modelsSlotState struct { 130 // Identifier of the bot associated with the slot. 131 BotId *string `pulumi:"botId"` 132 // Version of the bot associated with the slot. 133 BotVersion *string `pulumi:"botVersion"` 134 // Description of the slot. 135 Description *string `pulumi:"description"` 136 // Identifier of the intent that contains the slot. 137 IntentId *string `pulumi:"intentId"` 138 // Identifier of the language and locale that the slot will be used in. 139 LocaleId *string `pulumi:"localeId"` 140 // Whether the slot returns multiple values in one response. See the `multipleValuesSetting` argument reference below. 141 MultipleValuesSettings []V2modelsSlotMultipleValuesSetting `pulumi:"multipleValuesSettings"` 142 // Name of the slot. 143 Name *string `pulumi:"name"` 144 // Determines how slot values are used in Amazon CloudWatch logs. See the `obfuscationSetting` argument reference below. 145 ObfuscationSettings []V2modelsSlotObfuscationSetting `pulumi:"obfuscationSettings"` 146 // Unique identifier associated with the slot. 147 SlotId *string `pulumi:"slotId"` 148 // Unique identifier for the slot type associated with this slot. 149 SlotTypeId *string `pulumi:"slotTypeId"` 150 Timeouts *V2modelsSlotTimeouts `pulumi:"timeouts"` 151 // Prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot. 152 // 153 // The following arguments are optional: 154 ValueElicitationSetting *V2modelsSlotValueElicitationSetting `pulumi:"valueElicitationSetting"` 155 } 156 157 type V2modelsSlotState struct { 158 // Identifier of the bot associated with the slot. 159 BotId pulumi.StringPtrInput 160 // Version of the bot associated with the slot. 161 BotVersion pulumi.StringPtrInput 162 // Description of the slot. 163 Description pulumi.StringPtrInput 164 // Identifier of the intent that contains the slot. 165 IntentId pulumi.StringPtrInput 166 // Identifier of the language and locale that the slot will be used in. 167 LocaleId pulumi.StringPtrInput 168 // Whether the slot returns multiple values in one response. See the `multipleValuesSetting` argument reference below. 169 MultipleValuesSettings V2modelsSlotMultipleValuesSettingArrayInput 170 // Name of the slot. 171 Name pulumi.StringPtrInput 172 // Determines how slot values are used in Amazon CloudWatch logs. See the `obfuscationSetting` argument reference below. 173 ObfuscationSettings V2modelsSlotObfuscationSettingArrayInput 174 // Unique identifier associated with the slot. 175 SlotId pulumi.StringPtrInput 176 // Unique identifier for the slot type associated with this slot. 177 SlotTypeId pulumi.StringPtrInput 178 Timeouts V2modelsSlotTimeoutsPtrInput 179 // Prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot. 180 // 181 // The following arguments are optional: 182 ValueElicitationSetting V2modelsSlotValueElicitationSettingPtrInput 183 } 184 185 func (V2modelsSlotState) ElementType() reflect.Type { 186 return reflect.TypeOf((*v2modelsSlotState)(nil)).Elem() 187 } 188 189 type v2modelsSlotArgs struct { 190 // Identifier of the bot associated with the slot. 191 BotId string `pulumi:"botId"` 192 // Version of the bot associated with the slot. 193 BotVersion string `pulumi:"botVersion"` 194 // Description of the slot. 195 Description *string `pulumi:"description"` 196 // Identifier of the intent that contains the slot. 197 IntentId string `pulumi:"intentId"` 198 // Identifier of the language and locale that the slot will be used in. 199 LocaleId string `pulumi:"localeId"` 200 // Whether the slot returns multiple values in one response. See the `multipleValuesSetting` argument reference below. 201 MultipleValuesSettings []V2modelsSlotMultipleValuesSetting `pulumi:"multipleValuesSettings"` 202 // Name of the slot. 203 Name *string `pulumi:"name"` 204 // Determines how slot values are used in Amazon CloudWatch logs. See the `obfuscationSetting` argument reference below. 205 ObfuscationSettings []V2modelsSlotObfuscationSetting `pulumi:"obfuscationSettings"` 206 // Unique identifier for the slot type associated with this slot. 207 SlotTypeId *string `pulumi:"slotTypeId"` 208 Timeouts *V2modelsSlotTimeouts `pulumi:"timeouts"` 209 // Prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot. 210 // 211 // The following arguments are optional: 212 ValueElicitationSetting *V2modelsSlotValueElicitationSetting `pulumi:"valueElicitationSetting"` 213 } 214 215 // The set of arguments for constructing a V2modelsSlot resource. 216 type V2modelsSlotArgs struct { 217 // Identifier of the bot associated with the slot. 218 BotId pulumi.StringInput 219 // Version of the bot associated with the slot. 220 BotVersion pulumi.StringInput 221 // Description of the slot. 222 Description pulumi.StringPtrInput 223 // Identifier of the intent that contains the slot. 224 IntentId pulumi.StringInput 225 // Identifier of the language and locale that the slot will be used in. 226 LocaleId pulumi.StringInput 227 // Whether the slot returns multiple values in one response. See the `multipleValuesSetting` argument reference below. 228 MultipleValuesSettings V2modelsSlotMultipleValuesSettingArrayInput 229 // Name of the slot. 230 Name pulumi.StringPtrInput 231 // Determines how slot values are used in Amazon CloudWatch logs. See the `obfuscationSetting` argument reference below. 232 ObfuscationSettings V2modelsSlotObfuscationSettingArrayInput 233 // Unique identifier for the slot type associated with this slot. 234 SlotTypeId pulumi.StringPtrInput 235 Timeouts V2modelsSlotTimeoutsPtrInput 236 // Prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot. 237 // 238 // The following arguments are optional: 239 ValueElicitationSetting V2modelsSlotValueElicitationSettingPtrInput 240 } 241 242 func (V2modelsSlotArgs) ElementType() reflect.Type { 243 return reflect.TypeOf((*v2modelsSlotArgs)(nil)).Elem() 244 } 245 246 type V2modelsSlotInput interface { 247 pulumi.Input 248 249 ToV2modelsSlotOutput() V2modelsSlotOutput 250 ToV2modelsSlotOutputWithContext(ctx context.Context) V2modelsSlotOutput 251 } 252 253 func (*V2modelsSlot) ElementType() reflect.Type { 254 return reflect.TypeOf((**V2modelsSlot)(nil)).Elem() 255 } 256 257 func (i *V2modelsSlot) ToV2modelsSlotOutput() V2modelsSlotOutput { 258 return i.ToV2modelsSlotOutputWithContext(context.Background()) 259 } 260 261 func (i *V2modelsSlot) ToV2modelsSlotOutputWithContext(ctx context.Context) V2modelsSlotOutput { 262 return pulumi.ToOutputWithContext(ctx, i).(V2modelsSlotOutput) 263 } 264 265 // V2modelsSlotArrayInput is an input type that accepts V2modelsSlotArray and V2modelsSlotArrayOutput values. 266 // You can construct a concrete instance of `V2modelsSlotArrayInput` via: 267 // 268 // V2modelsSlotArray{ V2modelsSlotArgs{...} } 269 type V2modelsSlotArrayInput interface { 270 pulumi.Input 271 272 ToV2modelsSlotArrayOutput() V2modelsSlotArrayOutput 273 ToV2modelsSlotArrayOutputWithContext(context.Context) V2modelsSlotArrayOutput 274 } 275 276 type V2modelsSlotArray []V2modelsSlotInput 277 278 func (V2modelsSlotArray) ElementType() reflect.Type { 279 return reflect.TypeOf((*[]*V2modelsSlot)(nil)).Elem() 280 } 281 282 func (i V2modelsSlotArray) ToV2modelsSlotArrayOutput() V2modelsSlotArrayOutput { 283 return i.ToV2modelsSlotArrayOutputWithContext(context.Background()) 284 } 285 286 func (i V2modelsSlotArray) ToV2modelsSlotArrayOutputWithContext(ctx context.Context) V2modelsSlotArrayOutput { 287 return pulumi.ToOutputWithContext(ctx, i).(V2modelsSlotArrayOutput) 288 } 289 290 // V2modelsSlotMapInput is an input type that accepts V2modelsSlotMap and V2modelsSlotMapOutput values. 291 // You can construct a concrete instance of `V2modelsSlotMapInput` via: 292 // 293 // V2modelsSlotMap{ "key": V2modelsSlotArgs{...} } 294 type V2modelsSlotMapInput interface { 295 pulumi.Input 296 297 ToV2modelsSlotMapOutput() V2modelsSlotMapOutput 298 ToV2modelsSlotMapOutputWithContext(context.Context) V2modelsSlotMapOutput 299 } 300 301 type V2modelsSlotMap map[string]V2modelsSlotInput 302 303 func (V2modelsSlotMap) ElementType() reflect.Type { 304 return reflect.TypeOf((*map[string]*V2modelsSlot)(nil)).Elem() 305 } 306 307 func (i V2modelsSlotMap) ToV2modelsSlotMapOutput() V2modelsSlotMapOutput { 308 return i.ToV2modelsSlotMapOutputWithContext(context.Background()) 309 } 310 311 func (i V2modelsSlotMap) ToV2modelsSlotMapOutputWithContext(ctx context.Context) V2modelsSlotMapOutput { 312 return pulumi.ToOutputWithContext(ctx, i).(V2modelsSlotMapOutput) 313 } 314 315 type V2modelsSlotOutput struct{ *pulumi.OutputState } 316 317 func (V2modelsSlotOutput) ElementType() reflect.Type { 318 return reflect.TypeOf((**V2modelsSlot)(nil)).Elem() 319 } 320 321 func (o V2modelsSlotOutput) ToV2modelsSlotOutput() V2modelsSlotOutput { 322 return o 323 } 324 325 func (o V2modelsSlotOutput) ToV2modelsSlotOutputWithContext(ctx context.Context) V2modelsSlotOutput { 326 return o 327 } 328 329 // Identifier of the bot associated with the slot. 330 func (o V2modelsSlotOutput) BotId() pulumi.StringOutput { 331 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringOutput { return v.BotId }).(pulumi.StringOutput) 332 } 333 334 // Version of the bot associated with the slot. 335 func (o V2modelsSlotOutput) BotVersion() pulumi.StringOutput { 336 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringOutput { return v.BotVersion }).(pulumi.StringOutput) 337 } 338 339 // Description of the slot. 340 func (o V2modelsSlotOutput) Description() pulumi.StringPtrOutput { 341 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 342 } 343 344 // Identifier of the intent that contains the slot. 345 func (o V2modelsSlotOutput) IntentId() pulumi.StringOutput { 346 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringOutput { return v.IntentId }).(pulumi.StringOutput) 347 } 348 349 // Identifier of the language and locale that the slot will be used in. 350 func (o V2modelsSlotOutput) LocaleId() pulumi.StringOutput { 351 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringOutput { return v.LocaleId }).(pulumi.StringOutput) 352 } 353 354 // Whether the slot returns multiple values in one response. See the `multipleValuesSetting` argument reference below. 355 func (o V2modelsSlotOutput) MultipleValuesSettings() V2modelsSlotMultipleValuesSettingArrayOutput { 356 return o.ApplyT(func(v *V2modelsSlot) V2modelsSlotMultipleValuesSettingArrayOutput { return v.MultipleValuesSettings }).(V2modelsSlotMultipleValuesSettingArrayOutput) 357 } 358 359 // Name of the slot. 360 func (o V2modelsSlotOutput) Name() pulumi.StringOutput { 361 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 362 } 363 364 // Determines how slot values are used in Amazon CloudWatch logs. See the `obfuscationSetting` argument reference below. 365 func (o V2modelsSlotOutput) ObfuscationSettings() V2modelsSlotObfuscationSettingArrayOutput { 366 return o.ApplyT(func(v *V2modelsSlot) V2modelsSlotObfuscationSettingArrayOutput { return v.ObfuscationSettings }).(V2modelsSlotObfuscationSettingArrayOutput) 367 } 368 369 // Unique identifier associated with the slot. 370 func (o V2modelsSlotOutput) SlotId() pulumi.StringOutput { 371 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringOutput { return v.SlotId }).(pulumi.StringOutput) 372 } 373 374 // Unique identifier for the slot type associated with this slot. 375 func (o V2modelsSlotOutput) SlotTypeId() pulumi.StringPtrOutput { 376 return o.ApplyT(func(v *V2modelsSlot) pulumi.StringPtrOutput { return v.SlotTypeId }).(pulumi.StringPtrOutput) 377 } 378 379 func (o V2modelsSlotOutput) Timeouts() V2modelsSlotTimeoutsPtrOutput { 380 return o.ApplyT(func(v *V2modelsSlot) V2modelsSlotTimeoutsPtrOutput { return v.Timeouts }).(V2modelsSlotTimeoutsPtrOutput) 381 } 382 383 // Prompts that Amazon Lex sends to the user to elicit a response that provides the value for the slot. 384 // 385 // The following arguments are optional: 386 func (o V2modelsSlotOutput) ValueElicitationSetting() V2modelsSlotValueElicitationSettingPtrOutput { 387 return o.ApplyT(func(v *V2modelsSlot) V2modelsSlotValueElicitationSettingPtrOutput { return v.ValueElicitationSetting }).(V2modelsSlotValueElicitationSettingPtrOutput) 388 } 389 390 type V2modelsSlotArrayOutput struct{ *pulumi.OutputState } 391 392 func (V2modelsSlotArrayOutput) ElementType() reflect.Type { 393 return reflect.TypeOf((*[]*V2modelsSlot)(nil)).Elem() 394 } 395 396 func (o V2modelsSlotArrayOutput) ToV2modelsSlotArrayOutput() V2modelsSlotArrayOutput { 397 return o 398 } 399 400 func (o V2modelsSlotArrayOutput) ToV2modelsSlotArrayOutputWithContext(ctx context.Context) V2modelsSlotArrayOutput { 401 return o 402 } 403 404 func (o V2modelsSlotArrayOutput) Index(i pulumi.IntInput) V2modelsSlotOutput { 405 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *V2modelsSlot { 406 return vs[0].([]*V2modelsSlot)[vs[1].(int)] 407 }).(V2modelsSlotOutput) 408 } 409 410 type V2modelsSlotMapOutput struct{ *pulumi.OutputState } 411 412 func (V2modelsSlotMapOutput) ElementType() reflect.Type { 413 return reflect.TypeOf((*map[string]*V2modelsSlot)(nil)).Elem() 414 } 415 416 func (o V2modelsSlotMapOutput) ToV2modelsSlotMapOutput() V2modelsSlotMapOutput { 417 return o 418 } 419 420 func (o V2modelsSlotMapOutput) ToV2modelsSlotMapOutputWithContext(ctx context.Context) V2modelsSlotMapOutput { 421 return o 422 } 423 424 func (o V2modelsSlotMapOutput) MapIndex(k pulumi.StringInput) V2modelsSlotOutput { 425 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *V2modelsSlot { 426 return vs[0].(map[string]*V2modelsSlot)[vs[1].(string)] 427 }).(V2modelsSlotOutput) 428 } 429 430 func init() { 431 pulumi.RegisterInputType(reflect.TypeOf((*V2modelsSlotInput)(nil)).Elem(), &V2modelsSlot{}) 432 pulumi.RegisterInputType(reflect.TypeOf((*V2modelsSlotArrayInput)(nil)).Elem(), V2modelsSlotArray{}) 433 pulumi.RegisterInputType(reflect.TypeOf((*V2modelsSlotMapInput)(nil)).Elem(), V2modelsSlotMap{}) 434 pulumi.RegisterOutputType(V2modelsSlotOutput{}) 435 pulumi.RegisterOutputType(V2modelsSlotArrayOutput{}) 436 pulumi.RegisterOutputType(V2modelsSlotMapOutput{}) 437 }