/
threatweight.go
569 lines (509 loc) · 28.7 KB
/
threatweight.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
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
// 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 log
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/internal"
)
// Configure threat weight settings.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumiverse/pulumi-fortios/sdk/go/fortios/log"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := log.NewThreatweight(ctx, "trname", &log.ThreatweightArgs{
// Applications: log.ThreatweightApplicationArray{
// &log.ThreatweightApplicationArgs{
// Category: pulumi.Int(2),
// Id: pulumi.Int(1),
// Level: pulumi.String("low"),
// },
// &log.ThreatweightApplicationArgs{
// Category: pulumi.Int(6),
// Id: pulumi.Int(2),
// Level: pulumi.String("medium"),
// },
// },
// BlockedConnection: pulumi.String("high"),
// FailedConnection: pulumi.String("low"),
// Ips: &log.ThreatweightIpsArgs{
// CriticalSeverity: pulumi.String("critical"),
// HighSeverity: pulumi.String("high"),
// InfoSeverity: pulumi.String("disable"),
// LowSeverity: pulumi.String("low"),
// MediumSeverity: pulumi.String("medium"),
// },
// Level: &log.ThreatweightLevelArgs{
// Critical: pulumi.Int(50),
// High: pulumi.Int(30),
// Low: pulumi.Int(5),
// Medium: pulumi.Int(10),
// },
// Malware: &log.ThreatweightMalwareArgs{
// BotnetConnection: pulumi.String("critical"),
// CommandBlocked: pulumi.String("disable"),
// ContentDisarm: pulumi.String("medium"),
// FileBlocked: pulumi.String("low"),
// Mimefragmented: pulumi.String("disable"),
// Oversized: pulumi.String("disable"),
// SwitchProto: pulumi.String("disable"),
// VirusFileTypeExecutable: pulumi.String("medium"),
// VirusInfected: pulumi.String("critical"),
// VirusOutbreakPrevention: pulumi.String("critical"),
// VirusScanError: pulumi.String("high"),
// },
// Status: pulumi.String("enable"),
// UrlBlockDetected: pulumi.String("high"),
// Webs: log.ThreatweightWebArray{
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(26),
// Id: pulumi.Int(1),
// Level: pulumi.String("high"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(61),
// Id: pulumi.Int(2),
// Level: pulumi.String("high"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(86),
// Id: pulumi.Int(3),
// Level: pulumi.String("high"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(1),
// Id: pulumi.Int(4),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(3),
// Id: pulumi.Int(5),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(4),
// Id: pulumi.Int(6),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(5),
// Id: pulumi.Int(7),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(6),
// Id: pulumi.Int(8),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(12),
// Id: pulumi.Int(9),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(59),
// Id: pulumi.Int(10),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(62),
// Id: pulumi.Int(11),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(83),
// Id: pulumi.Int(12),
// Level: pulumi.String("medium"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(72),
// Id: pulumi.Int(13),
// Level: pulumi.String("low"),
// },
// &log.ThreatweightWebArgs{
// Category: pulumi.Int(14),
// Id: pulumi.Int(14),
// Level: pulumi.String("low"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Log ThreatWeight can be imported using any of these accepted formats:
//
// ```sh
// $ pulumi import fortios:log/threatweight:Threatweight labelname LogThreatWeight
// ```
//
// If you do not want to import arguments of block:
//
// $ export "FORTIOS_IMPORT_TABLE"="false"
//
// ```sh
// $ pulumi import fortios:log/threatweight:Threatweight labelname LogThreatWeight
// ```
//
// $ unset "FORTIOS_IMPORT_TABLE"
type Threatweight struct {
pulumi.CustomResourceState
// Application-control threat weight settings. The structure of `application` block is documented below.
Applications ThreatweightApplicationArrayOutput `pulumi:"applications"`
// Threat weight score for blocked connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BlockedConnection pulumi.StringOutput `pulumi:"blockedConnection"`
// Threat weight score for detected botnet connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BotnetConnectionDetected pulumi.StringOutput `pulumi:"botnetConnectionDetected"`
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrOutput `pulumi:"dynamicSortSubtable"`
// Threat weight score for failed connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
FailedConnection pulumi.StringOutput `pulumi:"failedConnection"`
// Geolocation-based threat weight settings. The structure of `geolocation` block is documented below.
Geolocations ThreatweightGeolocationArrayOutput `pulumi:"geolocations"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrOutput `pulumi:"getAllTables"`
// IPS threat weight settings. The structure of `ips` block is documented below.
Ips ThreatweightIpsOutput `pulumi:"ips"`
// Score mapping for threat weight levels. The structure of `level` block is documented below.
Level ThreatweightLevelOutput `pulumi:"level"`
// Anti-virus malware threat weight settings. The structure of `malware` block is documented below.
Malware ThreatweightMalwareOutput `pulumi:"malware"`
// Enable/disable the threat weight feature. Valid values: `enable`, `disable`.
Status pulumi.StringOutput `pulumi:"status"`
// Threat weight score for URL blocking. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
UrlBlockDetected pulumi.StringOutput `pulumi:"urlBlockDetected"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrOutput `pulumi:"vdomparam"`
// Web filtering threat weight settings. The structure of `web` block is documented below.
Webs ThreatweightWebArrayOutput `pulumi:"webs"`
}
// NewThreatweight registers a new resource with the given unique name, arguments, and options.
func NewThreatweight(ctx *pulumi.Context,
name string, args *ThreatweightArgs, opts ...pulumi.ResourceOption) (*Threatweight, error) {
if args == nil {
args = &ThreatweightArgs{}
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource Threatweight
err := ctx.RegisterResource("fortios:log/threatweight:Threatweight", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetThreatweight gets an existing Threatweight 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 GetThreatweight(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ThreatweightState, opts ...pulumi.ResourceOption) (*Threatweight, error) {
var resource Threatweight
err := ctx.ReadResource("fortios:log/threatweight:Threatweight", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Threatweight resources.
type threatweightState struct {
// Application-control threat weight settings. The structure of `application` block is documented below.
Applications []ThreatweightApplication `pulumi:"applications"`
// Threat weight score for blocked connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BlockedConnection *string `pulumi:"blockedConnection"`
// Threat weight score for detected botnet connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BotnetConnectionDetected *string `pulumi:"botnetConnectionDetected"`
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable *string `pulumi:"dynamicSortSubtable"`
// Threat weight score for failed connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
FailedConnection *string `pulumi:"failedConnection"`
// Geolocation-based threat weight settings. The structure of `geolocation` block is documented below.
Geolocations []ThreatweightGeolocation `pulumi:"geolocations"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables *string `pulumi:"getAllTables"`
// IPS threat weight settings. The structure of `ips` block is documented below.
Ips *ThreatweightIps `pulumi:"ips"`
// Score mapping for threat weight levels. The structure of `level` block is documented below.
Level *ThreatweightLevel `pulumi:"level"`
// Anti-virus malware threat weight settings. The structure of `malware` block is documented below.
Malware *ThreatweightMalware `pulumi:"malware"`
// Enable/disable the threat weight feature. Valid values: `enable`, `disable`.
Status *string `pulumi:"status"`
// Threat weight score for URL blocking. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
UrlBlockDetected *string `pulumi:"urlBlockDetected"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
// Web filtering threat weight settings. The structure of `web` block is documented below.
Webs []ThreatweightWeb `pulumi:"webs"`
}
type ThreatweightState struct {
// Application-control threat weight settings. The structure of `application` block is documented below.
Applications ThreatweightApplicationArrayInput
// Threat weight score for blocked connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BlockedConnection pulumi.StringPtrInput
// Threat weight score for detected botnet connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BotnetConnectionDetected pulumi.StringPtrInput
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrInput
// Threat weight score for failed connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
FailedConnection pulumi.StringPtrInput
// Geolocation-based threat weight settings. The structure of `geolocation` block is documented below.
Geolocations ThreatweightGeolocationArrayInput
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrInput
// IPS threat weight settings. The structure of `ips` block is documented below.
Ips ThreatweightIpsPtrInput
// Score mapping for threat weight levels. The structure of `level` block is documented below.
Level ThreatweightLevelPtrInput
// Anti-virus malware threat weight settings. The structure of `malware` block is documented below.
Malware ThreatweightMalwarePtrInput
// Enable/disable the threat weight feature. Valid values: `enable`, `disable`.
Status pulumi.StringPtrInput
// Threat weight score for URL blocking. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
UrlBlockDetected pulumi.StringPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
// Web filtering threat weight settings. The structure of `web` block is documented below.
Webs ThreatweightWebArrayInput
}
func (ThreatweightState) ElementType() reflect.Type {
return reflect.TypeOf((*threatweightState)(nil)).Elem()
}
type threatweightArgs struct {
// Application-control threat weight settings. The structure of `application` block is documented below.
Applications []ThreatweightApplication `pulumi:"applications"`
// Threat weight score for blocked connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BlockedConnection *string `pulumi:"blockedConnection"`
// Threat weight score for detected botnet connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BotnetConnectionDetected *string `pulumi:"botnetConnectionDetected"`
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable *string `pulumi:"dynamicSortSubtable"`
// Threat weight score for failed connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
FailedConnection *string `pulumi:"failedConnection"`
// Geolocation-based threat weight settings. The structure of `geolocation` block is documented below.
Geolocations []ThreatweightGeolocation `pulumi:"geolocations"`
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables *string `pulumi:"getAllTables"`
// IPS threat weight settings. The structure of `ips` block is documented below.
Ips *ThreatweightIps `pulumi:"ips"`
// Score mapping for threat weight levels. The structure of `level` block is documented below.
Level *ThreatweightLevel `pulumi:"level"`
// Anti-virus malware threat weight settings. The structure of `malware` block is documented below.
Malware *ThreatweightMalware `pulumi:"malware"`
// Enable/disable the threat weight feature. Valid values: `enable`, `disable`.
Status *string `pulumi:"status"`
// Threat weight score for URL blocking. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
UrlBlockDetected *string `pulumi:"urlBlockDetected"`
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam *string `pulumi:"vdomparam"`
// Web filtering threat weight settings. The structure of `web` block is documented below.
Webs []ThreatweightWeb `pulumi:"webs"`
}
// The set of arguments for constructing a Threatweight resource.
type ThreatweightArgs struct {
// Application-control threat weight settings. The structure of `application` block is documented below.
Applications ThreatweightApplicationArrayInput
// Threat weight score for blocked connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BlockedConnection pulumi.StringPtrInput
// Threat weight score for detected botnet connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
BotnetConnectionDetected pulumi.StringPtrInput
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
DynamicSortSubtable pulumi.StringPtrInput
// Threat weight score for failed connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
FailedConnection pulumi.StringPtrInput
// Geolocation-based threat weight settings. The structure of `geolocation` block is documented below.
Geolocations ThreatweightGeolocationArrayInput
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
GetAllTables pulumi.StringPtrInput
// IPS threat weight settings. The structure of `ips` block is documented below.
Ips ThreatweightIpsPtrInput
// Score mapping for threat weight levels. The structure of `level` block is documented below.
Level ThreatweightLevelPtrInput
// Anti-virus malware threat weight settings. The structure of `malware` block is documented below.
Malware ThreatweightMalwarePtrInput
// Enable/disable the threat weight feature. Valid values: `enable`, `disable`.
Status pulumi.StringPtrInput
// Threat weight score for URL blocking. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
UrlBlockDetected pulumi.StringPtrInput
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
Vdomparam pulumi.StringPtrInput
// Web filtering threat weight settings. The structure of `web` block is documented below.
Webs ThreatweightWebArrayInput
}
func (ThreatweightArgs) ElementType() reflect.Type {
return reflect.TypeOf((*threatweightArgs)(nil)).Elem()
}
type ThreatweightInput interface {
pulumi.Input
ToThreatweightOutput() ThreatweightOutput
ToThreatweightOutputWithContext(ctx context.Context) ThreatweightOutput
}
func (*Threatweight) ElementType() reflect.Type {
return reflect.TypeOf((**Threatweight)(nil)).Elem()
}
func (i *Threatweight) ToThreatweightOutput() ThreatweightOutput {
return i.ToThreatweightOutputWithContext(context.Background())
}
func (i *Threatweight) ToThreatweightOutputWithContext(ctx context.Context) ThreatweightOutput {
return pulumi.ToOutputWithContext(ctx, i).(ThreatweightOutput)
}
// ThreatweightArrayInput is an input type that accepts ThreatweightArray and ThreatweightArrayOutput values.
// You can construct a concrete instance of `ThreatweightArrayInput` via:
//
// ThreatweightArray{ ThreatweightArgs{...} }
type ThreatweightArrayInput interface {
pulumi.Input
ToThreatweightArrayOutput() ThreatweightArrayOutput
ToThreatweightArrayOutputWithContext(context.Context) ThreatweightArrayOutput
}
type ThreatweightArray []ThreatweightInput
func (ThreatweightArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Threatweight)(nil)).Elem()
}
func (i ThreatweightArray) ToThreatweightArrayOutput() ThreatweightArrayOutput {
return i.ToThreatweightArrayOutputWithContext(context.Background())
}
func (i ThreatweightArray) ToThreatweightArrayOutputWithContext(ctx context.Context) ThreatweightArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ThreatweightArrayOutput)
}
// ThreatweightMapInput is an input type that accepts ThreatweightMap and ThreatweightMapOutput values.
// You can construct a concrete instance of `ThreatweightMapInput` via:
//
// ThreatweightMap{ "key": ThreatweightArgs{...} }
type ThreatweightMapInput interface {
pulumi.Input
ToThreatweightMapOutput() ThreatweightMapOutput
ToThreatweightMapOutputWithContext(context.Context) ThreatweightMapOutput
}
type ThreatweightMap map[string]ThreatweightInput
func (ThreatweightMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Threatweight)(nil)).Elem()
}
func (i ThreatweightMap) ToThreatweightMapOutput() ThreatweightMapOutput {
return i.ToThreatweightMapOutputWithContext(context.Background())
}
func (i ThreatweightMap) ToThreatweightMapOutputWithContext(ctx context.Context) ThreatweightMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ThreatweightMapOutput)
}
type ThreatweightOutput struct{ *pulumi.OutputState }
func (ThreatweightOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Threatweight)(nil)).Elem()
}
func (o ThreatweightOutput) ToThreatweightOutput() ThreatweightOutput {
return o
}
func (o ThreatweightOutput) ToThreatweightOutputWithContext(ctx context.Context) ThreatweightOutput {
return o
}
// Application-control threat weight settings. The structure of `application` block is documented below.
func (o ThreatweightOutput) Applications() ThreatweightApplicationArrayOutput {
return o.ApplyT(func(v *Threatweight) ThreatweightApplicationArrayOutput { return v.Applications }).(ThreatweightApplicationArrayOutput)
}
// Threat weight score for blocked connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
func (o ThreatweightOutput) BlockedConnection() pulumi.StringOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringOutput { return v.BlockedConnection }).(pulumi.StringOutput)
}
// Threat weight score for detected botnet connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
func (o ThreatweightOutput) BotnetConnectionDetected() pulumi.StringOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringOutput { return v.BotnetConnectionDetected }).(pulumi.StringOutput)
}
// Sort sub-tables, please do not set this parameter when configuring static sub-tables. Options: [ false, true, natural, alphabetical ]. false: Default value, do not sort tables; true/natural: sort tables in natural order. For example: [ a10, a2 ] -> [ a2, a10 ]; alphabetical: sort tables in alphabetical order. For example: [ a10, a2 ] -> [ a10, a2 ].
func (o ThreatweightOutput) DynamicSortSubtable() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringPtrOutput { return v.DynamicSortSubtable }).(pulumi.StringPtrOutput)
}
// Threat weight score for failed connections. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
func (o ThreatweightOutput) FailedConnection() pulumi.StringOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringOutput { return v.FailedConnection }).(pulumi.StringOutput)
}
// Geolocation-based threat weight settings. The structure of `geolocation` block is documented below.
func (o ThreatweightOutput) Geolocations() ThreatweightGeolocationArrayOutput {
return o.ApplyT(func(v *Threatweight) ThreatweightGeolocationArrayOutput { return v.Geolocations }).(ThreatweightGeolocationArrayOutput)
}
// Get all sub-tables including unconfigured tables. Do not set this variable to true if you configure sub-table in another resource, otherwish conflicts and overwrite will occur. Options: [ false, true ]. false: Default value, do not get unconfigured tables; true: get all tables including unconfigured tables.
func (o ThreatweightOutput) GetAllTables() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringPtrOutput { return v.GetAllTables }).(pulumi.StringPtrOutput)
}
// IPS threat weight settings. The structure of `ips` block is documented below.
func (o ThreatweightOutput) Ips() ThreatweightIpsOutput {
return o.ApplyT(func(v *Threatweight) ThreatweightIpsOutput { return v.Ips }).(ThreatweightIpsOutput)
}
// Score mapping for threat weight levels. The structure of `level` block is documented below.
func (o ThreatweightOutput) Level() ThreatweightLevelOutput {
return o.ApplyT(func(v *Threatweight) ThreatweightLevelOutput { return v.Level }).(ThreatweightLevelOutput)
}
// Anti-virus malware threat weight settings. The structure of `malware` block is documented below.
func (o ThreatweightOutput) Malware() ThreatweightMalwareOutput {
return o.ApplyT(func(v *Threatweight) ThreatweightMalwareOutput { return v.Malware }).(ThreatweightMalwareOutput)
}
// Enable/disable the threat weight feature. Valid values: `enable`, `disable`.
func (o ThreatweightOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
// Threat weight score for URL blocking. Valid values: `disable`, `low`, `medium`, `high`, `critical`.
func (o ThreatweightOutput) UrlBlockDetected() pulumi.StringOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringOutput { return v.UrlBlockDetected }).(pulumi.StringOutput)
}
// Specifies the vdom to which the resource will be applied when the FortiGate unit is running in VDOM mode. Only one vdom can be specified. If you want to inherit the vdom configuration of the provider, please do not set this parameter.
func (o ThreatweightOutput) Vdomparam() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Threatweight) pulumi.StringPtrOutput { return v.Vdomparam }).(pulumi.StringPtrOutput)
}
// Web filtering threat weight settings. The structure of `web` block is documented below.
func (o ThreatweightOutput) Webs() ThreatweightWebArrayOutput {
return o.ApplyT(func(v *Threatweight) ThreatweightWebArrayOutput { return v.Webs }).(ThreatweightWebArrayOutput)
}
type ThreatweightArrayOutput struct{ *pulumi.OutputState }
func (ThreatweightArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Threatweight)(nil)).Elem()
}
func (o ThreatweightArrayOutput) ToThreatweightArrayOutput() ThreatweightArrayOutput {
return o
}
func (o ThreatweightArrayOutput) ToThreatweightArrayOutputWithContext(ctx context.Context) ThreatweightArrayOutput {
return o
}
func (o ThreatweightArrayOutput) Index(i pulumi.IntInput) ThreatweightOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Threatweight {
return vs[0].([]*Threatweight)[vs[1].(int)]
}).(ThreatweightOutput)
}
type ThreatweightMapOutput struct{ *pulumi.OutputState }
func (ThreatweightMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Threatweight)(nil)).Elem()
}
func (o ThreatweightMapOutput) ToThreatweightMapOutput() ThreatweightMapOutput {
return o
}
func (o ThreatweightMapOutput) ToThreatweightMapOutputWithContext(ctx context.Context) ThreatweightMapOutput {
return o
}
func (o ThreatweightMapOutput) MapIndex(k pulumi.StringInput) ThreatweightOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Threatweight {
return vs[0].(map[string]*Threatweight)[vs[1].(string)]
}).(ThreatweightOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ThreatweightInput)(nil)).Elem(), &Threatweight{})
pulumi.RegisterInputType(reflect.TypeOf((*ThreatweightArrayInput)(nil)).Elem(), ThreatweightArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ThreatweightMapInput)(nil)).Elem(), ThreatweightMap{})
pulumi.RegisterOutputType(ThreatweightOutput{})
pulumi.RegisterOutputType(ThreatweightArrayOutput{})
pulumi.RegisterOutputType(ThreatweightMapOutput{})
}