Class: Google::Apis::WebsecurityscannerV1alpha::WebSecurityScannerService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/websecurityscanner_v1alpha/service.rb

Overview

Web Security Scanner API

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

Examples:

require 'google/apis/websecurityscanner_v1alpha'

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

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://websecurityscanner.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeWebSecurityScannerService

Returns a new instance of WebSecurityScannerService.



47
48
49
50
51
52
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-websecurityscanner_v1alpha',
        client_version: Google::Apis::WebsecurityscannerV1alpha::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns 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.

Returns:

  • (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.



40
41
42
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 40

def key
  @key
end

#quota_userString

Returns 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.

Returns:

  • (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.



45
46
47
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#create_project_scan_config(parent, scan_config_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanConfig

Creates a new ScanConfig.

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_object (Google::Apis::WebsecurityscannerV1alpha::ScanConfig) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



76
77
78
79
80
81
82
83
84
85
86
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 76

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::Empty

Deletes an existing ScanConfig and its child resources.

Parameters:

  • name (String)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



109
110
111
112
113
114
115
116
117
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 109

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanConfig

Gets a ScanConfig.

Parameters:

  • name (String)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



140
141
142
143
144
145
146
147
148
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 140

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanRun

Gets a ScanRun.

Parameters:

  • name (String)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



286
287
288
289
290
291
292
293
294
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 286

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::Finding

Gets a Finding.

Parameters:

  • 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'.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



467
468
469
470
471
472
473
474
475
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 467

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ListCrawledUrlsResponse

List CrawledUrls under a given ScanRun.

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_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



401
402
403
404
405
406
407
408
409
410
411
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 401

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ListFindingTypeStatsResponse

List all FindingTypeStats under a given ScanRun.

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'.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



435
436
437
438
439
440
441
442
443
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 435

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ListFindingsResponse

List Findings under a given ScanRun.

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) (defaults to: nil)

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

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



509
510
511
512
513
514
515
516
517
518
519
520
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 509

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ListScanRunsResponse

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

Parameters:

  • parent (String)

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

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



325
326
327
328
329
330
331
332
333
334
335
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 325

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ListScanConfigsResponse

Lists ScanConfigs under a given project.

Parameters:

  • parent (String)

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

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    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.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



178
179
180
181
182
183
184
185
186
187
188
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 178

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanConfig

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

Parameters:

  • name (String)

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

  • scan_config_object (Google::Apis::WebsecurityscannerV1alpha::ScanConfig) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 217

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanRun

Start a ScanRun according to the given ScanConfig.

Parameters:

  • name (String)

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

  • start_scan_run_request_object (Google::Apis::WebsecurityscannerV1alpha::StartScanRunRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



252
253
254
255
256
257
258
259
260
261
262
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 252

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) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanRun

Stops a ScanRun. The stopped ScanRun is returned.

Parameters:

  • name (String)

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

  • stop_scan_run_request_object (Google::Apis::WebsecurityscannerV1alpha::StopScanRunRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



360
361
362
363
364
365
366
367
368
369
370
# File 'lib/google/apis/websecurityscanner_v1alpha/service.rb', line 360

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