/
inspectionCustomControls.go
415 lines (353 loc) · 18.6 KB
/
inspectionCustomControls.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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
// 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 zpa
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa/internal"
)
type InspectionCustomControls struct {
pulumi.CustomResourceState
// The performed action
Action pulumi.StringOutput `pulumi:"action"`
ActionValue pulumi.StringOutput `pulumi:"actionValue"`
// Name of the inspection profile
AssociatedInspectionProfileNames InspectionCustomControlsAssociatedInspectionProfileNameArrayOutput `pulumi:"associatedInspectionProfileNames"`
ControlNumber pulumi.StringOutput `pulumi:"controlNumber"`
// The control rule in JSON format that has the conditions and type of control for the inspection control
ControlRuleJson pulumi.StringOutput `pulumi:"controlRuleJson"`
ControlType pulumi.StringOutput `pulumi:"controlType"`
// The performed action
DefaultAction pulumi.StringOutput `pulumi:"defaultAction"`
// This is used to provide the redirect URL if the default action is set to REDIRECT
DefaultActionValue pulumi.StringOutput `pulumi:"defaultActionValue"`
// Description of the custom control
Description pulumi.StringOutput `pulumi:"description"`
Name pulumi.StringOutput `pulumi:"name"`
// OWASP Predefined Paranoia Level. Range: [1-4], inclusive
ParanoiaLevel pulumi.StringOutput `pulumi:"paranoiaLevel"`
ProtocolType pulumi.StringOutput `pulumi:"protocolType"`
// Rules of the custom controls applied as conditions (JSON)
Rules InspectionCustomControlsRuleArrayOutput `pulumi:"rules"`
// Severity of the control number
Severity pulumi.StringOutput `pulumi:"severity"`
// Rules to be applied to the request or response type
Type pulumi.StringOutput `pulumi:"type"`
Version pulumi.StringOutput `pulumi:"version"`
}
// NewInspectionCustomControls registers a new resource with the given unique name, arguments, and options.
func NewInspectionCustomControls(ctx *pulumi.Context,
name string, args *InspectionCustomControlsArgs, opts ...pulumi.ResourceOption) (*InspectionCustomControls, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.DefaultAction == nil {
return nil, errors.New("invalid value for required argument 'DefaultAction'")
}
if args.Severity == nil {
return nil, errors.New("invalid value for required argument 'Severity'")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource InspectionCustomControls
err := ctx.RegisterResource("zpa:index/inspectionCustomControls:InspectionCustomControls", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInspectionCustomControls gets an existing InspectionCustomControls 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 GetInspectionCustomControls(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InspectionCustomControlsState, opts ...pulumi.ResourceOption) (*InspectionCustomControls, error) {
var resource InspectionCustomControls
err := ctx.ReadResource("zpa:index/inspectionCustomControls:InspectionCustomControls", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InspectionCustomControls resources.
type inspectionCustomControlsState struct {
// The performed action
Action *string `pulumi:"action"`
ActionValue *string `pulumi:"actionValue"`
// Name of the inspection profile
AssociatedInspectionProfileNames []InspectionCustomControlsAssociatedInspectionProfileName `pulumi:"associatedInspectionProfileNames"`
ControlNumber *string `pulumi:"controlNumber"`
// The control rule in JSON format that has the conditions and type of control for the inspection control
ControlRuleJson *string `pulumi:"controlRuleJson"`
ControlType *string `pulumi:"controlType"`
// The performed action
DefaultAction *string `pulumi:"defaultAction"`
// This is used to provide the redirect URL if the default action is set to REDIRECT
DefaultActionValue *string `pulumi:"defaultActionValue"`
// Description of the custom control
Description *string `pulumi:"description"`
Name *string `pulumi:"name"`
// OWASP Predefined Paranoia Level. Range: [1-4], inclusive
ParanoiaLevel *string `pulumi:"paranoiaLevel"`
ProtocolType *string `pulumi:"protocolType"`
// Rules of the custom controls applied as conditions (JSON)
Rules []InspectionCustomControlsRule `pulumi:"rules"`
// Severity of the control number
Severity *string `pulumi:"severity"`
// Rules to be applied to the request or response type
Type *string `pulumi:"type"`
Version *string `pulumi:"version"`
}
type InspectionCustomControlsState struct {
// The performed action
Action pulumi.StringPtrInput
ActionValue pulumi.StringPtrInput
// Name of the inspection profile
AssociatedInspectionProfileNames InspectionCustomControlsAssociatedInspectionProfileNameArrayInput
ControlNumber pulumi.StringPtrInput
// The control rule in JSON format that has the conditions and type of control for the inspection control
ControlRuleJson pulumi.StringPtrInput
ControlType pulumi.StringPtrInput
// The performed action
DefaultAction pulumi.StringPtrInput
// This is used to provide the redirect URL if the default action is set to REDIRECT
DefaultActionValue pulumi.StringPtrInput
// Description of the custom control
Description pulumi.StringPtrInput
Name pulumi.StringPtrInput
// OWASP Predefined Paranoia Level. Range: [1-4], inclusive
ParanoiaLevel pulumi.StringPtrInput
ProtocolType pulumi.StringPtrInput
// Rules of the custom controls applied as conditions (JSON)
Rules InspectionCustomControlsRuleArrayInput
// Severity of the control number
Severity pulumi.StringPtrInput
// Rules to be applied to the request or response type
Type pulumi.StringPtrInput
Version pulumi.StringPtrInput
}
func (InspectionCustomControlsState) ElementType() reflect.Type {
return reflect.TypeOf((*inspectionCustomControlsState)(nil)).Elem()
}
type inspectionCustomControlsArgs struct {
// The performed action
Action *string `pulumi:"action"`
ActionValue *string `pulumi:"actionValue"`
// Name of the inspection profile
AssociatedInspectionProfileNames []InspectionCustomControlsAssociatedInspectionProfileName `pulumi:"associatedInspectionProfileNames"`
ControlNumber *string `pulumi:"controlNumber"`
// The control rule in JSON format that has the conditions and type of control for the inspection control
ControlRuleJson *string `pulumi:"controlRuleJson"`
ControlType *string `pulumi:"controlType"`
// The performed action
DefaultAction string `pulumi:"defaultAction"`
// This is used to provide the redirect URL if the default action is set to REDIRECT
DefaultActionValue *string `pulumi:"defaultActionValue"`
// Description of the custom control
Description *string `pulumi:"description"`
Name *string `pulumi:"name"`
// OWASP Predefined Paranoia Level. Range: [1-4], inclusive
ParanoiaLevel *string `pulumi:"paranoiaLevel"`
ProtocolType *string `pulumi:"protocolType"`
// Rules of the custom controls applied as conditions (JSON)
Rules []InspectionCustomControlsRule `pulumi:"rules"`
// Severity of the control number
Severity string `pulumi:"severity"`
// Rules to be applied to the request or response type
Type string `pulumi:"type"`
Version *string `pulumi:"version"`
}
// The set of arguments for constructing a InspectionCustomControls resource.
type InspectionCustomControlsArgs struct {
// The performed action
Action pulumi.StringPtrInput
ActionValue pulumi.StringPtrInput
// Name of the inspection profile
AssociatedInspectionProfileNames InspectionCustomControlsAssociatedInspectionProfileNameArrayInput
ControlNumber pulumi.StringPtrInput
// The control rule in JSON format that has the conditions and type of control for the inspection control
ControlRuleJson pulumi.StringPtrInput
ControlType pulumi.StringPtrInput
// The performed action
DefaultAction pulumi.StringInput
// This is used to provide the redirect URL if the default action is set to REDIRECT
DefaultActionValue pulumi.StringPtrInput
// Description of the custom control
Description pulumi.StringPtrInput
Name pulumi.StringPtrInput
// OWASP Predefined Paranoia Level. Range: [1-4], inclusive
ParanoiaLevel pulumi.StringPtrInput
ProtocolType pulumi.StringPtrInput
// Rules of the custom controls applied as conditions (JSON)
Rules InspectionCustomControlsRuleArrayInput
// Severity of the control number
Severity pulumi.StringInput
// Rules to be applied to the request or response type
Type pulumi.StringInput
Version pulumi.StringPtrInput
}
func (InspectionCustomControlsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*inspectionCustomControlsArgs)(nil)).Elem()
}
type InspectionCustomControlsInput interface {
pulumi.Input
ToInspectionCustomControlsOutput() InspectionCustomControlsOutput
ToInspectionCustomControlsOutputWithContext(ctx context.Context) InspectionCustomControlsOutput
}
func (*InspectionCustomControls) ElementType() reflect.Type {
return reflect.TypeOf((**InspectionCustomControls)(nil)).Elem()
}
func (i *InspectionCustomControls) ToInspectionCustomControlsOutput() InspectionCustomControlsOutput {
return i.ToInspectionCustomControlsOutputWithContext(context.Background())
}
func (i *InspectionCustomControls) ToInspectionCustomControlsOutputWithContext(ctx context.Context) InspectionCustomControlsOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectionCustomControlsOutput)
}
// InspectionCustomControlsArrayInput is an input type that accepts InspectionCustomControlsArray and InspectionCustomControlsArrayOutput values.
// You can construct a concrete instance of `InspectionCustomControlsArrayInput` via:
//
// InspectionCustomControlsArray{ InspectionCustomControlsArgs{...} }
type InspectionCustomControlsArrayInput interface {
pulumi.Input
ToInspectionCustomControlsArrayOutput() InspectionCustomControlsArrayOutput
ToInspectionCustomControlsArrayOutputWithContext(context.Context) InspectionCustomControlsArrayOutput
}
type InspectionCustomControlsArray []InspectionCustomControlsInput
func (InspectionCustomControlsArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InspectionCustomControls)(nil)).Elem()
}
func (i InspectionCustomControlsArray) ToInspectionCustomControlsArrayOutput() InspectionCustomControlsArrayOutput {
return i.ToInspectionCustomControlsArrayOutputWithContext(context.Background())
}
func (i InspectionCustomControlsArray) ToInspectionCustomControlsArrayOutputWithContext(ctx context.Context) InspectionCustomControlsArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectionCustomControlsArrayOutput)
}
// InspectionCustomControlsMapInput is an input type that accepts InspectionCustomControlsMap and InspectionCustomControlsMapOutput values.
// You can construct a concrete instance of `InspectionCustomControlsMapInput` via:
//
// InspectionCustomControlsMap{ "key": InspectionCustomControlsArgs{...} }
type InspectionCustomControlsMapInput interface {
pulumi.Input
ToInspectionCustomControlsMapOutput() InspectionCustomControlsMapOutput
ToInspectionCustomControlsMapOutputWithContext(context.Context) InspectionCustomControlsMapOutput
}
type InspectionCustomControlsMap map[string]InspectionCustomControlsInput
func (InspectionCustomControlsMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InspectionCustomControls)(nil)).Elem()
}
func (i InspectionCustomControlsMap) ToInspectionCustomControlsMapOutput() InspectionCustomControlsMapOutput {
return i.ToInspectionCustomControlsMapOutputWithContext(context.Background())
}
func (i InspectionCustomControlsMap) ToInspectionCustomControlsMapOutputWithContext(ctx context.Context) InspectionCustomControlsMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectionCustomControlsMapOutput)
}
type InspectionCustomControlsOutput struct{ *pulumi.OutputState }
func (InspectionCustomControlsOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InspectionCustomControls)(nil)).Elem()
}
func (o InspectionCustomControlsOutput) ToInspectionCustomControlsOutput() InspectionCustomControlsOutput {
return o
}
func (o InspectionCustomControlsOutput) ToInspectionCustomControlsOutputWithContext(ctx context.Context) InspectionCustomControlsOutput {
return o
}
// The performed action
func (o InspectionCustomControlsOutput) Action() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.Action }).(pulumi.StringOutput)
}
func (o InspectionCustomControlsOutput) ActionValue() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.ActionValue }).(pulumi.StringOutput)
}
// Name of the inspection profile
func (o InspectionCustomControlsOutput) AssociatedInspectionProfileNames() InspectionCustomControlsAssociatedInspectionProfileNameArrayOutput {
return o.ApplyT(func(v *InspectionCustomControls) InspectionCustomControlsAssociatedInspectionProfileNameArrayOutput {
return v.AssociatedInspectionProfileNames
}).(InspectionCustomControlsAssociatedInspectionProfileNameArrayOutput)
}
func (o InspectionCustomControlsOutput) ControlNumber() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.ControlNumber }).(pulumi.StringOutput)
}
// The control rule in JSON format that has the conditions and type of control for the inspection control
func (o InspectionCustomControlsOutput) ControlRuleJson() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.ControlRuleJson }).(pulumi.StringOutput)
}
func (o InspectionCustomControlsOutput) ControlType() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.ControlType }).(pulumi.StringOutput)
}
// The performed action
func (o InspectionCustomControlsOutput) DefaultAction() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.DefaultAction }).(pulumi.StringOutput)
}
// This is used to provide the redirect URL if the default action is set to REDIRECT
func (o InspectionCustomControlsOutput) DefaultActionValue() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.DefaultActionValue }).(pulumi.StringOutput)
}
// Description of the custom control
func (o InspectionCustomControlsOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
func (o InspectionCustomControlsOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// OWASP Predefined Paranoia Level. Range: [1-4], inclusive
func (o InspectionCustomControlsOutput) ParanoiaLevel() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.ParanoiaLevel }).(pulumi.StringOutput)
}
func (o InspectionCustomControlsOutput) ProtocolType() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.ProtocolType }).(pulumi.StringOutput)
}
// Rules of the custom controls applied as conditions (JSON)
func (o InspectionCustomControlsOutput) Rules() InspectionCustomControlsRuleArrayOutput {
return o.ApplyT(func(v *InspectionCustomControls) InspectionCustomControlsRuleArrayOutput { return v.Rules }).(InspectionCustomControlsRuleArrayOutput)
}
// Severity of the control number
func (o InspectionCustomControlsOutput) Severity() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.Severity }).(pulumi.StringOutput)
}
// Rules to be applied to the request or response type
func (o InspectionCustomControlsOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func (o InspectionCustomControlsOutput) Version() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionCustomControls) pulumi.StringOutput { return v.Version }).(pulumi.StringOutput)
}
type InspectionCustomControlsArrayOutput struct{ *pulumi.OutputState }
func (InspectionCustomControlsArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InspectionCustomControls)(nil)).Elem()
}
func (o InspectionCustomControlsArrayOutput) ToInspectionCustomControlsArrayOutput() InspectionCustomControlsArrayOutput {
return o
}
func (o InspectionCustomControlsArrayOutput) ToInspectionCustomControlsArrayOutputWithContext(ctx context.Context) InspectionCustomControlsArrayOutput {
return o
}
func (o InspectionCustomControlsArrayOutput) Index(i pulumi.IntInput) InspectionCustomControlsOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InspectionCustomControls {
return vs[0].([]*InspectionCustomControls)[vs[1].(int)]
}).(InspectionCustomControlsOutput)
}
type InspectionCustomControlsMapOutput struct{ *pulumi.OutputState }
func (InspectionCustomControlsMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InspectionCustomControls)(nil)).Elem()
}
func (o InspectionCustomControlsMapOutput) ToInspectionCustomControlsMapOutput() InspectionCustomControlsMapOutput {
return o
}
func (o InspectionCustomControlsMapOutput) ToInspectionCustomControlsMapOutputWithContext(ctx context.Context) InspectionCustomControlsMapOutput {
return o
}
func (o InspectionCustomControlsMapOutput) MapIndex(k pulumi.StringInput) InspectionCustomControlsOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InspectionCustomControls {
return vs[0].(map[string]*InspectionCustomControls)[vs[1].(string)]
}).(InspectionCustomControlsOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InspectionCustomControlsInput)(nil)).Elem(), &InspectionCustomControls{})
pulumi.RegisterInputType(reflect.TypeOf((*InspectionCustomControlsArrayInput)(nil)).Elem(), InspectionCustomControlsArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InspectionCustomControlsMapInput)(nil)).Elem(), InspectionCustomControlsMap{})
pulumi.RegisterOutputType(InspectionCustomControlsOutput{})
pulumi.RegisterOutputType(InspectionCustomControlsArrayOutput{})
pulumi.RegisterOutputType(InspectionCustomControlsMapOutput{})
}