Google Cloud Web Security Scanner V1beta Client - Class ScanRun (0.7.18)

Reference documentation and code samples for the Google Cloud Web Security Scanner V1beta Client class ScanRun.

A ScanRun is a output-only resource representing an actual run of the scan.

Next id: 12

Generated from protobuf message google.cloud.websecurityscanner.v1beta.ScanRun

Namespace

Google \ Cloud \ WebSecurityScanner \ V1beta

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

The resource name of the ScanRun. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. The ScanRun IDs are generated by the system.

↳ execution_state int

The execution state of the ScanRun.

↳ result_state int

The result state of the ScanRun. This field is only available after the execution state reaches "FINISHED".

↳ start_time Google\Protobuf\Timestamp

The time at which the ScanRun started.

↳ end_time Google\Protobuf\Timestamp

The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.

↳ urls_crawled_count int|string

The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.

↳ urls_tested_count int|string

The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.

↳ has_vulnerabilities bool

Whether the scan run has found any vulnerabilities.

↳ progress_percent int

The percentage of total completion ranging from 0 to 100. If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.

↳ error_trace Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace

If result_state is an ERROR, this field provides the primary reason for scan's termination and more details, if such are available.

↳ warning_traces array<Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace>

A list of warnings, if such are encountered during this scan run.

getName

The resource name of the ScanRun. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.

The ScanRun IDs are generated by the system.

Returns
TypeDescription
string

setName

The resource name of the ScanRun. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.

The ScanRun IDs are generated by the system.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getExecutionState

The execution state of the ScanRun.

Returns
TypeDescription
int

setExecutionState

The execution state of the ScanRun.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getResultState

The result state of the ScanRun. This field is only available after the execution state reaches "FINISHED".

Returns
TypeDescription
int

setResultState

The result state of the ScanRun. This field is only available after the execution state reaches "FINISHED".

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getStartTime

The time at which the ScanRun started.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasStartTime

clearStartTime

setStartTime

The time at which the ScanRun started.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getEndTime

The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasEndTime

clearEndTime

setEndTime

The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUrlsCrawledCount

The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.

Returns
TypeDescription
int|string

setUrlsCrawledCount

The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getUrlsTestedCount

The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.

Returns
TypeDescription
int|string

setUrlsTestedCount

The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getHasVulnerabilities

Whether the scan run has found any vulnerabilities.

Returns
TypeDescription
bool

setHasVulnerabilities

Whether the scan run has found any vulnerabilities.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getProgressPercent

The percentage of total completion ranging from 0 to 100.

If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.

Returns
TypeDescription
int

setProgressPercent

The percentage of total completion ranging from 0 to 100.

If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getErrorTrace

If result_state is an ERROR, this field provides the primary reason for scan's termination and more details, if such are available.

Returns
TypeDescription
Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace|null

hasErrorTrace

clearErrorTrace

setErrorTrace

If result_state is an ERROR, this field provides the primary reason for scan's termination and more details, if such are available.

Parameter
NameDescription
var Google\Cloud\WebSecurityScanner\V1beta\ScanRunErrorTrace
Returns
TypeDescription
$this

getWarningTraces

A list of warnings, if such are encountered during this scan run.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setWarningTraces

A list of warnings, if such are encountered during this scan run.

Parameter
NameDescription
var array<Google\Cloud\WebSecurityScanner\V1beta\ScanRunWarningTrace>
Returns
TypeDescription
$this