/
iamAuditConfig.go
293 lines (233 loc) · 10.2 KB
/
iamAuditConfig.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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
// *** 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 folder
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
type IamAuditConfig struct {
pulumi.CustomResourceState
// The configuration for logging of each type of permission. This can be specified multiple times.
AuditLogConfigs IamAuditConfigAuditLogConfigArrayOutput `pulumi:"auditLogConfigs"`
// The etag of iam policy
Etag pulumi.StringOutput `pulumi:"etag"`
Folder pulumi.StringOutput `pulumi:"folder"`
// Service which will be enabled for audit logging. The special value allServices covers all services.
Service pulumi.StringOutput `pulumi:"service"`
}
// NewIamAuditConfig registers a new resource with the given unique name, arguments, and options.
func NewIamAuditConfig(ctx *pulumi.Context,
name string, args *IamAuditConfigArgs, opts ...pulumi.ResourceOption) (*IamAuditConfig, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AuditLogConfigs == nil {
return nil, errors.New("invalid value for required argument 'AuditLogConfigs'")
}
if args.Folder == nil {
return nil, errors.New("invalid value for required argument 'Folder'")
}
if args.Service == nil {
return nil, errors.New("invalid value for required argument 'Service'")
}
var resource IamAuditConfig
err := ctx.RegisterResource("gcp:folder/iamAuditConfig:IamAuditConfig", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetIamAuditConfig gets an existing IamAuditConfig resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetIamAuditConfig(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IamAuditConfigState, opts ...pulumi.ResourceOption) (*IamAuditConfig, error) {
var resource IamAuditConfig
err := ctx.ReadResource("gcp:folder/iamAuditConfig:IamAuditConfig", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering IamAuditConfig resources.
type iamAuditConfigState struct {
// The configuration for logging of each type of permission. This can be specified multiple times.
AuditLogConfigs []IamAuditConfigAuditLogConfig `pulumi:"auditLogConfigs"`
// The etag of iam policy
Etag *string `pulumi:"etag"`
Folder *string `pulumi:"folder"`
// Service which will be enabled for audit logging. The special value allServices covers all services.
Service *string `pulumi:"service"`
}
type IamAuditConfigState struct {
// The configuration for logging of each type of permission. This can be specified multiple times.
AuditLogConfigs IamAuditConfigAuditLogConfigArrayInput
// The etag of iam policy
Etag pulumi.StringPtrInput
Folder pulumi.StringPtrInput
// Service which will be enabled for audit logging. The special value allServices covers all services.
Service pulumi.StringPtrInput
}
func (IamAuditConfigState) ElementType() reflect.Type {
return reflect.TypeOf((*iamAuditConfigState)(nil)).Elem()
}
type iamAuditConfigArgs struct {
// The configuration for logging of each type of permission. This can be specified multiple times.
AuditLogConfigs []IamAuditConfigAuditLogConfig `pulumi:"auditLogConfigs"`
Folder string `pulumi:"folder"`
// Service which will be enabled for audit logging. The special value allServices covers all services.
Service string `pulumi:"service"`
}
// The set of arguments for constructing a IamAuditConfig resource.
type IamAuditConfigArgs struct {
// The configuration for logging of each type of permission. This can be specified multiple times.
AuditLogConfigs IamAuditConfigAuditLogConfigArrayInput
Folder pulumi.StringInput
// Service which will be enabled for audit logging. The special value allServices covers all services.
Service pulumi.StringInput
}
func (IamAuditConfigArgs) ElementType() reflect.Type {
return reflect.TypeOf((*iamAuditConfigArgs)(nil)).Elem()
}
type IamAuditConfigInput interface {
pulumi.Input
ToIamAuditConfigOutput() IamAuditConfigOutput
ToIamAuditConfigOutputWithContext(ctx context.Context) IamAuditConfigOutput
}
func (*IamAuditConfig) ElementType() reflect.Type {
return reflect.TypeOf((*IamAuditConfig)(nil))
}
func (i *IamAuditConfig) ToIamAuditConfigOutput() IamAuditConfigOutput {
return i.ToIamAuditConfigOutputWithContext(context.Background())
}
func (i *IamAuditConfig) ToIamAuditConfigOutputWithContext(ctx context.Context) IamAuditConfigOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamAuditConfigOutput)
}
func (i *IamAuditConfig) ToIamAuditConfigPtrOutput() IamAuditConfigPtrOutput {
return i.ToIamAuditConfigPtrOutputWithContext(context.Background())
}
func (i *IamAuditConfig) ToIamAuditConfigPtrOutputWithContext(ctx context.Context) IamAuditConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamAuditConfigPtrOutput)
}
type IamAuditConfigPtrInput interface {
pulumi.Input
ToIamAuditConfigPtrOutput() IamAuditConfigPtrOutput
ToIamAuditConfigPtrOutputWithContext(ctx context.Context) IamAuditConfigPtrOutput
}
type iamAuditConfigPtrType IamAuditConfigArgs
func (*iamAuditConfigPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**IamAuditConfig)(nil))
}
func (i *iamAuditConfigPtrType) ToIamAuditConfigPtrOutput() IamAuditConfigPtrOutput {
return i.ToIamAuditConfigPtrOutputWithContext(context.Background())
}
func (i *iamAuditConfigPtrType) ToIamAuditConfigPtrOutputWithContext(ctx context.Context) IamAuditConfigPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamAuditConfigPtrOutput)
}
// IamAuditConfigArrayInput is an input type that accepts IamAuditConfigArray and IamAuditConfigArrayOutput values.
// You can construct a concrete instance of `IamAuditConfigArrayInput` via:
//
// IamAuditConfigArray{ IamAuditConfigArgs{...} }
type IamAuditConfigArrayInput interface {
pulumi.Input
ToIamAuditConfigArrayOutput() IamAuditConfigArrayOutput
ToIamAuditConfigArrayOutputWithContext(context.Context) IamAuditConfigArrayOutput
}
type IamAuditConfigArray []IamAuditConfigInput
func (IamAuditConfigArray) ElementType() reflect.Type {
return reflect.TypeOf(([]*IamAuditConfig)(nil))
}
func (i IamAuditConfigArray) ToIamAuditConfigArrayOutput() IamAuditConfigArrayOutput {
return i.ToIamAuditConfigArrayOutputWithContext(context.Background())
}
func (i IamAuditConfigArray) ToIamAuditConfigArrayOutputWithContext(ctx context.Context) IamAuditConfigArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamAuditConfigArrayOutput)
}
// IamAuditConfigMapInput is an input type that accepts IamAuditConfigMap and IamAuditConfigMapOutput values.
// You can construct a concrete instance of `IamAuditConfigMapInput` via:
//
// IamAuditConfigMap{ "key": IamAuditConfigArgs{...} }
type IamAuditConfigMapInput interface {
pulumi.Input
ToIamAuditConfigMapOutput() IamAuditConfigMapOutput
ToIamAuditConfigMapOutputWithContext(context.Context) IamAuditConfigMapOutput
}
type IamAuditConfigMap map[string]IamAuditConfigInput
func (IamAuditConfigMap) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*IamAuditConfig)(nil))
}
func (i IamAuditConfigMap) ToIamAuditConfigMapOutput() IamAuditConfigMapOutput {
return i.ToIamAuditConfigMapOutputWithContext(context.Background())
}
func (i IamAuditConfigMap) ToIamAuditConfigMapOutputWithContext(ctx context.Context) IamAuditConfigMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(IamAuditConfigMapOutput)
}
type IamAuditConfigOutput struct {
*pulumi.OutputState
}
func (IamAuditConfigOutput) ElementType() reflect.Type {
return reflect.TypeOf((*IamAuditConfig)(nil))
}
func (o IamAuditConfigOutput) ToIamAuditConfigOutput() IamAuditConfigOutput {
return o
}
func (o IamAuditConfigOutput) ToIamAuditConfigOutputWithContext(ctx context.Context) IamAuditConfigOutput {
return o
}
func (o IamAuditConfigOutput) ToIamAuditConfigPtrOutput() IamAuditConfigPtrOutput {
return o.ToIamAuditConfigPtrOutputWithContext(context.Background())
}
func (o IamAuditConfigOutput) ToIamAuditConfigPtrOutputWithContext(ctx context.Context) IamAuditConfigPtrOutput {
return o.ApplyT(func(v IamAuditConfig) *IamAuditConfig {
return &v
}).(IamAuditConfigPtrOutput)
}
type IamAuditConfigPtrOutput struct {
*pulumi.OutputState
}
func (IamAuditConfigPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**IamAuditConfig)(nil))
}
func (o IamAuditConfigPtrOutput) ToIamAuditConfigPtrOutput() IamAuditConfigPtrOutput {
return o
}
func (o IamAuditConfigPtrOutput) ToIamAuditConfigPtrOutputWithContext(ctx context.Context) IamAuditConfigPtrOutput {
return o
}
type IamAuditConfigArrayOutput struct{ *pulumi.OutputState }
func (IamAuditConfigArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]IamAuditConfig)(nil))
}
func (o IamAuditConfigArrayOutput) ToIamAuditConfigArrayOutput() IamAuditConfigArrayOutput {
return o
}
func (o IamAuditConfigArrayOutput) ToIamAuditConfigArrayOutputWithContext(ctx context.Context) IamAuditConfigArrayOutput {
return o
}
func (o IamAuditConfigArrayOutput) Index(i pulumi.IntInput) IamAuditConfigOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) IamAuditConfig {
return vs[0].([]IamAuditConfig)[vs[1].(int)]
}).(IamAuditConfigOutput)
}
type IamAuditConfigMapOutput struct{ *pulumi.OutputState }
func (IamAuditConfigMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]IamAuditConfig)(nil))
}
func (o IamAuditConfigMapOutput) ToIamAuditConfigMapOutput() IamAuditConfigMapOutput {
return o
}
func (o IamAuditConfigMapOutput) ToIamAuditConfigMapOutputWithContext(ctx context.Context) IamAuditConfigMapOutput {
return o
}
func (o IamAuditConfigMapOutput) MapIndex(k pulumi.StringInput) IamAuditConfigOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) IamAuditConfig {
return vs[0].(map[string]IamAuditConfig)[vs[1].(string)]
}).(IamAuditConfigOutput)
}
func init() {
pulumi.RegisterOutputType(IamAuditConfigOutput{})
pulumi.RegisterOutputType(IamAuditConfigPtrOutput{})
pulumi.RegisterOutputType(IamAuditConfigArrayOutput{})
pulumi.RegisterOutputType(IamAuditConfigMapOutput{})
}