/
getSlotType.go
179 lines (156 loc) · 6.89 KB
/
getSlotType.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package lex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides details about a specific Amazon Lex Slot Type.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := lex.LookupSlotType(ctx, &lex.LookupSlotTypeArgs{
// Name: "FlowerTypes",
// Version: pulumi.StringRef("1"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupSlotType(ctx *pulumi.Context, args *LookupSlotTypeArgs, opts ...pulumi.InvokeOption) (*LookupSlotTypeResult, error) {
var rv LookupSlotTypeResult
err := ctx.Invoke("aws:lex/getSlotType:getSlotType", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getSlotType.
type LookupSlotTypeArgs struct {
// Name of the slot type. The name is case sensitive.
Name string `pulumi:"name"`
// Version of the slot type.
Version *string `pulumi:"version"`
}
// A collection of values returned by getSlotType.
type LookupSlotTypeResult struct {
// Checksum identifying the version of the slot type that was created. The checksum is
// not included as an argument because the resource will add it automatically when updating the slot type.
Checksum string `pulumi:"checksum"`
// Date when the slot type version was created.
CreatedDate string `pulumi:"createdDate"`
// Description of the slot type.
Description string `pulumi:"description"`
// Set of EnumerationValue objects that defines the values that
// the slot type can take. Each value can have a set of synonyms, which are additional values that help
// train the machine learning model about the values that it resolves for a slot.
EnumerationValues []GetSlotTypeEnumerationValue `pulumi:"enumerationValues"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Date when the $LATEST version of this slot type was updated.
LastUpdatedDate string `pulumi:"lastUpdatedDate"`
// Name of the slot type. The name is not case sensitive.
Name string `pulumi:"name"`
// Determines the slot resolution strategy that Amazon Lex
// uses to return slot type values. `ORIGINAL_VALUE` returns the value entered by the user if the user
// value is similar to the slot value. `TOP_RESOLUTION` returns the first value in the resolution list
// if there is a resolution list for the slot, otherwise null is returned.
ValueSelectionStrategy string `pulumi:"valueSelectionStrategy"`
// Version of the slot type.
Version *string `pulumi:"version"`
}
func LookupSlotTypeOutput(ctx *pulumi.Context, args LookupSlotTypeOutputArgs, opts ...pulumi.InvokeOption) LookupSlotTypeResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupSlotTypeResult, error) {
args := v.(LookupSlotTypeArgs)
r, err := LookupSlotType(ctx, &args, opts...)
var s LookupSlotTypeResult
if r != nil {
s = *r
}
return s, err
}).(LookupSlotTypeResultOutput)
}
// A collection of arguments for invoking getSlotType.
type LookupSlotTypeOutputArgs struct {
// Name of the slot type. The name is case sensitive.
Name pulumi.StringInput `pulumi:"name"`
// Version of the slot type.
Version pulumi.StringPtrInput `pulumi:"version"`
}
func (LookupSlotTypeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSlotTypeArgs)(nil)).Elem()
}
// A collection of values returned by getSlotType.
type LookupSlotTypeResultOutput struct{ *pulumi.OutputState }
func (LookupSlotTypeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSlotTypeResult)(nil)).Elem()
}
func (o LookupSlotTypeResultOutput) ToLookupSlotTypeResultOutput() LookupSlotTypeResultOutput {
return o
}
func (o LookupSlotTypeResultOutput) ToLookupSlotTypeResultOutputWithContext(ctx context.Context) LookupSlotTypeResultOutput {
return o
}
// Checksum identifying the version of the slot type that was created. The checksum is
// not included as an argument because the resource will add it automatically when updating the slot type.
func (o LookupSlotTypeResultOutput) Checksum() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.Checksum }).(pulumi.StringOutput)
}
// Date when the slot type version was created.
func (o LookupSlotTypeResultOutput) CreatedDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.CreatedDate }).(pulumi.StringOutput)
}
// Description of the slot type.
func (o LookupSlotTypeResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.Description }).(pulumi.StringOutput)
}
// Set of EnumerationValue objects that defines the values that
// the slot type can take. Each value can have a set of synonyms, which are additional values that help
// train the machine learning model about the values that it resolves for a slot.
func (o LookupSlotTypeResultOutput) EnumerationValues() GetSlotTypeEnumerationValueArrayOutput {
return o.ApplyT(func(v LookupSlotTypeResult) []GetSlotTypeEnumerationValue { return v.EnumerationValues }).(GetSlotTypeEnumerationValueArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupSlotTypeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.Id }).(pulumi.StringOutput)
}
// Date when the $LATEST version of this slot type was updated.
func (o LookupSlotTypeResultOutput) LastUpdatedDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
}
// Name of the slot type. The name is not case sensitive.
func (o LookupSlotTypeResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.Name }).(pulumi.StringOutput)
}
// Determines the slot resolution strategy that Amazon Lex
// uses to return slot type values. `ORIGINAL_VALUE` returns the value entered by the user if the user
// value is similar to the slot value. `TOP_RESOLUTION` returns the first value in the resolution list
// if there is a resolution list for the slot, otherwise null is returned.
func (o LookupSlotTypeResultOutput) ValueSelectionStrategy() pulumi.StringOutput {
return o.ApplyT(func(v LookupSlotTypeResult) string { return v.ValueSelectionStrategy }).(pulumi.StringOutput)
}
// Version of the slot type.
func (o LookupSlotTypeResultOutput) Version() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSlotTypeResult) *string { return v.Version }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSlotTypeResultOutput{})
}