/
getBehaviour.go
116 lines (97 loc) · 3.78 KB
/
getBehaviour.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
// 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 okta
import (
"context"
"reflect"
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to retrieve a behavior from Okta.
func LookupBehaviour(ctx *pulumi.Context, args *LookupBehaviourArgs, opts ...pulumi.InvokeOption) (*LookupBehaviourResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupBehaviourResult
err := ctx.Invoke("okta:index/getBehaviour:getBehaviour", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getBehaviour.
type LookupBehaviourArgs struct {
// `id` of behavior to retrieve, conflicts with `name`.
Id *string `pulumi:"id"`
// The name of the behavior to retrieve. Name uses the `?q=<name>` query parameter exposed by
// Okta's API.
Name *string `pulumi:"name"`
}
// A collection of values returned by getBehaviour.
type LookupBehaviourResult struct {
// Behavior ID.
Id *string `pulumi:"id"`
// Behavior name.
Name *string `pulumi:"name"`
// Map of behavior settings.
Settings map[string]string `pulumi:"settings"`
// Behavior status.
Status string `pulumi:"status"`
// Behavior type.
Type string `pulumi:"type"`
}
func LookupBehaviourOutput(ctx *pulumi.Context, args LookupBehaviourOutputArgs, opts ...pulumi.InvokeOption) LookupBehaviourResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupBehaviourResult, error) {
args := v.(LookupBehaviourArgs)
r, err := LookupBehaviour(ctx, &args, opts...)
var s LookupBehaviourResult
if r != nil {
s = *r
}
return s, err
}).(LookupBehaviourResultOutput)
}
// A collection of arguments for invoking getBehaviour.
type LookupBehaviourOutputArgs struct {
// `id` of behavior to retrieve, conflicts with `name`.
Id pulumi.StringPtrInput `pulumi:"id"`
// The name of the behavior to retrieve. Name uses the `?q=<name>` query parameter exposed by
// Okta's API.
Name pulumi.StringPtrInput `pulumi:"name"`
}
func (LookupBehaviourOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBehaviourArgs)(nil)).Elem()
}
// A collection of values returned by getBehaviour.
type LookupBehaviourResultOutput struct{ *pulumi.OutputState }
func (LookupBehaviourResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupBehaviourResult)(nil)).Elem()
}
func (o LookupBehaviourResultOutput) ToLookupBehaviourResultOutput() LookupBehaviourResultOutput {
return o
}
func (o LookupBehaviourResultOutput) ToLookupBehaviourResultOutputWithContext(ctx context.Context) LookupBehaviourResultOutput {
return o
}
// Behavior ID.
func (o LookupBehaviourResultOutput) Id() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBehaviourResult) *string { return v.Id }).(pulumi.StringPtrOutput)
}
// Behavior name.
func (o LookupBehaviourResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupBehaviourResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Map of behavior settings.
func (o LookupBehaviourResultOutput) Settings() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupBehaviourResult) map[string]string { return v.Settings }).(pulumi.StringMapOutput)
}
// Behavior status.
func (o LookupBehaviourResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupBehaviourResult) string { return v.Status }).(pulumi.StringOutput)
}
// Behavior type.
func (o LookupBehaviourResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupBehaviourResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupBehaviourResultOutput{})
}