class OCI::VulnerabilityScanning::VulnerabilityScanningClient

Use the Vulnerability Scanning Service (VSS) APIs to manage scan recipes, targets, and reports.

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

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 @return [OCI::Retry::RetryConfig]

Public Class Methods

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

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.

@param [Config] config A Config object. @param [String] region A region used to determine the service endpoint. This will usually

correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer 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

@param [OCI::ApiClientProxySettings] proxy_settings 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

@param [OCI::Retry::RetryConfig] retry_config 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
# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 53
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

Public Instance Methods

change_container_scan_recipe_compartment(container_scan_recipe_id, change_container_scan_recipe_compartment_details, opts = {}) click to toggle source

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

@param [String] container_scan_recipe_id unique ContainerScanRecipe identifier @param [OCI::VulnerabilityScanning::Models::ChangeContainerScanRecipeCompartmentDetails] change_container_scan_recipe_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_container_scan_recipe_compartment.rb.html) to see an example of how to use change_container_scan_recipe_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 123
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 = {}) click to toggle source

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

@param [String] container_scan_result_id unique container scan identifier @param [OCI::VulnerabilityScanning::Models::ChangeContainerScanResultCompartmentDetails] change_container_scan_result_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_container_scan_result_compartment.rb.html) to see an example of how to use change_container_scan_result_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 194
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 = {}) click to toggle source

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

@param [String] container_scan_target_id unique ContainerScanTarget identifier @param [OCI::VulnerabilityScanning::Models::ChangeContainerScanTargetCompartmentDetails] change_container_scan_target_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_container_scan_target_compartment.rb.html) to see an example of how to use change_container_scan_target_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 265
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 = {}) click to toggle source

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

@param [String] host_agent_scan_result_id unique host agent scan identifier @param [OCI::VulnerabilityScanning::Models::ChangeHostAgentScanResultCompartmentDetails] change_host_agent_scan_result_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_host_agent_scan_result_compartment.rb.html) to see an example of how to use change_host_agent_scan_result_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 336
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 = {}) click to toggle source

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

@param [String] host_cis_benchmark_scan_result_id unique host Cis benchmark scan identifier @param [OCI::VulnerabilityScanning::Models::ChangeHostCisBenchmarkScanResultCompartmentDetails] change_host_cis_benchmark_scan_result_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_host_cis_benchmark_scan_result_compartment.rb.html) to see an example of how to use change_host_cis_benchmark_scan_result_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 407
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 = {}) click to toggle source

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

@param [String] host_endpoint_protection_scan_result_id unique host endpoint protection scan identifier @param [OCI::VulnerabilityScanning::Models::ChangeHostEndpointProtectionScanResultCompartmentDetails] change_host_endpoint_protection_scan_result_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_host_endpoint_protection_scan_result_compartment.rb.html) to see an example of how to use change_host_endpoint_protection_scan_result_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 478
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 = {}) click to toggle source

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

@param [String] host_port_scan_result_id unique host port scan identifier @param [OCI::VulnerabilityScanning::Models::ChangeHostPortScanResultCompartmentDetails] change_host_port_scan_result_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_host_port_scan_result_compartment.rb.html) to see an example of how to use change_host_port_scan_result_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 549
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 = {}) click to toggle source

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

@param [String] host_scan_recipe_id unique HostScanRecipe identifier @param [OCI::VulnerabilityScanning::Models::ChangeHostScanRecipeCompartmentDetails] change_host_scan_recipe_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_host_scan_recipe_compartment.rb.html) to see an example of how to use change_host_scan_recipe_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 620
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 = {}) click to toggle source

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

@param [String] host_scan_target_id unique HostScanTarget identifier @param [OCI::VulnerabilityScanning::Models::ChangeHostScanTargetCompartmentDetails] change_host_scan_target_compartment_details The compartment information to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :opc_retry_token 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.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/change_host_scan_target_compartment.rb.html) to see an example of how to use change_host_scan_target_compartment API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 691
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 = {}) click to toggle source

Creates a new ContainerScanRecipe

@param [OCI::VulnerabilityScanning::Models::CreateContainerScanRecipeDetails] create_container_scan_recipe_details Details for the new ContainerScanRecipe @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanRecipe ContainerScanRecipe} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/create_container_scan_recipe.rb.html) to see an example of how to use create_container_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 755
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 = {}) click to toggle source

Creates a new ContainerScanTarget

@param [OCI::VulnerabilityScanning::Models::CreateContainerScanTargetDetails] create_container_scan_target_details Details for the new ContainerScanTarget @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanTarget ContainerScanTarget} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/create_container_scan_target.rb.html) to see an example of how to use create_container_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 817
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 = {}) click to toggle source

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

