blob: e98bb9c3c1e3504974f7040c24ca6581fea70feb [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="websecurityscanner_v1beta.html">Web Security Scanner API</a> . <a href="websecurityscanner_v1beta.projects.html">projects</a> . <a href="websecurityscanner_v1beta.projects.scanConfigs.html">scanConfigs</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="websecurityscanner_v1beta.projects.scanConfigs.scanRuns.html">scanRuns()</a></code>
79</p>
80<p class="firstline">Returns the scanRuns Resource.</p>
81
82<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084<p class="firstline">Creates a new ScanConfig.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes an existing ScanConfig and its child resources.</p>
88<p class="toc_element">
89 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
90<p class="firstline">Gets a ScanConfig.</p>
91<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070092 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093<p class="firstline">Lists ScanConfigs under a given project.</p>
94<p class="toc_element">
95 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
96<p class="firstline">Retrieves the next page of results.</p>
97<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070098 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099<p class="firstline">Updates a ScanConfig. This method support partial update of a ScanConfig.</p>
100<p class="toc_element">
101 <code><a href="#start">start(name, body=None, x__xgafv=None)</a></code></p>
102<p class="firstline">Start a ScanRun according to the given ScanConfig.</p>
103<h3>Method Details</h3>
104<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106 <pre>Creates a new ScanConfig.
107
108Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700109 parent: string, Required. The parent resource name where the scan is created, which should be a
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110project resource name in the format 'projects/{projectId}'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112 The object takes the form of:
113
114{ # A ScanConfig resource contains the configurations to launch a scan.
Dan O'Mearadd494642020-05-01 07:42:23 -0700115 "blacklistPatterns": [ # The blacklist URL patterns as described in
116 # https://cloud.google.com/security-scanner/docs/excluded-urls
117 "A String",
118 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20
120 # inclusively. If the field is unspecified or its value is set 0, server will
121 # default to 15. Other values outside of [5, 20] range will be rejected with
122 # INVALID_ARGUMENT error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 "displayName": "A String", # Required. The user provided display name of the ScanConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124 "name": "A String", # The resource name of the ScanConfig. The name follows the format of
125 # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
126 # generated by the system.
127 "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig.
128 "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is
129 # refreshed by the server after each run. If unspecified, it will default
130 # to current server time, which means the scan will be scheduled to start
131 # immediately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 "intervalDurationDays": 42, # Required. The duration of time between executions in days.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700133 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Cloud Security
135 # Command Center.
136 "targetPlatforms": [ # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
137 # used as a default.
138 "A String",
139 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700140 "riskLevel": "A String", # The risk level selected for the scan
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700141 "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the
142 # authentication configuration during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP).
144 "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service
145 # account is added in Identity-Aware-Proxy (IAP) access policies.
146 # service account is added in Identity-Aware-Proxy (IAP) access policies.
147 "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by
148 # Identity-Aware-Proxy(IAP).
149 },
150 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700152 "username": "A String", # Required. The user name of the Google account.
153 "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 # and not returned in any response nor included in audit logs.
155 },
156 "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 "username": "A String", # Required. The user name of the custom account.
158 "loginUrl": "A String", # Required. The login form URL of the website.
159 "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700160 # and not returned in any response nor included in audit logs.
161 },
162 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature.
164 # If enabled, the scanner will access applications from static IP addresses.
165 "managedScan": True or False, # Whether the scan config is managed by Cloud Web Security Scanner, output
166 # only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 "userAgent": "A String", # The user agent used during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700169 "A String",
170 ],
171 "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available.
172 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700173 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700174 { # Output only.
175 # Defines a warning trace message for ScanRun. Warning traces provide customers
176 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700178 },
179 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700181 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
182 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700183 "executionState": "A String", # The execution state of the ScanRun.
184 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 # the value represents the number of URLs tested up to now. The number of
186 # URLs tested is usually larger than the number URLS crawled because
187 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700188 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 # If the scan is in queue, the value is 0.
190 # If the scan is running, the value ranges from 0 to 100.
191 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700192 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700193 # scan's termination and more details, if such are available.
194 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700195 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700196 # common HTTP error code, if such is available. For example, if this code is
197 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700198 "code": "A String", # Indicates the error reason code.
199 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 # message encountered during scan configuration validation that is performed
201 # before each scan run.
202 # APIs when scan configuration validation fails. It is also reported as part of
203 # a ScanRunErrorTrace message if scan validation fails due to a scan
204 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 "code": "A String", # Indicates the reason code for a configuration failure.
206 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 # for example "scan_config.max_qps". This field is provided for
208 # troubleshooting purposes only and its actual value can change in the
209 # future.
210 },
211 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700212 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700213 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700214 "startTime": "A String", # The time at which the ScanRun started.
215 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
216 # is either finished or stopped by user.
217 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
218 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
219 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700220 },
221}
222
223 x__xgafv: string, V1 error format.
224 Allowed values
225 1 - v1 error format
226 2 - v2 error format
227
228Returns:
229 An object of the form:
230
231 { # A ScanConfig resource contains the configurations to launch a scan.
Dan O'Mearadd494642020-05-01 07:42:23 -0700232 "blacklistPatterns": [ # The blacklist URL patterns as described in
233 # https://cloud.google.com/security-scanner/docs/excluded-urls
234 "A String",
235 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20
237 # inclusively. If the field is unspecified or its value is set 0, server will
238 # default to 15. Other values outside of [5, 20] range will be rejected with
239 # INVALID_ARGUMENT error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700240 "displayName": "A String", # Required. The user provided display name of the ScanConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700241 "name": "A String", # The resource name of the ScanConfig. The name follows the format of
242 # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
243 # generated by the system.
244 "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig.
245 "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is
246 # refreshed by the server after each run. If unspecified, it will default
247 # to current server time, which means the scan will be scheduled to start
248 # immediately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 "intervalDurationDays": 42, # Required. The duration of time between executions in days.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700250 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700251 "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Cloud Security
252 # Command Center.
253 "targetPlatforms": [ # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
254 # used as a default.
255 "A String",
256 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700257 "riskLevel": "A String", # The risk level selected for the scan
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258 "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the
259 # authentication configuration during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700260 "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP).
261 "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service
262 # account is added in Identity-Aware-Proxy (IAP) access policies.
263 # service account is added in Identity-Aware-Proxy (IAP) access policies.
264 "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by
265 # Identity-Aware-Proxy(IAP).
266 },
267 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700269 "username": "A String", # Required. The user name of the Google account.
270 "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 # and not returned in any response nor included in audit logs.
272 },
273 "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700274 "username": "A String", # Required. The user name of the custom account.
275 "loginUrl": "A String", # Required. The login form URL of the website.
276 "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 # and not returned in any response nor included in audit logs.
278 },
279 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700280 "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature.
281 # If enabled, the scanner will access applications from static IP addresses.
282 "managedScan": True or False, # Whether the scan config is managed by Cloud Web Security Scanner, output
283 # only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 "userAgent": "A String", # The user agent used during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700285 "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700286 "A String",
287 ],
288 "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available.
289 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700291 { # Output only.
292 # Defines a warning trace message for ScanRun. Warning traces provide customers
293 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700295 },
296 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700298 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
299 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 "executionState": "A String", # The execution state of the ScanRun.
301 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700302 # the value represents the number of URLs tested up to now. The number of
303 # URLs tested is usually larger than the number URLS crawled because
304 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700306 # If the scan is in queue, the value is 0.
307 # If the scan is running, the value ranges from 0 to 100.
308 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700309 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 # scan's termination and more details, if such are available.
311 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 # common HTTP error code, if such is available. For example, if this code is
314 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700315 "code": "A String", # Indicates the error reason code.
316 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700317 # message encountered during scan configuration validation that is performed
318 # before each scan run.
319 # APIs when scan configuration validation fails. It is also reported as part of
320 # a ScanRunErrorTrace message if scan validation fails due to a scan
321 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700322 "code": "A String", # Indicates the reason code for a configuration failure.
323 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700324 # for example "scan_config.max_qps". This field is provided for
325 # troubleshooting purposes only and its actual value can change in the
326 # future.
327 },
328 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700331 "startTime": "A String", # The time at which the ScanRun started.
332 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
333 # is either finished or stopped by user.
334 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
335 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
336 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700337 },
338 }</pre>
339</div>
340
341<div class="method">
342 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
343 <pre>Deletes an existing ScanConfig and its child resources.
344
345Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700346 name: string, Required. The resource name of the ScanConfig to be deleted. The name follows the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700347format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. (required)
348 x__xgafv: string, V1 error format.
349 Allowed values
350 1 - v1 error format
351 2 - v2 error format
352
353Returns:
354 An object of the form:
355
356 { # A generic empty message that you can re-use to avoid defining duplicated
357 # empty messages in your APIs. A typical example is to use it as the request
358 # or the response type of an API method. For instance:
359 #
360 # service Foo {
361 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
362 # }
363 #
364 # The JSON representation for `Empty` is empty JSON object `{}`.
365 }</pre>
366</div>
367
368<div class="method">
369 <code class="details" id="get">get(name, x__xgafv=None)</code>
370 <pre>Gets a ScanConfig.
371
372Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700373 name: string, Required. The resource name of the ScanConfig to be returned. The name follows the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. (required)
375 x__xgafv: string, V1 error format.
376 Allowed values
377 1 - v1 error format
378 2 - v2 error format
379
380Returns:
381 An object of the form:
382
383 { # A ScanConfig resource contains the configurations to launch a scan.
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 "blacklistPatterns": [ # The blacklist URL patterns as described in
385 # https://cloud.google.com/security-scanner/docs/excluded-urls
386 "A String",
387 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388 "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20
389 # inclusively. If the field is unspecified or its value is set 0, server will
390 # default to 15. Other values outside of [5, 20] range will be rejected with
391 # INVALID_ARGUMENT error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 "displayName": "A String", # Required. The user provided display name of the ScanConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393 "name": "A String", # The resource name of the ScanConfig. The name follows the format of
394 # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
395 # generated by the system.
396 "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig.
397 "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is
398 # refreshed by the server after each run. If unspecified, it will default
399 # to current server time, which means the scan will be scheduled to start
400 # immediately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700401 "intervalDurationDays": 42, # Required. The duration of time between executions in days.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700402 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700403 "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Cloud Security
404 # Command Center.
405 "targetPlatforms": [ # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
406 # used as a default.
407 "A String",
408 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700409 "riskLevel": "A String", # The risk level selected for the scan
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the
411 # authentication configuration during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700412 "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP).
413 "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service
414 # account is added in Identity-Aware-Proxy (IAP) access policies.
415 # service account is added in Identity-Aware-Proxy (IAP) access policies.
416 "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by
417 # Identity-Aware-Proxy(IAP).
418 },
419 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700420 "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700421 "username": "A String", # Required. The user name of the Google account.
422 "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700423 # and not returned in any response nor included in audit logs.
424 },
425 "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700426 "username": "A String", # Required. The user name of the custom account.
427 "loginUrl": "A String", # Required. The login form URL of the website.
428 "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700429 # and not returned in any response nor included in audit logs.
430 },
431 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature.
433 # If enabled, the scanner will access applications from static IP addresses.
434 "managedScan": True or False, # Whether the scan config is managed by Cloud Web Security Scanner, output
435 # only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700436 "userAgent": "A String", # The user agent used during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700437 "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700438 "A String",
439 ],
440 "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available.
441 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700442 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700443 { # Output only.
444 # Defines a warning trace message for ScanRun. Warning traces provide customers
445 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700446 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447 },
448 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700449 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700450 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
451 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700452 "executionState": "A String", # The execution state of the ScanRun.
453 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 # the value represents the number of URLs tested up to now. The number of
455 # URLs tested is usually larger than the number URLS crawled because
456 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700457 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700458 # If the scan is in queue, the value is 0.
459 # If the scan is running, the value ranges from 0 to 100.
460 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700461 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 # scan's termination and more details, if such are available.
463 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700464 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 # common HTTP error code, if such is available. For example, if this code is
466 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 "code": "A String", # Indicates the error reason code.
468 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700469 # message encountered during scan configuration validation that is performed
470 # before each scan run.
471 # APIs when scan configuration validation fails. It is also reported as part of
472 # a ScanRunErrorTrace message if scan validation fails due to a scan
473 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700474 "code": "A String", # Indicates the reason code for a configuration failure.
475 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700476 # for example "scan_config.max_qps". This field is provided for
477 # troubleshooting purposes only and its actual value can change in the
478 # future.
479 },
480 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700481 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700482 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700483 "startTime": "A String", # The time at which the ScanRun started.
484 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
485 # is either finished or stopped by user.
486 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
487 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
488 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 },
490 }</pre>
491</div>
492
493<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700494 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 <pre>Lists ScanConfigs under a given project.
496
497Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700498 parent: string, Required. The parent resource name, which should be a project resource name in the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499format 'projects/{projectId}'. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700500 pageSize: integer, The maximum number of ScanConfigs to return, can be limited by server.
501If not specified or not positive, the implementation will select a
502reasonable value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700503 pageToken: string, A token identifying a page of results to be returned. This should be a
504`next_page_token` value returned from a previous List request.
505If unspecified, the first page of results is returned.
506 x__xgafv: string, V1 error format.
507 Allowed values
508 1 - v1 error format
509 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700510
511Returns:
512 An object of the form:
513
514 { # Response for the `ListScanConfigs` method.
515 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no
516 # more results in the list.
517 "scanConfigs": [ # The list of ScanConfigs returned.
518 { # A ScanConfig resource contains the configurations to launch a scan.
Dan O'Mearadd494642020-05-01 07:42:23 -0700519 "blacklistPatterns": [ # The blacklist URL patterns as described in
520 # https://cloud.google.com/security-scanner/docs/excluded-urls
521 "A String",
522 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700523 "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20
524 # inclusively. If the field is unspecified or its value is set 0, server will
525 # default to 15. Other values outside of [5, 20] range will be rejected with
526 # INVALID_ARGUMENT error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700527 "displayName": "A String", # Required. The user provided display name of the ScanConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 "name": "A String", # The resource name of the ScanConfig. The name follows the format of
529 # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
530 # generated by the system.
531 "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig.
532 "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is
533 # refreshed by the server after each run. If unspecified, it will default
534 # to current server time, which means the scan will be scheduled to start
535 # immediately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 "intervalDurationDays": 42, # Required. The duration of time between executions in days.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700538 "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Cloud Security
539 # Command Center.
540 "targetPlatforms": [ # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
541 # used as a default.
542 "A String",
543 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700544 "riskLevel": "A String", # The risk level selected for the scan
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700545 "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the
546 # authentication configuration during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700547 "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP).
548 "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service
549 # account is added in Identity-Aware-Proxy (IAP) access policies.
550 # service account is added in Identity-Aware-Proxy (IAP) access policies.
551 "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by
552 # Identity-Aware-Proxy(IAP).
553 },
554 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700555 "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700556 "username": "A String", # Required. The user name of the Google account.
557 "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700558 # and not returned in any response nor included in audit logs.
559 },
560 "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700561 "username": "A String", # Required. The user name of the custom account.
562 "loginUrl": "A String", # Required. The login form URL of the website.
563 "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700564 # and not returned in any response nor included in audit logs.
565 },
566 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700567 "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature.
568 # If enabled, the scanner will access applications from static IP addresses.
569 "managedScan": True or False, # Whether the scan config is managed by Cloud Web Security Scanner, output
570 # only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700571 "userAgent": "A String", # The user agent used during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700572 "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 "A String",
574 ],
575 "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available.
576 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700577 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 { # Output only.
579 # Defines a warning trace message for ScanRun. Warning traces provide customers
580 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700581 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700582 },
583 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700585 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
586 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 "executionState": "A String", # The execution state of the ScanRun.
588 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700589 # the value represents the number of URLs tested up to now. The number of
590 # URLs tested is usually larger than the number URLS crawled because
591 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 # If the scan is in queue, the value is 0.
594 # If the scan is running, the value ranges from 0 to 100.
595 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700596 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 # scan's termination and more details, if such are available.
598 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700599 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700600 # common HTTP error code, if such is available. For example, if this code is
601 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700602 "code": "A String", # Indicates the error reason code.
603 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700604 # message encountered during scan configuration validation that is performed
605 # before each scan run.
606 # APIs when scan configuration validation fails. It is also reported as part of
607 # a ScanRunErrorTrace message if scan validation fails due to a scan
608 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700609 "code": "A String", # Indicates the reason code for a configuration failure.
610 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 # for example "scan_config.max_qps". This field is provided for
612 # troubleshooting purposes only and its actual value can change in the
613 # future.
614 },
615 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700616 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700617 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700618 "startTime": "A String", # The time at which the ScanRun started.
619 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
620 # is either finished or stopped by user.
621 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
622 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
623 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700624 },
625 },
626 ],
627 }</pre>
628</div>
629
630<div class="method">
631 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
632 <pre>Retrieves the next page of results.
633
634Args:
635 previous_request: The request for the previous page. (required)
636 previous_response: The response from the request for the previous page. (required)
637
638Returns:
639 A request object that you can call 'execute()' on to request the next
640 page. Returns None if there are no more items in the collection.
641 </pre>
642</div>
643
644<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700645 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700646 <pre>Updates a ScanConfig. This method support partial update of a ScanConfig.
647
648Args:
649 name: string, The resource name of the ScanConfig. The name follows the format of
650'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
651generated by the system. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700652 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700653 The object takes the form of:
654
655{ # A ScanConfig resource contains the configurations to launch a scan.
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 "blacklistPatterns": [ # The blacklist URL patterns as described in
657 # https://cloud.google.com/security-scanner/docs/excluded-urls
658 "A String",
659 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700660 "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20
661 # inclusively. If the field is unspecified or its value is set 0, server will
662 # default to 15. Other values outside of [5, 20] range will be rejected with
663 # INVALID_ARGUMENT error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 "displayName": "A String", # Required. The user provided display name of the ScanConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 "name": "A String", # The resource name of the ScanConfig. The name follows the format of
666 # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
667 # generated by the system.
668 "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig.
669 "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is
670 # refreshed by the server after each run. If unspecified, it will default
671 # to current server time, which means the scan will be scheduled to start
672 # immediately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700673 "intervalDurationDays": 42, # Required. The duration of time between executions in days.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700675 "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Cloud Security
676 # Command Center.
677 "targetPlatforms": [ # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
678 # used as a default.
679 "A String",
680 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700681 "riskLevel": "A String", # The risk level selected for the scan
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700682 "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the
683 # authentication configuration during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700684 "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP).
685 "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service
686 # account is added in Identity-Aware-Proxy (IAP) access policies.
687 # service account is added in Identity-Aware-Proxy (IAP) access policies.
688 "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by
689 # Identity-Aware-Proxy(IAP).
690 },
691 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700693 "username": "A String", # Required. The user name of the Google account.
694 "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 # and not returned in any response nor included in audit logs.
696 },
697 "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700698 "username": "A String", # Required. The user name of the custom account.
699 "loginUrl": "A String", # Required. The login form URL of the website.
700 "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700701 # and not returned in any response nor included in audit logs.
702 },
703 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700704 "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature.
705 # If enabled, the scanner will access applications from static IP addresses.
706 "managedScan": True or False, # Whether the scan config is managed by Cloud Web Security Scanner, output
707 # only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700708 "userAgent": "A String", # The user agent used during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 "A String",
711 ],
712 "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available.
713 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700714 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700715 { # Output only.
716 # Defines a warning trace message for ScanRun. Warning traces provide customers
717 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700718 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700719 },
720 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700721 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
723 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700724 "executionState": "A String", # The execution state of the ScanRun.
725 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700726 # the value represents the number of URLs tested up to now. The number of
727 # URLs tested is usually larger than the number URLS crawled because
728 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700729 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700730 # If the scan is in queue, the value is 0.
731 # If the scan is running, the value ranges from 0 to 100.
732 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700733 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700734 # scan's termination and more details, if such are available.
735 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700737 # common HTTP error code, if such is available. For example, if this code is
738 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700739 "code": "A String", # Indicates the error reason code.
740 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741 # message encountered during scan configuration validation that is performed
742 # before each scan run.
743 # APIs when scan configuration validation fails. It is also reported as part of
744 # a ScanRunErrorTrace message if scan validation fails due to a scan
745 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 "code": "A String", # Indicates the reason code for a configuration failure.
747 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700748 # for example "scan_config.max_qps". This field is provided for
749 # troubleshooting purposes only and its actual value can change in the
750 # future.
751 },
752 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700753 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700754 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700755 "startTime": "A String", # The time at which the ScanRun started.
756 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
757 # is either finished or stopped by user.
758 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
759 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
760 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700761 },
762}
763
Dan O'Mearadd494642020-05-01 07:42:23 -0700764 updateMask: string, Required. The update mask applies to the resource. For the `FieldMask` definition,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700765see
766https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
767 x__xgafv: string, V1 error format.
768 Allowed values
769 1 - v1 error format
770 2 - v2 error format
771
772Returns:
773 An object of the form:
774
775 { # A ScanConfig resource contains the configurations to launch a scan.
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 "blacklistPatterns": [ # The blacklist URL patterns as described in
777 # https://cloud.google.com/security-scanner/docs/excluded-urls
778 "A String",
779 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20
781 # inclusively. If the field is unspecified or its value is set 0, server will
782 # default to 15. Other values outside of [5, 20] range will be rejected with
783 # INVALID_ARGUMENT error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700784 "displayName": "A String", # Required. The user provided display name of the ScanConfig.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 "name": "A String", # The resource name of the ScanConfig. The name follows the format of
786 # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are
787 # generated by the system.
788 "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig.
789 "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is
790 # refreshed by the server after each run. If unspecified, it will default
791 # to current server time, which means the scan will be scheduled to start
792 # immediately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700793 "intervalDurationDays": 42, # Required. The duration of time between executions in days.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700795 "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Cloud Security
796 # Command Center.
797 "targetPlatforms": [ # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be
798 # used as a default.
799 "A String",
800 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700801 "riskLevel": "A String", # The risk level selected for the scan
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700802 "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the
803 # authentication configuration during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700804 "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP).
805 "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service
806 # account is added in Identity-Aware-Proxy (IAP) access policies.
807 # service account is added in Identity-Aware-Proxy (IAP) access policies.
808 "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by
809 # Identity-Aware-Proxy(IAP).
810 },
811 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700812 "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 "username": "A String", # Required. The user name of the Google account.
814 "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700815 # and not returned in any response nor included in audit logs.
816 },
817 "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700818 "username": "A String", # Required. The user name of the custom account.
819 "loginUrl": "A String", # Required. The login form URL of the website.
820 "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 # and not returned in any response nor included in audit logs.
822 },
823 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700824 "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature.
825 # If enabled, the scanner will access applications from static IP addresses.
826 "managedScan": True or False, # Whether the scan config is managed by Cloud Web Security Scanner, output
827 # only.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700828 "userAgent": "A String", # The user agent used during scanning.
Dan O'Mearadd494642020-05-01 07:42:23 -0700829 "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700830 "A String",
831 ],
832 "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available.
833 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700834 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 { # Output only.
836 # Defines a warning trace message for ScanRun. Warning traces provide customers
837 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700838 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 },
840 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700842 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
843 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700844 "executionState": "A String", # The execution state of the ScanRun.
845 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700846 # the value represents the number of URLs tested up to now. The number of
847 # URLs tested is usually larger than the number URLS crawled because
848 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700849 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 # If the scan is in queue, the value is 0.
851 # If the scan is running, the value ranges from 0 to 100.
852 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700854 # scan's termination and more details, if such are available.
855 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700856 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700857 # common HTTP error code, if such is available. For example, if this code is
858 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700859 "code": "A String", # Indicates the error reason code.
860 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 # message encountered during scan configuration validation that is performed
862 # before each scan run.
863 # APIs when scan configuration validation fails. It is also reported as part of
864 # a ScanRunErrorTrace message if scan validation fails due to a scan
865 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700866 "code": "A String", # Indicates the reason code for a configuration failure.
867 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700868 # for example "scan_config.max_qps". This field is provided for
869 # troubleshooting purposes only and its actual value can change in the
870 # future.
871 },
872 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700873 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700874 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 "startTime": "A String", # The time at which the ScanRun started.
876 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
877 # is either finished or stopped by user.
878 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
879 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
880 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881 },
882 }</pre>
883</div>
884
885<div class="method">
886 <code class="details" id="start">start(name, body=None, x__xgafv=None)</code>
887 <pre>Start a ScanRun according to the given ScanConfig.
888
889Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700890 name: string, Required. The resource name of the ScanConfig to be used. The name follows the
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700891format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. (required)
892 body: object, The request body.
893 The object takes the form of:
894
895{ # Request for the `StartScanRun` method.
896 }
897
898 x__xgafv: string, V1 error format.
899 Allowed values
900 1 - v1 error format
901 2 - v2 error format
902
903Returns:
904 An object of the form:
905
906 { # A ScanRun is a output-only resource representing an actual run of the scan.
907 # Next id: 12
Dan O'Mearadd494642020-05-01 07:42:23 -0700908 "warningTraces": [ # A list of warnings, if such are encountered during this scan run.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700909 { # Output only.
910 # Defines a warning trace message for ScanRun. Warning traces provide customers
911 # with useful information that helps make the scanning process more effective.
Dan O'Mearadd494642020-05-01 07:42:23 -0700912 "code": "A String", # Indicates the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 },
914 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 "name": "A String", # The resource name of the ScanRun. The name follows the format of
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700916 # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
917 # The ScanRun IDs are generated by the system.
Dan O'Mearadd494642020-05-01 07:42:23 -0700918 "executionState": "A String", # The execution state of the ScanRun.
919 "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700920 # the value represents the number of URLs tested up to now. The number of
921 # URLs tested is usually larger than the number URLS crawled because
922 # typically a crawled URL is tested with multiple test payloads.
Dan O'Mearadd494642020-05-01 07:42:23 -0700923 "progressPercent": 42, # The percentage of total completion ranging from 0 to 100.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700924 # If the scan is in queue, the value is 0.
925 # If the scan is running, the value ranges from 0 to 100.
926 # If the scan is finished, the value is 100.
Dan O'Mearadd494642020-05-01 07:42:23 -0700927 "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700928 # scan's termination and more details, if such are available.
929 # Defines an error trace message for a ScanRun.
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700931 # common HTTP error code, if such is available. For example, if this code is
932 # 404, the scan has encountered too many NOT_FOUND responses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700933 "code": "A String", # Indicates the error reason code.
934 "scanConfigError": { # Defines a custom error message used by CreateScanConfig and UpdateScanConfig # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 # message encountered during scan configuration validation that is performed
936 # before each scan run.
937 # APIs when scan configuration validation fails. It is also reported as part of
938 # a ScanRunErrorTrace message if scan validation fails due to a scan
939 # configuration error.
Dan O'Mearadd494642020-05-01 07:42:23 -0700940 "code": "A String", # Indicates the reason code for a configuration failure.
941 "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700942 # for example "scan_config.max_qps". This field is provided for
943 # troubleshooting purposes only and its actual value can change in the
944 # future.
945 },
946 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700948 # the value represents the number of URLs crawled up to now.
Dan O'Mearadd494642020-05-01 07:42:23 -0700949 "startTime": "A String", # The time at which the ScanRun started.
950 "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun
951 # is either finished or stopped by user.
952 "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities.
953 "resultState": "A String", # The result state of the ScanRun. This field is only available after the
954 # execution state reaches "FINISHED".
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700955 }</pre>
956</div>
957
958</body></html>