class Google::Apis::WebsecurityscannerV1alpha::WebSecurityScannerService

Web Security Scanner API

Scans your Compute and App Engine apps for common web vulnerabilities.

@example

require 'google/apis/websecurityscanner_v1alpha'

Websecurityscanner = Google::Apis::WebsecurityscannerV1alpha # Alias the module
service = Websecurityscanner::WebSecurityScannerService.new

@see cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/

Attributes

key[RW]

@return [String]

API key. Your API key identifies your project and provides you with API access,
quota, and reports. Required unless you provide an OAuth 2.0 token.
quota_user[RW]

@return [String]

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 45
def initialize
  super('https://websecurityscanner.googleapis.com/', '',
        client_name: 'google-apis-websecurityscanner_v1alpha',
        client_version: Google::Apis::WebsecurityscannerV1alpha::GEM_VERSION)
  @batch_path = 'batch'
end

Public Instance Methods

create_project_scan_config(parent, scan_config_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Creates a new ScanConfig. @param [String] parent

Required. The parent resource name where the scan is created, which should be
a project resource name in the format 'projects/`projectId`'.

@param [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] scan_config_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ScanConfig]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 74
def create_project_scan_config(parent, scan_config_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1alpha/{+parent}/scanConfigs', options)
  command.request_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation
  command.request_object = scan_config_object
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanConfig
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
delete_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Deletes an existing ScanConfig and its child resources. @param [String] name

Required. The resource name of the ScanConfig to be deleted. The name follows
the format of 'projects/`projectId`/scanConfigs/`scanConfigId`'.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::Empty] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::Empty]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 107
def delete_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::Empty::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets a ScanConfig. @param [String] name

Required. The resource name of the ScanConfig to be returned. The name follows
the format of 'projects/`projectId`/scanConfigs/`scanConfigId`'.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ScanConfig]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 138
def get_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanConfig
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_scan_config_scan_run(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets a ScanRun. @param [String] name

Required. The resource name of the ScanRun to be returned. The name follows
the format of 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`
scanRunId`'.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanRun] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ScanRun]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 284
def get_project_scan_config_scan_run(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanRun
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
get_project_scan_config_scan_run_finding(name, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Gets a Finding. @param [String] name

Required. The resource name of the Finding to be returned. The name follows
the format of 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`
scanRunId`/findings/`findingId`'.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::Finding] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::Finding]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 465
def get_project_scan_config_scan_run_finding(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+name}', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::Finding::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::Finding
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_scan_config_scan_run_crawled_urls(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

List CrawledUrls under a given ScanRun. @param [String] parent

Required. The parent resource name, which should be a scan run resource name
in the format 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`
scanRunId`'.

@param [Fixnum] page_size

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.

@param [String] page_token

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.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 399
def list_project_scan_config_scan_run_crawled_urls(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/crawledUrls', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_scan_config_scan_run_finding_type_stats(parent, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

List all FindingTypeStats under a given ScanRun. @param [String] parent

Required. The parent resource name, which should be a scan run resource name
in the format 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`
scanRunId`'.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 433
def list_project_scan_config_scan_run_finding_type_stats(parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/findingTypeStats', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_scan_config_scan_run_findings(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

List Findings under a given ScanRun. @param [String] parent

Required. The parent resource name, which should be a scan run resource name
in the format 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`
scanRunId`'.

@param [String] filter

Required. The filter expression. The expression must be in the format: .
Supported field: 'finding_type'. Supported operator: '='.

@param [Fixnum] page_size

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.

@param [String] page_token

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.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 507
def list_project_scan_config_scan_run_findings(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/findings', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_scan_config_scan_runs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time. @param [String] parent

Required. The parent resource name, which should be a scan resource name in
the format 'projects/`projectId`/scanConfigs/`scanConfigId`'.

@param [Fixnum] page_size

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.

@param [String] page_token

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.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 323
def list_project_scan_config_scan_runs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/scanRuns', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
list_project_scan_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Lists ScanConfigs under a given project. @param [String] parent

Required. The parent resource name, which should be a project resource name in
the format 'projects/`projectId`'.

@param [Fixnum] page_size

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.

@param [String] page_token

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.

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 176
def list_project_scan_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1alpha/{+parent}/scanConfigs', options)
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
patch_project_scan_config(name, scan_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Updates a ScanConfig. This method support partial update of a ScanConfig. @param [String] name

The resource name of the ScanConfig. The name follows the format of 'projects/`
projectId`/scanConfigs/`scanConfigId`'. The ScanConfig IDs are generated by
the system.

@param [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] scan_config_object @param [String] update_mask

Required. The update mask applies to the resource. For the `FieldMask`
definition, see https://developers.google.com/protocol-buffers/docs/reference/
google.protobuf#fieldmask

@param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanConfig] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ScanConfig]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 215
def patch_project_scan_config(name, scan_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1alpha/{+name}', options)
  command.request_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation
  command.request_object = scan_config_object
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanConfig::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanConfig
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
start_scan_config_scan_run(name, start_scan_run_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Start a ScanRun according to the given ScanConfig. @param [String] name

Required. The resource name of the ScanConfig to be used. The name follows the
format of 'projects/`projectId`/scanConfigs/`scanConfigId`'.

@param [Google::Apis::WebsecurityscannerV1alpha::StartScanRunRequest] start_scan_run_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanRun] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ScanRun]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 250
def start_scan_config_scan_run(name, start_scan_run_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1alpha/{+name}:start', options)
  command.request_representation = Google::Apis::WebsecurityscannerV1alpha::StartScanRunRequest::Representation
  command.request_object = start_scan_run_request_object
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanRun
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end
stop_scan_run(name, stop_scan_run_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Stops a ScanRun. The stopped ScanRun is returned. @param [String] name

Required. The resource name of the ScanRun to be stopped. The name follows the
format of 'projects/`projectId`/scanConfigs/`scanConfigId`/scanRuns/`scanRunId`
'.

@param [Google::Apis::WebsecurityscannerV1alpha::StopScanRunRequest] stop_scan_run_request_object @param [String] fields

Selector specifying which fields to include in a partial response.

@param [String] quota_user

Available to use for quota purposes for server-side applications. Can be any
arbitrary string assigned to a user, but should not exceed 40 characters.

@param [Google::Apis::RequestOptions] options

Request-specific options

@yield [result, err] Result & error if block supplied @yieldparam result [Google::Apis::WebsecurityscannerV1alpha::ScanRun] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::WebsecurityscannerV1alpha::ScanRun]

@raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification @raise [Google::Apis::AuthorizationError] Authorization is required

# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 358
def stop_scan_run(name, stop_scan_run_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1alpha/{+name}:stop', options)
  command.request_representation = Google::Apis::WebsecurityscannerV1alpha::StopScanRunRequest::Representation
  command.request_object = stop_scan_run_request_object
  command.response_representation = Google::Apis::WebsecurityscannerV1alpha::ScanRun::Representation
  command.response_class = Google::Apis::WebsecurityscannerV1alpha::ScanRun
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

Protected Instance Methods

apply_command_defaults(command) click to toggle source
# File lib/google/apis/websecurityscanner_v1alpha/service.rb, line 522
def apply_command_defaults(command)
  command.query['key'] = key unless key.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
end