@param [OCI::VulnerabilityScanning::Models::CreateHostScanRecipeDetails] create_host_scan_recipe_details Details for the new HostScanRecipe @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostScanRecipe HostScanRecipe} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/create_host_scan_recipe.rb.html) to see an example of how to use create_host_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 879
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 = {}) click to toggle source

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

@param [OCI::VulnerabilityScanning::Models::CreateHostScanTargetDetails] create_host_scan_target_details Details for the new HostScanTarget @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostScanTarget HostScanTarget} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/create_host_scan_target.rb.html) to see an example of how to use create_host_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 941
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 = {}) click to toggle source

Deletes the ContainerScanRecipe identified by the id

@param [String] container_scan_recipe_id unique ContainerScanRecipe identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_container_scan_recipe.rb.html) to see an example of how to use delete_container_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1003
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 = {}) click to toggle source

Deletes the ContainerScanResult identified by the id

@param [String] container_scan_result_id unique container scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_container_scan_result.rb.html) to see an example of how to use delete_container_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1064
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 = {}) click to toggle source

Deletes the ContainerScanTarget identified by the id

@param [String] container_scan_target_id unique ContainerScanTarget identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_container_scan_target.rb.html) to see an example of how to use delete_container_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1125
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 = {}) click to toggle source

Removes the HostAgentScanResult identified by the host agent scan ID.

@param [String] host_agent_scan_result_id unique host agent scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_host_agent_scan_result.rb.html) to see an example of how to use delete_host_agent_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1186
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 = {}) click to toggle source

Deletes the HostCisBenchmarkScanResult identified by the id

@param [String] host_cis_benchmark_scan_result_id unique host Cis benchmark scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_host_cis_benchmark_scan_result.rb.html) to see an example of how to use delete_host_cis_benchmark_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1247
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 = {}) click to toggle source

Deletes the HostEndpointProtectionScanResult identified by the id

@param [String] host_endpoint_protection_scan_result_id unique host endpoint protection scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_host_endpoint_protection_scan_result.rb.html) to see an example of how to use delete_host_endpoint_protection_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1308
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 = {}) click to toggle source

Removes the HostPortScanResult identified by the host port scan ID.

@param [String] host_port_scan_result_id unique host port scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_host_port_scan_result.rb.html) to see an example of how to use delete_host_port_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1369
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 = {}) click to toggle source

Removes the HostScanRecipe identified by the recipe ID.

@param [String] host_scan_recipe_id unique HostScanRecipe identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_host_scan_recipe.rb.html) to see an example of how to use delete_host_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1430
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 = {}) click to toggle source

Removes the HostScanTarget identified by the target ID.

@param [String] host_scan_target_id unique HostScanTarget identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/delete_host_scan_target.rb.html) to see an example of how to use delete_host_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1491
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) click to toggle source

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.

@param [OCI::VulnerabilityScanning::Models::ExportHostAgentScanResultCsvDetails] export_host_agent_scan_result_csv_details Information on which scan results to export to CSV @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given @option [Block] &block Streaming http body to the block @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/export_host_agent_scan_result_csv.rb.html) to see an example of how to use export_host_agent_scan_result_csv API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1548
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) click to toggle source

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

@param [OCI::VulnerabilityScanning::Models::ExportHostVulnerabilityCsvDetails] export_host_vulnerability_csv_details Information on which scan results to export to CSV @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given @option [Block] &block Streaming http body to the block @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/export_host_vulnerability_csv.rb.html) to see an example of how to use export_host_vulnerability_csv API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1648
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 = {}) click to toggle source

Gets a ContainerScanRecipe by identifier

@param [String] container_scan_recipe_id unique ContainerScanRecipe identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanRecipe ContainerScanRecipe} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_container_scan_recipe.rb.html) to see an example of how to use get_container_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1746
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 = {}) click to toggle source

Returns a ContainerScanResult of the given container scan ID.

@param [String] container_scan_result_id unique container scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanResult ContainerScanResult} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_container_scan_result.rb.html) to see an example of how to use get_container_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1801
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 = {}) click to toggle source

Gets a ContainerScanTarget by identifier

@param [String] container_scan_target_id unique ContainerScanTarget identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanTarget ContainerScanTarget} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_container_scan_target.rb.html) to see an example of how to use get_container_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1856
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 = {}) click to toggle source

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

@param [String] host_agent_scan_result_id unique host agent scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostAgentScanResult HostAgentScanResult} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_agent_scan_result.rb.html) to see an example of how to use get_host_agent_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1911
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 = {}) click to toggle source

Returns HostCisBenchmarkScanResults for the given host CIS (Center for Internet Security) benchmark scan result ID.

