/
getBotAssociation.go
117 lines (100 loc) · 4.1 KB
/
getBotAssociation.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package connect
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides details about a specific Lex (V1) Bot associated with an Amazon Connect instance.
//
// ## Example Usage
// ### By name
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/connect"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := connect.LookupBotAssociation(ctx, &connect.LookupBotAssociationArgs{
// InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
// LexBot: connect.GetBotAssociationLexBot{
// Name: "Test",
// },
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupBotAssociation(ctx *pulumi.Context, args *LookupBotAssociationArgs, opts ...pulumi.InvokeOption) (*LookupBotAssociationResult, error) {
var rv LookupBotAssociationResult
err := ctx.Invoke("aws:connect/getBotAssociation:getBotAssociation", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getBotAssociation.
type LookupBotAssociationArgs struct {
// The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
InstanceId string `pulumi:"instanceId"`
// Configuration information of an Amazon Lex (V1) bot. Detailed below.
LexBot GetBotAssociationLexBot `pulumi:"lexBot"`
}
// A collection of values returned by getBotAssociation.
type LookupBotAssociationResult struct {
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
InstanceId string `pulumi:"instanceId"`
LexBot GetBotAssociationLexBot `pulumi:"lexBot"`
}
func LookupBotAssociationOutput(ctx *pulumi.Context, args LookupBotAssociationOutputArgs, opts ...pulumi.InvokeOption) LookupBotAssociationResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupBotAssociationResult, error) {
args := v.(LookupBotAssociationArgs)
r, err := LookupBotAssociation(ctx, &args, opts...)
return *r, err
}).(LookupBotAssociationResultOutput)
}
// A collection of arguments for invoking getBotAssociation.
type LookupBotAssociationOutputArgs struct {
// The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
InstanceId pulumi.StringInput `pulumi:"instanceId"`
// Configuration information of an Amazon Lex (V1) bot. Detailed below.
LexBot GetBotAssociationLexBotInput `pulumi:"lexBot"`
}
func (LookupBotAssociationOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBotAssociationArgs)(nil)).Elem()
}
// A collection of values returned by getBotAssociation.
type LookupBotAssociationResultOutput struct{ *pulumi.OutputState }
func (LookupBotAssociationResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBotAssociationResult)(nil)).Elem()
}
func (o LookupBotAssociationResultOutput) ToLookupBotAssociationResultOutput() LookupBotAssociationResultOutput {
return o
}
func (o LookupBotAssociationResultOutput) ToLookupBotAssociationResultOutputWithContext(ctx context.Context) LookupBotAssociationResultOutput {
return o
}
// The provider-assigned unique ID for this managed resource.
func (o LookupBotAssociationResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotAssociationResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupBotAssociationResultOutput) InstanceId() pulumi.StringOutput {
return o.ApplyT(func(v LookupBotAssociationResult) string { return v.InstanceId }).(pulumi.StringOutput)
}
func (o LookupBotAssociationResultOutput) LexBot() GetBotAssociationLexBotOutput {
return o.ApplyT(func(v LookupBotAssociationResult) GetBotAssociationLexBot { return v.LexBot }).(GetBotAssociationLexBotOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBotAssociationResultOutput{})
}