class OCI::Mysql::DbSystemClientCompositeOperations

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

@return [OCI::Mysql::DbSystemClient]

Public Class Methods

new(service_client = OCI::Mysql::DbSystemClient.new) click to toggle source

Initializes a new DbSystemClientCompositeOperations

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

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

Public Instance Methods

add_analytics_cluster_and_wait_for_state(db_system_id, add_analytics_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#add_analytics_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::AddAnalyticsClusterDetails] add_analytics_cluster_details Request to add an Analytics Cluster. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#add_analytics_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 40
def add_analytics_cluster_and_wait_for_state(db_system_id, add_analytics_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.add_analytics_cluster(db_system_id, add_analytics_cluster_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
add_heat_wave_cluster_and_wait_for_state(db_system_id, add_heat_wave_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#add_heat_wave_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::AddHeatWaveClusterDetails] add_heat_wave_cluster_details Request to add a HeatWave cluster. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#add_heat_wave_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 90
def add_heat_wave_cluster_and_wait_for_state(db_system_id, add_heat_wave_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.add_heat_wave_cluster(db_system_id, add_heat_wave_cluster_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_db_system_and_wait_for_state(create_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#create_db_system} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [OCI::Mysql::Models::CreateDbSystemDetails] create_db_system_details Request to create a DB System. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#create_db_system} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 139
def create_db_system_and_wait_for_state(create_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_db_system(create_db_system_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#delete_analytics_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#delete_analytics_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 188
def delete_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_analytics_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_db_system_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#delete_db_system} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#delete_db_system} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 237
def delete_db_system_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_db_system(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#delete_heat_wave_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#delete_heat_wave_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 286
def delete_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_heat_wave_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
generate_analytics_cluster_memory_estimate_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#generate_analytics_cluster_memory_estimate} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#generate_analytics_cluster_memory_estimate} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 335
def generate_analytics_cluster_memory_estimate_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.generate_analytics_cluster_memory_estimate(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
generate_heat_wave_cluster_memory_estimate_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#generate_heat_wave_cluster_memory_estimate} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#generate_heat_wave_cluster_memory_estimate} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 384
def generate_heat_wave_cluster_memory_estimate_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.generate_heat_wave_cluster_memory_estimate(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
restart_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#restart_analytics_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#restart_analytics_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 433
def restart_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.restart_analytics_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
restart_db_system_and_wait_for_state(db_system_id, restart_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#restart_db_system} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::RestartDbSystemDetails] restart_db_system_details Optional parameters for the stop portion of the restart action. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#restart_db_system} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 483
def restart_db_system_and_wait_for_state(db_system_id, restart_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.restart_db_system(db_system_id, restart_db_system_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
restart_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#restart_heat_wave_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#restart_heat_wave_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 532
def restart_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.restart_heat_wave_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
start_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#start_analytics_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#start_analytics_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 581
def start_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.start_analytics_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
start_db_system_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#start_db_system} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#start_db_system} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 630
def start_db_system_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.start_db_system(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
start_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#start_heat_wave_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#start_heat_wave_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 679
def start_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.start_heat_wave_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
stop_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#stop_analytics_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#stop_analytics_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 728
def stop_analytics_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.stop_analytics_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
stop_db_system_and_wait_for_state(db_system_id, stop_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#stop_db_system} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::StopDbSystemDetails] stop_db_system_details Optional parameters for the stop action. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#stop_db_system} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 778
def stop_db_system_and_wait_for_state(db_system_id, stop_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.stop_db_system(db_system_id, stop_db_system_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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
stop_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#stop_heat_wave_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#stop_heat_wave_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 827
def stop_heat_wave_cluster_and_wait_for_state(db_system_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.stop_heat_wave_cluster(db_system_id, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_analytics_cluster_and_wait_for_state(db_system_id, update_analytics_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#update_analytics_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::UpdateAnalyticsClusterDetails] update_analytics_cluster_details Request to update an Analytics Cluster. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#update_analytics_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 877
def update_analytics_cluster_and_wait_for_state(db_system_id, update_analytics_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_analytics_cluster(db_system_id, update_analytics_cluster_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_db_system_and_wait_for_state(db_system_id, update_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#update_db_system} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::UpdateDbSystemDetails] update_db_system_details Request to update a DB System. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#update_db_system} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 927
def update_db_system_and_wait_for_state(db_system_id, update_db_system_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_db_system(db_system_id, update_db_system_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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_heat_wave_cluster_and_wait_for_state(db_system_id, update_heat_wave_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) click to toggle source

Calls {OCI::Mysql::DbSystemClient#update_heat_wave_cluster} and then waits for the {OCI::Mysql::Models::WorkRequest} to enter the given state(s).

@param [String] db_system_id The DB System [OCID](docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm). @param [OCI::Mysql::Models::UpdateHeatWaveClusterDetails] update_heat_wave_cluster_details Request to update a HeatWave cluster. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Mysql::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Mysql::DbSystemClient#update_heat_wave_cluster} @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::Mysql::Models::WorkRequest}

# File lib/oci/mysql/db_system_client_composite_operations.rb, line 977
def update_heat_wave_cluster_and_wait_for_state(db_system_id, update_heat_wave_cluster_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_heat_wave_cluster(db_system_id, update_heat_wave_cluster_details, base_operation_opts)
  use_util = OCI::Mysql::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::Mysql::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