@param [String] host_cis_benchmark_scan_result_id unique host Cis benchmark scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostCisBenchmarkScanResult HostCisBenchmarkScanResult} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_cis_benchmark_scan_result.rb.html) to see an example of how to use get_host_cis_benchmark_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 1966
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 = {}) click to toggle source

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

@param [String] host_endpoint_protection_scan_result_id unique host endpoint protection scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostEndpointProtectionScanResult HostEndpointProtectionScanResult} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_endpoint_protection_scan_result.rb.html) to see an example of how to use get_host_endpoint_protection_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2021
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 = {}) click to toggle source

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.

@param [String] host_port_scan_result_id unique host port scan identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostPortScanResult HostPortScanResult} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_port_scan_result.rb.html) to see an example of how to use get_host_port_scan_result API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2076
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 = {}) click to toggle source

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.

@param [String] host_scan_recipe_id unique HostScanRecipe identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostScanRecipe HostScanRecipe} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_scan_recipe.rb.html) to see an example of how to use get_host_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2131
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 = {}) click to toggle source

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.

@param [String] host_scan_target_id unique HostScanTarget identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostScanTarget HostScanTarget} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_scan_target.rb.html) to see an example of how to use get_host_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2186
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 = {}) click to toggle source

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.

@param [String] host_vulnerability_id unique host scan vulnerability identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostVulnerability HostVulnerability} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_host_vulnerability.rb.html) to see an example of how to use get_host_vulnerability API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2241
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_work_request(work_request_id, opts = {}) click to toggle source

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

@param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2296
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 = {}) click to toggle source

Returns a list of ContainerScanRecipeSummaries

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :lifecycle_state A filter to return only resources whose lifecycleState matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanRecipeSummaryCollection ContainerScanRecipeSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_container_scan_recipes.rb.html) to see an example of how to use list_container_scan_recipes API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2358
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 = {}) click to toggle source

Returns a collection of ContainerScanResultSummary objects

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :repository Repository name @option opts [String] :image Image name @option opts [BOOLEAN] :are_subcompartments_included 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. @option opts [String] :highest_problem_severity Parameter to filter by highestProblemSeverity for scan results @option opts [DateTime] :time_started_greater_than_or_equal_to Date and time on or after which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [DateTime] :time_started_less_than_or_equal_to Date and time on or before which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanResultSummaryCollection ContainerScanResultSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_container_scan_results.rb.html) to see an example of how to use list_container_scan_results API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2442
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]

  # 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 = {}) click to toggle source

Returns a list of ContainerScanTargetSummaries

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :lifecycle_state A filter to return only resources whose lifecycleState matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::ContainerScanTargetSummaryCollection ContainerScanTargetSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_container_scan_targets.rb.html) to see an example of how to use list_container_scan_targets API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2526
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 = {}) click to toggle source

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 problems detected in a specific compute instance.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :instance_id The ID of a compute instance @option opts [String] :highest_problem_severity Parameter to filter by highestProblemSeverity for scan results @option opts [String] :operating_system Parameter to filter by operating system for scan results @option opts [DateTime] :time_started_greater_than_or_equal_to Date and time on or after which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [DateTime] :time_started_less_than_or_equal_to Date and time on or before which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostAgentScanResultSummaryCollection HostAgentScanResultSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_agent_scan_results.rb.html) to see an example of how to use list_host_agent_scan_results API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2610
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]

  # 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 = {}) click to toggle source

Returns a collection of HostCisBenchmarkScanResultSummary objects

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :instance_id The ID of a compute instance @option opts [String] :highest_problem_severity Parameter to filter by highestProblemSeverity for scan results @option opts [DateTime] :time_started_greater_than_or_equal_to Date and time on or after which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [DateTime] :time_started_less_than_or_equal_to Date and time on or before which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostCisBenchmarkScanResultSummaryCollection HostCisBenchmarkScanResultSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_cis_benchmark_scan_results.rb.html) to see an example of how to use list_host_cis_benchmark_scan_results API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2697
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]

  # 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 = {}) click to toggle source

