class OCI::Core::ComputeManagementClientCompositeOperations
This class provides a wrapper around {OCI::Core::ComputeManagementClient} 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
The {OCI::Core::ComputeManagementClient} used to communicate with the service_client
@return [OCI::Core::ComputeManagementClient]
Public Class Methods
Initializes a new ComputeManagementClientCompositeOperations
@param [OCI::Core::ComputeManagementClient] service_client
The client used to communicate with the service.
Defaults to a new service client created via {OCI::Core::ComputeManagementClient#initialize} with no arguments
# File lib/oci/core/compute_management_client_composite_operations.rb, line 20 def initialize(service_client = OCI::Core::ComputeManagementClient.new) @service_client = service_client end
Public Instance Methods
Calls {OCI::Core::ComputeManagementClient#attach_instance_pool_instance} and then waits for the {OCI::Core::Models::InstancePoolInstance} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [OCI::Core::Models::AttachInstancePoolInstanceDetails] attach_instance_pool_instance_details Attach an instance to a pool @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePoolInstance#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#attach_instance_pool_instance} @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::Core::Models::InstancePoolInstance}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 40 def attach_instance_pool_instance_and_wait_for_state(instance_pool_id, attach_instance_pool_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.attach_instance_pool_instance(instance_pool_id, attach_instance_pool_instance_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_instance_pool_instance(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
Calls {OCI::Core::ComputeManagementClient#attach_load_balancer} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [OCI::Core::Models::AttachLoadBalancerDetails] attach_load_balancer_details Load balancer being attached @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#attach_load_balancer} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 80 def attach_load_balancer_and_wait_for_state(instance_pool_id, attach_load_balancer_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.attach_load_balancer(instance_pool_id, attach_load_balancer_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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#create_cluster_network} and then waits for the {OCI::Core::Models::ClusterNetwork} acted upon to enter the given state(s).
@param [OCI::Core::Models::CreateClusterNetworkDetails] create_cluster_network_details Cluster network creation details @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::ClusterNetwork#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#create_cluster_network} @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::Core::Models::ClusterNetwork}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 119 def create_cluster_network_and_wait_for_state(create_cluster_network_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_cluster_network(create_cluster_network_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_cluster_network(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
Calls {OCI::Core::ComputeManagementClient#create_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [OCI::Core::Models::CreateInstancePoolDetails] create_instance_pool_details Instance pool creation details @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#create_instance_pool} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 158 def create_instance_pool_and_wait_for_state(create_instance_pool_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_instance_pool(create_instance_pool_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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#detach_instance_pool_instance} and then waits for the {OCI::Core::Models::WorkRequest} to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [OCI::Core::Models::DetachInstancePoolInstanceDetails] detach_instance_pool_instance_details Instance being detached @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#detach_instance_pool_instance} @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::Core::Models::WorkRequest}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 198 def detach_instance_pool_instance_and_wait_for_state(instance_pool_id, detach_instance_pool_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.detach_instance_pool_instance(instance_pool_id, detach_instance_pool_instance_details, base_operation_opts) use_util = OCI::Core::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::Core::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
Calls {OCI::Core::ComputeManagementClient#detach_load_balancer} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [OCI::Core::Models::DetachLoadBalancerDetails] detach_load_balancer_details Load balancer being detached @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#detach_load_balancer} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 248 def detach_load_balancer_and_wait_for_state(instance_pool_id, detach_load_balancer_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.detach_load_balancer(instance_pool_id, detach_load_balancer_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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#reset_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#reset_instance_pool} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 287 def reset_instance_pool_and_wait_for_state(instance_pool_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.reset_instance_pool(instance_pool_id, 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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#softreset_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#softreset_instance_pool} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 326 def softreset_instance_pool_and_wait_for_state(instance_pool_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.softreset_instance_pool(instance_pool_id, 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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#start_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#start_instance_pool} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 365 def start_instance_pool_and_wait_for_state(instance_pool_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.start_instance_pool(instance_pool_id, 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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#stop_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#stop_instance_pool} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 404 def stop_instance_pool_and_wait_for_state(instance_pool_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.stop_instance_pool(instance_pool_id, 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_instance_pool(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
Calls {OCI::Core::ComputeManagementClient#terminate_cluster_network} and then waits for the {OCI::Core::Models::WorkRequest} to enter the given state(s).
@param [String] cluster_network_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#terminate_cluster_network} @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::Core::Models::WorkRequest}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 443 def terminate_cluster_network_and_wait_for_state(cluster_network_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.terminate_cluster_network(cluster_network_id, base_operation_opts) use_util = OCI::Core::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::Core::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
Calls {OCI::Core::ComputeManagementClient#terminate_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#terminate_instance_pool} @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/core/compute_management_client_composite_operations.rb, line 492 def terminate_instance_pool_and_wait_for_state(instance_pool_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_instance_pool(instance_pool_id) operation_result = @service_client.terminate_instance_pool(instance_pool_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
Calls {OCI::Core::ComputeManagementClient#update_cluster_network} and then waits for the {OCI::Core::Models::ClusterNetwork} acted upon to enter the given state(s).
@param [String] cluster_network_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the cluster network. @param [OCI::Core::Models::UpdateClusterNetworkDetails] update_cluster_network_details Update cluster network @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::ClusterNetwork#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#update_cluster_network} @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::Core::Models::ClusterNetwork}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 533 def update_cluster_network_and_wait_for_state(cluster_network_id, update_cluster_network_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_cluster_network(cluster_network_id, update_cluster_network_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_cluster_network(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
Calls {OCI::Core::ComputeManagementClient#update_instance_pool} and then waits for the {OCI::Core::Models::InstancePool} acted upon to enter the given state(s).
@param [String] instance_pool_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance pool. @param [OCI::Core::Models::UpdateInstancePoolDetails] update_instance_pool_details Update instance pool configuration @param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Core::Models::InstancePool#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Core::ComputeManagementClient#update_instance_pool} @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::Core::Models::InstancePool}
# File lib/oci/core/compute_management_client_composite_operations.rb, line 573 def update_instance_pool_and_wait_for_state(instance_pool_id, update_instance_pool_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_instance_pool(instance_pool_id, update_instance_pool_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_instance_pool(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