class OCI::Logging::LoggingManagementClientCompositeOperations

This class provides a wrapper around {OCI::Logging::LoggingManagementClient} 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::Logging::LoggingManagementClient} used to communicate with the service_client

@return [OCI::Logging::LoggingManagementClient]

Public Class Methods

new(service_client = OCI::Logging::LoggingManagementClient.new) click to toggle source

Initializes a new LoggingManagementClientCompositeOperations

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

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

Public Instance Methods

change_log_group_compartment_and_wait_for_state(log_group_id, change_log_group_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#change_log_group_compartment} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [OCI::Logging::Models::ChangeLogGroupCompartmentDetails] change_log_group_compartment_details Request to change the compartment of a given resource. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#change_log_group_compartment} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 40
def change_log_group_compartment_and_wait_for_state(log_group_id, change_log_group_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_log_group_compartment(log_group_id, change_log_group_compartment_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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
change_log_log_group_and_wait_for_state(log_group_id, log_id, change_log_log_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#change_log_log_group} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [String] log_id OCID of a log to work with. @param [OCI::Logging::Models::ChangeLogLogGroupDetails] change_log_log_group_details Request to change the log group of a given log. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#change_log_log_group} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 91
def change_log_log_group_and_wait_for_state(log_group_id, log_id, change_log_log_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_log_log_group(log_group_id, log_id, change_log_log_group_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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
change_unified_agent_configuration_compartment_and_wait_for_state(unified_agent_configuration_id, change_unified_agent_configuration_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#change_unified_agent_configuration_compartment} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] unified_agent_configuration_id The OCID of the Unified Agent configuration. @param [OCI::Logging::Models::ChangeUnifiedAgentConfigurationCompartmentDetails] change_unified_agent_configuration_compartment_details Request to change the compartment of a given resource. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#change_unified_agent_configuration_compartment} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 141
def change_unified_agent_configuration_compartment_and_wait_for_state(unified_agent_configuration_id, change_unified_agent_configuration_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_unified_agent_configuration_compartment(unified_agent_configuration_id, change_unified_agent_configuration_compartment_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_and_wait_for_state(log_group_id, create_log_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#create_log} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [OCI::Logging::Models::CreateLogDetails] create_log_details Log object configuration details. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#create_log} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 191
def create_log_and_wait_for_state(log_group_id, create_log_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_log(log_group_id, create_log_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_group_and_wait_for_state(create_log_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#create_log_group} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [OCI::Logging::Models::CreateLogGroupDetails] create_log_group_details Details to create log group. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#create_log_group} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 240
def create_log_group_and_wait_for_state(create_log_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_log_group(create_log_group_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_saved_search_and_wait_for_state(create_log_saved_search_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#create_log_saved_search} and then waits for the {OCI::Logging::Models::LogSavedSearch} acted upon to enter the given state(s).

@param [OCI::Logging::Models::CreateLogSavedSearchDetails] create_log_saved_search_details Specification of the Saved Search to create @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::LogSavedSearch#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#create_log_saved_search} @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 with data of type {OCI::Logging::Models::LogSavedSearch}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 289
def create_log_saved_search_and_wait_for_state(create_log_saved_search_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_log_saved_search(create_log_saved_search_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_log_saved_search(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.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
    )
    result_to_return = waiter_result

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

Calls {OCI::Logging::LoggingManagementClient#create_unified_agent_configuration} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [OCI::Logging::Models::CreateUnifiedAgentConfigurationDetails] create_unified_agent_configuration_details Unified agent configuration creation object. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#create_unified_agent_configuration} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 328
def create_unified_agent_configuration_and_wait_for_state(create_unified_agent_configuration_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_unified_agent_configuration(create_unified_agent_configuration_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_and_wait_for_state(log_group_id, log_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#delete_log} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [String] log_id OCID of a log to work with. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#delete_log} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 378
def delete_log_and_wait_for_state(log_group_id, log_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_log(log_group_id, log_id, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_group_and_wait_for_state(log_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#delete_log_group} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#delete_log_group} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 427
def delete_log_group_and_wait_for_state(log_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_log_group(log_group_id, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_saved_search_and_wait_for_state(log_saved_search_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#delete_log_saved_search} and then waits for the {OCI::Logging::Models::LogSavedSearch} acted upon to enter the given state(s).

@param [String] log_saved_search_id OCID of the logSavedSearch

@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::LogSavedSearch#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#delete_log_saved_search} @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 with data of type nil

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 477
def delete_log_saved_search_and_wait_for_state(log_saved_search_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  initial_get_result = @service_client.get_log_saved_search(log_saved_search_id)
  operation_result = @service_client.delete_log_saved_search(log_saved_search_id, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)

  begin
    waiter_result = initial_get_result.wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.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,
      succeed_on_not_found: true
    )
    result_to_return = waiter_result

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

Calls {OCI::Logging::LoggingManagementClient#delete_unified_agent_configuration} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] unified_agent_configuration_id The OCID of the Unified Agent configuration. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#delete_unified_agent_configuration} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 517
def delete_unified_agent_configuration_and_wait_for_state(unified_agent_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_unified_agent_configuration(unified_agent_configuration_id, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_work_request_and_wait_for_state(work_request_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#delete_work_request} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] work_request_id The asynchronous request ID. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#delete_work_request} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 566
def delete_work_request_and_wait_for_state(work_request_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_work_request(work_request_id, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_and_wait_for_state(log_group_id, log_id, update_log_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#update_log} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [String] log_id OCID of a log to work with. @param [OCI::Logging::Models::UpdateLogDetails] update_log_details Log config parameters to update. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#update_log} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 617
def update_log_and_wait_for_state(log_group_id, log_id, update_log_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_log(log_group_id, log_id, update_log_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_group_and_wait_for_state(log_group_id, update_log_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#update_log_group} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] log_group_id OCID of a log group to work with. @param [OCI::Logging::Models::UpdateLogGroupDetails] update_log_group_details LogGroup config parameters to update. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#update_log_group} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 667
def update_log_group_and_wait_for_state(log_group_id, update_log_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_log_group(log_group_id, update_log_group_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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_log_saved_search_and_wait_for_state(log_saved_search_id, update_log_saved_search_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Logging::LoggingManagementClient#update_log_saved_search} and then waits for the {OCI::Logging::Models::LogSavedSearch} acted upon to enter the given state(s).

@param [String] log_saved_search_id OCID of the logSavedSearch

@param [OCI::Logging::Models::UpdateLogSavedSearchDetails] update_log_saved_search_details Updates to the saved search. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::LogSavedSearch#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#update_log_saved_search} @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 with data of type {OCI::Logging::Models::LogSavedSearch}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 718
def update_log_saved_search_and_wait_for_state(log_saved_search_id, update_log_saved_search_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_log_saved_search(log_saved_search_id, update_log_saved_search_details, base_operation_opts)

  return operation_result if wait_for_states.empty?

  lowered_wait_for_states = wait_for_states.map(&:downcase)
  wait_for_resource_id = operation_result.data.id

  begin
    waiter_result = @service_client.get_log_saved_search(wait_for_resource_id).wait_until(
      eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.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
    )
    result_to_return = waiter_result

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

Calls {OCI::Logging::LoggingManagementClient#update_unified_agent_configuration} and then waits for the {OCI::Logging::Models::WorkRequest} to enter the given state(s).

@param [String] unified_agent_configuration_id The OCID of the Unified Agent configuration. @param [OCI::Logging::Models::UpdateUnifiedAgentConfigurationDetails] update_unified_agent_configuration_details Unified agent configuration to update. Empty group associations list doesn't modify the list, null value for group association clears all the previous associations.

@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Logging::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Logging::LoggingManagementClient#update_unified_agent_configuration} @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::Logging::Models::WorkRequest}

# File lib/oci/logging/logging_management_client_composite_operations.rb, line 759
def update_unified_agent_configuration_and_wait_for_state(unified_agent_configuration_id, update_unified_agent_configuration_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_unified_agent_configuration(unified_agent_configuration_id, update_unified_agent_configuration_details, base_operation_opts)
  use_util = OCI::Logging::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::Logging::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