Returns a collection of HostEndpointProtectionScanResultSummary objects

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :instance_id The ID of a compute instance @option opts [String] :highest_problem_severity Parameter to filter by highestProblemSeverity for scan results @option opts [DateTime] :time_started_greater_than_or_equal_to Date and time on or after which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [DateTime] :time_started_less_than_or_equal_to Date and time on or before which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostEndpointProtectionScanResultSummaryCollection HostEndpointProtectionScanResultSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_endpoint_protection_scan_results.rb.html) to see an example of how to use list_host_endpoint_protection_scan_results API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2783
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]

  # 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 = {}) click to toggle source

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.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :instance_id The ID of a compute instance @option opts [String] :highest_problem_severity Parameter to filter by highestProblemSeverity for scan results @option opts [DateTime] :time_started_greater_than_or_equal_to Date and time on or after which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [DateTime] :time_started_less_than_or_equal_to Date and time on or before which scans were started, as described in [RFC 3339](tools.ietf.org/rfc/rfc3339) @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostPortScanResultSummaryCollection HostPortScanResultSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_port_scan_results.rb.html) to see an example of how to use list_host_port_scan_results API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2869
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]

  # 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 = {}) click to toggle source

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.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :lifecycle_state A filter to return only resources whose lifecycleState matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostScanRecipeSummaryCollection HostScanRecipeSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_scan_recipes.rb.html) to see an example of how to use list_host_scan_recipes API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 2952
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_targets(compartment_id, opts = {}) click to toggle source

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.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :lifecycle_state A filter to return only resources whose lifecycleState matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostScanTargetSummaryCollection HostScanTargetSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_scan_targets.rb.html) to see an example of how to use list_host_scan_targets API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3032
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 = {}) click to toggle source

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.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :severity A filter to return only resources that have a severity that matches the given severity @option opts [String] :name A filter to return only resources that match the entire name given. @option opts [String] :cve_reference Parameter to filter by CVE reference number for vulnerabilities @option opts [String] :vulnerability_type The field to filter vulnerabilities based on its type. Only one value can be provided.

@option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostVulnerabilitySummaryCollection HostVulnerabilitySummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_vulnerabilities.rb.html) to see an example of how to use list_host_vulnerabilities API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3115
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 = {}) click to toggle source

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.

@param [String] host_vulnerability_id unique host scan vulnerability identifier @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :sort_order The sort order to use, either 'ASC' or 'DESC'. (default to ASC) @option opts [String] :sort_by 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)

@option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::HostVulnerabilityImpactedHostSummaryCollection HostVulnerabilityImpactedHostSummaryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_host_vulnerability_impacted_hosts.rb.html) to see an example of how to use list_host_vulnerability_impacted_hosts API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3199
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_work_request_errors(work_request_id, opts = {}) click to toggle source

Return a (paginated) list of errors for a given work request.

@param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::WorkRequestErrorCollection WorkRequestErrorCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3268
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 = {}) click to toggle source

Return a (paginated) list of logs for a given work request.

@param [String] work_request_id The ID of the asynchronous request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::WorkRequestLogEntryCollection WorkRequestLogEntryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3327
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 = {}) click to toggle source

Lists the work requests in a compartment.

@param [String] compartment_id The ID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id The client request ID for tracing. @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @return [Response] A Response object with data of type {OCI::VulnerabilityScanning::Models::WorkRequestCollection WorkRequestCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3386
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
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 92
def logger
  @api_client.config.logger
end
region=(new_region) click to toggle source

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

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 82
def region=(new_region)
  @region = new_region

  raise 'A region must be specified.' unless @region

  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://vss-cp-api.{region}.oci.{secondLevelDomain}') + '/20210215'
  logger.info "VulnerabilityScanningClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
update_container_scan_recipe(container_scan_recipe_id, update_container_scan_recipe_details, opts = {}) click to toggle source

Updates the ContainerScanRecipe identified by the id

@param [String] container_scan_recipe_id unique ContainerScanRecipe identifier @param [OCI::VulnerabilityScanning::Models::UpdateContainerScanRecipeDetails] update_container_scan_recipe_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/update_container_scan_recipe.rb.html) to see an example of how to use update_container_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3450
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 = {}) click to toggle source

Updates the ContainerScanTarget identified by the id

@param [String] container_scan_target_id unique ContainerScanTarget identifier @param [OCI::VulnerabilityScanning::Models::UpdateContainerScanTargetDetails] update_container_scan_target_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/update_container_scan_target.rb.html) to see an example of how to use update_container_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3513
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 = {}) click to toggle source

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.

@param [String] host_scan_recipe_id unique HostScanRecipe identifier @param [OCI::VulnerabilityScanning::Models::UpdateHostScanRecipeDetails] update_host_scan_recipe_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/update_host_scan_recipe.rb.html) to see an example of how to use update_host_scan_recipe API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3576
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 = {}) click to toggle source

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.

@param [String] host_scan_target_id unique HostScanTarget identifier @param [OCI::VulnerabilityScanning::Models::UpdateHostScanTargetDetails] update_host_scan_target_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id The client request ID for tracing. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/vulnerabilityscanning/update_host_scan_target.rb.html) to see an example of how to use update_host_scan_target API.

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3639
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

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client.rb, line 3683
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end