/
getBot.go
223 lines (192 loc) · 8.79 KB
/
getBot.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// 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 Bot.
//
// ## 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.LookupBot(ctx, &lex.LookupBotArgs{
// Name: "OrderFlowers",
// Version: pulumi.StringRef("$LATEST"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupBot(ctx *pulumi.Context, args *LookupBotArgs, opts ...pulumi.InvokeOption) (*LookupBotResult, error) {
var rv LookupBotResult
err := ctx.Invoke("aws:lex/getBot:getBot", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getBot.
type LookupBotArgs struct {
// Name of the bot. The name is case sensitive.
Name string `pulumi:"name"`
// Version or alias of the bot.
Version *string `pulumi:"version"`
}
// A collection of values returned by getBot.
type LookupBotResult struct {
// ARN of the bot.
Arn string `pulumi:"arn"`
// Checksum of the bot used to identify a specific revision of the bot's `$LATEST` version.
Checksum string `pulumi:"checksum"`
// If this Amazon Lex Bot 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.
ChildDirected bool `pulumi:"childDirected"`
// Date that the bot was created.
CreatedDate string `pulumi:"createdDate"`
// Description of the bot.
Description string `pulumi:"description"`
// When set to true user utterances are sent to Amazon Comprehend for sentiment analysis.
DetectSentiment bool `pulumi:"detectSentiment"`
// Set to true if natural language understanding improvements are enabled.
EnableModelImprovements bool `pulumi:"enableModelImprovements"`
// If the `status` is `FAILED`, the reason why the bot failed to build.
FailureReason string `pulumi:"failureReason"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
IdleSessionTtlInSeconds int `pulumi:"idleSessionTtlInSeconds"`
// Date that the bot was updated.
LastUpdatedDate string `pulumi:"lastUpdatedDate"`
// Target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.
Locale string `pulumi:"locale"`
// Name of the bot, case sensitive.
Name string `pulumi:"name"`
// 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.
NluIntentConfidenceThreshold float64 `pulumi:"nluIntentConfidenceThreshold"`
// Status of the bot.
Status string `pulumi:"status"`
// Version of the bot. For a new bot, the version is always `$LATEST`.
Version *string `pulumi:"version"`
// Amazon Polly voice ID that the Amazon Lex Bot uses for voice interactions with the user.
VoiceId string `pulumi:"voiceId"`
}
func LookupBotOutput(ctx *pulumi.Context, args LookupBotOutputArgs, opts ...pulumi.InvokeOption) LookupBotResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupBotResult, error) {
args := v.(LookupBotArgs)
r, err := LookupBot(ctx, &args, opts...)
var s LookupBotResult
if r != nil {
s = *r
}
return s, err
}).(LookupBotResultOutput)
}
// A collection of arguments for invoking getBot.
type LookupBotOutputArgs struct {
// Name of the bot. The name is case sensitive.
Name pulumi.StringInput `pulumi:"name"`
// Version or alias of the bot.
Version pulumi.StringPtrInput `pulumi:"version"`
}
func (LookupBotOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBotArgs)(nil)).Elem()
}
// A collection of values returned by getBot.
type LookupBotResultOutput struct{ *pulumi.OutputState }
func (LookupBotResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBotResult)(nil)).Elem()
}
func (o LookupBotResultOutput) ToLookupBotResultOutput() LookupBotResultOutput {
return o
}
func (o LookupBotResultOutput) ToLookupBotResultOutputWithContext(ctx context.Context) LookupBotResultOutput {
return o
}
// ARN of the bot.
func (o LookupBotResultOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Arn }).(pulumi.StringOutput)
}
// Checksum of the bot used to identify a specific revision of the bot's `$LATEST` version.
func (o LookupBotResultOutput) Checksum() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Checksum }).(pulumi.StringOutput)
}
// If this Amazon Lex Bot 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.
func (o LookupBotResultOutput) ChildDirected() pulumi.BoolOutput {
return o.ApplyT(func(v LookupBotResult) bool { return v.ChildDirected }).(pulumi.BoolOutput)
}
// Date that the bot was created.
func (o LookupBotResultOutput) CreatedDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.CreatedDate }).(pulumi.StringOutput)
}
// Description of the bot.
func (o LookupBotResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Description }).(pulumi.StringOutput)
}
// When set to true user utterances are sent to Amazon Comprehend for sentiment analysis.
func (o LookupBotResultOutput) DetectSentiment() pulumi.BoolOutput {
return o.ApplyT(func(v LookupBotResult) bool { return v.DetectSentiment }).(pulumi.BoolOutput)
}
// Set to true if natural language understanding improvements are enabled.
func (o LookupBotResultOutput) EnableModelImprovements() pulumi.BoolOutput {
return o.ApplyT(func(v LookupBotResult) bool { return v.EnableModelImprovements }).(pulumi.BoolOutput)
}
// If the `status` is `FAILED`, the reason why the bot failed to build.
func (o LookupBotResultOutput) FailureReason() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.FailureReason }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupBotResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Id }).(pulumi.StringOutput)
}
// The maximum time in seconds that Amazon Lex retains the data gathered in a conversation.
func (o LookupBotResultOutput) IdleSessionTtlInSeconds() pulumi.IntOutput {
return o.ApplyT(func(v LookupBotResult) int { return v.IdleSessionTtlInSeconds }).(pulumi.IntOutput)
}
// Date that the bot was updated.
func (o LookupBotResultOutput) LastUpdatedDate() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.LastUpdatedDate }).(pulumi.StringOutput)
}
// Target locale for the bot. Any intent used in the bot must be compatible with the locale of the bot.
func (o LookupBotResultOutput) Locale() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Locale }).(pulumi.StringOutput)
}
// Name of the bot, case sensitive.
func (o LookupBotResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Name }).(pulumi.StringOutput)
}
// 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.
func (o LookupBotResultOutput) NluIntentConfidenceThreshold() pulumi.Float64Output {
return o.ApplyT(func(v LookupBotResult) float64 { return v.NluIntentConfidenceThreshold }).(pulumi.Float64Output)
}
// Status of the bot.
func (o LookupBotResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.Status }).(pulumi.StringOutput)
}
// Version of the bot. For a new bot, the version is always `$LATEST`.
func (o LookupBotResultOutput) Version() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBotResult) *string { return v.Version }).(pulumi.StringPtrOutput)
}
// Amazon Polly voice ID that the Amazon Lex Bot uses for voice interactions with the user.
func (o LookupBotResultOutput) VoiceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotResult) string { return v.VoiceId }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBotResultOutput{})
}