class OCI::VulnerabilityScanning::VulnerabilityScanningClientCompositeOperations

This class provides a wrapper around {OCI::VulnerabilityScanning::VulnerabilityScanningClient} and offers convenience methods for operations that would otherwise need to be chained together. For example, instead of performing an action on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource to enter a given state, you can call a single method in this class to accomplish the same functionality

Attributes

service_client[R]

The {OCI::VulnerabilityScanning::VulnerabilityScanningClient} used to communicate with the service_client

@return [OCI::VulnerabilityScanning::VulnerabilityScanningClient]

Public Class Methods

new(service_client = OCI::VulnerabilityScanning::VulnerabilityScanningClient.new) click to toggle source

Initializes a new VulnerabilityScanningClientCompositeOperations

@param [OCI::VulnerabilityScanning::VulnerabilityScanningClient] service_client The client used to communicate with the service.

Defaults to a new service client created via {OCI::VulnerabilityScanning::VulnerabilityScanningClient#initialize} with no arguments
# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 20
def initialize(service_client = OCI::VulnerabilityScanning::VulnerabilityScanningClient.new)
  @service_client = service_client
end

Public Instance Methods

create_container_scan_recipe_and_wait_for_state(create_container_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_container_scan_recipe} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [OCI::VulnerabilityScanning::Models::CreateContainerScanRecipeDetails] create_container_scan_recipe_details Details for the new ContainerScanRecipe @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_container_scan_recipe} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 39
def create_container_scan_recipe_and_wait_for_state(create_container_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_container_scan_recipe(create_container_scan_recipe_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
create_container_scan_target_and_wait_for_state(create_container_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_container_scan_target} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [OCI::VulnerabilityScanning::Models::CreateContainerScanTargetDetails] create_container_scan_target_details Details for the new ContainerScanTarget @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_container_scan_target} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 88
def create_container_scan_target_and_wait_for_state(create_container_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_container_scan_target(create_container_scan_target_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
create_host_scan_recipe_and_wait_for_state(create_host_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_host_scan_recipe} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [OCI::VulnerabilityScanning::Models::CreateHostScanRecipeDetails] create_host_scan_recipe_details Details for the new HostScanRecipe @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_host_scan_recipe} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 137
def create_host_scan_recipe_and_wait_for_state(create_host_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_host_scan_recipe(create_host_scan_recipe_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
create_host_scan_target_and_wait_for_state(create_host_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_host_scan_target} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [OCI::VulnerabilityScanning::Models::CreateHostScanTargetDetails] create_host_scan_target_details Details for the new HostScanTarget @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#create_host_scan_target} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 186
def create_host_scan_target_and_wait_for_state(create_host_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_host_scan_target(create_host_scan_target_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_container_scan_recipe_and_wait_for_state(container_scan_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_container_scan_recipe} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] container_scan_recipe_id unique ContainerScanRecipe identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_container_scan_recipe} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 235
def delete_container_scan_recipe_and_wait_for_state(container_scan_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_container_scan_recipe(container_scan_recipe_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_container_scan_result_and_wait_for_state(container_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_container_scan_result} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] container_scan_result_id unique container scan identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_container_scan_result} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 284
def delete_container_scan_result_and_wait_for_state(container_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_container_scan_result(container_scan_result_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_container_scan_target_and_wait_for_state(container_scan_target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_container_scan_target} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] container_scan_target_id unique ContainerScanTarget identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_container_scan_target} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 333
def delete_container_scan_target_and_wait_for_state(container_scan_target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_container_scan_target(container_scan_target_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_host_agent_scan_result_and_wait_for_state(host_agent_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_agent_scan_result} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] host_agent_scan_result_id unique host agent scan identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_agent_scan_result} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 382
def delete_host_agent_scan_result_and_wait_for_state(host_agent_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_agent_scan_result(host_agent_scan_result_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_host_cis_benchmark_scan_result_and_wait_for_state(host_cis_benchmark_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_cis_benchmark_scan_result} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] host_cis_benchmark_scan_result_id unique host Cis benchmark scan identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_cis_benchmark_scan_result} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 431
def delete_host_cis_benchmark_scan_result_and_wait_for_state(host_cis_benchmark_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_cis_benchmark_scan_result(host_cis_benchmark_scan_result_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_host_endpoint_protection_scan_result_and_wait_for_state(host_endpoint_protection_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_endpoint_protection_scan_result} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] host_endpoint_protection_scan_result_id unique host endpoint protection scan identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_endpoint_protection_scan_result} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 480
def delete_host_endpoint_protection_scan_result_and_wait_for_state(host_endpoint_protection_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_endpoint_protection_scan_result(host_endpoint_protection_scan_result_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_host_port_scan_result_and_wait_for_state(host_port_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_port_scan_result} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] host_port_scan_result_id unique host port scan identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_port_scan_result} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 529
def delete_host_port_scan_result_and_wait_for_state(host_port_scan_result_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_port_scan_result(host_port_scan_result_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_host_scan_recipe_and_wait_for_state(host_scan_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_scan_recipe} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] host_scan_recipe_id unique HostScanRecipe identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_scan_recipe} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 578
def delete_host_scan_recipe_and_wait_for_state(host_scan_recipe_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_scan_recipe(host_scan_recipe_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
delete_host_scan_target_and_wait_for_state(host_scan_target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_scan_target} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@param [String] host_scan_target_id unique HostScanTarget identifier @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#delete_host_scan_target} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 627
def delete_host_scan_target_and_wait_for_state(host_scan_target_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_scan_target(host_scan_target_id, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
update_container_scan_recipe_and_wait_for_state(container_scan_recipe_id, update_container_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_container_scan_recipe} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@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 [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_container_scan_recipe} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 677
def update_container_scan_recipe_and_wait_for_state(container_scan_recipe_id, update_container_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_container_scan_recipe(container_scan_recipe_id, update_container_scan_recipe_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
update_container_scan_target_and_wait_for_state(container_scan_target_id, update_container_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_container_scan_target} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@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 [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_container_scan_target} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 727
def update_container_scan_target_and_wait_for_state(container_scan_target_id, update_container_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_container_scan_target(container_scan_target_id, update_container_scan_target_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
update_host_scan_recipe_and_wait_for_state(host_scan_recipe_id, update_host_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_host_scan_recipe} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@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 [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_host_scan_recipe} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 777
def update_host_scan_recipe_and_wait_for_state(host_scan_recipe_id, update_host_scan_recipe_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_host_scan_recipe(host_scan_recipe_id, update_host_scan_recipe_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end
update_host_scan_target_and_wait_for_state(host_scan_target_id, update_host_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_host_scan_target} and then waits for the {OCI::VulnerabilityScanning::Models::WorkRequest} to enter the given state(s).

@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 [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::VulnerabilityScanning::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::VulnerabilityScanning::VulnerabilityScanningClient#update_host_scan_target} @param [Hash] waiter_opts Optional arguments for the waiter. Keys should be symbols, and the following keys are supported:

* max_interval_seconds: The maximum interval between queries, in seconds.
* max_wait_seconds The maximum time to wait, in seconds

@return [OCI::Response] A {OCI::Response} object containing the completed {OCI::VulnerabilityScanning::Models::WorkRequest}

# File lib/oci/vulnerability_scanning/vulnerability_scanning_client_composite_operations.rb, line 827
def update_host_scan_target_and_wait_for_state(host_scan_target_id, update_host_scan_target_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_host_scan_target(host_scan_target_id, update_host_scan_target_details, base_operation_opts)
  use_util = OCI::VulnerabilityScanning::Util.respond_to?(:wait_on_work_request)

  return operation_result if wait_for_states.empty? && !use_util

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.headers['opc-work-request-id']

  begin
    if use_util
      waiter_result = OCI::VulnerabilityScanning::Util.wait_on_work_request(
        @service_client,
        wait_for_resource_id,
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    else
      waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until(
        eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) },
        max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30,
        max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end