/
pulumiTypes.go
338 lines (262 loc) · 15.8 KB
/
pulumiTypes.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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
// *** 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 cloudtrail
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type TrailEventSelector struct {
// Configuration block for data events. See details below.
DataResources []TrailEventSelectorDataResource `pulumi:"dataResources"`
// Whether to include management events for your trail.
IncludeManagementEvents *bool `pulumi:"includeManagementEvents"`
// Type of events to log. Valid values are `ReadOnly`, `WriteOnly`, `All`. Default value is `All`.
ReadWriteType *string `pulumi:"readWriteType"`
}
// TrailEventSelectorInput is an input type that accepts TrailEventSelectorArgs and TrailEventSelectorOutput values.
// You can construct a concrete instance of `TrailEventSelectorInput` via:
//
// TrailEventSelectorArgs{...}
type TrailEventSelectorInput interface {
pulumi.Input
ToTrailEventSelectorOutput() TrailEventSelectorOutput
ToTrailEventSelectorOutputWithContext(context.Context) TrailEventSelectorOutput
}
type TrailEventSelectorArgs struct {
// Configuration block for data events. See details below.
DataResources TrailEventSelectorDataResourceArrayInput `pulumi:"dataResources"`
// Whether to include management events for your trail.
IncludeManagementEvents pulumi.BoolPtrInput `pulumi:"includeManagementEvents"`
// Type of events to log. Valid values are `ReadOnly`, `WriteOnly`, `All`. Default value is `All`.
ReadWriteType pulumi.StringPtrInput `pulumi:"readWriteType"`
}
func (TrailEventSelectorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TrailEventSelector)(nil)).Elem()
}
func (i TrailEventSelectorArgs) ToTrailEventSelectorOutput() TrailEventSelectorOutput {
return i.ToTrailEventSelectorOutputWithContext(context.Background())
}
func (i TrailEventSelectorArgs) ToTrailEventSelectorOutputWithContext(ctx context.Context) TrailEventSelectorOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailEventSelectorOutput)
}
// TrailEventSelectorArrayInput is an input type that accepts TrailEventSelectorArray and TrailEventSelectorArrayOutput values.
// You can construct a concrete instance of `TrailEventSelectorArrayInput` via:
//
// TrailEventSelectorArray{ TrailEventSelectorArgs{...} }
type TrailEventSelectorArrayInput interface {
pulumi.Input
ToTrailEventSelectorArrayOutput() TrailEventSelectorArrayOutput
ToTrailEventSelectorArrayOutputWithContext(context.Context) TrailEventSelectorArrayOutput
}
type TrailEventSelectorArray []TrailEventSelectorInput
func (TrailEventSelectorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TrailEventSelector)(nil)).Elem()
}
func (i TrailEventSelectorArray) ToTrailEventSelectorArrayOutput() TrailEventSelectorArrayOutput {
return i.ToTrailEventSelectorArrayOutputWithContext(context.Background())
}
func (i TrailEventSelectorArray) ToTrailEventSelectorArrayOutputWithContext(ctx context.Context) TrailEventSelectorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailEventSelectorArrayOutput)
}
type TrailEventSelectorOutput struct{ *pulumi.OutputState }
func (TrailEventSelectorOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TrailEventSelector)(nil)).Elem()
}
func (o TrailEventSelectorOutput) ToTrailEventSelectorOutput() TrailEventSelectorOutput {
return o
}
func (o TrailEventSelectorOutput) ToTrailEventSelectorOutputWithContext(ctx context.Context) TrailEventSelectorOutput {
return o
}
// Configuration block for data events. See details below.
func (o TrailEventSelectorOutput) DataResources() TrailEventSelectorDataResourceArrayOutput {
return o.ApplyT(func(v TrailEventSelector) []TrailEventSelectorDataResource { return v.DataResources }).(TrailEventSelectorDataResourceArrayOutput)
}
// Whether to include management events for your trail.
func (o TrailEventSelectorOutput) IncludeManagementEvents() pulumi.BoolPtrOutput {
return o.ApplyT(func(v TrailEventSelector) *bool { return v.IncludeManagementEvents }).(pulumi.BoolPtrOutput)
}
// Type of events to log. Valid values are `ReadOnly`, `WriteOnly`, `All`. Default value is `All`.
func (o TrailEventSelectorOutput) ReadWriteType() pulumi.StringPtrOutput {
return o.ApplyT(func(v TrailEventSelector) *string { return v.ReadWriteType }).(pulumi.StringPtrOutput)
}
type TrailEventSelectorArrayOutput struct{ *pulumi.OutputState }
func (TrailEventSelectorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TrailEventSelector)(nil)).Elem()
}
func (o TrailEventSelectorArrayOutput) ToTrailEventSelectorArrayOutput() TrailEventSelectorArrayOutput {
return o
}
func (o TrailEventSelectorArrayOutput) ToTrailEventSelectorArrayOutputWithContext(ctx context.Context) TrailEventSelectorArrayOutput {
return o
}
func (o TrailEventSelectorArrayOutput) Index(i pulumi.IntInput) TrailEventSelectorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TrailEventSelector {
return vs[0].([]TrailEventSelector)[vs[1].(int)]
}).(TrailEventSelectorOutput)
}
type TrailEventSelectorDataResource struct {
// Resource type in which you want to log data events. You can specify only the following value: "AWS::S3::Object", "AWS::Lambda::Function" and "AWS::DynamoDB::Table".
Type string `pulumi:"type"`
// List of ARN strings or partial ARN strings to specify selectors for data audit events over data resources. ARN list is specific to single-valued `type`. For example, `arn:aws:s3:::<bucket name>/` for all objects in a bucket, `arn:aws:s3:::<bucket name>/key` for specific objects, `arn:aws:lambda` for all lambda events within an account, `arn:aws:lambda:<region>:<account number>:function:<function name>` for a specific Lambda function, `arn:aws:dynamodb` for all DDB events for all tables within an account, or `arn:aws:dynamodb:<region>:<account number>:table/<table name>` for a specific DynamoDB table.
Values []string `pulumi:"values"`
}
// TrailEventSelectorDataResourceInput is an input type that accepts TrailEventSelectorDataResourceArgs and TrailEventSelectorDataResourceOutput values.
// You can construct a concrete instance of `TrailEventSelectorDataResourceInput` via:
//
// TrailEventSelectorDataResourceArgs{...}
type TrailEventSelectorDataResourceInput interface {
pulumi.Input
ToTrailEventSelectorDataResourceOutput() TrailEventSelectorDataResourceOutput
ToTrailEventSelectorDataResourceOutputWithContext(context.Context) TrailEventSelectorDataResourceOutput
}
type TrailEventSelectorDataResourceArgs struct {
// Resource type in which you want to log data events. You can specify only the following value: "AWS::S3::Object", "AWS::Lambda::Function" and "AWS::DynamoDB::Table".
Type pulumi.StringInput `pulumi:"type"`
// List of ARN strings or partial ARN strings to specify selectors for data audit events over data resources. ARN list is specific to single-valued `type`. For example, `arn:aws:s3:::<bucket name>/` for all objects in a bucket, `arn:aws:s3:::<bucket name>/key` for specific objects, `arn:aws:lambda` for all lambda events within an account, `arn:aws:lambda:<region>:<account number>:function:<function name>` for a specific Lambda function, `arn:aws:dynamodb` for all DDB events for all tables within an account, or `arn:aws:dynamodb:<region>:<account number>:table/<table name>` for a specific DynamoDB table.
Values pulumi.StringArrayInput `pulumi:"values"`
}
func (TrailEventSelectorDataResourceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TrailEventSelectorDataResource)(nil)).Elem()
}
func (i TrailEventSelectorDataResourceArgs) ToTrailEventSelectorDataResourceOutput() TrailEventSelectorDataResourceOutput {
return i.ToTrailEventSelectorDataResourceOutputWithContext(context.Background())
}
func (i TrailEventSelectorDataResourceArgs) ToTrailEventSelectorDataResourceOutputWithContext(ctx context.Context) TrailEventSelectorDataResourceOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailEventSelectorDataResourceOutput)
}
// TrailEventSelectorDataResourceArrayInput is an input type that accepts TrailEventSelectorDataResourceArray and TrailEventSelectorDataResourceArrayOutput values.
// You can construct a concrete instance of `TrailEventSelectorDataResourceArrayInput` via:
//
// TrailEventSelectorDataResourceArray{ TrailEventSelectorDataResourceArgs{...} }
type TrailEventSelectorDataResourceArrayInput interface {
pulumi.Input
ToTrailEventSelectorDataResourceArrayOutput() TrailEventSelectorDataResourceArrayOutput
ToTrailEventSelectorDataResourceArrayOutputWithContext(context.Context) TrailEventSelectorDataResourceArrayOutput
}
type TrailEventSelectorDataResourceArray []TrailEventSelectorDataResourceInput
func (TrailEventSelectorDataResourceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TrailEventSelectorDataResource)(nil)).Elem()
}
func (i TrailEventSelectorDataResourceArray) ToTrailEventSelectorDataResourceArrayOutput() TrailEventSelectorDataResourceArrayOutput {
return i.ToTrailEventSelectorDataResourceArrayOutputWithContext(context.Background())
}
func (i TrailEventSelectorDataResourceArray) ToTrailEventSelectorDataResourceArrayOutputWithContext(ctx context.Context) TrailEventSelectorDataResourceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailEventSelectorDataResourceArrayOutput)
}
type TrailEventSelectorDataResourceOutput struct{ *pulumi.OutputState }
func (TrailEventSelectorDataResourceOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TrailEventSelectorDataResource)(nil)).Elem()
}
func (o TrailEventSelectorDataResourceOutput) ToTrailEventSelectorDataResourceOutput() TrailEventSelectorDataResourceOutput {
return o
}
func (o TrailEventSelectorDataResourceOutput) ToTrailEventSelectorDataResourceOutputWithContext(ctx context.Context) TrailEventSelectorDataResourceOutput {
return o
}
// Resource type in which you want to log data events. You can specify only the following value: "AWS::S3::Object", "AWS::Lambda::Function" and "AWS::DynamoDB::Table".
func (o TrailEventSelectorDataResourceOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v TrailEventSelectorDataResource) string { return v.Type }).(pulumi.StringOutput)
}
// List of ARN strings or partial ARN strings to specify selectors for data audit events over data resources. ARN list is specific to single-valued `type`. For example, `arn:aws:s3:::<bucket name>/` for all objects in a bucket, `arn:aws:s3:::<bucket name>/key` for specific objects, `arn:aws:lambda` for all lambda events within an account, `arn:aws:lambda:<region>:<account number>:function:<function name>` for a specific Lambda function, `arn:aws:dynamodb` for all DDB events for all tables within an account, or `arn:aws:dynamodb:<region>:<account number>:table/<table name>` for a specific DynamoDB table.
func (o TrailEventSelectorDataResourceOutput) Values() pulumi.StringArrayOutput {
return o.ApplyT(func(v TrailEventSelectorDataResource) []string { return v.Values }).(pulumi.StringArrayOutput)
}
type TrailEventSelectorDataResourceArrayOutput struct{ *pulumi.OutputState }
func (TrailEventSelectorDataResourceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TrailEventSelectorDataResource)(nil)).Elem()
}
func (o TrailEventSelectorDataResourceArrayOutput) ToTrailEventSelectorDataResourceArrayOutput() TrailEventSelectorDataResourceArrayOutput {
return o
}
func (o TrailEventSelectorDataResourceArrayOutput) ToTrailEventSelectorDataResourceArrayOutputWithContext(ctx context.Context) TrailEventSelectorDataResourceArrayOutput {
return o
}
func (o TrailEventSelectorDataResourceArrayOutput) Index(i pulumi.IntInput) TrailEventSelectorDataResourceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TrailEventSelectorDataResource {
return vs[0].([]TrailEventSelectorDataResource)[vs[1].(int)]
}).(TrailEventSelectorDataResourceOutput)
}
type TrailInsightSelector struct {
// Type of insights to log on a trail. The valid value is `ApiCallRateInsight`.
InsightType string `pulumi:"insightType"`
}
// TrailInsightSelectorInput is an input type that accepts TrailInsightSelectorArgs and TrailInsightSelectorOutput values.
// You can construct a concrete instance of `TrailInsightSelectorInput` via:
//
// TrailInsightSelectorArgs{...}
type TrailInsightSelectorInput interface {
pulumi.Input
ToTrailInsightSelectorOutput() TrailInsightSelectorOutput
ToTrailInsightSelectorOutputWithContext(context.Context) TrailInsightSelectorOutput
}
type TrailInsightSelectorArgs struct {
// Type of insights to log on a trail. The valid value is `ApiCallRateInsight`.
InsightType pulumi.StringInput `pulumi:"insightType"`
}
func (TrailInsightSelectorArgs) ElementType() reflect.Type {
return reflect.TypeOf((*TrailInsightSelector)(nil)).Elem()
}
func (i TrailInsightSelectorArgs) ToTrailInsightSelectorOutput() TrailInsightSelectorOutput {
return i.ToTrailInsightSelectorOutputWithContext(context.Background())
}
func (i TrailInsightSelectorArgs) ToTrailInsightSelectorOutputWithContext(ctx context.Context) TrailInsightSelectorOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailInsightSelectorOutput)
}
// TrailInsightSelectorArrayInput is an input type that accepts TrailInsightSelectorArray and TrailInsightSelectorArrayOutput values.
// You can construct a concrete instance of `TrailInsightSelectorArrayInput` via:
//
// TrailInsightSelectorArray{ TrailInsightSelectorArgs{...} }
type TrailInsightSelectorArrayInput interface {
pulumi.Input
ToTrailInsightSelectorArrayOutput() TrailInsightSelectorArrayOutput
ToTrailInsightSelectorArrayOutputWithContext(context.Context) TrailInsightSelectorArrayOutput
}
type TrailInsightSelectorArray []TrailInsightSelectorInput
func (TrailInsightSelectorArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]TrailInsightSelector)(nil)).Elem()
}
func (i TrailInsightSelectorArray) ToTrailInsightSelectorArrayOutput() TrailInsightSelectorArrayOutput {
return i.ToTrailInsightSelectorArrayOutputWithContext(context.Background())
}
func (i TrailInsightSelectorArray) ToTrailInsightSelectorArrayOutputWithContext(ctx context.Context) TrailInsightSelectorArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(TrailInsightSelectorArrayOutput)
}
type TrailInsightSelectorOutput struct{ *pulumi.OutputState }
func (TrailInsightSelectorOutput) ElementType() reflect.Type {
return reflect.TypeOf((*TrailInsightSelector)(nil)).Elem()
}
func (o TrailInsightSelectorOutput) ToTrailInsightSelectorOutput() TrailInsightSelectorOutput {
return o
}
func (o TrailInsightSelectorOutput) ToTrailInsightSelectorOutputWithContext(ctx context.Context) TrailInsightSelectorOutput {
return o
}
// Type of insights to log on a trail. The valid value is `ApiCallRateInsight`.
func (o TrailInsightSelectorOutput) InsightType() pulumi.StringOutput {
return o.ApplyT(func(v TrailInsightSelector) string { return v.InsightType }).(pulumi.StringOutput)
}
type TrailInsightSelectorArrayOutput struct{ *pulumi.OutputState }
func (TrailInsightSelectorArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]TrailInsightSelector)(nil)).Elem()
}
func (o TrailInsightSelectorArrayOutput) ToTrailInsightSelectorArrayOutput() TrailInsightSelectorArrayOutput {
return o
}
func (o TrailInsightSelectorArrayOutput) ToTrailInsightSelectorArrayOutputWithContext(ctx context.Context) TrailInsightSelectorArrayOutput {
return o
}
func (o TrailInsightSelectorArrayOutput) Index(i pulumi.IntInput) TrailInsightSelectorOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) TrailInsightSelector {
return vs[0].([]TrailInsightSelector)[vs[1].(int)]
}).(TrailInsightSelectorOutput)
}
func init() {
pulumi.RegisterOutputType(TrailEventSelectorOutput{})
pulumi.RegisterOutputType(TrailEventSelectorArrayOutput{})
pulumi.RegisterOutputType(TrailEventSelectorDataResourceOutput{})
pulumi.RegisterOutputType(TrailEventSelectorDataResourceArrayOutput{})
pulumi.RegisterOutputType(TrailInsightSelectorOutput{})
pulumi.RegisterOutputType(TrailInsightSelectorArrayOutput{})
}