@alicloud/waf-openapi20211001 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/client.ts ADDED
@@ -0,0 +1,803 @@
1
+ // This file is auto-generated, don't edit it
2
+ /**
3
+ *
4
+ */
5
+ import Util, * as $Util from '@alicloud/tea-util';
6
+ import OpenApi, * as $OpenApi from '@alicloud/openapi-client';
7
+ import OpenApiUtil from '@alicloud/openapi-util';
8
+ import EndpointUtil from '@alicloud/endpoint-util';
9
+ import * as $tea from '@alicloud/tea-typescript';
10
+
11
+ export class CreateMajorProtectionBlackIpRequest extends $tea.Model {
12
+ description?: string;
13
+ expiredTime?: number;
14
+ instanceId?: string;
15
+ ipList?: string;
16
+ ruleId?: number;
17
+ templateId?: number;
18
+ static names(): { [key: string]: string } {
19
+ return {
20
+ description: 'Description',
21
+ expiredTime: 'ExpiredTime',
22
+ instanceId: 'InstanceId',
23
+ ipList: 'IpList',
24
+ ruleId: 'RuleId',
25
+ templateId: 'TemplateId',
26
+ };
27
+ }
28
+
29
+ static types(): { [key: string]: any } {
30
+ return {
31
+ description: 'string',
32
+ expiredTime: 'number',
33
+ instanceId: 'string',
34
+ ipList: 'string',
35
+ ruleId: 'number',
36
+ templateId: 'number',
37
+ };
38
+ }
39
+
40
+ constructor(map?: { [key: string]: any }) {
41
+ super(map);
42
+ }
43
+ }
44
+
45
+ export class CreateMajorProtectionBlackIpResponseBody extends $tea.Model {
46
+ requestId?: string;
47
+ static names(): { [key: string]: string } {
48
+ return {
49
+ requestId: 'RequestId',
50
+ };
51
+ }
52
+
53
+ static types(): { [key: string]: any } {
54
+ return {
55
+ requestId: 'string',
56
+ };
57
+ }
58
+
59
+ constructor(map?: { [key: string]: any }) {
60
+ super(map);
61
+ }
62
+ }
63
+
64
+ export class CreateMajorProtectionBlackIpResponse extends $tea.Model {
65
+ headers: { [key: string]: string };
66
+ statusCode: number;
67
+ body: CreateMajorProtectionBlackIpResponseBody;
68
+ static names(): { [key: string]: string } {
69
+ return {
70
+ headers: 'headers',
71
+ statusCode: 'statusCode',
72
+ body: 'body',
73
+ };
74
+ }
75
+
76
+ static types(): { [key: string]: any } {
77
+ return {
78
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
79
+ statusCode: 'number',
80
+ body: CreateMajorProtectionBlackIpResponseBody,
81
+ };
82
+ }
83
+
84
+ constructor(map?: { [key: string]: any }) {
85
+ super(map);
86
+ }
87
+ }
88
+
89
+ export class DescribeInstanceRequest extends $tea.Model {
90
+ regionId?: string;
91
+ resourceGroupId?: string;
92
+ static names(): { [key: string]: string } {
93
+ return {
94
+ regionId: 'RegionId',
95
+ resourceGroupId: 'ResourceGroupId',
96
+ };
97
+ }
98
+
99
+ static types(): { [key: string]: any } {
100
+ return {
101
+ regionId: 'string',
102
+ resourceGroupId: 'string',
103
+ };
104
+ }
105
+
106
+ constructor(map?: { [key: string]: any }) {
107
+ super(map);
108
+ }
109
+ }
110
+
111
+ export class DescribeInstanceResponseBody extends $tea.Model {
112
+ details?: DescribeInstanceResponseBodyDetails;
113
+ edition?: string;
114
+ instanceId?: string;
115
+ regionId?: string;
116
+ requestId?: string;
117
+ static names(): { [key: string]: string } {
118
+ return {
119
+ details: 'Details',
120
+ edition: 'Edition',
121
+ instanceId: 'InstanceId',
122
+ regionId: 'RegionId',
123
+ requestId: 'RequestId',
124
+ };
125
+ }
126
+
127
+ static types(): { [key: string]: any } {
128
+ return {
129
+ details: DescribeInstanceResponseBodyDetails,
130
+ edition: 'string',
131
+ instanceId: 'string',
132
+ regionId: 'string',
133
+ requestId: 'string',
134
+ };
135
+ }
136
+
137
+ constructor(map?: { [key: string]: any }) {
138
+ super(map);
139
+ }
140
+ }
141
+
142
+ export class DescribeInstanceResponse extends $tea.Model {
143
+ headers: { [key: string]: string };
144
+ statusCode: number;
145
+ body: DescribeInstanceResponseBody;
146
+ static names(): { [key: string]: string } {
147
+ return {
148
+ headers: 'headers',
149
+ statusCode: 'statusCode',
150
+ body: 'body',
151
+ };
152
+ }
153
+
154
+ static types(): { [key: string]: any } {
155
+ return {
156
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
157
+ statusCode: 'number',
158
+ body: DescribeInstanceResponseBody,
159
+ };
160
+ }
161
+
162
+ constructor(map?: { [key: string]: any }) {
163
+ super(map);
164
+ }
165
+ }
166
+
167
+ export class DescribeInstanceCompatibleRequest extends $tea.Model {
168
+ regionId?: string;
169
+ resourceGroupId?: string;
170
+ static names(): { [key: string]: string } {
171
+ return {
172
+ regionId: 'RegionId',
173
+ resourceGroupId: 'ResourceGroupId',
174
+ };
175
+ }
176
+
177
+ static types(): { [key: string]: any } {
178
+ return {
179
+ regionId: 'string',
180
+ resourceGroupId: 'string',
181
+ };
182
+ }
183
+
184
+ constructor(map?: { [key: string]: any }) {
185
+ super(map);
186
+ }
187
+ }
188
+
189
+ export class DescribeInstanceCompatibleResponseBody extends $tea.Model {
190
+ commodityCode?: string;
191
+ details?: DescribeInstanceCompatibleResponseBodyDetails;
192
+ edition?: string;
193
+ instanceId?: string;
194
+ payType?: string;
195
+ regionId?: string;
196
+ requestId?: string;
197
+ static names(): { [key: string]: string } {
198
+ return {
199
+ commodityCode: 'CommodityCode',
200
+ details: 'Details',
201
+ edition: 'Edition',
202
+ instanceId: 'InstanceId',
203
+ payType: 'PayType',
204
+ regionId: 'RegionId',
205
+ requestId: 'RequestId',
206
+ };
207
+ }
208
+
209
+ static types(): { [key: string]: any } {
210
+ return {
211
+ commodityCode: 'string',
212
+ details: DescribeInstanceCompatibleResponseBodyDetails,
213
+ edition: 'string',
214
+ instanceId: 'string',
215
+ payType: 'string',
216
+ regionId: 'string',
217
+ requestId: 'string',
218
+ };
219
+ }
220
+
221
+ constructor(map?: { [key: string]: any }) {
222
+ super(map);
223
+ }
224
+ }
225
+
226
+ export class DescribeInstanceCompatibleResponse extends $tea.Model {
227
+ headers: { [key: string]: string };
228
+ statusCode: number;
229
+ body: DescribeInstanceCompatibleResponseBody;
230
+ static names(): { [key: string]: string } {
231
+ return {
232
+ headers: 'headers',
233
+ statusCode: 'statusCode',
234
+ body: 'body',
235
+ };
236
+ }
237
+
238
+ static types(): { [key: string]: any } {
239
+ return {
240
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
241
+ statusCode: 'number',
242
+ body: DescribeInstanceCompatibleResponseBody,
243
+ };
244
+ }
245
+
246
+ constructor(map?: { [key: string]: any }) {
247
+ super(map);
248
+ }
249
+ }
250
+
251
+ export class DescribeInstanceExtendRequest extends $tea.Model {
252
+ edition?: string;
253
+ regionId?: string;
254
+ resourceGroupId?: string;
255
+ static names(): { [key: string]: string } {
256
+ return {
257
+ edition: 'Edition',
258
+ regionId: 'RegionId',
259
+ resourceGroupId: 'ResourceGroupId',
260
+ };
261
+ }
262
+
263
+ static types(): { [key: string]: any } {
264
+ return {
265
+ edition: 'string',
266
+ regionId: 'string',
267
+ resourceGroupId: 'string',
268
+ };
269
+ }
270
+
271
+ constructor(map?: { [key: string]: any }) {
272
+ super(map);
273
+ }
274
+ }
275
+
276
+ export class DescribeInstanceExtendResponseBody extends $tea.Model {
277
+ instances?: DescribeInstanceExtendResponseBodyInstances[];
278
+ requestId?: string;
279
+ static names(): { [key: string]: string } {
280
+ return {
281
+ instances: 'Instances',
282
+ requestId: 'RequestId',
283
+ };
284
+ }
285
+
286
+ static types(): { [key: string]: any } {
287
+ return {
288
+ instances: { 'type': 'array', 'itemType': DescribeInstanceExtendResponseBodyInstances },
289
+ requestId: 'string',
290
+ };
291
+ }
292
+
293
+ constructor(map?: { [key: string]: any }) {
294
+ super(map);
295
+ }
296
+ }
297
+
298
+ export class DescribeInstanceExtendResponse extends $tea.Model {
299
+ headers: { [key: string]: string };
300
+ statusCode: number;
301
+ body: DescribeInstanceExtendResponseBody;
302
+ static names(): { [key: string]: string } {
303
+ return {
304
+ headers: 'headers',
305
+ statusCode: 'statusCode',
306
+ body: 'body',
307
+ };
308
+ }
309
+
310
+ static types(): { [key: string]: any } {
311
+ return {
312
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
313
+ statusCode: 'number',
314
+ body: DescribeInstanceExtendResponseBody,
315
+ };
316
+ }
317
+
318
+ constructor(map?: { [key: string]: any }) {
319
+ super(map);
320
+ }
321
+ }
322
+
323
+ export class DescribeInstanceResponseBodyDetails extends $tea.Model {
324
+ aclRuleMaxIpCount?: number;
325
+ antiScan?: boolean;
326
+ antiScanTemplateMaxCount?: number;
327
+ backendMaxCount?: number;
328
+ baseWafGroup?: boolean;
329
+ baseWafGroupRuleInTemplateMaxCount?: number;
330
+ baseWafGroupRuleTemplateMaxCount?: number;
331
+ cnameResourceMaxCount?: number;
332
+ customResponse?: boolean;
333
+ customResponseRuleInTemplateMaxCount?: number;
334
+ customResponseTemplateMaxCount?: number;
335
+ customRule?: boolean;
336
+ customRuleAction?: string;
337
+ customRuleCondition?: string;
338
+ customRuleInTemplateMaxCount?: number;
339
+ customRuleRatelimitor?: string;
340
+ customRuleTemplateMaxCount?: number;
341
+ defenseGroupMaxCount?: number;
342
+ defenseObjectInGroupMaxCount?: number;
343
+ defenseObjectInTemplateMaxCount?: number;
344
+ defenseObjectMaxCount?: number;
345
+ exclusiveIp?: boolean;
346
+ gslb?: boolean;
347
+ httpPorts?: string;
348
+ httpsPorts?: string;
349
+ ipBlacklist?: boolean;
350
+ ipBlacklistIpInRuleMaxCount?: number;
351
+ ipBlacklistRuleInTemplateMaxCount?: number;
352
+ ipBlacklistTemplateMaxCount?: number;
353
+ ipv6?: boolean;
354
+ logService?: boolean;
355
+ majorProtection?: boolean;
356
+ majorProtectionTemplateMaxCount?: number;
357
+ vastIpBlacklistInFileMaxCount?: number;
358
+ vastIpBlacklistInOperationMaxCount?: number;
359
+ vastIpBlacklistMaxCount?: number;
360
+ whitelist?: boolean;
361
+ whitelistLogical?: string;
362
+ whitelistRuleCondition?: string;
363
+ whitelistRuleInTemplateMaxCount?: number;
364
+ whitelistTemplateMaxCount?: number;
365
+ static names(): { [key: string]: string } {
366
+ return {
367
+ aclRuleMaxIpCount: 'AclRuleMaxIpCount',
368
+ antiScan: 'AntiScan',
369
+ antiScanTemplateMaxCount: 'AntiScanTemplateMaxCount',
370
+ backendMaxCount: 'BackendMaxCount',
371
+ baseWafGroup: 'BaseWafGroup',
372
+ baseWafGroupRuleInTemplateMaxCount: 'BaseWafGroupRuleInTemplateMaxCount',
373
+ baseWafGroupRuleTemplateMaxCount: 'BaseWafGroupRuleTemplateMaxCount',
374
+ cnameResourceMaxCount: 'CnameResourceMaxCount',
375
+ customResponse: 'CustomResponse',
376
+ customResponseRuleInTemplateMaxCount: 'CustomResponseRuleInTemplateMaxCount',
377
+ customResponseTemplateMaxCount: 'CustomResponseTemplateMaxCount',
378
+ customRule: 'CustomRule',
379
+ customRuleAction: 'CustomRuleAction',
380
+ customRuleCondition: 'CustomRuleCondition',
381
+ customRuleInTemplateMaxCount: 'CustomRuleInTemplateMaxCount',
382
+ customRuleRatelimitor: 'CustomRuleRatelimitor',
383
+ customRuleTemplateMaxCount: 'CustomRuleTemplateMaxCount',
384
+ defenseGroupMaxCount: 'DefenseGroupMaxCount',
385
+ defenseObjectInGroupMaxCount: 'DefenseObjectInGroupMaxCount',
386
+ defenseObjectInTemplateMaxCount: 'DefenseObjectInTemplateMaxCount',
387
+ defenseObjectMaxCount: 'DefenseObjectMaxCount',
388
+ exclusiveIp: 'ExclusiveIp',
389
+ gslb: 'Gslb',
390
+ httpPorts: 'HttpPorts',
391
+ httpsPorts: 'HttpsPorts',
392
+ ipBlacklist: 'IpBlacklist',
393
+ ipBlacklistIpInRuleMaxCount: 'IpBlacklistIpInRuleMaxCount',
394
+ ipBlacklistRuleInTemplateMaxCount: 'IpBlacklistRuleInTemplateMaxCount',
395
+ ipBlacklistTemplateMaxCount: 'IpBlacklistTemplateMaxCount',
396
+ ipv6: 'Ipv6',
397
+ logService: 'LogService',
398
+ majorProtection: 'MajorProtection',
399
+ majorProtectionTemplateMaxCount: 'MajorProtectionTemplateMaxCount',
400
+ vastIpBlacklistInFileMaxCount: 'VastIpBlacklistInFileMaxCount',
401
+ vastIpBlacklistInOperationMaxCount: 'VastIpBlacklistInOperationMaxCount',
402
+ vastIpBlacklistMaxCount: 'VastIpBlacklistMaxCount',
403
+ whitelist: 'Whitelist',
404
+ whitelistLogical: 'WhitelistLogical',
405
+ whitelistRuleCondition: 'WhitelistRuleCondition',
406
+ whitelistRuleInTemplateMaxCount: 'WhitelistRuleInTemplateMaxCount',
407
+ whitelistTemplateMaxCount: 'WhitelistTemplateMaxCount',
408
+ };
409
+ }
410
+
411
+ static types(): { [key: string]: any } {
412
+ return {
413
+ aclRuleMaxIpCount: 'number',
414
+ antiScan: 'boolean',
415
+ antiScanTemplateMaxCount: 'number',
416
+ backendMaxCount: 'number',
417
+ baseWafGroup: 'boolean',
418
+ baseWafGroupRuleInTemplateMaxCount: 'number',
419
+ baseWafGroupRuleTemplateMaxCount: 'number',
420
+ cnameResourceMaxCount: 'number',
421
+ customResponse: 'boolean',
422
+ customResponseRuleInTemplateMaxCount: 'number',
423
+ customResponseTemplateMaxCount: 'number',
424
+ customRule: 'boolean',
425
+ customRuleAction: 'string',
426
+ customRuleCondition: 'string',
427
+ customRuleInTemplateMaxCount: 'number',
428
+ customRuleRatelimitor: 'string',
429
+ customRuleTemplateMaxCount: 'number',
430
+ defenseGroupMaxCount: 'number',
431
+ defenseObjectInGroupMaxCount: 'number',
432
+ defenseObjectInTemplateMaxCount: 'number',
433
+ defenseObjectMaxCount: 'number',
434
+ exclusiveIp: 'boolean',
435
+ gslb: 'boolean',
436
+ httpPorts: 'string',
437
+ httpsPorts: 'string',
438
+ ipBlacklist: 'boolean',
439
+ ipBlacklistIpInRuleMaxCount: 'number',
440
+ ipBlacklistRuleInTemplateMaxCount: 'number',
441
+ ipBlacklistTemplateMaxCount: 'number',
442
+ ipv6: 'boolean',
443
+ logService: 'boolean',
444
+ majorProtection: 'boolean',
445
+ majorProtectionTemplateMaxCount: 'number',
446
+ vastIpBlacklistInFileMaxCount: 'number',
447
+ vastIpBlacklistInOperationMaxCount: 'number',
448
+ vastIpBlacklistMaxCount: 'number',
449
+ whitelist: 'boolean',
450
+ whitelistLogical: 'string',
451
+ whitelistRuleCondition: 'string',
452
+ whitelistRuleInTemplateMaxCount: 'number',
453
+ whitelistTemplateMaxCount: 'number',
454
+ };
455
+ }
456
+
457
+ constructor(map?: { [key: string]: any }) {
458
+ super(map);
459
+ }
460
+ }
461
+
462
+ export class DescribeInstanceCompatibleResponseBodyDetails extends $tea.Model {
463
+ antiScan?: boolean;
464
+ antiScanTemplateMaxCount?: number;
465
+ backendMaxCount?: number;
466
+ baseWafGroup?: boolean;
467
+ baseWafGroupRuleInTemplateMaxCount?: number;
468
+ baseWafGroupRuleTemplateMaxCount?: number;
469
+ cnameResourceMaxCount?: number;
470
+ customResponse?: boolean;
471
+ customResponseRuleInTemplateMaxCount?: number;
472
+ customResponseTemplateMaxCount?: number;
473
+ customRule?: boolean;
474
+ customRuleAction?: string;
475
+ customRuleCondition?: string;
476
+ customRuleInTemplateMaxCount?: number;
477
+ customRuleRatelimitor?: string;
478
+ customRuleTemplateMaxCount?: number;
479
+ defenseGroupMaxCount?: number;
480
+ defenseObjectInGroupMaxCount?: number;
481
+ defenseObjectInTemplateMaxCount?: number;
482
+ defenseObjectMaxCount?: number;
483
+ exclusiveIp?: boolean;
484
+ gslb?: boolean;
485
+ ipBlacklist?: boolean;
486
+ ipBlacklistIpInRuleMaxCount?: number;
487
+ ipBlacklistRuleInTemplateMaxCount?: number;
488
+ ipBlacklistTemplateMaxCount?: number;
489
+ ipv6?: boolean;
490
+ logService?: boolean;
491
+ whitelist?: boolean;
492
+ whitelistLogical?: string;
493
+ whitelistRuleCondition?: string;
494
+ whitelistRuleInTemplateMaxCount?: number;
495
+ whitelistTemplateMaxCount?: number;
496
+ static names(): { [key: string]: string } {
497
+ return {
498
+ antiScan: 'AntiScan',
499
+ antiScanTemplateMaxCount: 'AntiScanTemplateMaxCount',
500
+ backendMaxCount: 'BackendMaxCount',
501
+ baseWafGroup: 'BaseWafGroup',
502
+ baseWafGroupRuleInTemplateMaxCount: 'BaseWafGroupRuleInTemplateMaxCount',
503
+ baseWafGroupRuleTemplateMaxCount: 'BaseWafGroupRuleTemplateMaxCount',
504
+ cnameResourceMaxCount: 'CnameResourceMaxCount',
505
+ customResponse: 'CustomResponse',
506
+ customResponseRuleInTemplateMaxCount: 'CustomResponseRuleInTemplateMaxCount',
507
+ customResponseTemplateMaxCount: 'CustomResponseTemplateMaxCount',
508
+ customRule: 'CustomRule',
509
+ customRuleAction: 'CustomRuleAction',
510
+ customRuleCondition: 'CustomRuleCondition',
511
+ customRuleInTemplateMaxCount: 'CustomRuleInTemplateMaxCount',
512
+ customRuleRatelimitor: 'CustomRuleRatelimitor',
513
+ customRuleTemplateMaxCount: 'CustomRuleTemplateMaxCount',
514
+ defenseGroupMaxCount: 'DefenseGroupMaxCount',
515
+ defenseObjectInGroupMaxCount: 'DefenseObjectInGroupMaxCount',
516
+ defenseObjectInTemplateMaxCount: 'DefenseObjectInTemplateMaxCount',
517
+ defenseObjectMaxCount: 'DefenseObjectMaxCount',
518
+ exclusiveIp: 'ExclusiveIp',
519
+ gslb: 'Gslb',
520
+ ipBlacklist: 'IpBlacklist',
521
+ ipBlacklistIpInRuleMaxCount: 'IpBlacklistIpInRuleMaxCount',
522
+ ipBlacklistRuleInTemplateMaxCount: 'IpBlacklistRuleInTemplateMaxCount',
523
+ ipBlacklistTemplateMaxCount: 'IpBlacklistTemplateMaxCount',
524
+ ipv6: 'Ipv6',
525
+ logService: 'LogService',
526
+ whitelist: 'Whitelist',
527
+ whitelistLogical: 'WhitelistLogical',
528
+ whitelistRuleCondition: 'WhitelistRuleCondition',
529
+ whitelistRuleInTemplateMaxCount: 'WhitelistRuleInTemplateMaxCount',
530
+ whitelistTemplateMaxCount: 'WhitelistTemplateMaxCount',
531
+ };
532
+ }
533
+
534
+ static types(): { [key: string]: any } {
535
+ return {
536
+ antiScan: 'boolean',
537
+ antiScanTemplateMaxCount: 'number',
538
+ backendMaxCount: 'number',
539
+ baseWafGroup: 'boolean',
540
+ baseWafGroupRuleInTemplateMaxCount: 'number',
541
+ baseWafGroupRuleTemplateMaxCount: 'number',
542
+ cnameResourceMaxCount: 'number',
543
+ customResponse: 'boolean',
544
+ customResponseRuleInTemplateMaxCount: 'number',
545
+ customResponseTemplateMaxCount: 'number',
546
+ customRule: 'boolean',
547
+ customRuleAction: 'string',
548
+ customRuleCondition: 'string',
549
+ customRuleInTemplateMaxCount: 'number',
550
+ customRuleRatelimitor: 'string',
551
+ customRuleTemplateMaxCount: 'number',
552
+ defenseGroupMaxCount: 'number',
553
+ defenseObjectInGroupMaxCount: 'number',
554
+ defenseObjectInTemplateMaxCount: 'number',
555
+ defenseObjectMaxCount: 'number',
556
+ exclusiveIp: 'boolean',
557
+ gslb: 'boolean',
558
+ ipBlacklist: 'boolean',
559
+ ipBlacklistIpInRuleMaxCount: 'number',
560
+ ipBlacklistRuleInTemplateMaxCount: 'number',
561
+ ipBlacklistTemplateMaxCount: 'number',
562
+ ipv6: 'boolean',
563
+ logService: 'boolean',
564
+ whitelist: 'boolean',
565
+ whitelistLogical: 'string',
566
+ whitelistRuleCondition: 'string',
567
+ whitelistRuleInTemplateMaxCount: 'number',
568
+ whitelistTemplateMaxCount: 'number',
569
+ };
570
+ }
571
+
572
+ constructor(map?: { [key: string]: any }) {
573
+ super(map);
574
+ }
575
+ }
576
+
577
+ export class DescribeInstanceExtendResponseBodyInstances extends $tea.Model {
578
+ expireTime?: number;
579
+ instanceId?: string;
580
+ regionId?: string;
581
+ static names(): { [key: string]: string } {
582
+ return {
583
+ expireTime: 'ExpireTime',
584
+ instanceId: 'InstanceId',
585
+ regionId: 'RegionId',
586
+ };
587
+ }
588
+
589
+ static types(): { [key: string]: any } {
590
+ return {
591
+ expireTime: 'number',
592
+ instanceId: 'string',
593
+ regionId: 'string',
594
+ };
595
+ }
596
+
597
+ constructor(map?: { [key: string]: any }) {
598
+ super(map);
599
+ }
600
+ }
601
+
602
+
603
+ export default class Client extends OpenApi {
604
+
605
+ constructor(config: $OpenApi.Config) {
606
+ super(config);
607
+ this._endpointRule = "regional";
608
+ this._endpointMap = {
609
+ 'cn-qingdao': "wafopenapi.cn-hangzhou.aliyuncs.com",
610
+ 'cn-beijing': "wafopenapi.cn-hangzhou.aliyuncs.com",
611
+ 'cn-chengdu': "wafopenapi.cn-hangzhou.aliyuncs.com",
612
+ 'cn-zhangjiakou': "wafopenapi.cn-hangzhou.aliyuncs.com",
613
+ 'cn-huhehaote': "wafopenapi.cn-hangzhou.aliyuncs.com",
614
+ 'cn-hangzhou': "wafopenapi.cn-hangzhou.aliyuncs.com",
615
+ 'cn-shanghai': "wafopenapi.cn-hangzhou.aliyuncs.com",
616
+ 'cn-shenzhen': "wafopenapi.cn-hangzhou.aliyuncs.com",
617
+ 'cn-heyuan': "wafopenapi.cn-hangzhou.aliyuncs.com",
618
+ 'cn-wulanchabu': "wafopenapi.cn-hangzhou.aliyuncs.com",
619
+ 'cn-hongkong': "wafopenapi.ap-southeast-1.aliyuncs.com",
620
+ 'ap-southeast-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
621
+ 'ap-southeast-2': "wafopenapi.ap-southeast-1.aliyuncs.com",
622
+ 'ap-southeast-3': "wafopenapi.ap-southeast-1.aliyuncs.com",
623
+ 'ap-southeast-5': "wafopenapi.ap-southeast-1.aliyuncs.com",
624
+ 'eu-west-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
625
+ 'us-west-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
626
+ 'us-east-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
627
+ 'eu-central-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
628
+ 'me-east-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
629
+ 'ap-south-1': "wafopenapi.ap-southeast-1.aliyuncs.com",
630
+ 'cn-shanghai-finance-1': "wafopenapi.cn-hangzhou.aliyuncs.com",
631
+ 'cn-shenzhen-finance-1': "wafopenapi.cn-hangzhou.aliyuncs.com",
632
+ 'cn-north-2-gov-1': "wafopenapi.cn-hangzhou.aliyuncs.com",
633
+ };
634
+ this.checkConfig(config);
635
+ this._endpoint = this.getEndpoint("waf-openapi", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
636
+ }
637
+
638
+
639
+ getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
640
+ if (!Util.empty(endpoint)) {
641
+ return endpoint;
642
+ }
643
+
644
+ if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
645
+ return endpointMap[regionId];
646
+ }
647
+
648
+ return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
649
+ }
650
+
651
+ async createMajorProtectionBlackIpWithOptions(request: CreateMajorProtectionBlackIpRequest, runtime: $Util.RuntimeOptions): Promise<CreateMajorProtectionBlackIpResponse> {
652
+ Util.validateModel(request);
653
+ let query = { };
654
+ if (!Util.isUnset(request.description)) {
655
+ query["Description"] = request.description;
656
+ }
657
+
658
+ if (!Util.isUnset(request.expiredTime)) {
659
+ query["ExpiredTime"] = request.expiredTime;
660
+ }
661
+
662
+ if (!Util.isUnset(request.instanceId)) {
663
+ query["InstanceId"] = request.instanceId;
664
+ }
665
+
666
+ if (!Util.isUnset(request.ipList)) {
667
+ query["IpList"] = request.ipList;
668
+ }
669
+
670
+ if (!Util.isUnset(request.ruleId)) {
671
+ query["RuleId"] = request.ruleId;
672
+ }
673
+
674
+ if (!Util.isUnset(request.templateId)) {
675
+ query["TemplateId"] = request.templateId;
676
+ }
677
+
678
+ let req = new $OpenApi.OpenApiRequest({
679
+ query: OpenApiUtil.query(query),
680
+ });
681
+ let params = new $OpenApi.Params({
682
+ action: "CreateMajorProtectionBlackIp",
683
+ version: "2021-10-01",
684
+ protocol: "HTTPS",
685
+ pathname: "/",
686
+ method: "POST",
687
+ authType: "AK",
688
+ style: "RPC",
689
+ reqBodyType: "formData",
690
+ bodyType: "json",
691
+ });
692
+ return $tea.cast<CreateMajorProtectionBlackIpResponse>(await this.callApi(params, req, runtime), new CreateMajorProtectionBlackIpResponse({}));
693
+ }
694
+
695
+ async createMajorProtectionBlackIp(request: CreateMajorProtectionBlackIpRequest): Promise<CreateMajorProtectionBlackIpResponse> {
696
+ let runtime = new $Util.RuntimeOptions({ });
697
+ return await this.createMajorProtectionBlackIpWithOptions(request, runtime);
698
+ }
699
+
700
+ async describeInstanceWithOptions(request: DescribeInstanceRequest, runtime: $Util.RuntimeOptions): Promise<DescribeInstanceResponse> {
701
+ Util.validateModel(request);
702
+ let query = { };
703
+ if (!Util.isUnset(request.regionId)) {
704
+ query["RegionId"] = request.regionId;
705
+ }
706
+
707
+ if (!Util.isUnset(request.resourceGroupId)) {
708
+ query["ResourceGroupId"] = request.resourceGroupId;
709
+ }
710
+
711
+ let req = new $OpenApi.OpenApiRequest({
712
+ query: OpenApiUtil.query(query),
713
+ });
714
+ let params = new $OpenApi.Params({
715
+ action: "DescribeInstance",
716
+ version: "2021-10-01",
717
+ protocol: "HTTPS",
718
+ pathname: "/",
719
+ method: "POST",
720
+ authType: "AK",
721
+ style: "RPC",
722
+ reqBodyType: "formData",
723
+ bodyType: "json",
724
+ });
725
+ return $tea.cast<DescribeInstanceResponse>(await this.callApi(params, req, runtime), new DescribeInstanceResponse({}));
726
+ }
727
+
728
+ async describeInstance(request: DescribeInstanceRequest): Promise<DescribeInstanceResponse> {
729
+ let runtime = new $Util.RuntimeOptions({ });
730
+ return await this.describeInstanceWithOptions(request, runtime);
731
+ }
732
+
733
+ async describeInstanceCompatibleWithOptions(request: DescribeInstanceCompatibleRequest, runtime: $Util.RuntimeOptions): Promise<DescribeInstanceCompatibleResponse> {
734
+ Util.validateModel(request);
735
+ let query = { };
736
+ if (!Util.isUnset(request.regionId)) {
737
+ query["RegionId"] = request.regionId;
738
+ }
739
+
740
+ if (!Util.isUnset(request.resourceGroupId)) {
741
+ query["ResourceGroupId"] = request.resourceGroupId;
742
+ }
743
+
744
+ let req = new $OpenApi.OpenApiRequest({
745
+ query: OpenApiUtil.query(query),
746
+ });
747
+ let params = new $OpenApi.Params({
748
+ action: "DescribeInstanceCompatible",
749
+ version: "2021-10-01",
750
+ protocol: "HTTPS",
751
+ pathname: "/",
752
+ method: "POST",
753
+ authType: "AK",
754
+ style: "RPC",
755
+ reqBodyType: "formData",
756
+ bodyType: "json",
757
+ });
758
+ return $tea.cast<DescribeInstanceCompatibleResponse>(await this.callApi(params, req, runtime), new DescribeInstanceCompatibleResponse({}));
759
+ }
760
+
761
+ async describeInstanceCompatible(request: DescribeInstanceCompatibleRequest): Promise<DescribeInstanceCompatibleResponse> {
762
+ let runtime = new $Util.RuntimeOptions({ });
763
+ return await this.describeInstanceCompatibleWithOptions(request, runtime);
764
+ }
765
+
766
+ async describeInstanceExtendWithOptions(request: DescribeInstanceExtendRequest, runtime: $Util.RuntimeOptions): Promise<DescribeInstanceExtendResponse> {
767
+ Util.validateModel(request);
768
+ let query = { };
769
+ if (!Util.isUnset(request.edition)) {
770
+ query["Edition"] = request.edition;
771
+ }
772
+
773
+ if (!Util.isUnset(request.regionId)) {
774
+ query["RegionId"] = request.regionId;
775
+ }
776
+
777
+ if (!Util.isUnset(request.resourceGroupId)) {
778
+ query["ResourceGroupId"] = request.resourceGroupId;
779
+ }
780
+
781
+ let req = new $OpenApi.OpenApiRequest({
782
+ query: OpenApiUtil.query(query),
783
+ });
784
+ let params = new $OpenApi.Params({
785
+ action: "DescribeInstanceExtend",
786
+ version: "2021-10-01",
787
+ protocol: "HTTPS",
788
+ pathname: "/",
789
+ method: "POST",
790
+ authType: "AK",
791
+ style: "RPC",
792
+ reqBodyType: "formData",
793
+ bodyType: "json",
794
+ });
795
+ return $tea.cast<DescribeInstanceExtendResponse>(await this.callApi(params, req, runtime), new DescribeInstanceExtendResponse({}));
796
+ }
797
+
798
+ async describeInstanceExtend(request: DescribeInstanceExtendRequest): Promise<DescribeInstanceExtendResponse> {
799
+ let runtime = new $Util.RuntimeOptions({ });
800
+ return await this.describeInstanceExtendWithOptions(request, runtime);
801
+ }
802
+
803
+ }