/
inspectionProfile.go
344 lines (287 loc) · 15.4 KB
/
inspectionProfile.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
// 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"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa/internal"
)
// * [Official documentation](https://help.zscaler.com/zpa/about-browser-protection-profiles)
// * [API documentation](https://help.zscaler.com/zpa/configuring-appprotection-profiles-using-api)
//
// The **zpa_inspection_profile** resource creates an inspection profile in the Zscaler Private Access cloud. This resource can then be referenced in an inspection custom control resource.
type InspectionProfile struct {
pulumi.CustomResourceState
AssociateAllControls pulumi.BoolPtrOutput `pulumi:"associateAllControls"`
ControlsInfos InspectionProfileControlsInfoArrayOutput `pulumi:"controlsInfos"`
// The set of AppProtection controls used to define how inspections are managed
CustomControls InspectionProfileCustomControlArrayOutput `pulumi:"customControls"`
// The description of the AppProtection profile
Description pulumi.StringPtrOutput `pulumi:"description"`
// The actions of the predefined, custom, or override controls
GlobalControlActions pulumi.StringArrayOutput `pulumi:"globalControlActions"`
IncarnationNumber pulumi.StringPtrOutput `pulumi:"incarnationNumber"`
Name pulumi.StringOutput `pulumi:"name"`
// The OWASP Predefined Paranoia Level
ParanoiaLevel pulumi.StringPtrOutput `pulumi:"paranoiaLevel"`
// The predefined controls
PredefinedControls InspectionProfilePredefinedControlArrayOutput `pulumi:"predefinedControls"`
// The protocol for the AppProtection application
PredefinedControlsVersion pulumi.StringPtrOutput `pulumi:"predefinedControlsVersion"`
// Indicates the user's choice for the ThreatLabZ Controls. Supported values: ALL and SPECIFIC
ZsDefinedControlChoice pulumi.StringPtrOutput `pulumi:"zsDefinedControlChoice"`
}
// NewInspectionProfile registers a new resource with the given unique name, arguments, and options.
func NewInspectionProfile(ctx *pulumi.Context,
name string, args *InspectionProfileArgs, opts ...pulumi.ResourceOption) (*InspectionProfile, error) {
if args == nil {
args = &InspectionProfileArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource InspectionProfile
err := ctx.RegisterResource("zpa:index/inspectionProfile:InspectionProfile", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInspectionProfile gets an existing InspectionProfile 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 GetInspectionProfile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InspectionProfileState, opts ...pulumi.ResourceOption) (*InspectionProfile, error) {
var resource InspectionProfile
err := ctx.ReadResource("zpa:index/inspectionProfile:InspectionProfile", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InspectionProfile resources.
type inspectionProfileState struct {
AssociateAllControls *bool `pulumi:"associateAllControls"`
ControlsInfos []InspectionProfileControlsInfo `pulumi:"controlsInfos"`
// The set of AppProtection controls used to define how inspections are managed
CustomControls []InspectionProfileCustomControl `pulumi:"customControls"`
// The description of the AppProtection profile
Description *string `pulumi:"description"`
// The actions of the predefined, custom, or override controls
GlobalControlActions []string `pulumi:"globalControlActions"`
IncarnationNumber *string `pulumi:"incarnationNumber"`
Name *string `pulumi:"name"`
// The OWASP Predefined Paranoia Level
ParanoiaLevel *string `pulumi:"paranoiaLevel"`
// The predefined controls
PredefinedControls []InspectionProfilePredefinedControl `pulumi:"predefinedControls"`
// The protocol for the AppProtection application
PredefinedControlsVersion *string `pulumi:"predefinedControlsVersion"`
// Indicates the user's choice for the ThreatLabZ Controls. Supported values: ALL and SPECIFIC
ZsDefinedControlChoice *string `pulumi:"zsDefinedControlChoice"`
}
type InspectionProfileState struct {
AssociateAllControls pulumi.BoolPtrInput
ControlsInfos InspectionProfileControlsInfoArrayInput
// The set of AppProtection controls used to define how inspections are managed
CustomControls InspectionProfileCustomControlArrayInput
// The description of the AppProtection profile
Description pulumi.StringPtrInput
// The actions of the predefined, custom, or override controls
GlobalControlActions pulumi.StringArrayInput
IncarnationNumber pulumi.StringPtrInput
Name pulumi.StringPtrInput
// The OWASP Predefined Paranoia Level
ParanoiaLevel pulumi.StringPtrInput
// The predefined controls
PredefinedControls InspectionProfilePredefinedControlArrayInput
// The protocol for the AppProtection application
PredefinedControlsVersion pulumi.StringPtrInput
// Indicates the user's choice for the ThreatLabZ Controls. Supported values: ALL and SPECIFIC
ZsDefinedControlChoice pulumi.StringPtrInput
}
func (InspectionProfileState) ElementType() reflect.Type {
return reflect.TypeOf((*inspectionProfileState)(nil)).Elem()
}
type inspectionProfileArgs struct {
AssociateAllControls *bool `pulumi:"associateAllControls"`
ControlsInfos []InspectionProfileControlsInfo `pulumi:"controlsInfos"`
// The set of AppProtection controls used to define how inspections are managed
CustomControls []InspectionProfileCustomControl `pulumi:"customControls"`
// The description of the AppProtection profile
Description *string `pulumi:"description"`
// The actions of the predefined, custom, or override controls
GlobalControlActions []string `pulumi:"globalControlActions"`
IncarnationNumber *string `pulumi:"incarnationNumber"`
Name *string `pulumi:"name"`
// The OWASP Predefined Paranoia Level
ParanoiaLevel *string `pulumi:"paranoiaLevel"`
// The predefined controls
PredefinedControls []InspectionProfilePredefinedControl `pulumi:"predefinedControls"`
// The protocol for the AppProtection application
PredefinedControlsVersion *string `pulumi:"predefinedControlsVersion"`
// Indicates the user's choice for the ThreatLabZ Controls. Supported values: ALL and SPECIFIC
ZsDefinedControlChoice *string `pulumi:"zsDefinedControlChoice"`
}
// The set of arguments for constructing a InspectionProfile resource.
type InspectionProfileArgs struct {
AssociateAllControls pulumi.BoolPtrInput
ControlsInfos InspectionProfileControlsInfoArrayInput
// The set of AppProtection controls used to define how inspections are managed
CustomControls InspectionProfileCustomControlArrayInput
// The description of the AppProtection profile
Description pulumi.StringPtrInput
// The actions of the predefined, custom, or override controls
GlobalControlActions pulumi.StringArrayInput
IncarnationNumber pulumi.StringPtrInput
Name pulumi.StringPtrInput
// The OWASP Predefined Paranoia Level
ParanoiaLevel pulumi.StringPtrInput
// The predefined controls
PredefinedControls InspectionProfilePredefinedControlArrayInput
// The protocol for the AppProtection application
PredefinedControlsVersion pulumi.StringPtrInput
// Indicates the user's choice for the ThreatLabZ Controls. Supported values: ALL and SPECIFIC
ZsDefinedControlChoice pulumi.StringPtrInput
}
func (InspectionProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*inspectionProfileArgs)(nil)).Elem()
}
type InspectionProfileInput interface {
pulumi.Input
ToInspectionProfileOutput() InspectionProfileOutput
ToInspectionProfileOutputWithContext(ctx context.Context) InspectionProfileOutput
}
func (*InspectionProfile) ElementType() reflect.Type {
return reflect.TypeOf((**InspectionProfile)(nil)).Elem()
}
func (i *InspectionProfile) ToInspectionProfileOutput() InspectionProfileOutput {
return i.ToInspectionProfileOutputWithContext(context.Background())
}
func (i *InspectionProfile) ToInspectionProfileOutputWithContext(ctx context.Context) InspectionProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectionProfileOutput)
}
// InspectionProfileArrayInput is an input type that accepts InspectionProfileArray and InspectionProfileArrayOutput values.
// You can construct a concrete instance of `InspectionProfileArrayInput` via:
//
// InspectionProfileArray{ InspectionProfileArgs{...} }
type InspectionProfileArrayInput interface {
pulumi.Input
ToInspectionProfileArrayOutput() InspectionProfileArrayOutput
ToInspectionProfileArrayOutputWithContext(context.Context) InspectionProfileArrayOutput
}
type InspectionProfileArray []InspectionProfileInput
func (InspectionProfileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InspectionProfile)(nil)).Elem()
}
func (i InspectionProfileArray) ToInspectionProfileArrayOutput() InspectionProfileArrayOutput {
return i.ToInspectionProfileArrayOutputWithContext(context.Background())
}
func (i InspectionProfileArray) ToInspectionProfileArrayOutputWithContext(ctx context.Context) InspectionProfileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectionProfileArrayOutput)
}
// InspectionProfileMapInput is an input type that accepts InspectionProfileMap and InspectionProfileMapOutput values.
// You can construct a concrete instance of `InspectionProfileMapInput` via:
//
// InspectionProfileMap{ "key": InspectionProfileArgs{...} }
type InspectionProfileMapInput interface {
pulumi.Input
ToInspectionProfileMapOutput() InspectionProfileMapOutput
ToInspectionProfileMapOutputWithContext(context.Context) InspectionProfileMapOutput
}
type InspectionProfileMap map[string]InspectionProfileInput
func (InspectionProfileMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InspectionProfile)(nil)).Elem()
}
func (i InspectionProfileMap) ToInspectionProfileMapOutput() InspectionProfileMapOutput {
return i.ToInspectionProfileMapOutputWithContext(context.Background())
}
func (i InspectionProfileMap) ToInspectionProfileMapOutputWithContext(ctx context.Context) InspectionProfileMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InspectionProfileMapOutput)
}
type InspectionProfileOutput struct{ *pulumi.OutputState }
func (InspectionProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InspectionProfile)(nil)).Elem()
}
func (o InspectionProfileOutput) ToInspectionProfileOutput() InspectionProfileOutput {
return o
}
func (o InspectionProfileOutput) ToInspectionProfileOutputWithContext(ctx context.Context) InspectionProfileOutput {
return o
}
func (o InspectionProfileOutput) AssociateAllControls() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.BoolPtrOutput { return v.AssociateAllControls }).(pulumi.BoolPtrOutput)
}
func (o InspectionProfileOutput) ControlsInfos() InspectionProfileControlsInfoArrayOutput {
return o.ApplyT(func(v *InspectionProfile) InspectionProfileControlsInfoArrayOutput { return v.ControlsInfos }).(InspectionProfileControlsInfoArrayOutput)
}
// The set of AppProtection controls used to define how inspections are managed
func (o InspectionProfileOutput) CustomControls() InspectionProfileCustomControlArrayOutput {
return o.ApplyT(func(v *InspectionProfile) InspectionProfileCustomControlArrayOutput { return v.CustomControls }).(InspectionProfileCustomControlArrayOutput)
}
// The description of the AppProtection profile
func (o InspectionProfileOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The actions of the predefined, custom, or override controls
func (o InspectionProfileOutput) GlobalControlActions() pulumi.StringArrayOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringArrayOutput { return v.GlobalControlActions }).(pulumi.StringArrayOutput)
}
func (o InspectionProfileOutput) IncarnationNumber() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringPtrOutput { return v.IncarnationNumber }).(pulumi.StringPtrOutput)
}
func (o InspectionProfileOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The OWASP Predefined Paranoia Level
func (o InspectionProfileOutput) ParanoiaLevel() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringPtrOutput { return v.ParanoiaLevel }).(pulumi.StringPtrOutput)
}
// The predefined controls
func (o InspectionProfileOutput) PredefinedControls() InspectionProfilePredefinedControlArrayOutput {
return o.ApplyT(func(v *InspectionProfile) InspectionProfilePredefinedControlArrayOutput { return v.PredefinedControls }).(InspectionProfilePredefinedControlArrayOutput)
}
// The protocol for the AppProtection application
func (o InspectionProfileOutput) PredefinedControlsVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringPtrOutput { return v.PredefinedControlsVersion }).(pulumi.StringPtrOutput)
}
// Indicates the user's choice for the ThreatLabZ Controls. Supported values: ALL and SPECIFIC
func (o InspectionProfileOutput) ZsDefinedControlChoice() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InspectionProfile) pulumi.StringPtrOutput { return v.ZsDefinedControlChoice }).(pulumi.StringPtrOutput)
}
type InspectionProfileArrayOutput struct{ *pulumi.OutputState }
func (InspectionProfileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InspectionProfile)(nil)).Elem()
}
func (o InspectionProfileArrayOutput) ToInspectionProfileArrayOutput() InspectionProfileArrayOutput {
return o
}
func (o InspectionProfileArrayOutput) ToInspectionProfileArrayOutputWithContext(ctx context.Context) InspectionProfileArrayOutput {
return o
}
func (o InspectionProfileArrayOutput) Index(i pulumi.IntInput) InspectionProfileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InspectionProfile {
return vs[0].([]*InspectionProfile)[vs[1].(int)]
}).(InspectionProfileOutput)
}
type InspectionProfileMapOutput struct{ *pulumi.OutputState }
func (InspectionProfileMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InspectionProfile)(nil)).Elem()
}
func (o InspectionProfileMapOutput) ToInspectionProfileMapOutput() InspectionProfileMapOutput {
return o
}
func (o InspectionProfileMapOutput) ToInspectionProfileMapOutputWithContext(ctx context.Context) InspectionProfileMapOutput {
return o
}
func (o InspectionProfileMapOutput) MapIndex(k pulumi.StringInput) InspectionProfileOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InspectionProfile {
return vs[0].(map[string]*InspectionProfile)[vs[1].(string)]
}).(InspectionProfileOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InspectionProfileInput)(nil)).Elem(), &InspectionProfile{})
pulumi.RegisterInputType(reflect.TypeOf((*InspectionProfileArrayInput)(nil)).Elem(), InspectionProfileArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InspectionProfileMapInput)(nil)).Elem(), InspectionProfileMap{})
pulumi.RegisterOutputType(InspectionProfileOutput{})
pulumi.RegisterOutputType(InspectionProfileArrayOutput{})
pulumi.RegisterOutputType(InspectionProfileMapOutput{})
}