Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 83 | <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 84 | <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"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 92 | <code><a href="#list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 93 | <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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 98 | <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 99 | <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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 105 | <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 106 | <pre>Creates a new ScanConfig. |
| 107 | |
| 108 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 109 | parent: string, Required. The parent resource name where the scan is created, which should be a |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 110 | project resource name in the format 'projects/{projectId}'. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 111 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 112 | The object takes the form of: |
| 113 | |
| 114 | { # A ScanConfig resource contains the configurations to launch a scan. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 115 | "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Security |
| 116 | # Command Center. |
| 117 | "managedScan": True or False, # Whether the scan config is managed by Web Security Scanner, output |
| 118 | # only. |
| 119 | "userAgent": "A String", # The user agent used during scanning. |
| 120 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
| 121 | "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig. |
| 122 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
| 123 | "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is |
| 124 | # refreshed by the server after each run. If unspecified, it will default |
| 125 | # to current server time, which means the scan will be scheduled to start |
| 126 | # immediately. |
| 127 | }, |
| 128 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 129 | # authentication configuration during scanning. |
| 130 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
| 131 | "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted |
| 132 | # and not returned in any response nor included in audit logs. |
| 133 | "username": "A String", # Required. The user name of the Google account. |
| 134 | }, |
| 135 | "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP). |
| 136 | "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service |
| 137 | # account is added in Identity-Aware-Proxy (IAP) access policies. |
| 138 | # service account is added in Identity-Aware-Proxy (IAP) access policies. |
| 139 | "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by |
| 140 | # Identity-Aware-Proxy(IAP). |
| 141 | }, |
| 142 | }, |
| 143 | "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account. |
| 144 | "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted |
| 145 | # and not returned in any response nor included in audit logs. |
| 146 | "loginUrl": "A String", # Required. The login form URL of the website. |
| 147 | "username": "A String", # Required. The user name of the custom account. |
| 148 | }, |
| 149 | }, |
| 150 | "riskLevel": "A String", # The risk level selected for the scan |
| 151 | "blacklistPatterns": [ # The excluded URL patterns as described in |
| 152 | # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 153 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 154 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 155 | "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 156 | # Next id: 12 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 157 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 158 | # If the scan is in queue, the value is 0. |
| 159 | # If the scan is running, the value ranges from 0 to 100. |
| 160 | # If the scan is finished, the value is 100. |
| 161 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 162 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 163 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 164 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 165 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 166 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 167 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 168 | # the value represents the number of URLs tested up to now. The number of |
| 169 | # URLs tested is usually larger than the number URLS crawled because |
| 170 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 171 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 172 | # execution state reaches "FINISHED". |
| 173 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 174 | # the value represents the number of URLs crawled up to now. |
| 175 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 176 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 177 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 178 | { # Output only. |
| 179 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 180 | # with useful information that helps make the scanning process more effective. |
| 181 | "code": "A String", # Indicates the warning code. |
| 182 | }, |
| 183 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 184 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 185 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 186 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 187 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 188 | # message encountered during scan configuration validation that is performed |
| 189 | # before each scan run. |
| 190 | # APIs when scan configuration validation fails. It is also reported as part of |
| 191 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 192 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 193 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 194 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 195 | # troubleshooting purposes only and its actual value can change in the |
| 196 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 197 | "code": "A String", # Indicates the reason code for a configuration failure. |
| 198 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 199 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 200 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 201 | # common HTTP error code, if such is available. For example, if this code is |
| 202 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 203 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 204 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 205 | "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20 |
| 206 | # inclusively. If the field is unspecified or its value is set 0, server will |
| 207 | # default to 15. Other values outside of [5, 20] range will be rejected with |
| 208 | # INVALID_ARGUMENT error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 209 | "name": "A String", # The resource name of the ScanConfig. The name follows the format of |
| 210 | # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 211 | # generated by the system. |
| 212 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 213 | "A String", |
| 214 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 215 | "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature. |
| 216 | # If enabled, the scanner will access applications from static IP addresses. |
| 217 | "targetPlatforms": [ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE |
| 218 | # will be used as a default. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 219 | "A String", |
| 220 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | x__xgafv: string, V1 error format. |
| 224 | Allowed values |
| 225 | 1 - v1 error format |
| 226 | 2 - v2 error format |
| 227 | |
| 228 | Returns: |
| 229 | An object of the form: |
| 230 | |
| 231 | { # A ScanConfig resource contains the configurations to launch a scan. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 232 | "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Security |
| 233 | # Command Center. |
| 234 | "managedScan": True or False, # Whether the scan config is managed by Web Security Scanner, output |
| 235 | # only. |
| 236 | "userAgent": "A String", # The user agent used during scanning. |
| 237 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
| 238 | "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig. |
| 239 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
| 240 | "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is |
| 241 | # refreshed by the server after each run. If unspecified, it will default |
| 242 | # to current server time, which means the scan will be scheduled to start |
| 243 | # immediately. |
| 244 | }, |
| 245 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 246 | # authentication configuration during scanning. |
| 247 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
| 248 | "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted |
| 249 | # and not returned in any response nor included in audit logs. |
| 250 | "username": "A String", # Required. The user name of the Google account. |
| 251 | }, |
| 252 | "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP). |
| 253 | "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service |
| 254 | # account is added in Identity-Aware-Proxy (IAP) access policies. |
| 255 | # service account is added in Identity-Aware-Proxy (IAP) access policies. |
| 256 | "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by |
| 257 | # Identity-Aware-Proxy(IAP). |
| 258 | }, |
| 259 | }, |
| 260 | "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account. |
| 261 | "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted |
| 262 | # and not returned in any response nor included in audit logs. |
| 263 | "loginUrl": "A String", # Required. The login form URL of the website. |
| 264 | "username": "A String", # Required. The user name of the custom account. |
| 265 | }, |
| 266 | }, |
| 267 | "riskLevel": "A String", # The risk level selected for the scan |
| 268 | "blacklistPatterns": [ # The excluded URL patterns as described in |
| 269 | # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 270 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 271 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 272 | "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 273 | # Next id: 12 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 274 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 275 | # If the scan is in queue, the value is 0. |
| 276 | # If the scan is running, the value ranges from 0 to 100. |
| 277 | # If the scan is finished, the value is 100. |
| 278 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 279 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 280 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 281 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 282 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 283 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 284 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 285 | # the value represents the number of URLs tested up to now. The number of |
| 286 | # URLs tested is usually larger than the number URLS crawled because |
| 287 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 288 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 289 | # execution state reaches "FINISHED". |
| 290 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 291 | # the value represents the number of URLs crawled up to now. |
| 292 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 293 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 294 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 295 | { # Output only. |
| 296 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 297 | # with useful information that helps make the scanning process more effective. |
| 298 | "code": "A String", # Indicates the warning code. |
| 299 | }, |
| 300 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 301 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 302 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 303 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 304 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 305 | # message encountered during scan configuration validation that is performed |
| 306 | # before each scan run. |
| 307 | # APIs when scan configuration validation fails. It is also reported as part of |
| 308 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 309 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 310 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 311 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 312 | # troubleshooting purposes only and its actual value can change in the |
| 313 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 314 | "code": "A String", # Indicates the reason code for a configuration failure. |
| 315 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 316 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 317 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 318 | # common HTTP error code, if such is available. For example, if this code is |
| 319 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 320 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 321 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 322 | "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20 |
| 323 | # inclusively. If the field is unspecified or its value is set 0, server will |
| 324 | # default to 15. Other values outside of [5, 20] range will be rejected with |
| 325 | # INVALID_ARGUMENT error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 326 | "name": "A String", # The resource name of the ScanConfig. The name follows the format of |
| 327 | # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 328 | # generated by the system. |
| 329 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 330 | "A String", |
| 331 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 332 | "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature. |
| 333 | # If enabled, the scanner will access applications from static IP addresses. |
| 334 | "targetPlatforms": [ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE |
| 335 | # will be used as a default. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 336 | "A String", |
| 337 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 | |
| 345 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 346 | name: string, Required. The resource name of the ScanConfig to be deleted. The name follows the |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 347 | format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 348 | x__xgafv: string, V1 error format. |
| 349 | Allowed values |
| 350 | 1 - v1 error format |
| 351 | 2 - v2 error format |
| 352 | |
| 353 | Returns: |
| 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 | |
| 372 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 373 | name: string, Required. The resource name of the ScanConfig to be returned. The name follows the |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 374 | format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 375 | x__xgafv: string, V1 error format. |
| 376 | Allowed values |
| 377 | 1 - v1 error format |
| 378 | 2 - v2 error format |
| 379 | |
| 380 | Returns: |
| 381 | An object of the form: |
| 382 | |
| 383 | { # A ScanConfig resource contains the configurations to launch a scan. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 384 | "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Security |
| 385 | # Command Center. |
| 386 | "managedScan": True or False, # Whether the scan config is managed by Web Security Scanner, output |
| 387 | # only. |
| 388 | "userAgent": "A String", # The user agent used during scanning. |
| 389 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
| 390 | "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig. |
| 391 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
| 392 | "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is |
| 393 | # refreshed by the server after each run. If unspecified, it will default |
| 394 | # to current server time, which means the scan will be scheduled to start |
| 395 | # immediately. |
| 396 | }, |
| 397 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 398 | # authentication configuration during scanning. |
| 399 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
| 400 | "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted |
| 401 | # and not returned in any response nor included in audit logs. |
| 402 | "username": "A String", # Required. The user name of the Google account. |
| 403 | }, |
| 404 | "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP). |
| 405 | "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service |
| 406 | # account is added in Identity-Aware-Proxy (IAP) access policies. |
| 407 | # service account is added in Identity-Aware-Proxy (IAP) access policies. |
| 408 | "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by |
| 409 | # Identity-Aware-Proxy(IAP). |
| 410 | }, |
| 411 | }, |
| 412 | "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account. |
| 413 | "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted |
| 414 | # and not returned in any response nor included in audit logs. |
| 415 | "loginUrl": "A String", # Required. The login form URL of the website. |
| 416 | "username": "A String", # Required. The user name of the custom account. |
| 417 | }, |
| 418 | }, |
| 419 | "riskLevel": "A String", # The risk level selected for the scan |
| 420 | "blacklistPatterns": [ # The excluded URL patterns as described in |
| 421 | # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 422 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 424 | "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 425 | # Next id: 12 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 426 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 427 | # If the scan is in queue, the value is 0. |
| 428 | # If the scan is running, the value ranges from 0 to 100. |
| 429 | # If the scan is finished, the value is 100. |
| 430 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 431 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 432 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 433 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 434 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 435 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 436 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 437 | # the value represents the number of URLs tested up to now. The number of |
| 438 | # URLs tested is usually larger than the number URLS crawled because |
| 439 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 440 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 441 | # execution state reaches "FINISHED". |
| 442 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 443 | # the value represents the number of URLs crawled up to now. |
| 444 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 445 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 446 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 447 | { # Output only. |
| 448 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 449 | # with useful information that helps make the scanning process more effective. |
| 450 | "code": "A String", # Indicates the warning code. |
| 451 | }, |
| 452 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 453 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 454 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 455 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 456 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 457 | # message encountered during scan configuration validation that is performed |
| 458 | # before each scan run. |
| 459 | # APIs when scan configuration validation fails. It is also reported as part of |
| 460 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 461 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 462 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 463 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 464 | # troubleshooting purposes only and its actual value can change in the |
| 465 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 466 | "code": "A String", # Indicates the reason code for a configuration failure. |
| 467 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 468 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 469 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 470 | # common HTTP error code, if such is available. For example, if this code is |
| 471 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 472 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 473 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 474 | "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20 |
| 475 | # inclusively. If the field is unspecified or its value is set 0, server will |
| 476 | # default to 15. Other values outside of [5, 20] range will be rejected with |
| 477 | # INVALID_ARGUMENT error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 478 | "name": "A String", # The resource name of the ScanConfig. The name follows the format of |
| 479 | # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 480 | # generated by the system. |
| 481 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 482 | "A String", |
| 483 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 484 | "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature. |
| 485 | # If enabled, the scanner will access applications from static IP addresses. |
| 486 | "targetPlatforms": [ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE |
| 487 | # will be used as a default. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 488 | "A String", |
| 489 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 490 | }</pre> |
| 491 | </div> |
| 492 | |
| 493 | <div class="method"> |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 494 | <code class="details" id="list">list(parent, pageToken=None, pageSize=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 495 | <pre>Lists ScanConfigs under a given project. |
| 496 | |
| 497 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 498 | parent: string, Required. The parent resource name, which should be a project resource name in the |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 499 | format 'projects/{projectId}'. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 500 | pageToken: string, A token identifying a page of results to be returned. This should be a |
| 501 | `next_page_token` value returned from a previous List request. |
| 502 | If unspecified, the first page of results is returned. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 503 | pageSize: integer, The maximum number of ScanConfigs to return, can be limited by server. |
| 504 | If not specified or not positive, the implementation will select a |
| 505 | reasonable value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 506 | x__xgafv: string, V1 error format. |
| 507 | Allowed values |
| 508 | 1 - v1 error format |
| 509 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 510 | |
| 511 | Returns: |
| 512 | An object of the form: |
| 513 | |
| 514 | { # Response for the `ListScanConfigs` method. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 515 | "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no |
| 516 | # more results in the list. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 517 | "scanConfigs": [ # The list of ScanConfigs returned. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 518 | { # A ScanConfig resource contains the configurations to launch a scan. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 519 | "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Security |
| 520 | # Command Center. |
| 521 | "managedScan": True or False, # Whether the scan config is managed by Web Security Scanner, output |
| 522 | # only. |
| 523 | "userAgent": "A String", # The user agent used during scanning. |
| 524 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
| 525 | "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig. |
| 526 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
| 527 | "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is |
| 528 | # refreshed by the server after each run. If unspecified, it will default |
| 529 | # to current server time, which means the scan will be scheduled to start |
| 530 | # immediately. |
| 531 | }, |
| 532 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 533 | # authentication configuration during scanning. |
| 534 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
| 535 | "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted |
| 536 | # and not returned in any response nor included in audit logs. |
| 537 | "username": "A String", # Required. The user name of the Google account. |
| 538 | }, |
| 539 | "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP). |
| 540 | "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service |
| 541 | # account is added in Identity-Aware-Proxy (IAP) access policies. |
| 542 | # service account is added in Identity-Aware-Proxy (IAP) access policies. |
| 543 | "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by |
| 544 | # Identity-Aware-Proxy(IAP). |
| 545 | }, |
| 546 | }, |
| 547 | "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account. |
| 548 | "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted |
| 549 | # and not returned in any response nor included in audit logs. |
| 550 | "loginUrl": "A String", # Required. The login form URL of the website. |
| 551 | "username": "A String", # Required. The user name of the custom account. |
| 552 | }, |
| 553 | }, |
| 554 | "riskLevel": "A String", # The risk level selected for the scan |
| 555 | "blacklistPatterns": [ # The excluded URL patterns as described in |
| 556 | # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 557 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 558 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 559 | "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 560 | # Next id: 12 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 561 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 562 | # If the scan is in queue, the value is 0. |
| 563 | # If the scan is running, the value ranges from 0 to 100. |
| 564 | # If the scan is finished, the value is 100. |
| 565 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 566 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 567 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 568 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 569 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 570 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 571 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 572 | # the value represents the number of URLs tested up to now. The number of |
| 573 | # URLs tested is usually larger than the number URLS crawled because |
| 574 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 575 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 576 | # execution state reaches "FINISHED". |
| 577 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 578 | # the value represents the number of URLs crawled up to now. |
| 579 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 580 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 581 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 582 | { # Output only. |
| 583 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 584 | # with useful information that helps make the scanning process more effective. |
| 585 | "code": "A String", # Indicates the warning code. |
| 586 | }, |
| 587 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 588 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 589 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 590 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 591 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 592 | # message encountered during scan configuration validation that is performed |
| 593 | # before each scan run. |
| 594 | # APIs when scan configuration validation fails. It is also reported as part of |
| 595 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 596 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 597 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 598 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 599 | # troubleshooting purposes only and its actual value can change in the |
| 600 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 601 | "code": "A String", # Indicates the reason code for a configuration failure. |
| 602 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 603 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 604 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 605 | # common HTTP error code, if such is available. For example, if this code is |
| 606 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 607 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 608 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 609 | "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20 |
| 610 | # inclusively. If the field is unspecified or its value is set 0, server will |
| 611 | # default to 15. Other values outside of [5, 20] range will be rejected with |
| 612 | # INVALID_ARGUMENT error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 613 | "name": "A String", # The resource name of the ScanConfig. The name follows the format of |
| 614 | # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 615 | # generated by the system. |
| 616 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 617 | "A String", |
| 618 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 619 | "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature. |
| 620 | # If enabled, the scanner will access applications from static IP addresses. |
| 621 | "targetPlatforms": [ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE |
| 622 | # will be used as a default. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 623 | "A String", |
| 624 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 | |
| 634 | Args: |
| 635 | previous_request: The request for the previous page. (required) |
| 636 | previous_response: The response from the request for the previous page. (required) |
| 637 | |
| 638 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 639 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 640 | page. Returns None if there are no more items in the collection. |
| 641 | </pre> |
| 642 | </div> |
| 643 | |
| 644 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 645 | <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 646 | <pre>Updates a ScanConfig. This method support partial update of a ScanConfig. |
| 647 | |
| 648 | Args: |
| 649 | name: string, The resource name of the ScanConfig. The name follows the format of |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 650 | 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 651 | generated by the system. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 652 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 653 | The object takes the form of: |
| 654 | |
| 655 | { # A ScanConfig resource contains the configurations to launch a scan. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 656 | "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Security |
| 657 | # Command Center. |
| 658 | "managedScan": True or False, # Whether the scan config is managed by Web Security Scanner, output |
| 659 | # only. |
| 660 | "userAgent": "A String", # The user agent used during scanning. |
| 661 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
| 662 | "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig. |
| 663 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
| 664 | "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is |
| 665 | # refreshed by the server after each run. If unspecified, it will default |
| 666 | # to current server time, which means the scan will be scheduled to start |
| 667 | # immediately. |
| 668 | }, |
| 669 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 670 | # authentication configuration during scanning. |
| 671 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
| 672 | "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted |
| 673 | # and not returned in any response nor included in audit logs. |
| 674 | "username": "A String", # Required. The user name of the Google account. |
| 675 | }, |
| 676 | "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP). |
| 677 | "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service |
| 678 | # account is added in Identity-Aware-Proxy (IAP) access policies. |
| 679 | # service account is added in Identity-Aware-Proxy (IAP) access policies. |
| 680 | "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by |
| 681 | # Identity-Aware-Proxy(IAP). |
| 682 | }, |
| 683 | }, |
| 684 | "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account. |
| 685 | "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted |
| 686 | # and not returned in any response nor included in audit logs. |
| 687 | "loginUrl": "A String", # Required. The login form URL of the website. |
| 688 | "username": "A String", # Required. The user name of the custom account. |
| 689 | }, |
| 690 | }, |
| 691 | "riskLevel": "A String", # The risk level selected for the scan |
| 692 | "blacklistPatterns": [ # The excluded URL patterns as described in |
| 693 | # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 694 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 695 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 696 | "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 697 | # Next id: 12 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 698 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 699 | # If the scan is in queue, the value is 0. |
| 700 | # If the scan is running, the value ranges from 0 to 100. |
| 701 | # If the scan is finished, the value is 100. |
| 702 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 703 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 704 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 705 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 706 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 707 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 708 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 709 | # the value represents the number of URLs tested up to now. The number of |
| 710 | # URLs tested is usually larger than the number URLS crawled because |
| 711 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 712 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 713 | # execution state reaches "FINISHED". |
| 714 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 715 | # the value represents the number of URLs crawled up to now. |
| 716 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 717 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 718 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 719 | { # Output only. |
| 720 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 721 | # with useful information that helps make the scanning process more effective. |
| 722 | "code": "A String", # Indicates the warning code. |
| 723 | }, |
| 724 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 725 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 726 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 727 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 728 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 729 | # message encountered during scan configuration validation that is performed |
| 730 | # before each scan run. |
| 731 | # APIs when scan configuration validation fails. It is also reported as part of |
| 732 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 733 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 734 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 735 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 736 | # troubleshooting purposes only and its actual value can change in the |
| 737 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 738 | "code": "A String", # Indicates the reason code for a configuration failure. |
| 739 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 740 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 741 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 742 | # common HTTP error code, if such is available. For example, if this code is |
| 743 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 744 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 745 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 746 | "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20 |
| 747 | # inclusively. If the field is unspecified or its value is set 0, server will |
| 748 | # default to 15. Other values outside of [5, 20] range will be rejected with |
| 749 | # INVALID_ARGUMENT error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 750 | "name": "A String", # The resource name of the ScanConfig. The name follows the format of |
| 751 | # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 752 | # generated by the system. |
| 753 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 754 | "A String", |
| 755 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 756 | "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature. |
| 757 | # If enabled, the scanner will access applications from static IP addresses. |
| 758 | "targetPlatforms": [ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE |
| 759 | # will be used as a default. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 760 | "A String", |
| 761 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 762 | } |
| 763 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 764 | updateMask: string, Required. The update mask applies to the resource. For the `FieldMask` definition, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 765 | see |
| 766 | https://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 | |
| 772 | Returns: |
| 773 | An object of the form: |
| 774 | |
| 775 | { # A ScanConfig resource contains the configurations to launch a scan. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 776 | "exportToSecurityCommandCenter": "A String", # Controls export of scan configurations and results to Security |
| 777 | # Command Center. |
| 778 | "managedScan": True or False, # Whether the scan config is managed by Web Security Scanner, output |
| 779 | # only. |
| 780 | "userAgent": "A String", # The user agent used during scanning. |
| 781 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
| 782 | "schedule": { # Scan schedule configuration. # The schedule of the ScanConfig. |
| 783 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
| 784 | "scheduleTime": "A String", # A timestamp indicates when the next run will be scheduled. The value is |
| 785 | # refreshed by the server after each run. If unspecified, it will default |
| 786 | # to current server time, which means the scan will be scheduled to start |
| 787 | # immediately. |
| 788 | }, |
| 789 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 790 | # authentication configuration during scanning. |
| 791 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
| 792 | "password": "A String", # Required. Input only. The password of the Google account. The credential is stored encrypted |
| 793 | # and not returned in any response nor included in audit logs. |
| 794 | "username": "A String", # Required. The user name of the Google account. |
| 795 | }, |
| 796 | "iapCredential": { # Describes authentication configuration for Identity-Aware-Proxy (IAP). # Authentication using Identity-Aware-Proxy (IAP). |
| 797 | "iapTestServiceAccountInfo": { # Describes authentication configuration when Web-Security-Scanner # Authentication configuration when Web-Security-Scanner service |
| 798 | # account is added in Identity-Aware-Proxy (IAP) access policies. |
| 799 | # service account is added in Identity-Aware-Proxy (IAP) access policies. |
| 800 | "targetAudienceClientId": "A String", # Required. Describes OAuth2 Client ID of resources protected by |
| 801 | # Identity-Aware-Proxy(IAP). |
| 802 | }, |
| 803 | }, |
| 804 | "customAccount": { # Describes authentication configuration that uses a custom account. # Authentication using a custom account. |
| 805 | "password": "A String", # Required. Input only. The password of the custom account. The credential is stored encrypted |
| 806 | # and not returned in any response nor included in audit logs. |
| 807 | "loginUrl": "A String", # Required. The login form URL of the website. |
| 808 | "username": "A String", # Required. The user name of the custom account. |
| 809 | }, |
| 810 | }, |
| 811 | "riskLevel": "A String", # The risk level selected for the scan |
| 812 | "blacklistPatterns": [ # The excluded URL patterns as described in |
| 813 | # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 814 | "A String", |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 815 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 816 | "latestRun": { # A ScanRun is a output-only resource representing an actual run of the scan. # Latest ScanRun if available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 817 | # Next id: 12 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 818 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 819 | # If the scan is in queue, the value is 0. |
| 820 | # If the scan is running, the value ranges from 0 to 100. |
| 821 | # If the scan is finished, the value is 100. |
| 822 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 823 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 824 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 825 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 826 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 827 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 828 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 829 | # the value represents the number of URLs tested up to now. The number of |
| 830 | # URLs tested is usually larger than the number URLS crawled because |
| 831 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 832 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 833 | # execution state reaches "FINISHED". |
| 834 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 835 | # the value represents the number of URLs crawled up to now. |
| 836 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 837 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 838 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 839 | { # Output only. |
| 840 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 841 | # with useful information that helps make the scanning process more effective. |
| 842 | "code": "A String", # Indicates the warning code. |
| 843 | }, |
| 844 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 845 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 846 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 847 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 848 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 849 | # message encountered during scan configuration validation that is performed |
| 850 | # before each scan run. |
| 851 | # APIs when scan configuration validation fails. It is also reported as part of |
| 852 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 853 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 854 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 855 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 856 | # troubleshooting purposes only and its actual value can change in the |
| 857 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 858 | "code": "A String", # Indicates the reason code for a configuration failure. |
| 859 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 860 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 861 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 862 | # common HTTP error code, if such is available. For example, if this code is |
| 863 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 864 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 865 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 866 | "maxQps": 42, # The maximum QPS during scanning. A valid value ranges from 5 to 20 |
| 867 | # inclusively. If the field is unspecified or its value is set 0, server will |
| 868 | # default to 15. Other values outside of [5, 20] range will be rejected with |
| 869 | # INVALID_ARGUMENT error. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 870 | "name": "A String", # The resource name of the ScanConfig. The name follows the format of |
| 871 | # 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 872 | # generated by the system. |
| 873 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 874 | "A String", |
| 875 | ], |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 876 | "staticIpScan": True or False, # Whether the scan configuration has enabled static IP address scan feature. |
| 877 | # If enabled, the scanner will access applications from static IP addresses. |
| 878 | "targetPlatforms": [ # Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE |
| 879 | # will be used as a default. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 880 | "A String", |
| 881 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 | |
| 889 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 890 | name: string, Required. The resource name of the ScanConfig to be used. The name follows the |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 891 | format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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 | |
| 903 | Returns: |
| 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 |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 908 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
| 909 | # If the scan is in queue, the value is 0. |
| 910 | # If the scan is running, the value ranges from 0 to 100. |
| 911 | # If the scan is finished, the value is 100. |
| 912 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
| 913 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 914 | # The ScanRun IDs are generated by the system. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 915 | "executionState": "A String", # The execution state of the ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 916 | "hasVulnerabilities": True or False, # Whether the scan run has found any vulnerabilities. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 917 | "startTime": "A String", # The time at which the ScanRun started. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 918 | "urlsTestedCount": "A String", # The number of URLs tested during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 919 | # the value represents the number of URLs tested up to now. The number of |
| 920 | # URLs tested is usually larger than the number URLS crawled because |
| 921 | # typically a crawled URL is tested with multiple test payloads. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 922 | "resultState": "A String", # The result state of the ScanRun. This field is only available after the |
| 923 | # execution state reaches "FINISHED". |
| 924 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
| 925 | # the value represents the number of URLs crawled up to now. |
| 926 | "endTime": "A String", # The time at which the ScanRun reached termination state - that the ScanRun |
| 927 | # is either finished or stopped by user. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 928 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
| 929 | { # Output only. |
| 930 | # Defines a warning trace message for ScanRun. Warning traces provide customers |
| 931 | # with useful information that helps make the scanning process more effective. |
| 932 | "code": "A String", # Indicates the warning code. |
| 933 | }, |
| 934 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 935 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
| 936 | # scan's termination and more details, if such are available. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 937 | # Defines an error trace message for a ScanRun. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 938 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 939 | # message encountered during scan configuration validation that is performed |
| 940 | # before each scan run. |
| 941 | # APIs when scan configuration validation fails. It is also reported as part of |
| 942 | # a ScanRunErrorTrace message if scan validation fails due to a scan |
| 943 | # configuration error. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 944 | "fieldName": "A String", # Indicates the full name of the ScanConfig field that triggers this error, |
| 945 | # for example "scan_config.max_qps". This field is provided for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 946 | # troubleshooting purposes only and its actual value can change in the |
| 947 | # future. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 948 | "code": "A String", # Indicates the reason code for a configuration failure. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 949 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame^] | 950 | "code": "A String", # Indicates the error reason code. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 951 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
| 952 | # common HTTP error code, if such is available. For example, if this code is |
| 953 | # 404, the scan has encountered too many NOT_FOUND responses. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 954 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 955 | }</pre> |
| 956 | </div> |
| 957 | |
| 958 | </body></html> |