Web Security Scanner V1beta API - Class Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client (v0.6.1)

Reference documentation and code samples for the Web Security Scanner V1beta API class Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.

REST client for the WebSecurityScanner service.

Cloud Web Security Scanner Service identifies security vulnerabilities in web applications hosted on Google Cloud Platform. It crawls your application, and attempts to exercise as many user inputs and event handlers as possible.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the WebSecurityScanner Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all WebSecurityScanner clients
::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the WebSecurityScanner Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_scan_config

def create_scan_config(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
def create_scan_config(parent: nil, scan_config: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig

Creates a new ScanConfig.

Overloads
def create_scan_config(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
Pass arguments to create_scan_config via a request object, either of type CreateScanConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_scan_config(parent: nil, scan_config: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
Pass arguments to create_scan_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource name where the scan is created, which should be a project resource name in the format 'projects/{projectId}'.
  • scan_config (::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash) — Required. The ScanConfig to be created.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#delete_scan_config

def delete_scan_config(request, options = nil) -> ::Google::Protobuf::Empty
def delete_scan_config(name: nil) -> ::Google::Protobuf::Empty

Deletes an existing ScanConfig and its child resources.

Overloads
def delete_scan_config(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_scan_config via a request object, either of type DeleteScanConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_scan_config(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_scan_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the ScanConfig to be deleted. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_finding

def get_finding(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::Finding
def get_finding(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::Finding

Gets a Finding.

Overloads
def get_finding(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::Finding
Pass arguments to get_finding via a request object, either of type GetFindingRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_finding(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::Finding
Pass arguments to get_finding via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the Finding to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_scan_config

def get_scan_config(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
def get_scan_config(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig

Gets a ScanConfig.

Overloads
def get_scan_config(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
Pass arguments to get_scan_config via a request object, either of type GetScanConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_scan_config(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
Pass arguments to get_scan_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the ScanConfig to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#get_scan_run

def get_scan_run(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
def get_scan_run(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun

Gets a ScanRun.

Overloads
def get_scan_run(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
Pass arguments to get_scan_run via a request object, either of type GetScanRunRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_scan_run(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
Pass arguments to get_scan_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the ScanRun to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

def initialize() { |config| ... } -> Client

Create a new WebSecurityScanner REST client object.

Yields
  • (config) — Configure the WebSecurityScanner client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_crawled_urls

def list_crawled_urls(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>
def list_crawled_urls(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>

List CrawledUrls under a given ScanRun.

Overloads
def list_crawled_urls(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>
Pass arguments to list_crawled_urls via a request object, either of type ListCrawledUrlsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_crawled_urls(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>
Pass arguments to list_crawled_urls via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
  • page_token (::String) — A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.
  • page_size (::Integer) — The maximum number of CrawledUrls to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_finding_type_stats

def list_finding_type_stats(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse
def list_finding_type_stats(parent: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse

List all FindingTypeStats under a given ScanRun.

Overloads
def list_finding_type_stats(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse
Pass arguments to list_finding_type_stats via a request object, either of type ListFindingTypeStatsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_finding_type_stats(parent: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse
Pass arguments to list_finding_type_stats via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • parent (::String) — Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_findings

def list_findings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>
def list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>

List Findings under a given ScanRun.

Overloads
def list_findings(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>
Pass arguments to list_findings via a request object, either of type ListFindingsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>
Pass arguments to list_findings via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
  • filter (::String) — Required. The filter expression. The expression must be in the format:
  • page_token (::String) — A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.
  • page_size (::Integer) — The maximum number of Findings to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_scan_configs

def list_scan_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>
def list_scan_configs(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>

Lists ScanConfigs under a given project.

Overloads
def list_scan_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>
Pass arguments to list_scan_configs via a request object, either of type ListScanConfigsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_scan_configs(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>
Pass arguments to list_scan_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource name, which should be a project resource name in the format 'projects/{projectId}'.
  • page_token (::String) — A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.
  • page_size (::Integer) — The maximum number of ScanConfigs to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_scan_runs

def list_scan_runs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>
def list_scan_runs(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>

Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.

Overloads
def list_scan_runs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>
Pass arguments to list_scan_runs via a request object, either of type ListScanRunsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_scan_runs(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>
Pass arguments to list_scan_runs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The parent resource name, which should be a scan resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}'.
  • page_token (::String) — A token identifying a page of results to be returned. This should be a next_page_token value returned from a previous List request. If unspecified, the first page of results is returned.
  • page_size (::Integer) — The maximum number of ScanRuns to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#start_scan_run

def start_scan_run(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
def start_scan_run(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun

Start a ScanRun according to the given ScanConfig.

Overloads
def start_scan_run(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
Pass arguments to start_scan_run via a request object, either of type StartScanRunRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def start_scan_run(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
Pass arguments to start_scan_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the ScanConfig to be used. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#stop_scan_run

def stop_scan_run(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
def stop_scan_run(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun

Stops a ScanRun. The stopped ScanRun is returned.

Overloads
def stop_scan_run(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
Pass arguments to stop_scan_run via a request object, either of type StopScanRunRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def stop_scan_run(name: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun
Pass arguments to stop_scan_run via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the ScanRun to be stopped. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#update_scan_config

def update_scan_config(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
def update_scan_config(scan_config: nil, update_mask: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig

Updates a ScanConfig. This method support partial update of a ScanConfig.

Overloads
def update_scan_config(request, options = nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
Pass arguments to update_scan_config via a request object, either of type UpdateScanConfigRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_scan_config(scan_config: nil, update_mask: nil) -> ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig
Pass arguments to update_scan_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • scan_config (::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash) — Required. The ScanConfig to be updated. The name field must be set to identify the resource to be updated. The values of fields not covered by the mask will be ignored.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. The update mask applies to the resource. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.