Class: OCI::VulnerabilityScanning::VulnerabilityScanningClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb

Overview

Use the Vulnerability Scanning Service (VSS) API to manage scan recipes, targets, and reports. For more information, see the Vulnerability Scanning documentation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ VulnerabilityScanningClient

Creates a new VulnerabilityScanningClient. Notes: If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 55

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20210215'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "VulnerabilityScanningClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


29
30
31
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



25
26
27
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#change_container_scan_recipe_compartment(container_scan_recipe_id, change_container_scan_recipe_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_container_scan_recipe_compartment API.

Moves a ContainerScanRecipe into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 125

def change_container_scan_recipe_compartment(container_scan_recipe_id, change_container_scan_recipe_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_container_scan_recipe_compartment.' if logger

  raise "Missing the required parameter 'container_scan_recipe_id' when calling change_container_scan_recipe_compartment." if container_scan_recipe_id.nil?
  raise "Missing the required parameter 'change_container_scan_recipe_compartment_details' when calling change_container_scan_recipe_compartment." if change_container_scan_recipe_compartment_details.nil?
  raise "Parameter value for 'container_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_recipe_id)

  path = '/containerScanRecipes/{containerScanRecipeId}/actions/changeCompartment'.sub('{containerScanRecipeId}', container_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_container_scan_recipe_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_container_scan_recipe_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_container_scan_result_compartment(container_scan_result_id, change_container_scan_result_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_container_scan_result_compartment API.

Moves a ContainerScanResult into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 196

def change_container_scan_result_compartment(container_scan_result_id, change_container_scan_result_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_container_scan_result_compartment.' if logger

  raise "Missing the required parameter 'container_scan_result_id' when calling change_container_scan_result_compartment." if container_scan_result_id.nil?
  raise "Missing the required parameter 'change_container_scan_result_compartment_details' when calling change_container_scan_result_compartment." if change_container_scan_result_compartment_details.nil?
  raise "Parameter value for 'container_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_result_id)

  path = '/containerScanResults/{containerScanResultId}/actions/changeCompartment'.sub('{containerScanResultId}', container_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_container_scan_result_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_container_scan_result_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_container_scan_target_compartment(container_scan_target_id, change_container_scan_target_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_container_scan_target_compartment API.

Moves a ContainerScanTarget into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 267

def change_container_scan_target_compartment(container_scan_target_id, change_container_scan_target_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_container_scan_target_compartment.' if logger

  raise "Missing the required parameter 'container_scan_target_id' when calling change_container_scan_target_compartment." if container_scan_target_id.nil?
  raise "Missing the required parameter 'change_container_scan_target_compartment_details' when calling change_container_scan_target_compartment." if change_container_scan_target_compartment_details.nil?
  raise "Parameter value for 'container_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_target_id)

  path = '/containerScanTargets/{containerScanTargetId}/actions/changeCompartment'.sub('{containerScanTargetId}', container_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_container_scan_target_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_container_scan_target_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_host_agent_scan_result_compartment(host_agent_scan_result_id, change_host_agent_scan_result_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_host_agent_scan_result_compartment API.

Moves a HostAgentScanResult into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 338

def change_host_agent_scan_result_compartment(host_agent_scan_result_id, change_host_agent_scan_result_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_host_agent_scan_result_compartment.' if logger

  raise "Missing the required parameter 'host_agent_scan_result_id' when calling change_host_agent_scan_result_compartment." if host_agent_scan_result_id.nil?
  raise "Missing the required parameter 'change_host_agent_scan_result_compartment_details' when calling change_host_agent_scan_result_compartment." if change_host_agent_scan_result_compartment_details.nil?
  raise "Parameter value for 'host_agent_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_agent_scan_result_id)

  path = '/hostAgentScanResults/{hostAgentScanResultId}/actions/changeCompartment'.sub('{hostAgentScanResultId}', host_agent_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_host_agent_scan_result_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_host_agent_scan_result_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_host_cis_benchmark_scan_result_compartment(host_cis_benchmark_scan_result_id, change_host_cis_benchmark_scan_result_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_host_cis_benchmark_scan_result_compartment API.

Moves a HostCisBenchmarkScanResult into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 409

def change_host_cis_benchmark_scan_result_compartment(host_cis_benchmark_scan_result_id, change_host_cis_benchmark_scan_result_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_host_cis_benchmark_scan_result_compartment.' if logger

  raise "Missing the required parameter 'host_cis_benchmark_scan_result_id' when calling change_host_cis_benchmark_scan_result_compartment." if host_cis_benchmark_scan_result_id.nil?
  raise "Missing the required parameter 'change_host_cis_benchmark_scan_result_compartment_details' when calling change_host_cis_benchmark_scan_result_compartment." if change_host_cis_benchmark_scan_result_compartment_details.nil?
  raise "Parameter value for 'host_cis_benchmark_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_cis_benchmark_scan_result_id)

  path = '/hostCisBenchmarkScanResults/{hostCisBenchmarkScanResultId}/actions/changeCompartment'.sub('{hostCisBenchmarkScanResultId}', host_cis_benchmark_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_host_cis_benchmark_scan_result_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_host_cis_benchmark_scan_result_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_host_endpoint_protection_scan_result_compartment(host_endpoint_protection_scan_result_id, change_host_endpoint_protection_scan_result_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_host_endpoint_protection_scan_result_compartment API.

Moves a HostEndpointProtectionScanResult into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 480

def change_host_endpoint_protection_scan_result_compartment(host_endpoint_protection_scan_result_id, change_host_endpoint_protection_scan_result_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_host_endpoint_protection_scan_result_compartment.' if logger

  raise "Missing the required parameter 'host_endpoint_protection_scan_result_id' when calling change_host_endpoint_protection_scan_result_compartment." if host_endpoint_protection_scan_result_id.nil?
  raise "Missing the required parameter 'change_host_endpoint_protection_scan_result_compartment_details' when calling change_host_endpoint_protection_scan_result_compartment." if change_host_endpoint_protection_scan_result_compartment_details.nil?
  raise "Parameter value for 'host_endpoint_protection_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_endpoint_protection_scan_result_id)

  path = '/hostEndpointProtectionScanResults/{hostEndpointProtectionScanResultId}/actions/changeCompartment'.sub('{hostEndpointProtectionScanResultId}', host_endpoint_protection_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_host_endpoint_protection_scan_result_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_host_endpoint_protection_scan_result_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_host_port_scan_result_compartment(host_port_scan_result_id, change_host_port_scan_result_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_host_port_scan_result_compartment API.

Moves a HostPortScanResult into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 551

def change_host_port_scan_result_compartment(host_port_scan_result_id, change_host_port_scan_result_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_host_port_scan_result_compartment.' if logger

  raise "Missing the required parameter 'host_port_scan_result_id' when calling change_host_port_scan_result_compartment." if host_port_scan_result_id.nil?
  raise "Missing the required parameter 'change_host_port_scan_result_compartment_details' when calling change_host_port_scan_result_compartment." if change_host_port_scan_result_compartment_details.nil?
  raise "Parameter value for 'host_port_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_port_scan_result_id)

  path = '/hostPortScanResults/{hostPortScanResultId}/actions/changeCompartment'.sub('{hostPortScanResultId}', host_port_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_host_port_scan_result_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_host_port_scan_result_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_host_scan_recipe_compartment(host_scan_recipe_id, change_host_scan_recipe_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_host_scan_recipe_compartment API.

Moves a HostScanRecipe into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 622

def change_host_scan_recipe_compartment(host_scan_recipe_id, change_host_scan_recipe_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_host_scan_recipe_compartment.' if logger

  raise "Missing the required parameter 'host_scan_recipe_id' when calling change_host_scan_recipe_compartment." if host_scan_recipe_id.nil?
  raise "Missing the required parameter 'change_host_scan_recipe_compartment_details' when calling change_host_scan_recipe_compartment." if change_host_scan_recipe_compartment_details.nil?
  raise "Parameter value for 'host_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_recipe_id)

  path = '/hostScanRecipes/{hostScanRecipeId}/actions/changeCompartment'.sub('{hostScanRecipeId}', host_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_host_scan_recipe_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_host_scan_recipe_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#change_host_scan_target_compartment(host_scan_target_id, change_host_scan_target_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_host_scan_target_compartment API.

Moves a HostScanTarget into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 693

def change_host_scan_target_compartment(host_scan_target_id, change_host_scan_target_compartment_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#change_host_scan_target_compartment.' if logger

  raise "Missing the required parameter 'host_scan_target_id' when calling change_host_scan_target_compartment." if host_scan_target_id.nil?
  raise "Missing the required parameter 'change_host_scan_target_compartment_details' when calling change_host_scan_target_compartment." if change_host_scan_target_compartment_details.nil?
  raise "Parameter value for 'host_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_target_id)

  path = '/hostScanTargets/{hostScanTargetId}/actions/changeCompartment'.sub('{hostScanTargetId}', host_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_host_scan_target_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#change_host_scan_target_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_container_scan_recipe(create_container_scan_recipe_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_container_scan_recipe API.

Creates a new ContainerScanRecipe. A recipe determines the types of security issues that you want scanned.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 757

def create_container_scan_recipe(create_container_scan_recipe_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#create_container_scan_recipe.' if logger

  raise "Missing the required parameter 'create_container_scan_recipe_details' when calling create_container_scan_recipe." if create_container_scan_recipe_details.nil?

  path = '/containerScanRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_container_scan_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#create_container_scan_recipe') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_container_scan_target(create_container_scan_target_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_container_scan_target API.

Creates a new ContainerScanTarget. A container scan target specifies a group of one or more Docker image repositories in Oracle Cloud Infrastructure Registry (OCIR) that you want routinely scanned for security vulnerabilities.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 819

def create_container_scan_target(create_container_scan_target_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#create_container_scan_target.' if logger

  raise "Missing the required parameter 'create_container_scan_target_details' when calling create_container_scan_target." if create_container_scan_target_details.nil?

  path = '/containerScanTargets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_container_scan_target_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#create_container_scan_target') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanTarget'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_host_scan_recipe(create_host_scan_recipe_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_host_scan_recipe API.

Creates a new HostScanRecipe. A recipe determines the types of security issues that you want scanned, and how often to scan.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 881

def create_host_scan_recipe(create_host_scan_recipe_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#create_host_scan_recipe.' if logger

  raise "Missing the required parameter 'create_host_scan_recipe_details' when calling create_host_scan_recipe." if create_host_scan_recipe_details.nil?

  path = '/hostScanRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_host_scan_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#create_host_scan_recipe') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_host_scan_target(create_host_scan_target_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_host_scan_target API.

Creates a new HostScanTarget. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 943

def create_host_scan_target(create_host_scan_target_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#create_host_scan_target.' if logger

  raise "Missing the required parameter 'create_host_scan_target_details' when calling create_host_scan_target." if create_host_scan_target_details.nil?

  path = '/hostScanTargets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_host_scan_target_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#create_host_scan_target') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanTarget'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_container_scan_recipe(container_scan_recipe_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_container_scan_recipe API.

Deletes the ContainerScanRecipe identified by the recipe ID.

Parameters:

  • container_scan_recipe_id (String)

    unique ContainerScanRecipe identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1005

def delete_container_scan_recipe(container_scan_recipe_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_container_scan_recipe.' if logger

  raise "Missing the required parameter 'container_scan_recipe_id' when calling delete_container_scan_recipe." if container_scan_recipe_id.nil?
  raise "Parameter value for 'container_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_recipe_id)

  path = '/containerScanRecipes/{containerScanRecipeId}'.sub('{containerScanRecipeId}', container_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_container_scan_recipe') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_container_scan_result(container_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_container_scan_result API.

Deletes the ContainerScanResult identified by the container scan ID.

Parameters:

  • container_scan_result_id (String)

    unique container scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1066

def delete_container_scan_result(container_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_container_scan_result.' if logger

  raise "Missing the required parameter 'container_scan_result_id' when calling delete_container_scan_result." if container_scan_result_id.nil?
  raise "Parameter value for 'container_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_result_id)

  path = '/containerScanResults/{containerScanResultId}'.sub('{containerScanResultId}', container_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_container_scan_result') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_container_scan_target(container_scan_target_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_container_scan_target API.

Deletes the ContainerScanTarget identified by the target ID.

Parameters:

  • container_scan_target_id (String)

    unique ContainerScanTarget identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1127

def delete_container_scan_target(container_scan_target_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_container_scan_target.' if logger

  raise "Missing the required parameter 'container_scan_target_id' when calling delete_container_scan_target." if container_scan_target_id.nil?
  raise "Parameter value for 'container_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_target_id)

  path = '/containerScanTargets/{containerScanTargetId}'.sub('{containerScanTargetId}', container_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_container_scan_target') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_host_agent_scan_result(host_agent_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_host_agent_scan_result API.

Deletes the HostAgentScanResult identified by the host agent scan ID.

Parameters:

  • host_agent_scan_result_id (String)

    unique host agent scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1188

def delete_host_agent_scan_result(host_agent_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_host_agent_scan_result.' if logger

  raise "Missing the required parameter 'host_agent_scan_result_id' when calling delete_host_agent_scan_result." if host_agent_scan_result_id.nil?
  raise "Parameter value for 'host_agent_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_agent_scan_result_id)

  path = '/hostAgentScanResults/{hostAgentScanResultId}'.sub('{hostAgentScanResultId}', host_agent_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_host_agent_scan_result') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_host_cis_benchmark_scan_result(host_cis_benchmark_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_host_cis_benchmark_scan_result API.

Deletes the HostCisBenchmarkScanResult identified by the benchmark scan result ID.

Parameters:

  • host_cis_benchmark_scan_result_id (String)

    unique host Cis benchmark scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1249

def delete_host_cis_benchmark_scan_result(host_cis_benchmark_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_host_cis_benchmark_scan_result.' if logger

  raise "Missing the required parameter 'host_cis_benchmark_scan_result_id' when calling delete_host_cis_benchmark_scan_result." if host_cis_benchmark_scan_result_id.nil?
  raise "Parameter value for 'host_cis_benchmark_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_cis_benchmark_scan_result_id)

  path = '/hostCisBenchmarkScanResults/{hostCisBenchmarkScanResultId}'.sub('{hostCisBenchmarkScanResultId}', host_cis_benchmark_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_host_cis_benchmark_scan_result') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_host_endpoint_protection_scan_result(host_endpoint_protection_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_host_endpoint_protection_scan_result API.

Deletes the HostEndpointProtectionScanResult identified by the id

Parameters:

  • host_endpoint_protection_scan_result_id (String)

    unique host endpoint protection scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1310

def delete_host_endpoint_protection_scan_result(host_endpoint_protection_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_host_endpoint_protection_scan_result.' if logger

  raise "Missing the required parameter 'host_endpoint_protection_scan_result_id' when calling delete_host_endpoint_protection_scan_result." if host_endpoint_protection_scan_result_id.nil?
  raise "Parameter value for 'host_endpoint_protection_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_endpoint_protection_scan_result_id)

  path = '/hostEndpointProtectionScanResults/{hostEndpointProtectionScanResultId}'.sub('{hostEndpointProtectionScanResultId}', host_endpoint_protection_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_host_endpoint_protection_scan_result') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_host_port_scan_result(host_port_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_host_port_scan_result API.

Deletes the HostPortScanResult identified by the host port scan ID.

Parameters:

  • host_port_scan_result_id (String)

    unique host port scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1371

def delete_host_port_scan_result(host_port_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_host_port_scan_result.' if logger

  raise "Missing the required parameter 'host_port_scan_result_id' when calling delete_host_port_scan_result." if host_port_scan_result_id.nil?
  raise "Parameter value for 'host_port_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_port_scan_result_id)

  path = '/hostPortScanResults/{hostPortScanResultId}'.sub('{hostPortScanResultId}', host_port_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_host_port_scan_result') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_host_scan_recipe(host_scan_recipe_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_host_scan_recipe API.

Deletes the HostScanRecipe identified by the recipe ID.

Parameters:

  • host_scan_recipe_id (String)

    unique HostScanRecipe identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1432

def delete_host_scan_recipe(host_scan_recipe_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_host_scan_recipe.' if logger

  raise "Missing the required parameter 'host_scan_recipe_id' when calling delete_host_scan_recipe." if host_scan_recipe_id.nil?
  raise "Parameter value for 'host_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_recipe_id)

  path = '/hostScanRecipes/{hostScanRecipeId}'.sub('{hostScanRecipeId}', host_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_host_scan_recipe') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_host_scan_target(host_scan_target_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_host_scan_target API.

Deletes the HostScanTarget identified by the target ID.

Parameters:

  • host_scan_target_id (String)

    unique HostScanTarget identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1493

def delete_host_scan_target(host_scan_target_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#delete_host_scan_target.' if logger

  raise "Missing the required parameter 'host_scan_target_id' when calling delete_host_scan_target." if host_scan_target_id.nil?
  raise "Parameter value for 'host_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_target_id)

  path = '/hostScanTargets/{hostScanTargetId}'.sub('{hostScanTargetId}', host_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#delete_host_scan_target') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#export_host_agent_scan_result_csv(export_host_agent_scan_result_csv_details, opts = {}, &block) ⇒ Response

Note:

Click here to see an example of how to use export_host_agent_scan_result_csv API.

Exports a list of HostAgentScanResultSummary objects within a compartment and during a specified time range in CSV format. You can filter the results by problem severity.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1550

def export_host_agent_scan_result_csv(export_host_agent_scan_result_csv_details, opts = {}, &block)
  logger.debug 'Calling operation VulnerabilityScanningClient#export_host_agent_scan_result_csv.' if logger

  raise "Missing the required parameter 'export_host_agent_scan_result_csv_details' when calling export_host_agent_scan_result_csv." if export_host_agent_scan_result_csv_details.nil?

  path = '/hostAgentScanResults/actions/exportCsv'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'text/csv'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(export_host_agent_scan_result_csv_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#export_host_agent_scan_result_csv') do
    if !block.nil?
      @api_client.call_api(
        :POST,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @api_client.call_api(
            :POST,
            path,
            endpoint,
            header_params: header_params,
            query_params: query_params,
            operation_signing_strategy: operation_signing_strategy,
            body: post_body,
            return_type: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @api_client.call_api(
        :POST,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end

#export_host_vulnerability_csv(export_host_vulnerability_csv_details, opts = {}, &block) ⇒ Response

Note:

Click here to see an example of how to use export_host_vulnerability_csv API.

Exports a list of HostVulnerabilitySummary objects in a compartment in CSV format.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1650

def export_host_vulnerability_csv(export_host_vulnerability_csv_details, opts = {}, &block)
  logger.debug 'Calling operation VulnerabilityScanningClient#export_host_vulnerability_csv.' if logger

  raise "Missing the required parameter 'export_host_vulnerability_csv_details' when calling export_host_vulnerability_csv." if export_host_vulnerability_csv_details.nil?

  path = '/hostVulnerabilities/actions/exportCsv'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'text/csv'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(export_host_vulnerability_csv_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#export_host_vulnerability_csv') do
    if !block.nil?
      @api_client.call_api(
        :POST,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @api_client.call_api(
            :POST,
            path,
            endpoint,
            header_params: header_params,
            query_params: query_params,
            operation_signing_strategy: operation_signing_strategy,
            body: post_body,
            return_type: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @api_client.call_api(
        :POST,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end

#get_container_scan_recipe(container_scan_recipe_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_container_scan_recipe API.

Retrieves a ContainerScanRecipe identified by the recipe ID. A recipe determines the types of security issues that you want scanned.

Parameters:

  • container_scan_recipe_id (String)

    unique ContainerScanRecipe identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1748

def get_container_scan_recipe(container_scan_recipe_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_container_scan_recipe.' if logger

  raise "Missing the required parameter 'container_scan_recipe_id' when calling get_container_scan_recipe." if container_scan_recipe_id.nil?
  raise "Parameter value for 'container_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_recipe_id)

  path = '/containerScanRecipes/{containerScanRecipeId}'.sub('{containerScanRecipeId}', container_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_container_scan_recipe') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_container_scan_result(container_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_container_scan_result API.

Retrieves a ContainerScanResult identified by the container scan ID. The result includes a list of problems found in a specific image in a Docker repository.

Parameters:

  • container_scan_result_id (String)

    unique container scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1803

def get_container_scan_result(container_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_container_scan_result.' if logger

  raise "Missing the required parameter 'container_scan_result_id' when calling get_container_scan_result." if container_scan_result_id.nil?
  raise "Parameter value for 'container_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_result_id)

  path = '/containerScanResults/{containerScanResultId}'.sub('{containerScanResultId}', container_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_container_scan_result') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanResult'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_container_scan_target(container_scan_target_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_container_scan_target API.

Gets a ContainerScanTarget identified by the target ID. A container scan target specifies a group of one or more Docker image repositories in Oracle Cloud Infrastructure Registry (OCIR) that you want routinely scanned for security vulnerabilities.

Parameters:

  • container_scan_target_id (String)

    unique ContainerScanTarget identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1858

def get_container_scan_target(container_scan_target_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_container_scan_target.' if logger

  raise "Missing the required parameter 'container_scan_target_id' when calling get_container_scan_target." if container_scan_target_id.nil?
  raise "Parameter value for 'container_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_target_id)

  path = '/containerScanTargets/{containerScanTargetId}'.sub('{containerScanTargetId}', container_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_container_scan_target') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanTarget'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_agent_scan_result(host_agent_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_agent_scan_result API.

Retrieves a HostAgentScanResult identified by the host agent scan ID. The result includes a list of CVEs detected in a specific compute instance.

Parameters:

  • host_agent_scan_result_id (String)

    unique host agent scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1913

def get_host_agent_scan_result(host_agent_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_agent_scan_result.' if logger

  raise "Missing the required parameter 'host_agent_scan_result_id' when calling get_host_agent_scan_result." if host_agent_scan_result_id.nil?
  raise "Parameter value for 'host_agent_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_agent_scan_result_id)

  path = '/hostAgentScanResults/{hostAgentScanResultId}'.sub('{hostAgentScanResultId}', host_agent_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_agent_scan_result') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostAgentScanResult'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_cis_benchmark_scan_result(host_cis_benchmark_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_cis_benchmark_scan_result API.

Retrieves a HostCisBenchmarkScanResult identified by the benchmark scan result ID. A CIS (Center for Internet Security) benchmark scan result includes a list of benchmarks that were tested on a specific compute instance, and whether each test passed or failed.

Parameters:

  • host_cis_benchmark_scan_result_id (String)

    unique host Cis benchmark scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 1968

def get_host_cis_benchmark_scan_result(host_cis_benchmark_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_cis_benchmark_scan_result.' if logger

  raise "Missing the required parameter 'host_cis_benchmark_scan_result_id' when calling get_host_cis_benchmark_scan_result." if host_cis_benchmark_scan_result_id.nil?
  raise "Parameter value for 'host_cis_benchmark_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_cis_benchmark_scan_result_id)

  path = '/hostCisBenchmarkScanResults/{hostCisBenchmarkScanResultId}'.sub('{hostCisBenchmarkScanResultId}', host_cis_benchmark_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_cis_benchmark_scan_result') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostCisBenchmarkScanResult'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_endpoint_protection_scan_result(host_endpoint_protection_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_endpoint_protection_scan_result API.

Returns HostEndpointProtectionScanResults for the given host endpoint protection scan result ID.

Parameters:

  • host_endpoint_protection_scan_result_id (String)

    unique host endpoint protection scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2023

def get_host_endpoint_protection_scan_result(host_endpoint_protection_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_endpoint_protection_scan_result.' if logger

  raise "Missing the required parameter 'host_endpoint_protection_scan_result_id' when calling get_host_endpoint_protection_scan_result." if host_endpoint_protection_scan_result_id.nil?
  raise "Parameter value for 'host_endpoint_protection_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_endpoint_protection_scan_result_id)

  path = '/hostEndpointProtectionScanResults/{hostEndpointProtectionScanResultId}'.sub('{hostEndpointProtectionScanResultId}', host_endpoint_protection_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_endpoint_protection_scan_result') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostEndpointProtectionScanResult'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_port_scan_result(host_port_scan_result_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_port_scan_result API.

Retrieves a HostPortScanResult identified by the host port scan ID. The result includes a list of open ports that were detected in a specific compute instance.

Parameters:

  • host_port_scan_result_id (String)

    unique host port scan identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2078

def get_host_port_scan_result(host_port_scan_result_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_port_scan_result.' if logger

  raise "Missing the required parameter 'host_port_scan_result_id' when calling get_host_port_scan_result." if host_port_scan_result_id.nil?
  raise "Parameter value for 'host_port_scan_result_id' must not be blank" if OCI::Internal::Util.blank_string?(host_port_scan_result_id)

  path = '/hostPortScanResults/{hostPortScanResultId}'.sub('{hostPortScanResultId}', host_port_scan_result_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_port_scan_result') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostPortScanResult'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_scan_recipe(host_scan_recipe_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_scan_recipe API.

Retrieves a HostScanRecipe identified by the recipe ID. A recipe determines the types of security issues that you want scanned, and how often to scan.

Parameters:

  • host_scan_recipe_id (String)

    unique HostScanRecipe identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2133

def get_host_scan_recipe(host_scan_recipe_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_scan_recipe.' if logger

  raise "Missing the required parameter 'host_scan_recipe_id' when calling get_host_scan_recipe." if host_scan_recipe_id.nil?
  raise "Parameter value for 'host_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_recipe_id)

  path = '/hostScanRecipes/{hostScanRecipeId}'.sub('{hostScanRecipeId}', host_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_scan_recipe') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanRecipe'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_scan_target(host_scan_target_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_scan_target API.

Retrieves a HostScanTarget identified by the target ID. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.

Parameters:

  • host_scan_target_id (String)

    unique HostScanTarget identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2188

def get_host_scan_target(host_scan_target_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_scan_target.' if logger

  raise "Missing the required parameter 'host_scan_target_id' when calling get_host_scan_target." if host_scan_target_id.nil?
  raise "Parameter value for 'host_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_target_id)

  path = '/hostScanTargets/{hostScanTargetId}'.sub('{hostScanTargetId}', host_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_scan_target') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanTarget'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_host_vulnerability(host_vulnerability_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_host_vulnerability API.

Retrieves a HostVulnerability identified by the host vulnerability ID. A host vulnerability describes a security issue that was detected in scans of one or more compute instances. Common Vulnerabilities and Exposures (CVE) numbers identify security vulnerabilities for operating systems and other software, including Critical Patch Updates and Security Alert advisories.

Parameters:

  • host_vulnerability_id (String)

    unique host scan vulnerability identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2243

def get_host_vulnerability(host_vulnerability_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_host_vulnerability.' if logger

  raise "Missing the required parameter 'host_vulnerability_id' when calling get_host_vulnerability." if host_vulnerability_id.nil?
  raise "Parameter value for 'host_vulnerability_id' must not be blank" if OCI::Internal::Util.blank_string?(host_vulnerability_id)

  path = '/hostVulnerabilities/{hostVulnerabilityId}'.sub('{hostVulnerabilityId}', host_vulnerability_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_host_vulnerability') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostVulnerability'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_vulnerability(vulnerability_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_vulnerability API.

Retrieves a Vulnerability identified by the vulnerability ID. A vulnerability describes a security issue that was detected in scans of one or more compute instances, container scan repositories. Common Vulnerabilities and Exposures (CVE) numbers identify security vulnerabilities for operating systems and other software, including Critical Patch Updates and Security Alert advisories.

Parameters:

  • vulnerability_id (String)

    unique vulnerability identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2298

def get_vulnerability(vulnerability_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_vulnerability.' if logger

  raise "Missing the required parameter 'vulnerability_id' when calling get_vulnerability." if vulnerability_id.nil?
  raise "Parameter value for 'vulnerability_id' must not be blank" if OCI::Internal::Util.blank_string?(vulnerability_id)

  path = '/vulnerabilities/{vulnerabilityId}'.sub('{vulnerabilityId}', vulnerability_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_vulnerability') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::Vulnerability'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_work_request API.

Gets the status of the work request with the given ID.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2353

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_container_scan_recipes(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_container_scan_recipes API.

Retrieves a list of ContainerScanRecipeSummary objects in a compartment. A recipe determines the types of security issues that you want scanned.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to return only resources whose lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2415

def list_container_scan_recipes(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_container_scan_recipes.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_container_scan_recipes." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.'
  end

  path = '/containerScanRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_container_scan_recipes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanRecipeSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_container_scan_results(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_container_scan_results API.

Retrieves a list of ContainerScanResultSummary objects in a compartment. You can filter and sort the results by problem severity and time. A container scan result includes a list of problems detected in a specific image in a Docker repository.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :repository (String)

    Repository name

  • :image (String)

    Image name

  • :are_subcompartments_included (BOOLEAN)

    When listing with one or more filters, whether to include subcompartments for the compartmentId being listed for. Does nothing if no filters are present in the query.

  • :highest_problem_severity (String)

    Parameter to filter by highestProblemSeverity for scan results

  • :time_started_greater_than_or_equal_to (DateTime)

    Date and time on or after which scans were started, as described in RFC 3339

  • :time_started_less_than_or_equal_to (DateTime)

    Date and time on or before which scans were started, as described in RFC 3339

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is descending. If no value is specified timeStarted is default. (default to timeStarted)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :is_latest_only (BOOLEAN)

    A flag to return only the latest scan result of an instance. (default to false)

Returns:



2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2500

def list_container_scan_results(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_container_scan_results.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_container_scan_results." if compartment_id.nil?

  if opts[:highest_problem_severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:highest_problem_severity])
    raise 'Invalid value for "highest_problem_severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::CONTAINER_SCAN_RESULT_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::CONTAINER_SCAN_RESULT_SORT_BY_ENUM.'
  end

  path = '/containerScanResults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:repository] = opts[:repository] if opts[:repository]
  query_params[:image] = opts[:image] if opts[:image]
  query_params[:areSubcompartmentsIncluded] = opts[:are_subcompartments_included] if !opts[:are_subcompartments_included].nil?
  query_params[:highestProblemSeverity] = opts[:highest_problem_severity] if opts[:highest_problem_severity]
  query_params[:timeStartedGreaterThanOrEqualTo] = opts[:time_started_greater_than_or_equal_to] if opts[:time_started_greater_than_or_equal_to]
  query_params[:timeStartedLessThanOrEqualTo] = opts[:time_started_less_than_or_equal_to] if opts[:time_started_less_than_or_equal_to]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:isLatestOnly] = opts[:is_latest_only] if !opts[:is_latest_only].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_container_scan_results') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanResultSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_container_scan_targets(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_container_scan_targets API.

Retrieves a list of ContainerScanTargetSummary objects in a compartment. A container scan target specifies a group of one or more Docker image repositories in Oracle Cloud Infrastructure Registry (OCIR) that you want routinely scanned for security vulnerabilities.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to return only resources whose lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2585

def list_container_scan_targets(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_container_scan_targets.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_container_scan_targets." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.'
  end

  path = '/containerScanTargets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_container_scan_targets') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::ContainerScanTargetSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_agent_scan_results(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_agent_scan_results API.

Retrieves a list of HostAgentScanResultSummary objects in a compartment. You can filter and sort the results by problem severity and time. An agent scan result includes a list of CVEs detected in a specific compute instance.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :instance_id (String)

    The ID of a compute instance

  • :highest_problem_severity (String)

    Parameter to filter by highestProblemSeverity for scan results

  • :operating_system (String)

    Parameter to filter by operating system for scan results

  • :time_started_greater_than_or_equal_to (DateTime)

    Date and time on or after which scans were started, as described in RFC 3339

  • :time_started_less_than_or_equal_to (DateTime)

    Date and time on or before which scans were started, as described in RFC 3339

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is descending. If no value is specified timeStarted is default. (default to timeStarted)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :is_latest_only (BOOLEAN)

    A flag to return only the latest scan result of an instance. (default to false)

Returns:



2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2670

def list_host_agent_scan_results(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_agent_scan_results.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_agent_scan_results." if compartment_id.nil?

  if opts[:highest_problem_severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:highest_problem_severity])
    raise 'Invalid value for "highest_problem_severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::HOST_AGENT_SCAN_RESULT_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::HOST_AGENT_SCAN_RESULT_SORT_BY_ENUM.'
  end

  path = '/hostAgentScanResults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:instanceId] = opts[:instance_id] if opts[:instance_id]
  query_params[:highestProblemSeverity] = opts[:highest_problem_severity] if opts[:highest_problem_severity]
  query_params[:operatingSystem] = opts[:operating_system] if opts[:operating_system]
  query_params[:timeStartedGreaterThanOrEqualTo] = opts[:time_started_greater_than_or_equal_to] if opts[:time_started_greater_than_or_equal_to]
  query_params[:timeStartedLessThanOrEqualTo] = opts[:time_started_less_than_or_equal_to] if opts[:time_started_less_than_or_equal_to]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:isLatestOnly] = opts[:is_latest_only] if !opts[:is_latest_only].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_agent_scan_results') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostAgentScanResultSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_cis_benchmark_scan_results(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_cis_benchmark_scan_results API.

Retrieves a list of HostCisBenchmarkScanResultSummary objects in a compartment. You can filter and sort the results by problem severity and time. A CIS (Center for Internet Security) benchmark scan result includes the number of failed benchmark tests on a specific compute instance.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :instance_id (String)

    The ID of a compute instance

  • :highest_problem_severity (String)

    Parameter to filter by highestProblemSeverity for scan results

  • :time_started_greater_than_or_equal_to (DateTime)

    Date and time on or after which scans were started, as described in RFC 3339

  • :time_started_less_than_or_equal_to (DateTime)

    Date and time on or before which scans were started, as described in RFC 3339

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is descending. If no value is specified timeFinished is default. (default to timeFinished)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :is_latest_only (BOOLEAN)

    A flag to return only the latest scan result of an instance. (default to false)

Returns:



2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2759

def list_host_cis_benchmark_scan_results(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_cis_benchmark_scan_results.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_cis_benchmark_scan_results." if compartment_id.nil?

  if opts[:highest_problem_severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:highest_problem_severity])
    raise 'Invalid value for "highest_problem_severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::HOST_CIS_BENCHMARK_SCAN_RESULT_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::HOST_CIS_BENCHMARK_SCAN_RESULT_SORT_BY_ENUM.'
  end

  path = '/hostCisBenchmarkScanResults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:instanceId] = opts[:instance_id] if opts[:instance_id]
  query_params[:highestProblemSeverity] = opts[:highest_problem_severity] if opts[:highest_problem_severity]
  query_params[:timeStartedGreaterThanOrEqualTo] = opts[:time_started_greater_than_or_equal_to] if opts[:time_started_greater_than_or_equal_to]
  query_params[:timeStartedLessThanOrEqualTo] = opts[:time_started_less_than_or_equal_to] if opts[:time_started_less_than_or_equal_to]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:isLatestOnly] = opts[:is_latest_only] if !opts[:is_latest_only].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_cis_benchmark_scan_results') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostCisBenchmarkScanResultSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_endpoint_protection_scan_results(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_endpoint_protection_scan_results API.

Returns a collection of HostEndpointProtectionScanResultSummary objects

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :instance_id (String)

    The ID of a compute instance

  • :highest_problem_severity (String)

    Parameter to filter by highestProblemSeverity for scan results

  • :time_started_greater_than_or_equal_to (DateTime)

    Date and time on or after which scans were started, as described in RFC 3339

  • :time_started_less_than_or_equal_to (DateTime)

    Date and time on or before which scans were started, as described in RFC 3339

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is descending. If no value is specified timeFinished is default. (default to timeFinished)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :is_latest_only (BOOLEAN)

    A flag to return only the latest scan result of an instance. (default to false)

Returns:



2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2847

def list_host_endpoint_protection_scan_results(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_endpoint_protection_scan_results.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_endpoint_protection_scan_results." if compartment_id.nil?

  if opts[:highest_problem_severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:highest_problem_severity])
    raise 'Invalid value for "highest_problem_severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::HOST_ENDPOINT_PROTECTION_SCAN_RESULT_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::HOST_ENDPOINT_PROTECTION_SCAN_RESULT_SORT_BY_ENUM.'
  end

  path = '/hostEndpointProtectionScanResults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:instanceId] = opts[:instance_id] if opts[:instance_id]
  query_params[:highestProblemSeverity] = opts[:highest_problem_severity] if opts[:highest_problem_severity]
  query_params[:timeStartedGreaterThanOrEqualTo] = opts[:time_started_greater_than_or_equal_to] if opts[:time_started_greater_than_or_equal_to]
  query_params[:timeStartedLessThanOrEqualTo] = opts[:time_started_less_than_or_equal_to] if opts[:time_started_less_than_or_equal_to]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:isLatestOnly] = opts[:is_latest_only] if !opts[:is_latest_only].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_endpoint_protection_scan_results') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostEndpointProtectionScanResultSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_port_scan_results(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_port_scan_results API.

Retrieves a list of HostPortScanResultSummary objects in a compartment. You can filter and sort the results by problem severity and time. A port scan result includes a list of open ports that were detected in a specific compute instance.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :instance_id (String)

    The ID of a compute instance

  • :highest_problem_severity (String)

    Parameter to filter by highestProblemSeverity for scan results

  • :time_started_greater_than_or_equal_to (DateTime)

    Date and time on or after which scans were started, as described in RFC 3339

  • :time_started_less_than_or_equal_to (DateTime)

    Date and time on or before which scans were started, as described in RFC 3339

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is descending. If no value is specified timeFinished is default. (default to timeFinished)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :is_latest_only (BOOLEAN)

    A flag to return only the latest scan result of an instance. (default to false)

Returns:



2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 2935

def list_host_port_scan_results(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_port_scan_results.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_port_scan_results." if compartment_id.nil?

  if opts[:highest_problem_severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:highest_problem_severity])
    raise 'Invalid value for "highest_problem_severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::HOST_PORT_SCAN_RESULT_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::HOST_PORT_SCAN_RESULT_SORT_BY_ENUM.'
  end

  path = '/hostPortScanResults'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:instanceId] = opts[:instance_id] if opts[:instance_id]
  query_params[:highestProblemSeverity] = opts[:highest_problem_severity] if opts[:highest_problem_severity]
  query_params[:timeStartedGreaterThanOrEqualTo] = opts[:time_started_greater_than_or_equal_to] if opts[:time_started_greater_than_or_equal_to]
  query_params[:timeStartedLessThanOrEqualTo] = opts[:time_started_less_than_or_equal_to] if opts[:time_started_less_than_or_equal_to]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:isLatestOnly] = opts[:is_latest_only] if !opts[:is_latest_only].nil?

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_port_scan_results') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostPortScanResultSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_scan_recipes(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_scan_recipes API.

Retrieves a list of HostScanRecipeSummary objects in a compartment. A recipe determines the types of security issues that you want scanned, and how often to scan.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to return only resources whose lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3019

def list_host_scan_recipes(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_scan_recipes.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_scan_recipes." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.'
  end

  path = '/hostScanRecipes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_scan_recipes') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanRecipeSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_scan_target_errors(compartment_id, host_scan_target_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_scan_target_errors API.

Retrieves list of errors during scanning on instances associated with HostScanTarget identified by the target ID. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • host_scan_target_id (String)

    unique HostScanTarget identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to return only resources whose lifecycleState matches the given lifecycleState.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeUpdated is descending. If no value is specified timeUpdated is default. (default to timeUpdated)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3099

def list_host_scan_target_errors(compartment_id, host_scan_target_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_scan_target_errors.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_scan_target_errors." if compartment_id.nil?
  raise "Missing the required parameter 'host_scan_target_id' when calling list_host_scan_target_errors." if host_scan_target_id.nil?

  if opts[:lifecycle_state] && !OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::SORT_BY_TIME_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_BY_TIME_ENUM.'
  end
  raise "Parameter value for 'host_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_target_id)

  path = '/hostScanTargets/{hostScanTargetId}/errors'.sub('{hostScanTargetId}', host_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_scan_target_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanTargetErrorSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_scan_targets(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_scan_targets API.

Retrieves a list of HostScanTargetSummary objects in a compartment. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :lifecycle_state (String)

    A filter to return only resources whose lifecycleState matches the given lifecycleState.

  • :display_name (String)

    A filter to return only resources that match the entire display name given.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. Default order for displayName is ascending. If no value is specified timeCreated is default. (default to timeCreated)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3180

def list_host_scan_targets(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_scan_targets.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_scan_targets." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::VulnerabilityScanning::Models::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_BY_ENUM.'
  end

  path = '/hostScanTargets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_scan_targets') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostScanTargetSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_vulnerabilities(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_vulnerabilities API.

Retrieves a list of HostVulnerabilitySummary objects in a compartment. You can filter and sort the vulnerabilities by problem severity and time. A host vulnerability describes a security issue that was detected in scans of one or more compute instances.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :severity (String)

    A filter to return only resources that have a severity that matches the given severity

  • :name (String)

    A filter to return only resources that match the entire name given.

  • :cve_reference (String)

    Parameter to filter by CVE reference number for vulnerabilities

  • :vulnerability_type (String)

    The field to filter vulnerabilities based on its type. Only one value can be provided.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for 'name' is Ascending. Default order for other values is descending. If no value is specified name is default. (default to name)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3263

def list_host_vulnerabilities(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_vulnerabilities.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_host_vulnerabilities." if compartment_id.nil?

  if opts[:severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:severity])
    raise 'Invalid value for "severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:vulnerability_type] && !OCI::VulnerabilityScanning::Models::VULNERABILITY_TYPE_ENUM.include?(opts[:vulnerability_type])
    raise 'Invalid value for "vulnerability_type", must be one of the values in OCI::VulnerabilityScanning::Models::VULNERABILITY_TYPE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::HOST_VULNERABILITY_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::HOST_VULNERABILITY_SORT_BY_ENUM.'
  end

  path = '/hostVulnerabilities'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:severity] = opts[:severity] if opts[:severity]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:cveReference] = opts[:cve_reference] if opts[:cve_reference]
  query_params[:vulnerabilityType] = opts[:vulnerability_type] if opts[:vulnerability_type]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_vulnerabilities') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostVulnerabilitySummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_host_vulnerability_impacted_hosts(host_vulnerability_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_host_vulnerability_impacted_hosts API.

Retrieves a list of HostVulnerabilityImpactedHostSummary objects for a specific host vulnerability ID. An impacted host summary identifies a compute instance on which the specified vulnerability was detected.

Parameters:

  • host_vulnerability_id (String)

    unique host scan vulnerability identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is Ascending. If no value is specified instanceId is default. (default to instanceId)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3347

def list_host_vulnerability_impacted_hosts(host_vulnerability_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_host_vulnerability_impacted_hosts.' if logger

  raise "Missing the required parameter 'host_vulnerability_id' when calling list_host_vulnerability_impacted_hosts." if host_vulnerability_id.nil?

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::IMPACTED_HOST_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::IMPACTED_HOST_SORT_BY_ENUM.'
  end
  raise "Parameter value for 'host_vulnerability_id' must not be blank" if OCI::Internal::Util.blank_string?(host_vulnerability_id)

  path = '/hostVulnerabilities/{hostVulnerabilityId}/impactedHosts'.sub('{hostVulnerabilityId}', host_vulnerability_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_host_vulnerability_impacted_hosts') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::HostVulnerabilityImpactedHostSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_vulnerabilities(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_vulnerabilities API.

Retrieves a list of VulnerabilitySummary objects in a compartment. You can filter and sort the vulnerabilities by problem severity and time and type. A vulnerability describes a security issue that was detected in scans of one or more compute instances, container images.

Allowed values are: name, severity, firstDetected, lastDetected, impactedHosts, impactedContainers, impactedResources

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :severity (String)

    A filter to return only resources that have a severity that matches the given severity

  • :name (String)

    A filter to return only resources that match the entire name given.

  • :vulnerability_reference (String)

    Parameter to filter the vulnerability type's unique identifier. For CVE, this is the MITRE CVE ID

  • :vulnerability_type (String)

    The field to filter vulnerabilities based on its type. Only one value can be provided.

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order for 'name' is Ascending. Default order for other values is descending. If no value is specified name is default. (default to lastDetected)

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3425

def list_vulnerabilities(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_vulnerabilities.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_vulnerabilities." if compartment_id.nil?

  if opts[:severity] && !OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.include?(opts[:severity])
    raise 'Invalid value for "severity", must be one of the values in OCI::VulnerabilityScanning::Models::SCAN_RESULT_PROBLEM_SEVERITY_ENUM.'
  end

  if opts[:vulnerability_type] && !OCI::VulnerabilityScanning::Models::VULNERABILITY_TYPE_ENUM.include?(opts[:vulnerability_type])
    raise 'Invalid value for "vulnerability_type", must be one of the values in OCI::VulnerabilityScanning::Models::VULNERABILITY_TYPE_ENUM.'
  end

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[name severity firstDetected lastDetected impactedHosts impactedContainers impactedResources].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of name, severity, firstDetected, lastDetected, impactedHosts, impactedContainers, impactedResources.'
  end

  path = '/vulnerabilities'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:severity] = opts[:severity] if opts[:severity]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:vulnerabilityReference] = opts[:vulnerability_reference] if opts[:vulnerability_reference]
  query_params[:vulnerabilityType] = opts[:vulnerability_type] if opts[:vulnerability_type]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_vulnerabilities') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::VulnerabilitySummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_vulnerability_impacted_containers(vulnerability_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_vulnerability_impacted_containers API.

Retrieves a list of VulnerabilityImpactedContainerSummary objects for a specific vulnerability ID. An impacted container image summary identifies container images on which the specified vulnerability was detected.

Allowed values are: image, repository, registry

Parameters:

  • vulnerability_id (String)

    unique vulnerability identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is Ascending. If no value is specified image name is default. (default to image)

Returns:



3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3510

def list_vulnerability_impacted_containers(vulnerability_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_vulnerability_impacted_containers.' if logger

  raise "Missing the required parameter 'vulnerability_id' when calling list_vulnerability_impacted_containers." if vulnerability_id.nil?

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[image repository registry].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of image, repository, registry.'
  end
  raise "Parameter value for 'vulnerability_id' must not be blank" if OCI::Internal::Util.blank_string?(vulnerability_id)

  path = '/vulnerabilities/{vulnerabilityId}/impactedContainers'.sub('{vulnerabilityId}', vulnerability_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_vulnerability_impacted_containers') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::VulnerabilityImpactedContainerSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_vulnerability_impacted_hosts(vulnerability_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_vulnerability_impacted_hosts API.

Retrieves a list of VulnerabilityImpactedHostSummary objects for a specific host vulnerability ID. An impacted host summary identifies a compute instance on which the specified vulnerability was detected.

Parameters:

  • vulnerability_id (String)

    unique vulnerability identifier

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :sort_order (String)

    The sort order to use, either 'ASC' or 'DESC'. (default to ASC)

  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Default order is Ascending. If no value is specified instanceId is default. (default to instanceId)

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:



3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3582

def list_vulnerability_impacted_hosts(vulnerability_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_vulnerability_impacted_hosts.' if logger

  raise "Missing the required parameter 'vulnerability_id' when calling list_vulnerability_impacted_hosts." if vulnerability_id.nil?

  if opts[:sort_order] && !OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::VulnerabilityScanning::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !OCI::VulnerabilityScanning::Models::IMPACTED_HOST_SORT_BY_ENUM.include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of the values in OCI::VulnerabilityScanning::Models::IMPACTED_HOST_SORT_BY_ENUM.'
  end
  raise "Parameter value for 'vulnerability_id' must not be blank" if OCI::Internal::Util.blank_string?(vulnerability_id)

  path = '/vulnerabilities/{vulnerabilityId}/impactedHosts'.sub('{vulnerabilityId}', vulnerability_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_vulnerability_impacted_hosts') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::VulnerabilityImpactedHostSummaryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_request_errors API.

Return a (paginated) list of errors for a given work request.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3651

def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_request_logs API.

Return a (paginated) list of logs for a given work request.

Parameters:

  • work_request_id (String)

    The ID of the asynchronous request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3710

def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_requests API.

Lists the work requests in a compartment.

Parameters:

  • compartment_id (String)

    The ID of the compartment in which to list resources.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :opc_request_id (String)

    The client request ID for tracing.

  • :page (String)

    The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call.

  • :limit (Integer)

    The maximum number of items to return. (default to 10)

Returns:



3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3769

def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::VulnerabilityScanning::Models::WorkRequestCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 94

def logger
  @api_client.config.logger
end

#update_container_scan_recipe(container_scan_recipe_id, update_container_scan_recipe_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_container_scan_recipe API.

Updates the ContainerScanRecipe identified by the recipe ID. A recipe determines the types of security issues that you want scanned.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3833

def update_container_scan_recipe(container_scan_recipe_id, update_container_scan_recipe_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#update_container_scan_recipe.' if logger

  raise "Missing the required parameter 'container_scan_recipe_id' when calling update_container_scan_recipe." if container_scan_recipe_id.nil?
  raise "Missing the required parameter 'update_container_scan_recipe_details' when calling update_container_scan_recipe." if update_container_scan_recipe_details.nil?
  raise "Parameter value for 'container_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_recipe_id)

  path = '/containerScanRecipes/{containerScanRecipeId}'.sub('{containerScanRecipeId}', container_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_container_scan_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#update_container_scan_recipe') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_container_scan_target(container_scan_target_id, update_container_scan_target_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_container_scan_target API.

Updates the ContainerScanTarget identified by the target ID. A container scan target specifies a group of one or more Docker image repositories in Oracle Cloud Infrastructure Registry (OCIR) that you want routinely scanned for security vulnerabilities.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3896

def update_container_scan_target(container_scan_target_id, update_container_scan_target_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#update_container_scan_target.' if logger

  raise "Missing the required parameter 'container_scan_target_id' when calling update_container_scan_target." if container_scan_target_id.nil?
  raise "Missing the required parameter 'update_container_scan_target_details' when calling update_container_scan_target." if update_container_scan_target_details.nil?
  raise "Parameter value for 'container_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(container_scan_target_id)

  path = '/containerScanTargets/{containerScanTargetId}'.sub('{containerScanTargetId}', container_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_container_scan_target_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#update_container_scan_target') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_host_scan_recipe(host_scan_recipe_id, update_host_scan_recipe_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_host_scan_recipe API.

Updates the HostScanRecipe identified by the recipe ID. A recipe determines the types of security issues that you want scanned, and how often to scan.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 3959

def update_host_scan_recipe(host_scan_recipe_id, update_host_scan_recipe_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#update_host_scan_recipe.' if logger

  raise "Missing the required parameter 'host_scan_recipe_id' when calling update_host_scan_recipe." if host_scan_recipe_id.nil?
  raise "Missing the required parameter 'update_host_scan_recipe_details' when calling update_host_scan_recipe." if update_host_scan_recipe_details.nil?
  raise "Parameter value for 'host_scan_recipe_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_recipe_id)

  path = '/hostScanRecipes/{hostScanRecipeId}'.sub('{hostScanRecipeId}', host_scan_recipe_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_host_scan_recipe_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#update_host_scan_recipe') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_host_scan_target(host_scan_target_id, update_host_scan_target_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_host_scan_target API.

Updates the HostScanTarget identified by the target ID. A host scan target is a collection of compute instances that you want routinely scanned for security vulnerabilities.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit nil value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.

  • :opc_request_id (String)

    The client request ID for tracing.

Returns:

  • (Response)

    A Response object with data of type nil



4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
# File 'lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb', line 4022

def update_host_scan_target(host_scan_target_id, update_host_scan_target_details, opts = {})
  logger.debug 'Calling operation VulnerabilityScanningClient#update_host_scan_target.' if logger

  raise "Missing the required parameter 'host_scan_target_id' when calling update_host_scan_target." if host_scan_target_id.nil?
  raise "Missing the required parameter 'update_host_scan_target_details' when calling update_host_scan_target." if update_host_scan_target_details.nil?
  raise "Parameter value for 'host_scan_target_id' must not be blank" if OCI::Internal::Util.blank_string?(host_scan_target_id)

  path = '/hostScanTargets/{hostScanTargetId}'.sub('{hostScanTargetId}', host_scan_target_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_host_scan_target_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'VulnerabilityScanningClient#update_host_scan_target') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end