This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
getAuditLogSubscription.go
170 lines (149 loc) · 7.41 KB
/
getAuditLogSubscription.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
// 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 launchdarkly
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a LaunchDarkly audit log subscription data source.
//
// This data source allows you to retrieve information about LaunchDarkly audit log subscriptions.
//
// ```go
// package main
//
// import (
//
// "github.com/lbrlabs/pulumi-launchdarkly/sdk/go/launchdarkly"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err = launchdarkly.LookupAuditLogSubscription(ctx, &launchdarkly.LookupAuditLogSubscriptionArgs{
// Id: "5f0cd446a77cba0b4c5644a7",
// IntegrationKey: "msteams",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupAuditLogSubscription(ctx *pulumi.Context, args *LookupAuditLogSubscriptionArgs, opts ...pulumi.InvokeOption) (*LookupAuditLogSubscriptionResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv LookupAuditLogSubscriptionResult
err := ctx.Invoke("launchdarkly:index/getAuditLogSubscription:getAuditLogSubscription", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAuditLogSubscription.
type LookupAuditLogSubscriptionArgs struct {
// A block of configuration fields associated with your integration type.
Config map[string]interface{} `pulumi:"config"`
// The unique subscription ID. This can be found in the URL of the pull-out configuration sidebar for the given subscription on your [LaunchDarkly Integrations page](https://app.launchdarkly.com/default/integrations).
Id string `pulumi:"id"`
// The integration key. As of February 2022, supported integrations are `"datadog"`, `"dynatrace"`, `"elastic"`, `"honeycomb"`, `"logdna"`, `"msteams"`, `"new-relic-apm"`, `"signalfx"`, `"slack"`, and `"splunk"`.
IntegrationKey string `pulumi:"integrationKey"`
// The subscription's human-readable name.
Name *string `pulumi:"name"`
// Whether the subscription is enabled.
On *bool `pulumi:"on"`
// The statement block used to filter subscription events. To learn more, read Statement Blocks.
Statements []GetAuditLogSubscriptionStatement `pulumi:"statements"`
// Set of tags associated with the subscription.
Tags []string `pulumi:"tags"`
}
// A collection of values returned by getAuditLogSubscription.
type LookupAuditLogSubscriptionResult struct {
// A block of configuration fields associated with your integration type.
Config map[string]interface{} `pulumi:"config"`
Id string `pulumi:"id"`
IntegrationKey string `pulumi:"integrationKey"`
// The subscription's human-readable name.
Name *string `pulumi:"name"`
// Whether the subscription is enabled.
On *bool `pulumi:"on"`
// The statement block used to filter subscription events. To learn more, read Statement Blocks.
Statements []GetAuditLogSubscriptionStatement `pulumi:"statements"`
// Set of tags associated with the subscription.
Tags []string `pulumi:"tags"`
}
func LookupAuditLogSubscriptionOutput(ctx *pulumi.Context, args LookupAuditLogSubscriptionOutputArgs, opts ...pulumi.InvokeOption) LookupAuditLogSubscriptionResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAuditLogSubscriptionResult, error) {
args := v.(LookupAuditLogSubscriptionArgs)
r, err := LookupAuditLogSubscription(ctx, &args, opts...)
var s LookupAuditLogSubscriptionResult
if r != nil {
s = *r
}
return s, err
}).(LookupAuditLogSubscriptionResultOutput)
}
// A collection of arguments for invoking getAuditLogSubscription.
type LookupAuditLogSubscriptionOutputArgs struct {
// A block of configuration fields associated with your integration type.
Config pulumi.MapInput `pulumi:"config"`
// The unique subscription ID. This can be found in the URL of the pull-out configuration sidebar for the given subscription on your [LaunchDarkly Integrations page](https://app.launchdarkly.com/default/integrations).
Id pulumi.StringInput `pulumi:"id"`
// The integration key. As of February 2022, supported integrations are `"datadog"`, `"dynatrace"`, `"elastic"`, `"honeycomb"`, `"logdna"`, `"msteams"`, `"new-relic-apm"`, `"signalfx"`, `"slack"`, and `"splunk"`.
IntegrationKey pulumi.StringInput `pulumi:"integrationKey"`
// The subscription's human-readable name.
Name pulumi.StringPtrInput `pulumi:"name"`
// Whether the subscription is enabled.
On pulumi.BoolPtrInput `pulumi:"on"`
// The statement block used to filter subscription events. To learn more, read Statement Blocks.
Statements GetAuditLogSubscriptionStatementArrayInput `pulumi:"statements"`
// Set of tags associated with the subscription.
Tags pulumi.StringArrayInput `pulumi:"tags"`
}
func (LookupAuditLogSubscriptionOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuditLogSubscriptionArgs)(nil)).Elem()
}
// A collection of values returned by getAuditLogSubscription.
type LookupAuditLogSubscriptionResultOutput struct{ *pulumi.OutputState }
func (LookupAuditLogSubscriptionResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAuditLogSubscriptionResult)(nil)).Elem()
}
func (o LookupAuditLogSubscriptionResultOutput) ToLookupAuditLogSubscriptionResultOutput() LookupAuditLogSubscriptionResultOutput {
return o
}
func (o LookupAuditLogSubscriptionResultOutput) ToLookupAuditLogSubscriptionResultOutputWithContext(ctx context.Context) LookupAuditLogSubscriptionResultOutput {
return o
}
// A block of configuration fields associated with your integration type.
func (o LookupAuditLogSubscriptionResultOutput) Config() pulumi.MapOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) map[string]interface{} { return v.Config }).(pulumi.MapOutput)
}
func (o LookupAuditLogSubscriptionResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o LookupAuditLogSubscriptionResultOutput) IntegrationKey() pulumi.StringOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) string { return v.IntegrationKey }).(pulumi.StringOutput)
}
// The subscription's human-readable name.
func (o LookupAuditLogSubscriptionResultOutput) Name() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) *string { return v.Name }).(pulumi.StringPtrOutput)
}
// Whether the subscription is enabled.
func (o LookupAuditLogSubscriptionResultOutput) On() pulumi.BoolPtrOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) *bool { return v.On }).(pulumi.BoolPtrOutput)
}
// The statement block used to filter subscription events. To learn more, read Statement Blocks.
func (o LookupAuditLogSubscriptionResultOutput) Statements() GetAuditLogSubscriptionStatementArrayOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) []GetAuditLogSubscriptionStatement { return v.Statements }).(GetAuditLogSubscriptionStatementArrayOutput)
}
// Set of tags associated with the subscription.
func (o LookupAuditLogSubscriptionResultOutput) Tags() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupAuditLogSubscriptionResult) []string { return v.Tags }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAuditLogSubscriptionResultOutput{})
}