@maxim_mazurok/gapi.client.monitoring-v3 0.0.20220806

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,1392 @@
1
+ /* This is stub file for gapi.client.monitoring-v3 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: 20220806
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://monitoring.googleapis.com/$discovery/rest?version=v3');
12
+ /** now we can use gapi.client.monitoring */
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
+ /** View and write monitoring data for all of your Google and third-party Cloud and API projects */
21
+ 'https://www.googleapis.com/auth/monitoring',
22
+ /** View monitoring data for all of your Google Cloud and third-party projects */
23
+ 'https://www.googleapis.com/auth/monitoring.read',
24
+ /** Publish metric data to your Google Cloud projects */
25
+ 'https://www.googleapis.com/auth/monitoring.write',
26
+ ];
27
+ const immediate = false;
28
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
29
+ if (authResult && !authResult.error) {
30
+ /** handle successful authorization */
31
+ run();
32
+ } else {
33
+ /** handle authorization error */
34
+ }
35
+ });
36
+
37
+ async function run() {
38
+ /** Lists time series that match a filter. */
39
+ await gapi.client.monitoring.folders.timeSeries.list({
40
+ "aggregation.alignmentPeriod": "Test string",
41
+ "aggregation.crossSeriesReducer": "Test string",
42
+ "aggregation.groupByFields": "Test string",
43
+ "aggregation.perSeriesAligner": "Test string",
44
+ filter: "Test string",
45
+ "interval.endTime": "Test string",
46
+ "interval.startTime": "Test string",
47
+ name: "Test string",
48
+ orderBy: "Test string",
49
+ pageSize: 42,
50
+ pageToken: "Test string",
51
+ "secondaryAggregation.alignmentPeriod": "Test string",
52
+ "secondaryAggregation.crossSeriesReducer": "Test string",
53
+ "secondaryAggregation.groupByFields": "Test string",
54
+ "secondaryAggregation.perSeriesAligner": "Test string",
55
+ view: "Test string",
56
+ });
57
+ /** Lists time series that match a filter. */
58
+ await gapi.client.monitoring.organizations.timeSeries.list({
59
+ "aggregation.alignmentPeriod": "Test string",
60
+ "aggregation.crossSeriesReducer": "Test string",
61
+ "aggregation.groupByFields": "Test string",
62
+ "aggregation.perSeriesAligner": "Test string",
63
+ filter: "Test string",
64
+ "interval.endTime": "Test string",
65
+ "interval.startTime": "Test string",
66
+ name: "Test string",
67
+ orderBy: "Test string",
68
+ pageSize: 42,
69
+ pageToken: "Test string",
70
+ "secondaryAggregation.alignmentPeriod": "Test string",
71
+ "secondaryAggregation.crossSeriesReducer": "Test string",
72
+ "secondaryAggregation.groupByFields": "Test string",
73
+ "secondaryAggregation.perSeriesAligner": "Test string",
74
+ view: "Test string",
75
+ });
76
+ /** Creates a new alerting policy. */
77
+ await gapi.client.monitoring.projects.alertPolicies.create({
78
+ name: "Test string",
79
+ }, {
80
+ alertStrategy: {
81
+ autoClose: "Test string",
82
+ notificationRateLimit: {
83
+ period: "Test string",
84
+ },
85
+ },
86
+ combiner: "Test string",
87
+ conditions: [
88
+ {
89
+ conditionAbsent: {
90
+ aggregations: [
91
+ {
92
+ alignmentPeriod: "Test string",
93
+ crossSeriesReducer: "Test string",
94
+ groupByFields: [
95
+ "Test string"
96
+ ],
97
+ perSeriesAligner: "Test string",
98
+ }
99
+ ],
100
+ duration: "Test string",
101
+ filter: "Test string",
102
+ trigger: {
103
+ count: 42,
104
+ percent: 42,
105
+ },
106
+ },
107
+ conditionMatchedLog: {
108
+ filter: "Test string",
109
+ labelExtractors: {
110
+ A: "Test string"
111
+ },
112
+ },
113
+ conditionMonitoringQueryLanguage: {
114
+ duration: "Test string",
115
+ evaluationMissingData: "Test string",
116
+ query: "Test string",
117
+ trigger: {
118
+ count: 42,
119
+ percent: 42,
120
+ },
121
+ },
122
+ conditionThreshold: {
123
+ aggregations: [
124
+ {
125
+ alignmentPeriod: "Test string",
126
+ crossSeriesReducer: "Test string",
127
+ groupByFields: [
128
+ "Test string"
129
+ ],
130
+ perSeriesAligner: "Test string",
131
+ }
132
+ ],
133
+ comparison: "Test string",
134
+ denominatorAggregations: [
135
+ {
136
+ alignmentPeriod: "Test string",
137
+ crossSeriesReducer: "Test string",
138
+ groupByFields: [
139
+ "Test string"
140
+ ],
141
+ perSeriesAligner: "Test string",
142
+ }
143
+ ],
144
+ denominatorFilter: "Test string",
145
+ duration: "Test string",
146
+ evaluationMissingData: "Test string",
147
+ filter: "Test string",
148
+ thresholdValue: 42,
149
+ trigger: {
150
+ count: 42,
151
+ percent: 42,
152
+ },
153
+ },
154
+ displayName: "Test string",
155
+ name: "Test string",
156
+ }
157
+ ],
158
+ creationRecord: {
159
+ mutatedBy: "Test string",
160
+ mutateTime: "Test string",
161
+ },
162
+ displayName: "Test string",
163
+ documentation: {
164
+ content: "Test string",
165
+ mimeType: "Test string",
166
+ },
167
+ enabled: true,
168
+ mutationRecord: {
169
+ mutatedBy: "Test string",
170
+ mutateTime: "Test string",
171
+ },
172
+ name: "Test string",
173
+ notificationChannels: [
174
+ "Test string"
175
+ ],
176
+ userLabels: {
177
+ A: "Test string"
178
+ },
179
+ validity: {
180
+ code: 42,
181
+ details: [
182
+ {
183
+ A: 42
184
+ }
185
+ ],
186
+ message: "Test string",
187
+ },
188
+ });
189
+ /** Deletes an alerting policy. */
190
+ await gapi.client.monitoring.projects.alertPolicies.delete({
191
+ name: "Test string",
192
+ });
193
+ /** Gets a single alerting policy. */
194
+ await gapi.client.monitoring.projects.alertPolicies.get({
195
+ name: "Test string",
196
+ });
197
+ /** Lists the existing alerting policies for the workspace. */
198
+ await gapi.client.monitoring.projects.alertPolicies.list({
199
+ filter: "Test string",
200
+ name: "Test string",
201
+ orderBy: "Test string",
202
+ pageSize: 42,
203
+ pageToken: "Test string",
204
+ });
205
+ /**
206
+ * Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated
207
+ * via updateMask. Returns the updated alerting policy.
208
+ */
209
+ await gapi.client.monitoring.projects.alertPolicies.patch({
210
+ name: "Test string",
211
+ updateMask: "Test string",
212
+ }, {
213
+ alertStrategy: {
214
+ autoClose: "Test string",
215
+ notificationRateLimit: {
216
+ period: "Test string",
217
+ },
218
+ },
219
+ combiner: "Test string",
220
+ conditions: [
221
+ {
222
+ conditionAbsent: {
223
+ aggregations: [
224
+ {
225
+ alignmentPeriod: "Test string",
226
+ crossSeriesReducer: "Test string",
227
+ groupByFields: [
228
+ "Test string"
229
+ ],
230
+ perSeriesAligner: "Test string",
231
+ }
232
+ ],
233
+ duration: "Test string",
234
+ filter: "Test string",
235
+ trigger: {
236
+ count: 42,
237
+ percent: 42,
238
+ },
239
+ },
240
+ conditionMatchedLog: {
241
+ filter: "Test string",
242
+ labelExtractors: {
243
+ A: "Test string"
244
+ },
245
+ },
246
+ conditionMonitoringQueryLanguage: {
247
+ duration: "Test string",
248
+ evaluationMissingData: "Test string",
249
+ query: "Test string",
250
+ trigger: {
251
+ count: 42,
252
+ percent: 42,
253
+ },
254
+ },
255
+ conditionThreshold: {
256
+ aggregations: [
257
+ {
258
+ alignmentPeriod: "Test string",
259
+ crossSeriesReducer: "Test string",
260
+ groupByFields: [
261
+ "Test string"
262
+ ],
263
+ perSeriesAligner: "Test string",
264
+ }
265
+ ],
266
+ comparison: "Test string",
267
+ denominatorAggregations: [
268
+ {
269
+ alignmentPeriod: "Test string",
270
+ crossSeriesReducer: "Test string",
271
+ groupByFields: [
272
+ "Test string"
273
+ ],
274
+ perSeriesAligner: "Test string",
275
+ }
276
+ ],
277
+ denominatorFilter: "Test string",
278
+ duration: "Test string",
279
+ evaluationMissingData: "Test string",
280
+ filter: "Test string",
281
+ thresholdValue: 42,
282
+ trigger: {
283
+ count: 42,
284
+ percent: 42,
285
+ },
286
+ },
287
+ displayName: "Test string",
288
+ name: "Test string",
289
+ }
290
+ ],
291
+ creationRecord: {
292
+ mutatedBy: "Test string",
293
+ mutateTime: "Test string",
294
+ },
295
+ displayName: "Test string",
296
+ documentation: {
297
+ content: "Test string",
298
+ mimeType: "Test string",
299
+ },
300
+ enabled: true,
301
+ mutationRecord: {
302
+ mutatedBy: "Test string",
303
+ mutateTime: "Test string",
304
+ },
305
+ name: "Test string",
306
+ notificationChannels: [
307
+ "Test string"
308
+ ],
309
+ userLabels: {
310
+ A: "Test string"
311
+ },
312
+ validity: {
313
+ code: 42,
314
+ details: [
315
+ {
316
+ A: 42
317
+ }
318
+ ],
319
+ message: "Test string",
320
+ },
321
+ });
322
+ /** Cloud Monitoring Agent only: Creates a new time series.This method is only for use by the Cloud Monitoring Agent. Use projects.timeSeries.create instead. */
323
+ await gapi.client.monitoring.projects.collectdTimeSeries.create({
324
+ name: "Test string",
325
+ }, {
326
+ collectdPayloads: [
327
+ {
328
+ endTime: "Test string",
329
+ metadata: {
330
+ A: {
331
+ boolValue: true,
332
+ distributionValue: {
333
+ bucketCounts: [
334
+ "Test string"
335
+ ],
336
+ bucketOptions: {
337
+ explicitBuckets: {
338
+ bounds: [
339
+ 42
340
+ ],
341
+ },
342
+ exponentialBuckets: {
343
+ growthFactor: 42,
344
+ numFiniteBuckets: 42,
345
+ scale: 42,
346
+ },
347
+ linearBuckets: {
348
+ numFiniteBuckets: 42,
349
+ offset: 42,
350
+ width: 42,
351
+ },
352
+ },
353
+ count: "Test string",
354
+ exemplars: [
355
+ {
356
+ attachments: [
357
+ {
358
+ A: 42
359
+ }
360
+ ],
361
+ timestamp: "Test string",
362
+ value: 42,
363
+ }
364
+ ],
365
+ mean: 42,
366
+ range: {
367
+ max: 42,
368
+ min: 42,
369
+ },
370
+ sumOfSquaredDeviation: 42,
371
+ },
372
+ doubleValue: 42,
373
+ int64Value: "Test string",
374
+ stringValue: "Test string",
375
+ }
376
+ },
377
+ plugin: "Test string",
378
+ pluginInstance: "Test string",
379
+ startTime: "Test string",
380
+ type: "Test string",
381
+ typeInstance: "Test string",
382
+ values: [
383
+ {
384
+ dataSourceName: "Test string",
385
+ dataSourceType: "Test string",
386
+ value: {
387
+ boolValue: true,
388
+ distributionValue: {
389
+ bucketCounts: [
390
+ "Test string"
391
+ ],
392
+ bucketOptions: {
393
+ explicitBuckets: {
394
+ bounds: [
395
+ 42
396
+ ],
397
+ },
398
+ exponentialBuckets: {
399
+ growthFactor: 42,
400
+ numFiniteBuckets: 42,
401
+ scale: 42,
402
+ },
403
+ linearBuckets: {
404
+ numFiniteBuckets: 42,
405
+ offset: 42,
406
+ width: 42,
407
+ },
408
+ },
409
+ count: "Test string",
410
+ exemplars: [
411
+ {
412
+ attachments: [
413
+ {
414
+ A: 42
415
+ }
416
+ ],
417
+ timestamp: "Test string",
418
+ value: 42,
419
+ }
420
+ ],
421
+ mean: 42,
422
+ range: {
423
+ max: 42,
424
+ min: 42,
425
+ },
426
+ sumOfSquaredDeviation: 42,
427
+ },
428
+ doubleValue: 42,
429
+ int64Value: "Test string",
430
+ stringValue: "Test string",
431
+ },
432
+ }
433
+ ],
434
+ }
435
+ ],
436
+ collectdVersion: "Test string",
437
+ resource: {
438
+ labels: {
439
+ A: "Test string"
440
+ },
441
+ type: "Test string",
442
+ },
443
+ });
444
+ /** Creates a new group. */
445
+ await gapi.client.monitoring.projects.groups.create({
446
+ name: "Test string",
447
+ validateOnly: true,
448
+ }, {
449
+ displayName: "Test string",
450
+ filter: "Test string",
451
+ isCluster: true,
452
+ name: "Test string",
453
+ parentName: "Test string",
454
+ });
455
+ /** Deletes an existing group. */
456
+ await gapi.client.monitoring.projects.groups.delete({
457
+ name: "Test string",
458
+ recursive: true,
459
+ });
460
+ /** Gets a single group. */
461
+ await gapi.client.monitoring.projects.groups.get({
462
+ name: "Test string",
463
+ });
464
+ /** Lists the existing groups. */
465
+ await gapi.client.monitoring.projects.groups.list({
466
+ ancestorsOfGroup: "Test string",
467
+ childrenOfGroup: "Test string",
468
+ descendantsOfGroup: "Test string",
469
+ name: "Test string",
470
+ pageSize: 42,
471
+ pageToken: "Test string",
472
+ });
473
+ /** Updates an existing group. You can change any group attributes except name. */
474
+ await gapi.client.monitoring.projects.groups.update({
475
+ name: "Test string",
476
+ validateOnly: true,
477
+ }, {
478
+ displayName: "Test string",
479
+ filter: "Test string",
480
+ isCluster: true,
481
+ name: "Test string",
482
+ parentName: "Test string",
483
+ });
484
+ /** Lists the monitored resources that are members of a group. */
485
+ await gapi.client.monitoring.projects.groups.members.list({
486
+ filter: "Test string",
487
+ "interval.endTime": "Test string",
488
+ "interval.startTime": "Test string",
489
+ name: "Test string",
490
+ pageSize: 42,
491
+ pageToken: "Test string",
492
+ });
493
+ /**
494
+ * Creates a new metric descriptor. The creation is executed asynchronously. User-created metric descriptors define custom metrics (https://cloud.google.com/monitoring/custom-metrics). The
495
+ * metric descriptor is updated if it already exists, except that metric labels are never removed.
496
+ */
497
+ await gapi.client.monitoring.projects.metricDescriptors.create({
498
+ name: "Test string",
499
+ }, {
500
+ description: "Test string",
501
+ displayName: "Test string",
502
+ labels: [
503
+ {
504
+ description: "Test string",
505
+ key: "Test string",
506
+ valueType: "Test string",
507
+ }
508
+ ],
509
+ launchStage: "Test string",
510
+ metadata: {
511
+ ingestDelay: "Test string",
512
+ launchStage: "Test string",
513
+ samplePeriod: "Test string",
514
+ },
515
+ metricKind: "Test string",
516
+ monitoredResourceTypes: [
517
+ "Test string"
518
+ ],
519
+ name: "Test string",
520
+ type: "Test string",
521
+ unit: "Test string",
522
+ valueType: "Test string",
523
+ });
524
+ /** Deletes a metric descriptor. Only user-created custom metrics (https://cloud.google.com/monitoring/custom-metrics) can be deleted. */
525
+ await gapi.client.monitoring.projects.metricDescriptors.delete({
526
+ name: "Test string",
527
+ });
528
+ /** Gets a single metric descriptor. */
529
+ await gapi.client.monitoring.projects.metricDescriptors.get({
530
+ name: "Test string",
531
+ });
532
+ /** Lists metric descriptors that match a filter. */
533
+ await gapi.client.monitoring.projects.metricDescriptors.list({
534
+ filter: "Test string",
535
+ name: "Test string",
536
+ pageSize: 42,
537
+ pageToken: "Test string",
538
+ });
539
+ /** Gets a single monitored resource descriptor. */
540
+ await gapi.client.monitoring.projects.monitoredResourceDescriptors.get({
541
+ name: "Test string",
542
+ });
543
+ /** Lists monitored resource descriptors that match a filter. */
544
+ await gapi.client.monitoring.projects.monitoredResourceDescriptors.list({
545
+ filter: "Test string",
546
+ name: "Test string",
547
+ pageSize: 42,
548
+ pageToken: "Test string",
549
+ });
550
+ /** Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type. */
551
+ await gapi.client.monitoring.projects.notificationChannelDescriptors.get({
552
+ name: "Test string",
553
+ });
554
+ /** Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added. */
555
+ await gapi.client.monitoring.projects.notificationChannelDescriptors.list({
556
+ name: "Test string",
557
+ pageSize: 42,
558
+ pageToken: "Test string",
559
+ });
560
+ /** Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service. */
561
+ await gapi.client.monitoring.projects.notificationChannels.create({
562
+ name: "Test string",
563
+ }, {
564
+ creationRecord: {
565
+ mutatedBy: "Test string",
566
+ mutateTime: "Test string",
567
+ },
568
+ description: "Test string",
569
+ displayName: "Test string",
570
+ enabled: true,
571
+ labels: {
572
+ A: "Test string"
573
+ },
574
+ mutationRecords: [
575
+ {
576
+ mutatedBy: "Test string",
577
+ mutateTime: "Test string",
578
+ }
579
+ ],
580
+ name: "Test string",
581
+ type: "Test string",
582
+ userLabels: {
583
+ A: "Test string"
584
+ },
585
+ verificationStatus: "Test string",
586
+ });
587
+ /** Deletes a notification channel. */
588
+ await gapi.client.monitoring.projects.notificationChannels.delete({
589
+ force: true,
590
+ name: "Test string",
591
+ });
592
+ /**
593
+ * Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API
594
+ * keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.
595
+ */
596
+ await gapi.client.monitoring.projects.notificationChannels.get({
597
+ name: "Test string",
598
+ });
599
+ /**
600
+ * Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the
601
+ * same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified
602
+ * state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the
603
+ * given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to
604
+ * the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and
605
+ * returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and
606
+ * also have a shorter expiration (e.g. codes such as "G-123456") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer
607
+ * expiration time.
608
+ */
609
+ await gapi.client.monitoring.projects.notificationChannels.getVerificationCode({
610
+ name: "Test string",
611
+ }, {
612
+ expireTime: "Test string",
613
+ });
614
+ /** Lists the notification channels that have been created for the project. */
615
+ await gapi.client.monitoring.projects.notificationChannels.list({
616
+ filter: "Test string",
617
+ name: "Test string",
618
+ orderBy: "Test string",
619
+ pageSize: 42,
620
+ pageToken: "Test string",
621
+ });
622
+ /** Updates a notification channel. Fields not specified in the field mask remain unchanged. */
623
+ await gapi.client.monitoring.projects.notificationChannels.patch({
624
+ name: "Test string",
625
+ updateMask: "Test string",
626
+ }, {
627
+ creationRecord: {
628
+ mutatedBy: "Test string",
629
+ mutateTime: "Test string",
630
+ },
631
+ description: "Test string",
632
+ displayName: "Test string",
633
+ enabled: true,
634
+ labels: {
635
+ A: "Test string"
636
+ },
637
+ mutationRecords: [
638
+ {
639
+ mutatedBy: "Test string",
640
+ mutateTime: "Test string",
641
+ }
642
+ ],
643
+ name: "Test string",
644
+ type: "Test string",
645
+ userLabels: {
646
+ A: "Test string"
647
+ },
648
+ verificationStatus: "Test string",
649
+ });
650
+ /** Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel. */
651
+ await gapi.client.monitoring.projects.notificationChannels.sendVerificationCode({
652
+ name: "Test string",
653
+ }, {
654
+ });
655
+ /** Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode. */
656
+ await gapi.client.monitoring.projects.notificationChannels.verify({
657
+ name: "Test string",
658
+ }, {
659
+ code: "Test string",
660
+ });
661
+ /**
662
+ * Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure
663
+ * message is included in the error response.
664
+ */
665
+ await gapi.client.monitoring.projects.timeSeries.create({
666
+ name: "Test string",
667
+ }, {
668
+ timeSeries: [
669
+ {
670
+ metadata: {
671
+ systemLabels: {
672
+ A: 42
673
+ },
674
+ userLabels: {
675
+ A: "Test string"
676
+ },
677
+ },
678
+ metric: {
679
+ labels: {
680
+ A: "Test string"
681
+ },
682
+ type: "Test string",
683
+ },
684
+ metricKind: "Test string",
685
+ points: [
686
+ {
687
+ interval: {
688
+ endTime: "Test string",
689
+ startTime: "Test string",
690
+ },
691
+ value: {
692
+ boolValue: true,
693
+ distributionValue: {
694
+ bucketCounts: [
695
+ "Test string"
696
+ ],
697
+ bucketOptions: {
698
+ explicitBuckets: {
699
+ bounds: [
700
+ 42
701
+ ],
702
+ },
703
+ exponentialBuckets: {
704
+ growthFactor: 42,
705
+ numFiniteBuckets: 42,
706
+ scale: 42,
707
+ },
708
+ linearBuckets: {
709
+ numFiniteBuckets: 42,
710
+ offset: 42,
711
+ width: 42,
712
+ },
713
+ },
714
+ count: "Test string",
715
+ exemplars: [
716
+ {
717
+ attachments: [
718
+ {
719
+ A: 42
720
+ }
721
+ ],
722
+ timestamp: "Test string",
723
+ value: 42,
724
+ }
725
+ ],
726
+ mean: 42,
727
+ range: {
728
+ max: 42,
729
+ min: 42,
730
+ },
731
+ sumOfSquaredDeviation: 42,
732
+ },
733
+ doubleValue: 42,
734
+ int64Value: "Test string",
735
+ stringValue: "Test string",
736
+ },
737
+ }
738
+ ],
739
+ resource: {
740
+ labels: {
741
+ A: "Test string"
742
+ },
743
+ type: "Test string",
744
+ },
745
+ unit: "Test string",
746
+ valueType: "Test string",
747
+ }
748
+ ],
749
+ });
750
+ /**
751
+ * Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. The response is empty if all time series in the
752
+ * request were written. If any time series could not be written, a corresponding failure message is included in the error response. This endpoint rejects writes to user-defined metrics.
753
+ * This method is only for use by Google Cloud services. Use projects.timeSeries.create instead.
754
+ */
755
+ await gapi.client.monitoring.projects.timeSeries.createService({
756
+ name: "Test string",
757
+ }, {
758
+ timeSeries: [
759
+ {
760
+ metadata: {
761
+ systemLabels: {
762
+ A: 42
763
+ },
764
+ userLabels: {
765
+ A: "Test string"
766
+ },
767
+ },
768
+ metric: {
769
+ labels: {
770
+ A: "Test string"
771
+ },
772
+ type: "Test string",
773
+ },
774
+ metricKind: "Test string",
775
+ points: [
776
+ {
777
+ interval: {
778
+ endTime: "Test string",
779
+ startTime: "Test string",
780
+ },
781
+ value: {
782
+ boolValue: true,
783
+ distributionValue: {
784
+ bucketCounts: [
785
+ "Test string"
786
+ ],
787
+ bucketOptions: {
788
+ explicitBuckets: {
789
+ bounds: [
790
+ 42
791
+ ],
792
+ },
793
+ exponentialBuckets: {
794
+ growthFactor: 42,
795
+ numFiniteBuckets: 42,
796
+ scale: 42,
797
+ },
798
+ linearBuckets: {
799
+ numFiniteBuckets: 42,
800
+ offset: 42,
801
+ width: 42,
802
+ },
803
+ },
804
+ count: "Test string",
805
+ exemplars: [
806
+ {
807
+ attachments: [
808
+ {
809
+ A: 42
810
+ }
811
+ ],
812
+ timestamp: "Test string",
813
+ value: 42,
814
+ }
815
+ ],
816
+ mean: 42,
817
+ range: {
818
+ max: 42,
819
+ min: 42,
820
+ },
821
+ sumOfSquaredDeviation: 42,
822
+ },
823
+ doubleValue: 42,
824
+ int64Value: "Test string",
825
+ stringValue: "Test string",
826
+ },
827
+ }
828
+ ],
829
+ resource: {
830
+ labels: {
831
+ A: "Test string"
832
+ },
833
+ type: "Test string",
834
+ },
835
+ unit: "Test string",
836
+ valueType: "Test string",
837
+ }
838
+ ],
839
+ });
840
+ /** Lists time series that match a filter. */
841
+ await gapi.client.monitoring.projects.timeSeries.list({
842
+ "aggregation.alignmentPeriod": "Test string",
843
+ "aggregation.crossSeriesReducer": "Test string",
844
+ "aggregation.groupByFields": "Test string",
845
+ "aggregation.perSeriesAligner": "Test string",
846
+ filter: "Test string",
847
+ "interval.endTime": "Test string",
848
+ "interval.startTime": "Test string",
849
+ name: "Test string",
850
+ orderBy: "Test string",
851
+ pageSize: 42,
852
+ pageToken: "Test string",
853
+ "secondaryAggregation.alignmentPeriod": "Test string",
854
+ "secondaryAggregation.crossSeriesReducer": "Test string",
855
+ "secondaryAggregation.groupByFields": "Test string",
856
+ "secondaryAggregation.perSeriesAligner": "Test string",
857
+ view: "Test string",
858
+ });
859
+ /** Queries time series using Monitoring Query Language. */
860
+ await gapi.client.monitoring.projects.timeSeries.query({
861
+ name: "Test string",
862
+ }, {
863
+ pageSize: 42,
864
+ pageToken: "Test string",
865
+ query: "Test string",
866
+ });
867
+ /** Creates a new Uptime check configuration. */
868
+ await gapi.client.monitoring.projects.uptimeCheckConfigs.create({
869
+ parent: "Test string",
870
+ }, {
871
+ checkerType: "Test string",
872
+ contentMatchers: [
873
+ {
874
+ content: "Test string",
875
+ jsonPathMatcher: {
876
+ jsonMatcher: "Test string",
877
+ jsonPath: "Test string",
878
+ },
879
+ matcher: "Test string",
880
+ }
881
+ ],
882
+ displayName: "Test string",
883
+ httpCheck: {
884
+ acceptedResponseStatusCodes: [
885
+ {
886
+ statusClass: "Test string",
887
+ statusValue: 42,
888
+ }
889
+ ],
890
+ authInfo: {
891
+ password: "Test string",
892
+ username: "Test string",
893
+ },
894
+ body: "Test string",
895
+ contentType: "Test string",
896
+ headers: {
897
+ A: "Test string"
898
+ },
899
+ maskHeaders: true,
900
+ path: "Test string",
901
+ port: 42,
902
+ requestMethod: "Test string",
903
+ useSsl: true,
904
+ validateSsl: true,
905
+ },
906
+ internalCheckers: [
907
+ {
908
+ displayName: "Test string",
909
+ gcpZone: "Test string",
910
+ name: "Test string",
911
+ network: "Test string",
912
+ peerProjectId: "Test string",
913
+ state: "Test string",
914
+ }
915
+ ],
916
+ isInternal: true,
917
+ monitoredResource: {
918
+ labels: {
919
+ A: "Test string"
920
+ },
921
+ type: "Test string",
922
+ },
923
+ name: "Test string",
924
+ period: "Test string",
925
+ resourceGroup: {
926
+ groupId: "Test string",
927
+ resourceType: "Test string",
928
+ },
929
+ selectedRegions: [
930
+ "Test string"
931
+ ],
932
+ tcpCheck: {
933
+ port: 42,
934
+ },
935
+ timeout: "Test string",
936
+ userLabels: {
937
+ A: "Test string"
938
+ },
939
+ });
940
+ /**
941
+ * Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be
942
+ * rendered invalid by the deletion.
943
+ */
944
+ await gapi.client.monitoring.projects.uptimeCheckConfigs.delete({
945
+ name: "Test string",
946
+ });
947
+ /** Gets a single Uptime check configuration. */
948
+ await gapi.client.monitoring.projects.uptimeCheckConfigs.get({
949
+ name: "Test string",
950
+ });
951
+ /** Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations). */
952
+ await gapi.client.monitoring.projects.uptimeCheckConfigs.list({
953
+ pageSize: 42,
954
+ pageToken: "Test string",
955
+ parent: "Test string",
956
+ });
957
+ /**
958
+ * Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the
959
+ * fields to be updated via updateMask. Returns the updated configuration.
960
+ */
961
+ await gapi.client.monitoring.projects.uptimeCheckConfigs.patch({
962
+ name: "Test string",
963
+ updateMask: "Test string",
964
+ }, {
965
+ checkerType: "Test string",
966
+ contentMatchers: [
967
+ {
968
+ content: "Test string",
969
+ jsonPathMatcher: {
970
+ jsonMatcher: "Test string",
971
+ jsonPath: "Test string",
972
+ },
973
+ matcher: "Test string",
974
+ }
975
+ ],
976
+ displayName: "Test string",
977
+ httpCheck: {
978
+ acceptedResponseStatusCodes: [
979
+ {
980
+ statusClass: "Test string",
981
+ statusValue: 42,
982
+ }
983
+ ],
984
+ authInfo: {
985
+ password: "Test string",
986
+ username: "Test string",
987
+ },
988
+ body: "Test string",
989
+ contentType: "Test string",
990
+ headers: {
991
+ A: "Test string"
992
+ },
993
+ maskHeaders: true,
994
+ path: "Test string",
995
+ port: 42,
996
+ requestMethod: "Test string",
997
+ useSsl: true,
998
+ validateSsl: true,
999
+ },
1000
+ internalCheckers: [
1001
+ {
1002
+ displayName: "Test string",
1003
+ gcpZone: "Test string",
1004
+ name: "Test string",
1005
+ network: "Test string",
1006
+ peerProjectId: "Test string",
1007
+ state: "Test string",
1008
+ }
1009
+ ],
1010
+ isInternal: true,
1011
+ monitoredResource: {
1012
+ labels: {
1013
+ A: "Test string"
1014
+ },
1015
+ type: "Test string",
1016
+ },
1017
+ name: "Test string",
1018
+ period: "Test string",
1019
+ resourceGroup: {
1020
+ groupId: "Test string",
1021
+ resourceType: "Test string",
1022
+ },
1023
+ selectedRegions: [
1024
+ "Test string"
1025
+ ],
1026
+ tcpCheck: {
1027
+ port: 42,
1028
+ },
1029
+ timeout: "Test string",
1030
+ userLabels: {
1031
+ A: "Test string"
1032
+ },
1033
+ });
1034
+ /** Create a Service. */
1035
+ await gapi.client.monitoring.services.create({
1036
+ parent: "Test string",
1037
+ serviceId: "Test string",
1038
+ }, {
1039
+ appEngine: {
1040
+ moduleId: "Test string",
1041
+ },
1042
+ cloudEndpoints: {
1043
+ service: "Test string",
1044
+ },
1045
+ cloudRun: {
1046
+ location: "Test string",
1047
+ serviceName: "Test string",
1048
+ },
1049
+ clusterIstio: {
1050
+ clusterName: "Test string",
1051
+ location: "Test string",
1052
+ serviceName: "Test string",
1053
+ serviceNamespace: "Test string",
1054
+ },
1055
+ custom: {
1056
+ },
1057
+ displayName: "Test string",
1058
+ gkeNamespace: {
1059
+ clusterName: "Test string",
1060
+ location: "Test string",
1061
+ namespaceName: "Test string",
1062
+ projectId: "Test string",
1063
+ },
1064
+ gkeService: {
1065
+ clusterName: "Test string",
1066
+ location: "Test string",
1067
+ namespaceName: "Test string",
1068
+ projectId: "Test string",
1069
+ serviceName: "Test string",
1070
+ },
1071
+ gkeWorkload: {
1072
+ clusterName: "Test string",
1073
+ location: "Test string",
1074
+ namespaceName: "Test string",
1075
+ projectId: "Test string",
1076
+ topLevelControllerName: "Test string",
1077
+ topLevelControllerType: "Test string",
1078
+ },
1079
+ istioCanonicalService: {
1080
+ canonicalService: "Test string",
1081
+ canonicalServiceNamespace: "Test string",
1082
+ meshUid: "Test string",
1083
+ },
1084
+ meshIstio: {
1085
+ meshUid: "Test string",
1086
+ serviceName: "Test string",
1087
+ serviceNamespace: "Test string",
1088
+ },
1089
+ name: "Test string",
1090
+ telemetry: {
1091
+ resourceName: "Test string",
1092
+ },
1093
+ userLabels: {
1094
+ A: "Test string"
1095
+ },
1096
+ });
1097
+ /** Soft delete this Service. */
1098
+ await gapi.client.monitoring.services.delete({
1099
+ name: "Test string",
1100
+ });
1101
+ /** Get the named Service. */
1102
+ await gapi.client.monitoring.services.get({
1103
+ name: "Test string",
1104
+ });
1105
+ /** List Services for this Metrics Scope. */
1106
+ await gapi.client.monitoring.services.list({
1107
+ filter: "Test string",
1108
+ pageSize: 42,
1109
+ pageToken: "Test string",
1110
+ parent: "Test string",
1111
+ });
1112
+ /** Update this Service. */
1113
+ await gapi.client.monitoring.services.patch({
1114
+ name: "Test string",
1115
+ updateMask: "Test string",
1116
+ }, {
1117
+ appEngine: {
1118
+ moduleId: "Test string",
1119
+ },
1120
+ cloudEndpoints: {
1121
+ service: "Test string",
1122
+ },
1123
+ cloudRun: {
1124
+ location: "Test string",
1125
+ serviceName: "Test string",
1126
+ },
1127
+ clusterIstio: {
1128
+ clusterName: "Test string",
1129
+ location: "Test string",
1130
+ serviceName: "Test string",
1131
+ serviceNamespace: "Test string",
1132
+ },
1133
+ custom: {
1134
+ },
1135
+ displayName: "Test string",
1136
+ gkeNamespace: {
1137
+ clusterName: "Test string",
1138
+ location: "Test string",
1139
+ namespaceName: "Test string",
1140
+ projectId: "Test string",
1141
+ },
1142
+ gkeService: {
1143
+ clusterName: "Test string",
1144
+ location: "Test string",
1145
+ namespaceName: "Test string",
1146
+ projectId: "Test string",
1147
+ serviceName: "Test string",
1148
+ },
1149
+ gkeWorkload: {
1150
+ clusterName: "Test string",
1151
+ location: "Test string",
1152
+ namespaceName: "Test string",
1153
+ projectId: "Test string",
1154
+ topLevelControllerName: "Test string",
1155
+ topLevelControllerType: "Test string",
1156
+ },
1157
+ istioCanonicalService: {
1158
+ canonicalService: "Test string",
1159
+ canonicalServiceNamespace: "Test string",
1160
+ meshUid: "Test string",
1161
+ },
1162
+ meshIstio: {
1163
+ meshUid: "Test string",
1164
+ serviceName: "Test string",
1165
+ serviceNamespace: "Test string",
1166
+ },
1167
+ name: "Test string",
1168
+ telemetry: {
1169
+ resourceName: "Test string",
1170
+ },
1171
+ userLabels: {
1172
+ A: "Test string"
1173
+ },
1174
+ });
1175
+ /** Create a ServiceLevelObjective for the given Service. */
1176
+ await gapi.client.monitoring.services.serviceLevelObjectives.create({
1177
+ parent: "Test string",
1178
+ serviceLevelObjectiveId: "Test string",
1179
+ }, {
1180
+ calendarPeriod: "Test string",
1181
+ displayName: "Test string",
1182
+ goal: 42,
1183
+ name: "Test string",
1184
+ rollingPeriod: "Test string",
1185
+ serviceLevelIndicator: {
1186
+ basicSli: {
1187
+ availability: {
1188
+ },
1189
+ latency: {
1190
+ threshold: "Test string",
1191
+ },
1192
+ location: [
1193
+ "Test string"
1194
+ ],
1195
+ method: [
1196
+ "Test string"
1197
+ ],
1198
+ version: [
1199
+ "Test string"
1200
+ ],
1201
+ },
1202
+ requestBased: {
1203
+ distributionCut: {
1204
+ distributionFilter: "Test string",
1205
+ range: {
1206
+ max: 42,
1207
+ min: 42,
1208
+ },
1209
+ },
1210
+ goodTotalRatio: {
1211
+ badServiceFilter: "Test string",
1212
+ goodServiceFilter: "Test string",
1213
+ totalServiceFilter: "Test string",
1214
+ },
1215
+ },
1216
+ windowsBased: {
1217
+ goodBadMetricFilter: "Test string",
1218
+ goodTotalRatioThreshold: {
1219
+ basicSliPerformance: {
1220
+ availability: {
1221
+ },
1222
+ latency: {
1223
+ threshold: "Test string",
1224
+ },
1225
+ location: [
1226
+ "Test string"
1227
+ ],
1228
+ method: [
1229
+ "Test string"
1230
+ ],
1231
+ version: [
1232
+ "Test string"
1233
+ ],
1234
+ },
1235
+ performance: {
1236
+ distributionCut: {
1237
+ distributionFilter: "Test string",
1238
+ range: {
1239
+ max: 42,
1240
+ min: 42,
1241
+ },
1242
+ },
1243
+ goodTotalRatio: {
1244
+ badServiceFilter: "Test string",
1245
+ goodServiceFilter: "Test string",
1246
+ totalServiceFilter: "Test string",
1247
+ },
1248
+ },
1249
+ threshold: 42,
1250
+ },
1251
+ metricMeanInRange: {
1252
+ range: {
1253
+ max: 42,
1254
+ min: 42,
1255
+ },
1256
+ timeSeries: "Test string",
1257
+ },
1258
+ metricSumInRange: {
1259
+ range: {
1260
+ max: 42,
1261
+ min: 42,
1262
+ },
1263
+ timeSeries: "Test string",
1264
+ },
1265
+ windowPeriod: "Test string",
1266
+ },
1267
+ },
1268
+ userLabels: {
1269
+ A: "Test string"
1270
+ },
1271
+ });
1272
+ /** Delete the given ServiceLevelObjective. */
1273
+ await gapi.client.monitoring.services.serviceLevelObjectives.delete({
1274
+ name: "Test string",
1275
+ });
1276
+ /** Get a ServiceLevelObjective by name. */
1277
+ await gapi.client.monitoring.services.serviceLevelObjectives.get({
1278
+ name: "Test string",
1279
+ view: "Test string",
1280
+ });
1281
+ /** List the ServiceLevelObjectives for the given Service. */
1282
+ await gapi.client.monitoring.services.serviceLevelObjectives.list({
1283
+ filter: "Test string",
1284
+ pageSize: 42,
1285
+ pageToken: "Test string",
1286
+ parent: "Test string",
1287
+ view: "Test string",
1288
+ });
1289
+ /** Update the given ServiceLevelObjective. */
1290
+ await gapi.client.monitoring.services.serviceLevelObjectives.patch({
1291
+ name: "Test string",
1292
+ updateMask: "Test string",
1293
+ }, {
1294
+ calendarPeriod: "Test string",
1295
+ displayName: "Test string",
1296
+ goal: 42,
1297
+ name: "Test string",
1298
+ rollingPeriod: "Test string",
1299
+ serviceLevelIndicator: {
1300
+ basicSli: {
1301
+ availability: {
1302
+ },
1303
+ latency: {
1304
+ threshold: "Test string",
1305
+ },
1306
+ location: [
1307
+ "Test string"
1308
+ ],
1309
+ method: [
1310
+ "Test string"
1311
+ ],
1312
+ version: [
1313
+ "Test string"
1314
+ ],
1315
+ },
1316
+ requestBased: {
1317
+ distributionCut: {
1318
+ distributionFilter: "Test string",
1319
+ range: {
1320
+ max: 42,
1321
+ min: 42,
1322
+ },
1323
+ },
1324
+ goodTotalRatio: {
1325
+ badServiceFilter: "Test string",
1326
+ goodServiceFilter: "Test string",
1327
+ totalServiceFilter: "Test string",
1328
+ },
1329
+ },
1330
+ windowsBased: {
1331
+ goodBadMetricFilter: "Test string",
1332
+ goodTotalRatioThreshold: {
1333
+ basicSliPerformance: {
1334
+ availability: {
1335
+ },
1336
+ latency: {
1337
+ threshold: "Test string",
1338
+ },
1339
+ location: [
1340
+ "Test string"
1341
+ ],
1342
+ method: [
1343
+ "Test string"
1344
+ ],
1345
+ version: [
1346
+ "Test string"
1347
+ ],
1348
+ },
1349
+ performance: {
1350
+ distributionCut: {
1351
+ distributionFilter: "Test string",
1352
+ range: {
1353
+ max: 42,
1354
+ min: 42,
1355
+ },
1356
+ },
1357
+ goodTotalRatio: {
1358
+ badServiceFilter: "Test string",
1359
+ goodServiceFilter: "Test string",
1360
+ totalServiceFilter: "Test string",
1361
+ },
1362
+ },
1363
+ threshold: 42,
1364
+ },
1365
+ metricMeanInRange: {
1366
+ range: {
1367
+ max: 42,
1368
+ min: 42,
1369
+ },
1370
+ timeSeries: "Test string",
1371
+ },
1372
+ metricSumInRange: {
1373
+ range: {
1374
+ max: 42,
1375
+ min: 42,
1376
+ },
1377
+ timeSeries: "Test string",
1378
+ },
1379
+ windowPeriod: "Test string",
1380
+ },
1381
+ },
1382
+ userLabels: {
1383
+ A: "Test string"
1384
+ },
1385
+ });
1386
+ /** Returns the list of IP addresses that checkers run from */
1387
+ await gapi.client.monitoring.uptimeCheckIps.list({
1388
+ pageSize: 42,
1389
+ pageToken: "Test string",
1390
+ });
1391
+ }
1392
+ });