v1beta.d.ts
49.1 KB
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
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
/**
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { GaxiosPromise } from 'gaxios';
import { Compute, JWT, OAuth2Client, UserRefreshClient } from 'google-auth-library';
import { APIRequestContext, BodyResponseCallback, GlobalOptions, GoogleConfigurable, MethodOptions } from 'googleapis-common';
export declare namespace websecurityscanner_v1beta {
interface Options extends GlobalOptions {
version: 'v1beta';
}
interface StandardParameters {
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API
* access, quota, and reports. Required unless you provide an OAuth 2.0
* token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be
* any arbitrary string assigned to a user, but should not exceed 40
* characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Web Security Scanner API
*
* Scans your Compute and App Engine apps for common web vulnerabilities.
*
* @example
* const {google} = require('googleapis');
* const websecurityscanner = google.websecurityscanner('v1beta');
*
* @namespace websecurityscanner
* @type {Function}
* @version v1beta
* @variation v1beta
* @param {object=} options Options for Websecurityscanner
*/
class Websecurityscanner {
context: APIRequestContext;
projects: Resource$Projects;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* Scan authentication configuration.
*/
interface Schema$Authentication {
/**
* Authentication using a custom account.
*/
customAccount?: Schema$CustomAccount;
/**
* Authentication using a Google account.
*/
googleAccount?: Schema$GoogleAccount;
}
/**
* A CrawledUrl resource represents a URL that was crawled during a ScanRun.
* Web Security Scanner Service crawls the web applications, following all
* links within the scope of sites, to find the URLs to test against.
*/
interface Schema$CrawledUrl {
/**
* Output only. The body of the request that was used to visit the URL.
*/
body?: string;
/**
* Output only. The http method of the request that was used to visit the
* URL, in uppercase.
*/
httpMethod?: string;
/**
* Output only. The URL that was crawled.
*/
url?: string;
}
/**
* Describes authentication configuration that uses a custom account.
*/
interface Schema$CustomAccount {
/**
* Required. The login form URL of the website.
*/
loginUrl?: string;
/**
* Input only. Required. The password of the custom account. The credential
* is stored encrypted and not returned in any response nor included in
* audit logs.
*/
password?: string;
/**
* Required. The user name of the custom account.
*/
username?: string;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance: service Foo { rpc
* Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON
* representation for `Empty` is empty JSON object `{}`.
*/
interface Schema$Empty {
}
/**
* A Finding resource represents a vulnerability instance identified during a
* ScanRun.
*/
interface Schema$Finding {
/**
* Output only. The body of the request that triggered the vulnerability.
*/
body?: string;
/**
* Output only. The description of the vulnerability.
*/
description?: string;
/**
* Output only. The URL where the browser lands when the vulnerability is
* detected.
*/
finalUrl?: string;
/**
* Output only. The type of the Finding. Detailed and up-to-date information
* on findings can be found here:
* https://cloud.google.com/security-scanner/docs/scan-result-details
*/
findingType?: string;
/**
* Output only. An addon containing information reported for a vulnerability
* with an HTML form, if any.
*/
form?: Schema$Form;
/**
* Output only. If the vulnerability was originated from nested IFrame, the
* immediate parent IFrame is reported.
*/
frameUrl?: string;
/**
* Output only. The URL produced by the server-side fuzzer and used in the
* request that triggered the vulnerability.
*/
fuzzedUrl?: string;
/**
* Output only. The http method of the request that triggered the
* vulnerability, in uppercase.
*/
httpMethod?: string;
/**
* Output only. The resource name of the Finding. The name follows the
* format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'.
* The finding IDs are generated by the system.
*/
name?: string;
/**
* Output only. An addon containing information about outdated libraries.
*/
outdatedLibrary?: Schema$OutdatedLibrary;
/**
* Output only. The URL containing human-readable payload that user can
* leverage to reproduce the vulnerability.
*/
reproductionUrl?: string;
/**
* Output only. The tracking ID uniquely identifies a vulnerability instance
* across multiple ScanRuns.
*/
trackingId?: string;
/**
* Output only. An addon containing detailed information regarding any
* resource causing the vulnerability such as JavaScript sources, image,
* audio files, etc.
*/
violatingResource?: Schema$ViolatingResource;
/**
* Output only. An addon containing information about vulnerable or missing
* HTTP headers.
*/
vulnerableHeaders?: Schema$VulnerableHeaders;
/**
* Output only. An addon containing information about request parameters
* which were found to be vulnerable.
*/
vulnerableParameters?: Schema$VulnerableParameters;
/**
* Output only. An addon containing information reported for an XSS, if any.
*/
xss?: Schema$Xss;
}
/**
* A FindingTypeStats resource represents stats regarding a specific
* FindingType of Findings under a given ScanRun.
*/
interface Schema$FindingTypeStats {
/**
* Output only. The count of findings belonging to this finding type.
*/
findingCount?: number;
/**
* Output only. The finding type associated with the stats.
*/
findingType?: string;
}
/**
* ! Information about a vulnerability with an HTML.
*/
interface Schema$Form {
/**
* ! The URI where to send the form when it's submitted.
*/
actionUri?: string;
/**
* ! The names of form fields related to the vulnerability.
*/
fields?: string[];
}
/**
* Describes authentication configuration that uses a Google account.
*/
interface Schema$GoogleAccount {
/**
* Input only. Required. The password of the Google account. The credential
* is stored encrypted and not returned in any response nor included in
* audit logs.
*/
password?: string;
/**
* Required. The user name of the Google account.
*/
username?: string;
}
/**
* Describes a HTTP Header.
*/
interface Schema$Header {
/**
* Header name.
*/
name?: string;
/**
* Header value.
*/
value?: string;
}
/**
* Response for the `ListCrawledUrls` method.
*/
interface Schema$ListCrawledUrlsResponse {
/**
* The list of CrawledUrls returned.
*/
crawledUrls?: Schema$CrawledUrl[];
/**
* Token to retrieve the next page of results, or empty if there are no more
* results in the list.
*/
nextPageToken?: string;
}
/**
* Response for the `ListFindings` method.
*/
interface Schema$ListFindingsResponse {
/**
* The list of Findings returned.
*/
findings?: Schema$Finding[];
/**
* Token to retrieve the next page of results, or empty if there are no more
* results in the list.
*/
nextPageToken?: string;
}
/**
* Response for the `ListFindingTypeStats` method.
*/
interface Schema$ListFindingTypeStatsResponse {
/**
* The list of FindingTypeStats returned.
*/
findingTypeStats?: Schema$FindingTypeStats[];
}
/**
* Response for the `ListScanConfigs` method.
*/
interface Schema$ListScanConfigsResponse {
/**
* Token to retrieve the next page of results, or empty if there are no more
* results in the list.
*/
nextPageToken?: string;
/**
* The list of ScanConfigs returned.
*/
scanConfigs?: Schema$ScanConfig[];
}
/**
* Response for the `ListScanRuns` method.
*/
interface Schema$ListScanRunsResponse {
/**
* Token to retrieve the next page of results, or empty if there are no more
* results in the list.
*/
nextPageToken?: string;
/**
* The list of ScanRuns returned.
*/
scanRuns?: Schema$ScanRun[];
}
/**
* Information reported for an outdated library.
*/
interface Schema$OutdatedLibrary {
/**
* URLs to learn more information about the vulnerabilities in the library.
*/
learnMoreUrls?: string[];
/**
* The name of the outdated library.
*/
libraryName?: string;
/**
* The version number.
*/
version?: string;
}
/**
* A ScanConfig resource contains the configurations to launch a scan. next
* id: 12
*/
interface Schema$ScanConfig {
/**
* The authentication configuration. If specified, service will use the
* authentication configuration during scanning.
*/
authentication?: Schema$Authentication;
/**
* The blacklist URL patterns as described in
* https://cloud.google.com/security-scanner/docs/excluded-urls
*/
blacklistPatterns?: string[];
/**
* Required. The user provided display name of the ScanConfig.
*/
displayName?: string;
/**
* Controls export of scan configurations and results to Cloud Security
* Command Center.
*/
exportToSecurityCommandCenter?: string;
/**
* Latest ScanRun if available.
*/
latestRun?: Schema$ScanRun;
/**
* The maximum QPS during scanning. A valid value ranges from 5 to 20
* inclusively. If the field is unspecified or its value is set 0, server
* will default to 15. Other values outside of [5, 20] range will be
* rejected with INVALID_ARGUMENT error.
*/
maxQps?: number;
/**
* The resource name of the ScanConfig. The name follows the format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig
* IDs are generated by the system.
*/
name?: string;
/**
* The schedule of the ScanConfig.
*/
schedule?: Schema$Schedule;
/**
* Required. The starting URLs from which the scanner finds site pages.
*/
startingUrls?: string[];
/**
* Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
* used as a default.
*/
targetPlatforms?: string[];
/**
* The user agent used during scanning.
*/
userAgent?: string;
}
/**
* Defines a custom error message used by CreateScanConfig and
* UpdateScanConfig APIs when scan configuration validation fails. It is also
* reported as part of a ScanRunErrorTrace message if scan validation fails
* due to a scan configuration error.
*/
interface Schema$ScanConfigError {
/**
* Output only. Indicates the reason code for a configuration failure.
*/
code?: string;
/**
* Output only. Indicates the full name of the ScanConfig field that
* triggers this error, for example "scan_config.max_qps". This
* field is provided for troubleshooting purposes only and its actual value
* can change in the future.
*/
fieldName?: string;
}
/**
* A ScanRun is a output-only resource representing an actual run of the scan.
* Next id: 12
*/
interface Schema$ScanRun {
/**
* Output only. The time at which the ScanRun reached termination state -
* that the ScanRun is either finished or stopped by user.
*/
endTime?: string;
/**
* Output only. If result_state is an ERROR, this field provides the primary
* reason for scan's termination and more details, if such are
* available.
*/
errorTrace?: Schema$ScanRunErrorTrace;
/**
* Output only. The execution state of the ScanRun.
*/
executionState?: string;
/**
* Output only. Whether the scan run has found any vulnerabilities.
*/
hasVulnerabilities?: boolean;
/**
* Output only. The resource name of the ScanRun. The name follows the
* format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
* The ScanRun IDs are generated by the system.
*/
name?: string;
/**
* Output only. The percentage of total completion ranging from 0 to 100. If
* the scan is in queue, the value is 0. If the scan is running, the value
* ranges from 0 to 100. If the scan is finished, the value is 100.
*/
progressPercent?: number;
/**
* Output only. The result state of the ScanRun. This field is only
* available after the execution state reaches "FINISHED".
*/
resultState?: string;
/**
* Output only. The time at which the ScanRun started.
*/
startTime?: string;
/**
* Output only. The number of URLs crawled during this ScanRun. If the scan
* is in progress, the value represents the number of URLs crawled up to
* now.
*/
urlsCrawledCount?: string;
/**
* Output only. The number of URLs tested during this ScanRun. If the scan
* is in progress, the value represents the number of URLs tested up to now.
* The number of URLs tested is usually larger than the number URLS crawled
* because typically a crawled URL is tested with multiple test payloads.
*/
urlsTestedCount?: string;
/**
* Output only. A list of warnings, if such are encountered during this scan
* run.
*/
warningTraces?: Schema$ScanRunWarningTrace[];
}
/**
* Output only. Defines an error trace message for a ScanRun.
*/
interface Schema$ScanRunErrorTrace {
/**
* Output only. Indicates the error reason code.
*/
code?: string;
/**
* Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field
* indicates the most common HTTP error code, if such is available. For
* example, if this code is 404, the scan has encountered too many NOT_FOUND
* responses.
*/
mostCommonHttpErrorCode?: number;
/**
* Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field
* has the error message encountered during scan configuration validation
* that is performed before each scan run.
*/
scanConfigError?: Schema$ScanConfigError;
}
/**
* Output only. Defines a warning trace message for ScanRun. Warning traces
* provide customers with useful information that helps make the scanning
* process more effective.
*/
interface Schema$ScanRunWarningTrace {
/**
* Output only. Indicates the warning code.
*/
code?: string;
}
/**
* Scan schedule configuration.
*/
interface Schema$Schedule {
/**
* Required. The duration of time between executions in days.
*/
intervalDurationDays?: number;
/**
* A timestamp indicates when the next run will be scheduled. The value is
* refreshed by the server after each run. If unspecified, it will default
* to current server time, which means the scan will be scheduled to start
* immediately.
*/
scheduleTime?: string;
}
/**
* Request for the `StartScanRun` method.
*/
interface Schema$StartScanRunRequest {
}
/**
* Request for the `StopScanRun` method.
*/
interface Schema$StopScanRunRequest {
}
/**
* Information regarding any resource causing the vulnerability such as
* JavaScript sources, image, audio files, etc.
*/
interface Schema$ViolatingResource {
/**
* The MIME type of this resource.
*/
contentType?: string;
/**
* URL of this violating resource.
*/
resourceUrl?: string;
}
/**
* Information about vulnerable or missing HTTP Headers.
*/
interface Schema$VulnerableHeaders {
/**
* List of vulnerable headers.
*/
headers?: Schema$Header[];
/**
* List of missing headers.
*/
missingHeaders?: Schema$Header[];
}
/**
* Information about vulnerable request parameters.
*/
interface Schema$VulnerableParameters {
/**
* The vulnerable parameter names.
*/
parameterNames?: string[];
}
/**
* Information reported for an XSS.
*/
interface Schema$Xss {
/**
* An error message generated by a javascript breakage.
*/
errorMessage?: string;
/**
* Stack traces leading to the point where the XSS occurred.
*/
stackTraces?: string[];
}
class Resource$Projects {
context: APIRequestContext;
scanConfigs: Resource$Projects$Scanconfigs;
constructor(context: APIRequestContext);
}
class Resource$Projects$Scanconfigs {
context: APIRequestContext;
scanRuns: Resource$Projects$Scanconfigs$Scanruns;
constructor(context: APIRequestContext);
/**
* websecurityscanner.projects.scanConfigs.create
* @desc Creates a new ScanConfig.
* @alias websecurityscanner.projects.scanConfigs.create
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.parent Required. The parent resource name where the scan is created, which should be a project resource name in the format 'projects/{projectId}'.
* @param {().ScanConfig} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
create(params?: Params$Resource$Projects$Scanconfigs$Create, options?: MethodOptions): GaxiosPromise<Schema$ScanConfig>;
create(params: Params$Resource$Projects$Scanconfigs$Create, options: MethodOptions | BodyResponseCallback<Schema$ScanConfig>, callback: BodyResponseCallback<Schema$ScanConfig>): void;
create(params: Params$Resource$Projects$Scanconfigs$Create, callback: BodyResponseCallback<Schema$ScanConfig>): void;
create(callback: BodyResponseCallback<Schema$ScanConfig>): void;
/**
* websecurityscanner.projects.scanConfigs.delete
* @desc Deletes an existing ScanConfig and its child resources.
* @alias websecurityscanner.projects.scanConfigs.delete
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The resource name of the ScanConfig to be deleted. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
delete(params?: Params$Resource$Projects$Scanconfigs$Delete, options?: MethodOptions): GaxiosPromise<Schema$Empty>;
delete(params: Params$Resource$Projects$Scanconfigs$Delete, options: MethodOptions | BodyResponseCallback<Schema$Empty>, callback: BodyResponseCallback<Schema$Empty>): void;
delete(params: Params$Resource$Projects$Scanconfigs$Delete, callback: BodyResponseCallback<Schema$Empty>): void;
delete(callback: BodyResponseCallback<Schema$Empty>): void;
/**
* websecurityscanner.projects.scanConfigs.get
* @desc Gets a ScanConfig.
* @alias websecurityscanner.projects.scanConfigs.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The resource name of the ScanConfig to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Projects$Scanconfigs$Get, options?: MethodOptions): GaxiosPromise<Schema$ScanConfig>;
get(params: Params$Resource$Projects$Scanconfigs$Get, options: MethodOptions | BodyResponseCallback<Schema$ScanConfig>, callback: BodyResponseCallback<Schema$ScanConfig>): void;
get(params: Params$Resource$Projects$Scanconfigs$Get, callback: BodyResponseCallback<Schema$ScanConfig>): void;
get(callback: BodyResponseCallback<Schema$ScanConfig>): void;
/**
* websecurityscanner.projects.scanConfigs.list
* @desc Lists ScanConfigs under a given project.
* @alias websecurityscanner.projects.scanConfigs.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer=} params.pageSize The maximum number of ScanConfigs to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
* @param {string=} params.pageToken A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.
* @param {string} params.parent Required. The parent resource name, which should be a project resource name in the format 'projects/{projectId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Projects$Scanconfigs$List, options?: MethodOptions): GaxiosPromise<Schema$ListScanConfigsResponse>;
list(params: Params$Resource$Projects$Scanconfigs$List, options: MethodOptions | BodyResponseCallback<Schema$ListScanConfigsResponse>, callback: BodyResponseCallback<Schema$ListScanConfigsResponse>): void;
list(params: Params$Resource$Projects$Scanconfigs$List, callback: BodyResponseCallback<Schema$ListScanConfigsResponse>): void;
list(callback: BodyResponseCallback<Schema$ListScanConfigsResponse>): void;
/**
* websecurityscanner.projects.scanConfigs.patch
* @desc Updates a ScanConfig. This method support partial update of a
* ScanConfig.
* @alias websecurityscanner.projects.scanConfigs.patch
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.
* @param {string=} params.updateMask Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
* @param {().ScanConfig} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
patch(params?: Params$Resource$Projects$Scanconfigs$Patch, options?: MethodOptions): GaxiosPromise<Schema$ScanConfig>;
patch(params: Params$Resource$Projects$Scanconfigs$Patch, options: MethodOptions | BodyResponseCallback<Schema$ScanConfig>, callback: BodyResponseCallback<Schema$ScanConfig>): void;
patch(params: Params$Resource$Projects$Scanconfigs$Patch, callback: BodyResponseCallback<Schema$ScanConfig>): void;
patch(callback: BodyResponseCallback<Schema$ScanConfig>): void;
/**
* websecurityscanner.projects.scanConfigs.start
* @desc Start a ScanRun according to the given ScanConfig.
* @alias websecurityscanner.projects.scanConfigs.start
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The resource name of the ScanConfig to be used. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
* @param {().StartScanRunRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
start(params?: Params$Resource$Projects$Scanconfigs$Start, options?: MethodOptions): GaxiosPromise<Schema$ScanRun>;
start(params: Params$Resource$Projects$Scanconfigs$Start, options: MethodOptions | BodyResponseCallback<Schema$ScanRun>, callback: BodyResponseCallback<Schema$ScanRun>): void;
start(params: Params$Resource$Projects$Scanconfigs$Start, callback: BodyResponseCallback<Schema$ScanRun>): void;
start(callback: BodyResponseCallback<Schema$ScanRun>): void;
}
interface Params$Resource$Projects$Scanconfigs$Create extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The parent resource name where the scan is created, which
* should be a project resource name in the format 'projects/{projectId}'.
*/
parent?: string;
/**
* Request body metadata
*/
requestBody?: Schema$ScanConfig;
}
interface Params$Resource$Projects$Scanconfigs$Delete extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The resource name of the ScanConfig to be deleted. The name
* follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
name?: string;
}
interface Params$Resource$Projects$Scanconfigs$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The resource name of the ScanConfig to be returned. The name
* follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
name?: string;
}
interface Params$Resource$Projects$Scanconfigs$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The maximum number of ScanConfigs to return, can be limited by server. If
* not specified or not positive, the implementation will select a
* reasonable value.
*/
pageSize?: number;
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request. If
* unspecified, the first page of results is returned.
*/
pageToken?: string;
/**
* Required. The parent resource name, which should be a project resource
* name in the format 'projects/{projectId}'.
*/
parent?: string;
}
interface Params$Resource$Projects$Scanconfigs$Patch extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The resource name of the ScanConfig. The name follows the format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
* generated by the system.
*/
name?: string;
/**
* Required. The update mask applies to the resource. For the `FieldMask`
* definition, see
* https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
*/
updateMask?: string;
/**
* Request body metadata
*/
requestBody?: Schema$ScanConfig;
}
interface Params$Resource$Projects$Scanconfigs$Start extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The resource name of the ScanConfig to be used. The name
* follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
name?: string;
/**
* Request body metadata
*/
requestBody?: Schema$StartScanRunRequest;
}
class Resource$Projects$Scanconfigs$Scanruns {
context: APIRequestContext;
crawledUrls: Resource$Projects$Scanconfigs$Scanruns$Crawledurls;
findings: Resource$Projects$Scanconfigs$Scanruns$Findings;
findingTypeStats: Resource$Projects$Scanconfigs$Scanruns$Findingtypestats;
constructor(context: APIRequestContext);
/**
* websecurityscanner.projects.scanConfigs.scanRuns.get
* @desc Gets a ScanRun.
* @alias websecurityscanner.projects.scanConfigs.scanRuns.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The resource name of the ScanRun to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Projects$Scanconfigs$Scanruns$Get, options?: MethodOptions): GaxiosPromise<Schema$ScanRun>;
get(params: Params$Resource$Projects$Scanconfigs$Scanruns$Get, options: MethodOptions | BodyResponseCallback<Schema$ScanRun>, callback: BodyResponseCallback<Schema$ScanRun>): void;
get(params: Params$Resource$Projects$Scanconfigs$Scanruns$Get, callback: BodyResponseCallback<Schema$ScanRun>): void;
get(callback: BodyResponseCallback<Schema$ScanRun>): void;
/**
* websecurityscanner.projects.scanConfigs.scanRuns.list
* @desc Lists ScanRuns under a given ScanConfig, in descending order of
* ScanRun stop time.
* @alias websecurityscanner.projects.scanConfigs.scanRuns.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer=} params.pageSize The maximum number of ScanRuns to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
* @param {string=} params.pageToken A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.
* @param {string} params.parent Required. The parent resource name, which should be a scan resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Projects$Scanconfigs$Scanruns$List, options?: MethodOptions): GaxiosPromise<Schema$ListScanRunsResponse>;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$List, options: MethodOptions | BodyResponseCallback<Schema$ListScanRunsResponse>, callback: BodyResponseCallback<Schema$ListScanRunsResponse>): void;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$List, callback: BodyResponseCallback<Schema$ListScanRunsResponse>): void;
list(callback: BodyResponseCallback<Schema$ListScanRunsResponse>): void;
/**
* websecurityscanner.projects.scanConfigs.scanRuns.stop
* @desc Stops a ScanRun. The stopped ScanRun is returned.
* @alias websecurityscanner.projects.scanConfigs.scanRuns.stop
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The resource name of the ScanRun to be stopped. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
* @param {().StopScanRunRequest} params.resource Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
stop(params?: Params$Resource$Projects$Scanconfigs$Scanruns$Stop, options?: MethodOptions): GaxiosPromise<Schema$ScanRun>;
stop(params: Params$Resource$Projects$Scanconfigs$Scanruns$Stop, options: MethodOptions | BodyResponseCallback<Schema$ScanRun>, callback: BodyResponseCallback<Schema$ScanRun>): void;
stop(params: Params$Resource$Projects$Scanconfigs$Scanruns$Stop, callback: BodyResponseCallback<Schema$ScanRun>): void;
stop(callback: BodyResponseCallback<Schema$ScanRun>): void;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The resource name of the ScanRun to be returned. The name
* follows the format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
name?: string;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The maximum number of ScanRuns to return, can be limited by server. If
* not specified or not positive, the implementation will select a
* reasonable value.
*/
pageSize?: number;
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request. If
* unspecified, the first page of results is returned.
*/
pageToken?: string;
/**
* Required. The parent resource name, which should be a scan resource name
* in the format 'projects/{projectId}/scanConfigs/{scanConfigId}'.
*/
parent?: string;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$Stop extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The resource name of the ScanRun to be stopped. The name
* follows the format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
name?: string;
/**
* Request body metadata
*/
requestBody?: Schema$StopScanRunRequest;
}
class Resource$Projects$Scanconfigs$Scanruns$Crawledurls {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list
* @desc List CrawledUrls under a given ScanRun.
* @alias websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer=} params.pageSize The maximum number of CrawledUrls to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
* @param {string=} params.pageToken A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.
* @param {string} params.parent Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Projects$Scanconfigs$Scanruns$Crawledurls$List, options?: MethodOptions): GaxiosPromise<Schema$ListCrawledUrlsResponse>;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$Crawledurls$List, options: MethodOptions | BodyResponseCallback<Schema$ListCrawledUrlsResponse>, callback: BodyResponseCallback<Schema$ListCrawledUrlsResponse>): void;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$Crawledurls$List, callback: BodyResponseCallback<Schema$ListCrawledUrlsResponse>): void;
list(callback: BodyResponseCallback<Schema$ListCrawledUrlsResponse>): void;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$Crawledurls$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The maximum number of CrawledUrls to return, can be limited by server. If
* not specified or not positive, the implementation will select a
* reasonable value.
*/
pageSize?: number;
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request. If
* unspecified, the first page of results is returned.
*/
pageToken?: string;
/**
* Required. The parent resource name, which should be a scan run resource
* name in the format
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
parent?: string;
}
class Resource$Projects$Scanconfigs$Scanruns$Findings {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* websecurityscanner.projects.scanConfigs.scanRuns.findings.get
* @desc Gets a Finding.
* @alias websecurityscanner.projects.scanConfigs.scanRuns.findings.get
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.name Required. The resource name of the Finding to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
get(params?: Params$Resource$Projects$Scanconfigs$Scanruns$Findings$Get, options?: MethodOptions): GaxiosPromise<Schema$Finding>;
get(params: Params$Resource$Projects$Scanconfigs$Scanruns$Findings$Get, options: MethodOptions | BodyResponseCallback<Schema$Finding>, callback: BodyResponseCallback<Schema$Finding>): void;
get(params: Params$Resource$Projects$Scanconfigs$Scanruns$Findings$Get, callback: BodyResponseCallback<Schema$Finding>): void;
get(callback: BodyResponseCallback<Schema$Finding>): void;
/**
* websecurityscanner.projects.scanConfigs.scanRuns.findings.list
* @desc List Findings under a given ScanRun.
* @alias websecurityscanner.projects.scanConfigs.scanRuns.findings.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string=} params.filter The filter expression. The expression must be in the format: <field> <operator> <value>. Supported field: 'finding_type'. Supported operator: '='.
* @param {integer=} params.pageSize The maximum number of Findings to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
* @param {string=} params.pageToken A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.
* @param {string} params.parent Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Projects$Scanconfigs$Scanruns$Findings$List, options?: MethodOptions): GaxiosPromise<Schema$ListFindingsResponse>;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$Findings$List, options: MethodOptions | BodyResponseCallback<Schema$ListFindingsResponse>, callback: BodyResponseCallback<Schema$ListFindingsResponse>): void;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$Findings$List, callback: BodyResponseCallback<Schema$ListFindingsResponse>): void;
list(callback: BodyResponseCallback<Schema$ListFindingsResponse>): void;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$Findings$Get extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The resource name of the Finding to be returned. The name
* follows the format of
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.
*/
name?: string;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$Findings$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* The filter expression. The expression must be in the format: <field>
* <operator> <value>. Supported field: 'finding_type'. Supported operator:
* '='.
*/
filter?: string;
/**
* The maximum number of Findings to return, can be limited by server. If
* not specified or not positive, the implementation will select a
* reasonable value.
*/
pageSize?: number;
/**
* A token identifying a page of results to be returned. This should be a
* `next_page_token` value returned from a previous List request. If
* unspecified, the first page of results is returned.
*/
pageToken?: string;
/**
* Required. The parent resource name, which should be a scan run resource
* name in the format
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
parent?: string;
}
class Resource$Projects$Scanconfigs$Scanruns$Findingtypestats {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list
* @desc List all FindingTypeStats under a given ScanRun.
* @alias
* websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.parent Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
* @return {object} Request object
*/
list(params?: Params$Resource$Projects$Scanconfigs$Scanruns$Findingtypestats$List, options?: MethodOptions): GaxiosPromise<Schema$ListFindingTypeStatsResponse>;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$Findingtypestats$List, options: MethodOptions | BodyResponseCallback<Schema$ListFindingTypeStatsResponse>, callback: BodyResponseCallback<Schema$ListFindingTypeStatsResponse>): void;
list(params: Params$Resource$Projects$Scanconfigs$Scanruns$Findingtypestats$List, callback: BodyResponseCallback<Schema$ListFindingTypeStatsResponse>): void;
list(callback: BodyResponseCallback<Schema$ListFindingTypeStatsResponse>): void;
}
interface Params$Resource$Projects$Scanconfigs$Scanruns$Findingtypestats$List extends StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient;
/**
* Required. The parent resource name, which should be a scan run resource
* name in the format
* 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
*/
parent?: string;
}
}