@maxim_mazurok/gapi.client.securitycenter-v1beta2 0.0.20220809

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/tests.ts ADDED
@@ -0,0 +1,546 @@
1
+ /* This is stub file for gapi.client.securitycenter-v1beta2 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220809
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://securitycenter.googleapis.com/$discovery/rest?version=v1beta2');
12
+ /** now we can use gapi.client.securitycenter */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
19
+ 'https://www.googleapis.com/auth/cloud-platform',
20
+ ];
21
+ const immediate = false;
22
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
23
+ if (authResult && !authResult.error) {
24
+ /** handle successful authorization */
25
+ run();
26
+ } else {
27
+ /** handle authorization error */
28
+ }
29
+ });
30
+
31
+ async function run() {
32
+ /** Get the ContainerThreatDetectionSettings resource. */
33
+ await gapi.client.securitycenter.folders.getContainerThreatDetectionSettings({
34
+ name: "Test string",
35
+ });
36
+ /** Get the EventThreatDetectionSettings resource. */
37
+ await gapi.client.securitycenter.folders.getEventThreatDetectionSettings({
38
+ name: "Test string",
39
+ });
40
+ /** Retrieve the OnboardingState of a resource. */
41
+ await gapi.client.securitycenter.folders.getOnboardingState({
42
+ name: "Test string",
43
+ });
44
+ /** Get the RapidVulnerabilityDetectionSettings resource. */
45
+ await gapi.client.securitycenter.folders.getRapidVulnerabilityDetectionSettings({
46
+ name: "Test string",
47
+ });
48
+ /** Get the SecurityCenterSettings resource. */
49
+ await gapi.client.securitycenter.folders.getSecurityCenterSettings({
50
+ name: "Test string",
51
+ });
52
+ /** Get the SecurityHealthAnalyticsSettings resource. */
53
+ await gapi.client.securitycenter.folders.getSecurityHealthAnalyticsSettings({
54
+ name: "Test string",
55
+ });
56
+ /** Get the VirtualMachineThreatDetectionSettings resource. */
57
+ await gapi.client.securitycenter.folders.getVirtualMachineThreatDetectionSettings({
58
+ name: "Test string",
59
+ });
60
+ /** Get the WebSecurityScannerSettings resource. */
61
+ await gapi.client.securitycenter.folders.getWebSecurityScannerSettings({
62
+ name: "Test string",
63
+ });
64
+ /** Update the ContainerThreatDetectionSettings resource. */
65
+ await gapi.client.securitycenter.folders.updateContainerThreatDetectionSettings({
66
+ name: "Test string",
67
+ updateMask: "Test string",
68
+ }, {
69
+ modules: {
70
+ A: {
71
+ moduleEnablementState: "Test string",
72
+ value: {
73
+ A: 42
74
+ },
75
+ }
76
+ },
77
+ name: "Test string",
78
+ serviceAccount: "Test string",
79
+ serviceEnablementState: "Test string",
80
+ updateTime: "Test string",
81
+ });
82
+ /** Update the EventThreatDetectionSettings resource. */
83
+ await gapi.client.securitycenter.folders.updateEventThreatDetectionSettings({
84
+ name: "Test string",
85
+ updateMask: "Test string",
86
+ }, {
87
+ modules: {
88
+ A: {
89
+ moduleEnablementState: "Test string",
90
+ value: {
91
+ A: 42
92
+ },
93
+ }
94
+ },
95
+ name: "Test string",
96
+ serviceEnablementState: "Test string",
97
+ updateTime: "Test string",
98
+ });
99
+ /** Update the RapidVulnerabilityDetectionSettings resource. */
100
+ await gapi.client.securitycenter.folders.updateRapidVulnerabilityDetectionSettings({
101
+ name: "Test string",
102
+ updateMask: "Test string",
103
+ }, {
104
+ modules: {
105
+ A: {
106
+ moduleEnablementState: "Test string",
107
+ value: {
108
+ A: 42
109
+ },
110
+ }
111
+ },
112
+ name: "Test string",
113
+ serviceEnablementState: "Test string",
114
+ updateTime: "Test string",
115
+ });
116
+ /** Update the SecurityHealthAnalyticsSettings resource. */
117
+ await gapi.client.securitycenter.folders.updateSecurityHealthAnalyticsSettings({
118
+ name: "Test string",
119
+ updateMask: "Test string",
120
+ }, {
121
+ modules: {
122
+ A: {
123
+ moduleEnablementState: "Test string",
124
+ value: {
125
+ A: 42
126
+ },
127
+ }
128
+ },
129
+ name: "Test string",
130
+ serviceAccount: "Test string",
131
+ serviceEnablementState: "Test string",
132
+ updateTime: "Test string",
133
+ });
134
+ /** Update the VirtualMachineThreatDetectionSettings resource. */
135
+ await gapi.client.securitycenter.folders.updateVirtualMachineThreatDetectionSettings({
136
+ name: "Test string",
137
+ updateMask: "Test string",
138
+ }, {
139
+ modules: {
140
+ A: {
141
+ moduleEnablementState: "Test string",
142
+ value: {
143
+ A: 42
144
+ },
145
+ }
146
+ },
147
+ name: "Test string",
148
+ serviceAccount: "Test string",
149
+ serviceEnablementState: "Test string",
150
+ updateTime: "Test string",
151
+ });
152
+ /** Update the WebSecurityScannerSettings resource. */
153
+ await gapi.client.securitycenter.folders.updateWebSecurityScannerSettings({
154
+ name: "Test string",
155
+ updateMask: "Test string",
156
+ }, {
157
+ modules: {
158
+ A: {
159
+ moduleEnablementState: "Test string",
160
+ value: {
161
+ A: 42
162
+ },
163
+ }
164
+ },
165
+ name: "Test string",
166
+ serviceEnablementState: "Test string",
167
+ updateTime: "Test string",
168
+ });
169
+ /** Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
170
+ await gapi.client.securitycenter.folders.containerThreatDetectionSettings.calculate({
171
+ name: "Test string",
172
+ });
173
+ /** Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
174
+ await gapi.client.securitycenter.folders.eventThreatDetectionSettings.calculate({
175
+ name: "Test string",
176
+ });
177
+ /** Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. */
178
+ await gapi.client.securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate({
179
+ name: "Test string",
180
+ });
181
+ /** Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. */
182
+ await gapi.client.securitycenter.folders.securityHealthAnalyticsSettings.calculate({
183
+ name: "Test string",
184
+ });
185
+ /** Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
186
+ await gapi.client.securitycenter.folders.virtualMachineThreatDetectionSettings.calculate({
187
+ name: "Test string",
188
+ });
189
+ /** Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. */
190
+ await gapi.client.securitycenter.folders.webSecurityScannerSettings.calculate({
191
+ name: "Test string",
192
+ });
193
+ /** Get the ContainerThreatDetectionSettings resource. */
194
+ await gapi.client.securitycenter.organizations.getContainerThreatDetectionSettings({
195
+ name: "Test string",
196
+ });
197
+ /** Get the EventThreatDetectionSettings resource. */
198
+ await gapi.client.securitycenter.organizations.getEventThreatDetectionSettings({
199
+ name: "Test string",
200
+ });
201
+ /** Retrieve the OnboardingState of a resource. */
202
+ await gapi.client.securitycenter.organizations.getOnboardingState({
203
+ name: "Test string",
204
+ });
205
+ /** Get the RapidVulnerabilityDetectionSettings resource. */
206
+ await gapi.client.securitycenter.organizations.getRapidVulnerabilityDetectionSettings({
207
+ name: "Test string",
208
+ });
209
+ /** Get the SecurityCenterSettings resource. */
210
+ await gapi.client.securitycenter.organizations.getSecurityCenterSettings({
211
+ name: "Test string",
212
+ });
213
+ /** Get the SecurityHealthAnalyticsSettings resource. */
214
+ await gapi.client.securitycenter.organizations.getSecurityHealthAnalyticsSettings({
215
+ name: "Test string",
216
+ });
217
+ /** Get the Subscription resource. */
218
+ await gapi.client.securitycenter.organizations.getSubscription({
219
+ name: "Test string",
220
+ });
221
+ /** Get the VirtualMachineThreatDetectionSettings resource. */
222
+ await gapi.client.securitycenter.organizations.getVirtualMachineThreatDetectionSettings({
223
+ name: "Test string",
224
+ });
225
+ /** Get the WebSecurityScannerSettings resource. */
226
+ await gapi.client.securitycenter.organizations.getWebSecurityScannerSettings({
227
+ name: "Test string",
228
+ });
229
+ /** Update the ContainerThreatDetectionSettings resource. */
230
+ await gapi.client.securitycenter.organizations.updateContainerThreatDetectionSettings({
231
+ name: "Test string",
232
+ updateMask: "Test string",
233
+ }, {
234
+ modules: {
235
+ A: {
236
+ moduleEnablementState: "Test string",
237
+ value: {
238
+ A: 42
239
+ },
240
+ }
241
+ },
242
+ name: "Test string",
243
+ serviceAccount: "Test string",
244
+ serviceEnablementState: "Test string",
245
+ updateTime: "Test string",
246
+ });
247
+ /** Update the EventThreatDetectionSettings resource. */
248
+ await gapi.client.securitycenter.organizations.updateEventThreatDetectionSettings({
249
+ name: "Test string",
250
+ updateMask: "Test string",
251
+ }, {
252
+ modules: {
253
+ A: {
254
+ moduleEnablementState: "Test string",
255
+ value: {
256
+ A: 42
257
+ },
258
+ }
259
+ },
260
+ name: "Test string",
261
+ serviceEnablementState: "Test string",
262
+ updateTime: "Test string",
263
+ });
264
+ /** Update the RapidVulnerabilityDetectionSettings resource. */
265
+ await gapi.client.securitycenter.organizations.updateRapidVulnerabilityDetectionSettings({
266
+ name: "Test string",
267
+ updateMask: "Test string",
268
+ }, {
269
+ modules: {
270
+ A: {
271
+ moduleEnablementState: "Test string",
272
+ value: {
273
+ A: 42
274
+ },
275
+ }
276
+ },
277
+ name: "Test string",
278
+ serviceEnablementState: "Test string",
279
+ updateTime: "Test string",
280
+ });
281
+ /** Update the SecurityHealthAnalyticsSettings resource. */
282
+ await gapi.client.securitycenter.organizations.updateSecurityHealthAnalyticsSettings({
283
+ name: "Test string",
284
+ updateMask: "Test string",
285
+ }, {
286
+ modules: {
287
+ A: {
288
+ moduleEnablementState: "Test string",
289
+ value: {
290
+ A: 42
291
+ },
292
+ }
293
+ },
294
+ name: "Test string",
295
+ serviceAccount: "Test string",
296
+ serviceEnablementState: "Test string",
297
+ updateTime: "Test string",
298
+ });
299
+ /** Update the VirtualMachineThreatDetectionSettings resource. */
300
+ await gapi.client.securitycenter.organizations.updateVirtualMachineThreatDetectionSettings({
301
+ name: "Test string",
302
+ updateMask: "Test string",
303
+ }, {
304
+ modules: {
305
+ A: {
306
+ moduleEnablementState: "Test string",
307
+ value: {
308
+ A: 42
309
+ },
310
+ }
311
+ },
312
+ name: "Test string",
313
+ serviceAccount: "Test string",
314
+ serviceEnablementState: "Test string",
315
+ updateTime: "Test string",
316
+ });
317
+ /** Update the WebSecurityScannerSettings resource. */
318
+ await gapi.client.securitycenter.organizations.updateWebSecurityScannerSettings({
319
+ name: "Test string",
320
+ updateMask: "Test string",
321
+ }, {
322
+ modules: {
323
+ A: {
324
+ moduleEnablementState: "Test string",
325
+ value: {
326
+ A: 42
327
+ },
328
+ }
329
+ },
330
+ name: "Test string",
331
+ serviceEnablementState: "Test string",
332
+ updateTime: "Test string",
333
+ });
334
+ /** Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
335
+ await gapi.client.securitycenter.organizations.containerThreatDetectionSettings.calculate({
336
+ name: "Test string",
337
+ });
338
+ /** Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
339
+ await gapi.client.securitycenter.organizations.eventThreatDetectionSettings.calculate({
340
+ name: "Test string",
341
+ });
342
+ /** Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. */
343
+ await gapi.client.securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate({
344
+ name: "Test string",
345
+ });
346
+ /** Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. */
347
+ await gapi.client.securitycenter.organizations.securityHealthAnalyticsSettings.calculate({
348
+ name: "Test string",
349
+ });
350
+ /** Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
351
+ await gapi.client.securitycenter.organizations.virtualMachineThreatDetectionSettings.calculate({
352
+ name: "Test string",
353
+ });
354
+ /** Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. */
355
+ await gapi.client.securitycenter.organizations.webSecurityScannerSettings.calculate({
356
+ name: "Test string",
357
+ });
358
+ /** Get the ContainerThreatDetectionSettings resource. */
359
+ await gapi.client.securitycenter.projects.getContainerThreatDetectionSettings({
360
+ name: "Test string",
361
+ });
362
+ /** Get the EventThreatDetectionSettings resource. */
363
+ await gapi.client.securitycenter.projects.getEventThreatDetectionSettings({
364
+ name: "Test string",
365
+ });
366
+ /** Retrieve the OnboardingState of a resource. */
367
+ await gapi.client.securitycenter.projects.getOnboardingState({
368
+ name: "Test string",
369
+ });
370
+ /** Get the RapidVulnerabilityDetectionSettings resource. */
371
+ await gapi.client.securitycenter.projects.getRapidVulnerabilityDetectionSettings({
372
+ name: "Test string",
373
+ });
374
+ /** Get the SecurityCenterSettings resource. */
375
+ await gapi.client.securitycenter.projects.getSecurityCenterSettings({
376
+ name: "Test string",
377
+ });
378
+ /** Get the SecurityHealthAnalyticsSettings resource. */
379
+ await gapi.client.securitycenter.projects.getSecurityHealthAnalyticsSettings({
380
+ name: "Test string",
381
+ });
382
+ /** Get the VirtualMachineThreatDetectionSettings resource. */
383
+ await gapi.client.securitycenter.projects.getVirtualMachineThreatDetectionSettings({
384
+ name: "Test string",
385
+ });
386
+ /** Get the WebSecurityScannerSettings resource. */
387
+ await gapi.client.securitycenter.projects.getWebSecurityScannerSettings({
388
+ name: "Test string",
389
+ });
390
+ /** Update the ContainerThreatDetectionSettings resource. */
391
+ await gapi.client.securitycenter.projects.updateContainerThreatDetectionSettings({
392
+ name: "Test string",
393
+ updateMask: "Test string",
394
+ }, {
395
+ modules: {
396
+ A: {
397
+ moduleEnablementState: "Test string",
398
+ value: {
399
+ A: 42
400
+ },
401
+ }
402
+ },
403
+ name: "Test string",
404
+ serviceAccount: "Test string",
405
+ serviceEnablementState: "Test string",
406
+ updateTime: "Test string",
407
+ });
408
+ /** Update the EventThreatDetectionSettings resource. */
409
+ await gapi.client.securitycenter.projects.updateEventThreatDetectionSettings({
410
+ name: "Test string",
411
+ updateMask: "Test string",
412
+ }, {
413
+ modules: {
414
+ A: {
415
+ moduleEnablementState: "Test string",
416
+ value: {
417
+ A: 42
418
+ },
419
+ }
420
+ },
421
+ name: "Test string",
422
+ serviceEnablementState: "Test string",
423
+ updateTime: "Test string",
424
+ });
425
+ /** Update the RapidVulnerabilityDetectionSettings resource. */
426
+ await gapi.client.securitycenter.projects.updateRapidVulnerabilityDetectionSettings({
427
+ name: "Test string",
428
+ updateMask: "Test string",
429
+ }, {
430
+ modules: {
431
+ A: {
432
+ moduleEnablementState: "Test string",
433
+ value: {
434
+ A: 42
435
+ },
436
+ }
437
+ },
438
+ name: "Test string",
439
+ serviceEnablementState: "Test string",
440
+ updateTime: "Test string",
441
+ });
442
+ /** Update the SecurityHealthAnalyticsSettings resource. */
443
+ await gapi.client.securitycenter.projects.updateSecurityHealthAnalyticsSettings({
444
+ name: "Test string",
445
+ updateMask: "Test string",
446
+ }, {
447
+ modules: {
448
+ A: {
449
+ moduleEnablementState: "Test string",
450
+ value: {
451
+ A: 42
452
+ },
453
+ }
454
+ },
455
+ name: "Test string",
456
+ serviceAccount: "Test string",
457
+ serviceEnablementState: "Test string",
458
+ updateTime: "Test string",
459
+ });
460
+ /** Update the VirtualMachineThreatDetectionSettings resource. */
461
+ await gapi.client.securitycenter.projects.updateVirtualMachineThreatDetectionSettings({
462
+ name: "Test string",
463
+ updateMask: "Test string",
464
+ }, {
465
+ modules: {
466
+ A: {
467
+ moduleEnablementState: "Test string",
468
+ value: {
469
+ A: 42
470
+ },
471
+ }
472
+ },
473
+ name: "Test string",
474
+ serviceAccount: "Test string",
475
+ serviceEnablementState: "Test string",
476
+ updateTime: "Test string",
477
+ });
478
+ /** Update the WebSecurityScannerSettings resource. */
479
+ await gapi.client.securitycenter.projects.updateWebSecurityScannerSettings({
480
+ name: "Test string",
481
+ updateMask: "Test string",
482
+ }, {
483
+ modules: {
484
+ A: {
485
+ moduleEnablementState: "Test string",
486
+ value: {
487
+ A: 42
488
+ },
489
+ }
490
+ },
491
+ name: "Test string",
492
+ serviceEnablementState: "Test string",
493
+ updateTime: "Test string",
494
+ });
495
+ /** Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
496
+ await gapi.client.securitycenter.projects.containerThreatDetectionSettings.calculate({
497
+ name: "Test string",
498
+ });
499
+ /** Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
500
+ await gapi.client.securitycenter.projects.eventThreatDetectionSettings.calculate({
501
+ name: "Test string",
502
+ });
503
+ /** Get the ContainerThreatDetectionSettings resource. */
504
+ await gapi.client.securitycenter.projects.locations.clusters.getContainerThreatDetectionSettings({
505
+ name: "Test string",
506
+ });
507
+ /** Update the ContainerThreatDetectionSettings resource. */
508
+ await gapi.client.securitycenter.projects.locations.clusters.updateContainerThreatDetectionSettings({
509
+ name: "Test string",
510
+ updateMask: "Test string",
511
+ }, {
512
+ modules: {
513
+ A: {
514
+ moduleEnablementState: "Test string",
515
+ value: {
516
+ A: 42
517
+ },
518
+ }
519
+ },
520
+ name: "Test string",
521
+ serviceAccount: "Test string",
522
+ serviceEnablementState: "Test string",
523
+ updateTime: "Test string",
524
+ });
525
+ /** Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
526
+ await gapi.client.securitycenter.projects.locations.clusters.containerThreatDetectionSettings.calculate({
527
+ name: "Test string",
528
+ });
529
+ /** Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. */
530
+ await gapi.client.securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate({
531
+ name: "Test string",
532
+ });
533
+ /** Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. */
534
+ await gapi.client.securitycenter.projects.securityHealthAnalyticsSettings.calculate({
535
+ name: "Test string",
536
+ });
537
+ /** Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. */
538
+ await gapi.client.securitycenter.projects.virtualMachineThreatDetectionSettings.calculate({
539
+ name: "Test string",
540
+ });
541
+ /** Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. */
542
+ await gapi.client.securitycenter.projects.webSecurityScannerSettings.calculate({
543
+ name: "Test string",
544
+ });
545
+ }
546
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6", "dom"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictNullChecks": true,
8
+ "baseUrl": "../",
9
+ "typeRoots": [
10
+ "../"
11
+ ],
12
+ "types": [],
13
+ "noEmit": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strictFunctionTypes": true
16
+ },
17
+ "files": ["index.d.ts", "tests.ts"]
18
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }