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"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 92 | <code><a href="#list">list(parent, pageSize=None, pageToken=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 | 715bd7f | 2019-06-14 16:50:42 -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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 115 | "blacklistPatterns": [ # The blacklist URL patterns as described in |
| 116 | # https://cloud.google.com/security-scanner/docs/excluded-urls |
| 117 | "A String", |
| 118 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 119 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 123 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 124 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 132 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 133 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 134 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 140 | "riskLevel": "A String", # The risk level selected for the scan |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 141 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 142 | # authentication configuration during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 143 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 151 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 152 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 154 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 157 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 160 | # and not returned in any response nor included in audit logs. |
| 161 | }, |
| 162 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 163 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 167 | "userAgent": "A String", # The user agent used during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 168 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 169 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 173 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 174 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 177 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 178 | }, |
| 179 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 180 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 181 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 182 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 183 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 185 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 188 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 189 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 192 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 193 | # scan's termination and more details, if such are available. |
| 194 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 195 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 196 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 198 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 200 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 205 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 207 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 212 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 213 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 214 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 220 | }, |
| 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 232 | "blacklistPatterns": [ # The blacklist URL patterns as described in |
| 233 | # https://cloud.google.com/security-scanner/docs/excluded-urls |
| 234 | "A String", |
| 235 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 236 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 240 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 241 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 249 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 250 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 251 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 257 | "riskLevel": "A String", # The risk level selected for the scan |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 258 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 259 | # authentication configuration during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 260 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 268 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 269 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 271 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 274 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 277 | # and not returned in any response nor included in audit logs. |
| 278 | }, |
| 279 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 280 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 284 | "userAgent": "A String", # The user agent used during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 285 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 286 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 290 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 291 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 294 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 295 | }, |
| 296 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 297 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 298 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 299 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 300 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 302 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 305 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 306 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 309 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 310 | # scan's termination and more details, if such are available. |
| 311 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 312 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 313 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 315 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 317 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 322 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 324 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 329 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 330 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 331 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 337 | }, |
| 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 | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 347 | format 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 | |
| 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 | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 374 | format 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 | |
| 380 | Returns: |
| 381 | An object of the form: |
| 382 | |
| 383 | { # A ScanConfig resource contains the configurations to launch a scan. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 384 | "blacklistPatterns": [ # The blacklist URL patterns as described in |
| 385 | # https://cloud.google.com/security-scanner/docs/excluded-urls |
| 386 | "A String", |
| 387 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 388 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 392 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 393 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 401 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 402 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 403 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 409 | "riskLevel": "A String", # The risk level selected for the scan |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 410 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 411 | # authentication configuration during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 412 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 420 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 421 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 423 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 426 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 429 | # and not returned in any response nor included in audit logs. |
| 430 | }, |
| 431 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 432 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 436 | "userAgent": "A String", # The user agent used during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 437 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 438 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 442 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 443 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 446 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 447 | }, |
| 448 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 449 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 450 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 451 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 452 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 454 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 457 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 458 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 461 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 462 | # scan's termination and more details, if such are available. |
| 463 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 464 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 465 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 467 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 469 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 474 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 476 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 481 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 482 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 483 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 489 | }, |
| 490 | }</pre> |
| 491 | </div> |
| 492 | |
| 493 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 494 | <code class="details" id="list">list(parent, pageSize=None, pageToken=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 | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 499 | format 'projects/{projectId}'. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 500 | pageSize: integer, The maximum number of ScanConfigs to return, can be limited by server. |
| 501 | If not specified or not positive, the implementation will select a |
| 502 | reasonable value. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 503 | 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. |
| 505 | If 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 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. |
| 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 519 | "blacklistPatterns": [ # The blacklist URL patterns as described in |
| 520 | # https://cloud.google.com/security-scanner/docs/excluded-urls |
| 521 | "A String", |
| 522 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 523 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 527 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 528 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 536 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 537 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 538 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 544 | "riskLevel": "A String", # The risk level selected for the scan |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 545 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 546 | # authentication configuration during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 547 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 555 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 556 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 558 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 561 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 564 | # and not returned in any response nor included in audit logs. |
| 565 | }, |
| 566 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 567 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 571 | "userAgent": "A String", # The user agent used during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 572 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 573 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 577 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 578 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 581 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 582 | }, |
| 583 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 584 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 585 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 586 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 587 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 589 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 592 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 593 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 596 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 597 | # scan's termination and more details, if such are available. |
| 598 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 599 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 600 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 602 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 604 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 609 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 611 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 616 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 617 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 618 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 624 | }, |
| 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: |
| 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'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 |
| 650 | 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are |
| 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 656 | "blacklistPatterns": [ # The blacklist URL patterns as described in |
| 657 | # https://cloud.google.com/security-scanner/docs/excluded-urls |
| 658 | "A String", |
| 659 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 660 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 664 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 665 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 673 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 674 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 675 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 681 | "riskLevel": "A String", # The risk level selected for the scan |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 682 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 683 | # authentication configuration during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 684 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 692 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 693 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 695 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 698 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 701 | # and not returned in any response nor included in audit logs. |
| 702 | }, |
| 703 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 704 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 708 | "userAgent": "A String", # The user agent used during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 709 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 710 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 714 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 715 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 718 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 719 | }, |
| 720 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 721 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 722 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 723 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 724 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 726 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 729 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 730 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 733 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 734 | # scan's termination and more details, if such are available. |
| 735 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 736 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 737 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 739 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 741 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 746 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 748 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 753 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 754 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 755 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 761 | }, |
| 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. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 776 | "blacklistPatterns": [ # The blacklist URL patterns as described in |
| 777 | # https://cloud.google.com/security-scanner/docs/excluded-urls |
| 778 | "A String", |
| 779 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 780 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 784 | "displayName": "A String", # Required. The user provided display name of the ScanConfig. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 785 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 793 | "intervalDurationDays": 42, # Required. The duration of time between executions in days. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 794 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 795 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 801 | "riskLevel": "A String", # The risk level selected for the scan |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 802 | "authentication": { # Scan authentication configuration. # The authentication configuration. If specified, service will use the |
| 803 | # authentication configuration during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 804 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 812 | "googleAccount": { # Describes authentication configuration that uses a Google account. # Authentication using a Google account. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 813 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 815 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 818 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 821 | # and not returned in any response nor included in audit logs. |
| 822 | }, |
| 823 | }, |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 824 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 828 | "userAgent": "A String", # The user agent used during scanning. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 829 | "startingUrls": [ # Required. The starting URLs from which the scanner finds site pages. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 830 | "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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 834 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 835 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 838 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 839 | }, |
| 840 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 841 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 842 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 843 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 844 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 846 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 849 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 850 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 853 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 854 | # scan's termination and more details, if such are available. |
| 855 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 856 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 857 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 859 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 861 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 866 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 868 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 873 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 874 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 875 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 881 | }, |
| 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 | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 891 | format 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 | |
| 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 |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 908 | "warningTraces": [ # A list of warnings, if such are encountered during this scan run. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 909 | { # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 912 | "code": "A String", # Indicates the warning code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 913 | }, |
| 914 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 915 | "name": "A String", # The resource name of the ScanRun. The name follows the format of |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 916 | # 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. |
| 917 | # The ScanRun IDs are generated by the system. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 918 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 920 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 923 | "progressPercent": 42, # The percentage of total completion ranging from 0 to 100. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 924 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 927 | "errorTrace": { # Output only. # If result_state is an ERROR, this field provides the primary reason for |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 928 | # scan's termination and more details, if such are available. |
| 929 | # Defines an error trace message for a ScanRun. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 930 | "mostCommonHttpErrorCode": 42, # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 931 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 933 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 935 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 940 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 942 | # 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 947 | "urlsCrawledCount": "A String", # The number of URLs crawled during this ScanRun. If the scan is in progress, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 948 | # the value represents the number of URLs crawled up to now. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame^] | 949 | "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 Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 955 | }</pre> |
| 956 | </div> |
| 957 | |
| 958 | </body></html> |