Class: Google::Apis::WebsecurityscannerV1alpha::WebSecurityScannerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::WebsecurityscannerV1alpha::WebSecurityScannerService
- Defined in:
- generated/google/apis/websecurityscanner_v1alpha/service.rb
Overview
Web Security Scanner API
Scans your Compute and App Engine apps for common web vulnerabilities.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#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.
-
#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.
-
#get_project_scan_config(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanConfig
Gets a ScanConfig.
-
#get_project_scan_config_scan_run(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::ScanRun
Gets a ScanRun.
-
#get_project_scan_config_scan_run_finding(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::WebsecurityscannerV1alpha::Finding
Gets a Finding.
-
#initialize ⇒ WebSecurityScannerService
constructor
A new instance of WebSecurityScannerService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ WebSecurityScannerService
Returns a new instance of WebSecurityScannerService
45 46 47 48 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 45 def initialize super('https://websecurityscanner.googleapis.com/', '') @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 38 def key @key end |
#quota_user ⇒ String
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.
43 44 45 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 43 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.
73 74 75 76 77 78 79 80 81 82 83 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 73 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', ) 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.
107 108 109 110 111 112 113 114 115 |
# File 'generated/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}', ) 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.
139 140 141 142 143 144 145 146 147 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 139 def get_project_scan_config(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) 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.
291 292 293 294 295 296 297 298 299 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 291 def get_project_scan_config_scan_run(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) 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.
480 481 482 483 484 485 486 487 488 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 480 def get_project_scan_config_scan_run_finding(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1alpha/{+name}', ) 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.
411 412 413 414 415 416 417 418 419 420 421 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 411 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', ) 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.
446 447 448 449 450 451 452 453 454 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 446 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', ) 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.
526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 526 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', ) 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.
332 333 334 335 336 337 338 339 340 341 342 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 332 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', ) 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.
179 180 181 182 183 184 185 186 187 188 189 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 179 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', ) 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.
220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 220 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}', ) 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.
256 257 258 259 260 261 262 263 264 265 266 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 256 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', ) 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.
368 369 370 371 372 373 374 375 376 377 378 |
# File 'generated/google/apis/websecurityscanner_v1alpha/service.rb', line 368 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', ) 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 |