This repository has been archived by the owner on Aug 15, 2022. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
ddosPolicyCase.go
595 lines (525 loc) · 28.8 KB
/
ddosPolicyCase.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
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
// 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 dayu
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
type DdosPolicyCase struct {
pulumi.CustomResourceState
// App protocol set of the DDoS policy case.
AppProtocols pulumi.StringArrayOutput `pulumi:"appProtocols"`
// App type of the DDoS policy case. Valid values: `WEB`, `GAME`, `APP` and `OTHER`.
AppType pulumi.StringOutput `pulumi:"appType"`
// Create time of the DDoS policy case.
CreateTime pulumi.StringOutput `pulumi:"createTime"`
// Indicate whether the service involves overseas or not. Valid values: `no` and `yes`.
HasAbroad pulumi.StringOutput `pulumi:"hasAbroad"`
// Indicate whether the service actively initiates TCP requests or not. Valid values: `no` and `yes`.
HasInitiateTcp pulumi.StringOutput `pulumi:"hasInitiateTcp"`
// Indicate whether the actively initiate UDP requests or not. Valid values: `no` and `yes`.
HasInitiateUdp pulumi.StringPtrOutput `pulumi:"hasInitiateUdp"`
// Indicate whether the service involves VPN service or not. Valid values: `no` and `yes`.
HasVpn pulumi.StringPtrOutput `pulumi:"hasVpn"`
// The max length of TCP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_tcp_package_len`.
MaxTcpPackageLen pulumi.StringPtrOutput `pulumi:"maxTcpPackageLen"`
// The max length of UDP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_udp_package_len`.
MaxUdpPackageLen pulumi.StringPtrOutput `pulumi:"maxUdpPackageLen"`
// The minimum length of TCP message package, valid value length should be greater than 0 and less than 1500.
MinTcpPackageLen pulumi.StringPtrOutput `pulumi:"minTcpPackageLen"`
// The minimum length of UDP message package, valid value length should be greater than 0 and less than 1500.
MinUdpPackageLen pulumi.StringPtrOutput `pulumi:"minUdpPackageLen"`
// Name of the DDoS policy case. Length should between 1 and 64.
Name pulumi.StringOutput `pulumi:"name"`
// The port that actively initiates TCP requests. Valid value ranges: (1~65535).
PeerTcpPort pulumi.StringPtrOutput `pulumi:"peerTcpPort"`
// The port that actively initiates UDP requests. Valid value ranges: (1~65535).
PeerUdpPort pulumi.StringPtrOutput `pulumi:"peerUdpPort"`
// Platform set of the DDoS policy case.
PlatformTypes pulumi.StringArrayOutput `pulumi:"platformTypes"`
// Type of the resource that the DDoS policy case works for. Valid values: `bgpip`, `bgp` and `bgp-multip`.
ResourceType pulumi.StringOutput `pulumi:"resourceType"`
// ID of the DDoS policy case.
SceneId pulumi.StringOutput `pulumi:"sceneId"`
// End port of the TCP service. Valid value ranges: (0~65535). It must be greater than `tcp_start_port`.
TcpEndPort pulumi.StringOutput `pulumi:"tcpEndPort"`
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
TcpFootprint pulumi.StringPtrOutput `pulumi:"tcpFootprint"`
// Start port of the TCP service. Valid value ranges: (0~65535).
TcpStartPort pulumi.StringOutput `pulumi:"tcpStartPort"`
// End port of the UDP service. Valid value ranges: (0~65535). It must be greater than `udp_start_port`.
UdpEndPort pulumi.StringOutput `pulumi:"udpEndPort"`
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
UdpFootprint pulumi.StringPtrOutput `pulumi:"udpFootprint"`
// Start port of the UDP service. Valid value ranges: (0~65535).
UdpStartPort pulumi.StringOutput `pulumi:"udpStartPort"`
// Web API url set.
WebApiUrls pulumi.StringArrayOutput `pulumi:"webApiUrls"`
}
// NewDdosPolicyCase registers a new resource with the given unique name, arguments, and options.
func NewDdosPolicyCase(ctx *pulumi.Context,
name string, args *DdosPolicyCaseArgs, opts ...pulumi.ResourceOption) (*DdosPolicyCase, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AppProtocols == nil {
return nil, errors.New("invalid value for required argument 'AppProtocols'")
}
if args.AppType == nil {
return nil, errors.New("invalid value for required argument 'AppType'")
}
if args.HasAbroad == nil {
return nil, errors.New("invalid value for required argument 'HasAbroad'")
}
if args.HasInitiateTcp == nil {
return nil, errors.New("invalid value for required argument 'HasInitiateTcp'")
}
if args.PlatformTypes == nil {
return nil, errors.New("invalid value for required argument 'PlatformTypes'")
}
if args.ResourceType == nil {
return nil, errors.New("invalid value for required argument 'ResourceType'")
}
if args.TcpEndPort == nil {
return nil, errors.New("invalid value for required argument 'TcpEndPort'")
}
if args.TcpStartPort == nil {
return nil, errors.New("invalid value for required argument 'TcpStartPort'")
}
if args.UdpEndPort == nil {
return nil, errors.New("invalid value for required argument 'UdpEndPort'")
}
if args.UdpStartPort == nil {
return nil, errors.New("invalid value for required argument 'UdpStartPort'")
}
if args.WebApiUrls == nil {
return nil, errors.New("invalid value for required argument 'WebApiUrls'")
}
var resource DdosPolicyCase
err := ctx.RegisterResource("tctest:Dayu/ddosPolicyCase:DdosPolicyCase", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetDdosPolicyCase gets an existing DdosPolicyCase 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 GetDdosPolicyCase(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *DdosPolicyCaseState, opts ...pulumi.ResourceOption) (*DdosPolicyCase, error) {
var resource DdosPolicyCase
err := ctx.ReadResource("tctest:Dayu/ddosPolicyCase:DdosPolicyCase", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering DdosPolicyCase resources.
type ddosPolicyCaseState struct {
// App protocol set of the DDoS policy case.
AppProtocols []string `pulumi:"appProtocols"`
// App type of the DDoS policy case. Valid values: `WEB`, `GAME`, `APP` and `OTHER`.
AppType *string `pulumi:"appType"`
// Create time of the DDoS policy case.
CreateTime *string `pulumi:"createTime"`
// Indicate whether the service involves overseas or not. Valid values: `no` and `yes`.
HasAbroad *string `pulumi:"hasAbroad"`
// Indicate whether the service actively initiates TCP requests or not. Valid values: `no` and `yes`.
HasInitiateTcp *string `pulumi:"hasInitiateTcp"`
// Indicate whether the actively initiate UDP requests or not. Valid values: `no` and `yes`.
HasInitiateUdp *string `pulumi:"hasInitiateUdp"`
// Indicate whether the service involves VPN service or not. Valid values: `no` and `yes`.
HasVpn *string `pulumi:"hasVpn"`
// The max length of TCP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_tcp_package_len`.
MaxTcpPackageLen *string `pulumi:"maxTcpPackageLen"`
// The max length of UDP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_udp_package_len`.
MaxUdpPackageLen *string `pulumi:"maxUdpPackageLen"`
// The minimum length of TCP message package, valid value length should be greater than 0 and less than 1500.
MinTcpPackageLen *string `pulumi:"minTcpPackageLen"`
// The minimum length of UDP message package, valid value length should be greater than 0 and less than 1500.
MinUdpPackageLen *string `pulumi:"minUdpPackageLen"`
// Name of the DDoS policy case. Length should between 1 and 64.
Name *string `pulumi:"name"`
// The port that actively initiates TCP requests. Valid value ranges: (1~65535).
PeerTcpPort *string `pulumi:"peerTcpPort"`
// The port that actively initiates UDP requests. Valid value ranges: (1~65535).
PeerUdpPort *string `pulumi:"peerUdpPort"`
// Platform set of the DDoS policy case.
PlatformTypes []string `pulumi:"platformTypes"`
// Type of the resource that the DDoS policy case works for. Valid values: `bgpip`, `bgp` and `bgp-multip`.
ResourceType *string `pulumi:"resourceType"`
// ID of the DDoS policy case.
SceneId *string `pulumi:"sceneId"`
// End port of the TCP service. Valid value ranges: (0~65535). It must be greater than `tcp_start_port`.
TcpEndPort *string `pulumi:"tcpEndPort"`
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
TcpFootprint *string `pulumi:"tcpFootprint"`
// Start port of the TCP service. Valid value ranges: (0~65535).
TcpStartPort *string `pulumi:"tcpStartPort"`
// End port of the UDP service. Valid value ranges: (0~65535). It must be greater than `udp_start_port`.
UdpEndPort *string `pulumi:"udpEndPort"`
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
UdpFootprint *string `pulumi:"udpFootprint"`
// Start port of the UDP service. Valid value ranges: (0~65535).
UdpStartPort *string `pulumi:"udpStartPort"`
// Web API url set.
WebApiUrls []string `pulumi:"webApiUrls"`
}
type DdosPolicyCaseState struct {
// App protocol set of the DDoS policy case.
AppProtocols pulumi.StringArrayInput
// App type of the DDoS policy case. Valid values: `WEB`, `GAME`, `APP` and `OTHER`.
AppType pulumi.StringPtrInput
// Create time of the DDoS policy case.
CreateTime pulumi.StringPtrInput
// Indicate whether the service involves overseas or not. Valid values: `no` and `yes`.
HasAbroad pulumi.StringPtrInput
// Indicate whether the service actively initiates TCP requests or not. Valid values: `no` and `yes`.
HasInitiateTcp pulumi.StringPtrInput
// Indicate whether the actively initiate UDP requests or not. Valid values: `no` and `yes`.
HasInitiateUdp pulumi.StringPtrInput
// Indicate whether the service involves VPN service or not. Valid values: `no` and `yes`.
HasVpn pulumi.StringPtrInput
// The max length of TCP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_tcp_package_len`.
MaxTcpPackageLen pulumi.StringPtrInput
// The max length of UDP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_udp_package_len`.
MaxUdpPackageLen pulumi.StringPtrInput
// The minimum length of TCP message package, valid value length should be greater than 0 and less than 1500.
MinTcpPackageLen pulumi.StringPtrInput
// The minimum length of UDP message package, valid value length should be greater than 0 and less than 1500.
MinUdpPackageLen pulumi.StringPtrInput
// Name of the DDoS policy case. Length should between 1 and 64.
Name pulumi.StringPtrInput
// The port that actively initiates TCP requests. Valid value ranges: (1~65535).
PeerTcpPort pulumi.StringPtrInput
// The port that actively initiates UDP requests. Valid value ranges: (1~65535).
PeerUdpPort pulumi.StringPtrInput
// Platform set of the DDoS policy case.
PlatformTypes pulumi.StringArrayInput
// Type of the resource that the DDoS policy case works for. Valid values: `bgpip`, `bgp` and `bgp-multip`.
ResourceType pulumi.StringPtrInput
// ID of the DDoS policy case.
SceneId pulumi.StringPtrInput
// End port of the TCP service. Valid value ranges: (0~65535). It must be greater than `tcp_start_port`.
TcpEndPort pulumi.StringPtrInput
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
TcpFootprint pulumi.StringPtrInput
// Start port of the TCP service. Valid value ranges: (0~65535).
TcpStartPort pulumi.StringPtrInput
// End port of the UDP service. Valid value ranges: (0~65535). It must be greater than `udp_start_port`.
UdpEndPort pulumi.StringPtrInput
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
UdpFootprint pulumi.StringPtrInput
// Start port of the UDP service. Valid value ranges: (0~65535).
UdpStartPort pulumi.StringPtrInput
// Web API url set.
WebApiUrls pulumi.StringArrayInput
}
func (DdosPolicyCaseState) ElementType() reflect.Type {
return reflect.TypeOf((*ddosPolicyCaseState)(nil)).Elem()
}
type ddosPolicyCaseArgs struct {
// App protocol set of the DDoS policy case.
AppProtocols []string `pulumi:"appProtocols"`
// App type of the DDoS policy case. Valid values: `WEB`, `GAME`, `APP` and `OTHER`.
AppType string `pulumi:"appType"`
// Indicate whether the service involves overseas or not. Valid values: `no` and `yes`.
HasAbroad string `pulumi:"hasAbroad"`
// Indicate whether the service actively initiates TCP requests or not. Valid values: `no` and `yes`.
HasInitiateTcp string `pulumi:"hasInitiateTcp"`
// Indicate whether the actively initiate UDP requests or not. Valid values: `no` and `yes`.
HasInitiateUdp *string `pulumi:"hasInitiateUdp"`
// Indicate whether the service involves VPN service or not. Valid values: `no` and `yes`.
HasVpn *string `pulumi:"hasVpn"`
// The max length of TCP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_tcp_package_len`.
MaxTcpPackageLen *string `pulumi:"maxTcpPackageLen"`
// The max length of UDP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_udp_package_len`.
MaxUdpPackageLen *string `pulumi:"maxUdpPackageLen"`
// The minimum length of TCP message package, valid value length should be greater than 0 and less than 1500.
MinTcpPackageLen *string `pulumi:"minTcpPackageLen"`
// The minimum length of UDP message package, valid value length should be greater than 0 and less than 1500.
MinUdpPackageLen *string `pulumi:"minUdpPackageLen"`
// Name of the DDoS policy case. Length should between 1 and 64.
Name *string `pulumi:"name"`
// The port that actively initiates TCP requests. Valid value ranges: (1~65535).
PeerTcpPort *string `pulumi:"peerTcpPort"`
// The port that actively initiates UDP requests. Valid value ranges: (1~65535).
PeerUdpPort *string `pulumi:"peerUdpPort"`
// Platform set of the DDoS policy case.
PlatformTypes []string `pulumi:"platformTypes"`
// Type of the resource that the DDoS policy case works for. Valid values: `bgpip`, `bgp` and `bgp-multip`.
ResourceType string `pulumi:"resourceType"`
// End port of the TCP service. Valid value ranges: (0~65535). It must be greater than `tcp_start_port`.
TcpEndPort string `pulumi:"tcpEndPort"`
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
TcpFootprint *string `pulumi:"tcpFootprint"`
// Start port of the TCP service. Valid value ranges: (0~65535).
TcpStartPort string `pulumi:"tcpStartPort"`
// End port of the UDP service. Valid value ranges: (0~65535). It must be greater than `udp_start_port`.
UdpEndPort string `pulumi:"udpEndPort"`
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
UdpFootprint *string `pulumi:"udpFootprint"`
// Start port of the UDP service. Valid value ranges: (0~65535).
UdpStartPort string `pulumi:"udpStartPort"`
// Web API url set.
WebApiUrls []string `pulumi:"webApiUrls"`
}
// The set of arguments for constructing a DdosPolicyCase resource.
type DdosPolicyCaseArgs struct {
// App protocol set of the DDoS policy case.
AppProtocols pulumi.StringArrayInput
// App type of the DDoS policy case. Valid values: `WEB`, `GAME`, `APP` and `OTHER`.
AppType pulumi.StringInput
// Indicate whether the service involves overseas or not. Valid values: `no` and `yes`.
HasAbroad pulumi.StringInput
// Indicate whether the service actively initiates TCP requests or not. Valid values: `no` and `yes`.
HasInitiateTcp pulumi.StringInput
// Indicate whether the actively initiate UDP requests or not. Valid values: `no` and `yes`.
HasInitiateUdp pulumi.StringPtrInput
// Indicate whether the service involves VPN service or not. Valid values: `no` and `yes`.
HasVpn pulumi.StringPtrInput
// The max length of TCP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_tcp_package_len`.
MaxTcpPackageLen pulumi.StringPtrInput
// The max length of UDP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_udp_package_len`.
MaxUdpPackageLen pulumi.StringPtrInput
// The minimum length of TCP message package, valid value length should be greater than 0 and less than 1500.
MinTcpPackageLen pulumi.StringPtrInput
// The minimum length of UDP message package, valid value length should be greater than 0 and less than 1500.
MinUdpPackageLen pulumi.StringPtrInput
// Name of the DDoS policy case. Length should between 1 and 64.
Name pulumi.StringPtrInput
// The port that actively initiates TCP requests. Valid value ranges: (1~65535).
PeerTcpPort pulumi.StringPtrInput
// The port that actively initiates UDP requests. Valid value ranges: (1~65535).
PeerUdpPort pulumi.StringPtrInput
// Platform set of the DDoS policy case.
PlatformTypes pulumi.StringArrayInput
// Type of the resource that the DDoS policy case works for. Valid values: `bgpip`, `bgp` and `bgp-multip`.
ResourceType pulumi.StringInput
// End port of the TCP service. Valid value ranges: (0~65535). It must be greater than `tcp_start_port`.
TcpEndPort pulumi.StringInput
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
TcpFootprint pulumi.StringPtrInput
// Start port of the TCP service. Valid value ranges: (0~65535).
TcpStartPort pulumi.StringInput
// End port of the UDP service. Valid value ranges: (0~65535). It must be greater than `udp_start_port`.
UdpEndPort pulumi.StringInput
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
UdpFootprint pulumi.StringPtrInput
// Start port of the UDP service. Valid value ranges: (0~65535).
UdpStartPort pulumi.StringInput
// Web API url set.
WebApiUrls pulumi.StringArrayInput
}
func (DdosPolicyCaseArgs) ElementType() reflect.Type {
return reflect.TypeOf((*ddosPolicyCaseArgs)(nil)).Elem()
}
type DdosPolicyCaseInput interface {
pulumi.Input
ToDdosPolicyCaseOutput() DdosPolicyCaseOutput
ToDdosPolicyCaseOutputWithContext(ctx context.Context) DdosPolicyCaseOutput
}
func (*DdosPolicyCase) ElementType() reflect.Type {
return reflect.TypeOf((**DdosPolicyCase)(nil)).Elem()
}
func (i *DdosPolicyCase) ToDdosPolicyCaseOutput() DdosPolicyCaseOutput {
return i.ToDdosPolicyCaseOutputWithContext(context.Background())
}
func (i *DdosPolicyCase) ToDdosPolicyCaseOutputWithContext(ctx context.Context) DdosPolicyCaseOutput {
return pulumi.ToOutputWithContext(ctx, i).(DdosPolicyCaseOutput)
}
// DdosPolicyCaseArrayInput is an input type that accepts DdosPolicyCaseArray and DdosPolicyCaseArrayOutput values.
// You can construct a concrete instance of `DdosPolicyCaseArrayInput` via:
//
// DdosPolicyCaseArray{ DdosPolicyCaseArgs{...} }
type DdosPolicyCaseArrayInput interface {
pulumi.Input
ToDdosPolicyCaseArrayOutput() DdosPolicyCaseArrayOutput
ToDdosPolicyCaseArrayOutputWithContext(context.Context) DdosPolicyCaseArrayOutput
}
type DdosPolicyCaseArray []DdosPolicyCaseInput
func (DdosPolicyCaseArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DdosPolicyCase)(nil)).Elem()
}
func (i DdosPolicyCaseArray) ToDdosPolicyCaseArrayOutput() DdosPolicyCaseArrayOutput {
return i.ToDdosPolicyCaseArrayOutputWithContext(context.Background())
}
func (i DdosPolicyCaseArray) ToDdosPolicyCaseArrayOutputWithContext(ctx context.Context) DdosPolicyCaseArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(DdosPolicyCaseArrayOutput)
}
// DdosPolicyCaseMapInput is an input type that accepts DdosPolicyCaseMap and DdosPolicyCaseMapOutput values.
// You can construct a concrete instance of `DdosPolicyCaseMapInput` via:
//
// DdosPolicyCaseMap{ "key": DdosPolicyCaseArgs{...} }
type DdosPolicyCaseMapInput interface {
pulumi.Input
ToDdosPolicyCaseMapOutput() DdosPolicyCaseMapOutput
ToDdosPolicyCaseMapOutputWithContext(context.Context) DdosPolicyCaseMapOutput
}
type DdosPolicyCaseMap map[string]DdosPolicyCaseInput
func (DdosPolicyCaseMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DdosPolicyCase)(nil)).Elem()
}
func (i DdosPolicyCaseMap) ToDdosPolicyCaseMapOutput() DdosPolicyCaseMapOutput {
return i.ToDdosPolicyCaseMapOutputWithContext(context.Background())
}
func (i DdosPolicyCaseMap) ToDdosPolicyCaseMapOutputWithContext(ctx context.Context) DdosPolicyCaseMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(DdosPolicyCaseMapOutput)
}
type DdosPolicyCaseOutput struct{ *pulumi.OutputState }
func (DdosPolicyCaseOutput) ElementType() reflect.Type {
return reflect.TypeOf((**DdosPolicyCase)(nil)).Elem()
}
func (o DdosPolicyCaseOutput) ToDdosPolicyCaseOutput() DdosPolicyCaseOutput {
return o
}
func (o DdosPolicyCaseOutput) ToDdosPolicyCaseOutputWithContext(ctx context.Context) DdosPolicyCaseOutput {
return o
}
// App protocol set of the DDoS policy case.
func (o DdosPolicyCaseOutput) AppProtocols() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringArrayOutput { return v.AppProtocols }).(pulumi.StringArrayOutput)
}
// App type of the DDoS policy case. Valid values: `WEB`, `GAME`, `APP` and `OTHER`.
func (o DdosPolicyCaseOutput) AppType() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.AppType }).(pulumi.StringOutput)
}
// Create time of the DDoS policy case.
func (o DdosPolicyCaseOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.CreateTime }).(pulumi.StringOutput)
}
// Indicate whether the service involves overseas or not. Valid values: `no` and `yes`.
func (o DdosPolicyCaseOutput) HasAbroad() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.HasAbroad }).(pulumi.StringOutput)
}
// Indicate whether the service actively initiates TCP requests or not. Valid values: `no` and `yes`.
func (o DdosPolicyCaseOutput) HasInitiateTcp() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.HasInitiateTcp }).(pulumi.StringOutput)
}
// Indicate whether the actively initiate UDP requests or not. Valid values: `no` and `yes`.
func (o DdosPolicyCaseOutput) HasInitiateUdp() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.HasInitiateUdp }).(pulumi.StringPtrOutput)
}
// Indicate whether the service involves VPN service or not. Valid values: `no` and `yes`.
func (o DdosPolicyCaseOutput) HasVpn() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.HasVpn }).(pulumi.StringPtrOutput)
}
// The max length of TCP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_tcp_package_len`.
func (o DdosPolicyCaseOutput) MaxTcpPackageLen() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.MaxTcpPackageLen }).(pulumi.StringPtrOutput)
}
// The max length of UDP message package, valid value length should be greater than 0 and less than 1500. It should be
// greater than `min_udp_package_len`.
func (o DdosPolicyCaseOutput) MaxUdpPackageLen() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.MaxUdpPackageLen }).(pulumi.StringPtrOutput)
}
// The minimum length of TCP message package, valid value length should be greater than 0 and less than 1500.
func (o DdosPolicyCaseOutput) MinTcpPackageLen() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.MinTcpPackageLen }).(pulumi.StringPtrOutput)
}
// The minimum length of UDP message package, valid value length should be greater than 0 and less than 1500.
func (o DdosPolicyCaseOutput) MinUdpPackageLen() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.MinUdpPackageLen }).(pulumi.StringPtrOutput)
}
// Name of the DDoS policy case. Length should between 1 and 64.
func (o DdosPolicyCaseOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The port that actively initiates TCP requests. Valid value ranges: (1~65535).
func (o DdosPolicyCaseOutput) PeerTcpPort() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.PeerTcpPort }).(pulumi.StringPtrOutput)
}
// The port that actively initiates UDP requests. Valid value ranges: (1~65535).
func (o DdosPolicyCaseOutput) PeerUdpPort() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.PeerUdpPort }).(pulumi.StringPtrOutput)
}
// Platform set of the DDoS policy case.
func (o DdosPolicyCaseOutput) PlatformTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringArrayOutput { return v.PlatformTypes }).(pulumi.StringArrayOutput)
}
// Type of the resource that the DDoS policy case works for. Valid values: `bgpip`, `bgp` and `bgp-multip`.
func (o DdosPolicyCaseOutput) ResourceType() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.ResourceType }).(pulumi.StringOutput)
}
// ID of the DDoS policy case.
func (o DdosPolicyCaseOutput) SceneId() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.SceneId }).(pulumi.StringOutput)
}
// End port of the TCP service. Valid value ranges: (0~65535). It must be greater than `tcp_start_port`.
func (o DdosPolicyCaseOutput) TcpEndPort() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.TcpEndPort }).(pulumi.StringOutput)
}
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
func (o DdosPolicyCaseOutput) TcpFootprint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.TcpFootprint }).(pulumi.StringPtrOutput)
}
// Start port of the TCP service. Valid value ranges: (0~65535).
func (o DdosPolicyCaseOutput) TcpStartPort() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.TcpStartPort }).(pulumi.StringOutput)
}
// End port of the UDP service. Valid value ranges: (0~65535). It must be greater than `udp_start_port`.
func (o DdosPolicyCaseOutput) UdpEndPort() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.UdpEndPort }).(pulumi.StringOutput)
}
// The fixed signature of TCP protocol load, valid value length is range from 1 to 512.
func (o DdosPolicyCaseOutput) UdpFootprint() pulumi.StringPtrOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringPtrOutput { return v.UdpFootprint }).(pulumi.StringPtrOutput)
}
// Start port of the UDP service. Valid value ranges: (0~65535).
func (o DdosPolicyCaseOutput) UdpStartPort() pulumi.StringOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringOutput { return v.UdpStartPort }).(pulumi.StringOutput)
}
// Web API url set.
func (o DdosPolicyCaseOutput) WebApiUrls() pulumi.StringArrayOutput {
return o.ApplyT(func(v *DdosPolicyCase) pulumi.StringArrayOutput { return v.WebApiUrls }).(pulumi.StringArrayOutput)
}
type DdosPolicyCaseArrayOutput struct{ *pulumi.OutputState }
func (DdosPolicyCaseArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*DdosPolicyCase)(nil)).Elem()
}
func (o DdosPolicyCaseArrayOutput) ToDdosPolicyCaseArrayOutput() DdosPolicyCaseArrayOutput {
return o
}
func (o DdosPolicyCaseArrayOutput) ToDdosPolicyCaseArrayOutputWithContext(ctx context.Context) DdosPolicyCaseArrayOutput {
return o
}
func (o DdosPolicyCaseArrayOutput) Index(i pulumi.IntInput) DdosPolicyCaseOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DdosPolicyCase {
return vs[0].([]*DdosPolicyCase)[vs[1].(int)]
}).(DdosPolicyCaseOutput)
}
type DdosPolicyCaseMapOutput struct{ *pulumi.OutputState }
func (DdosPolicyCaseMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*DdosPolicyCase)(nil)).Elem()
}
func (o DdosPolicyCaseMapOutput) ToDdosPolicyCaseMapOutput() DdosPolicyCaseMapOutput {
return o
}
func (o DdosPolicyCaseMapOutput) ToDdosPolicyCaseMapOutputWithContext(ctx context.Context) DdosPolicyCaseMapOutput {
return o
}
func (o DdosPolicyCaseMapOutput) MapIndex(k pulumi.StringInput) DdosPolicyCaseOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DdosPolicyCase {
return vs[0].(map[string]*DdosPolicyCase)[vs[1].(string)]
}).(DdosPolicyCaseOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*DdosPolicyCaseInput)(nil)).Elem(), &DdosPolicyCase{})
pulumi.RegisterInputType(reflect.TypeOf((*DdosPolicyCaseArrayInput)(nil)).Elem(), DdosPolicyCaseArray{})
pulumi.RegisterInputType(reflect.TypeOf((*DdosPolicyCaseMapInput)(nil)).Elem(), DdosPolicyCaseMap{})
pulumi.RegisterOutputType(DdosPolicyCaseOutput{})
pulumi.RegisterOutputType(DdosPolicyCaseArrayOutput{})
pulumi.RegisterOutputType(DdosPolicyCaseMapOutput{})
}