class OCI::Analytics::AnalyticsClientCompositeOperations
This class provides a wrapper around {OCI::Analytics::AnalyticsClient} 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::Analytics::AnalyticsClient} used to communicate with the service_client
@return [OCI::Analytics::AnalyticsClient]
Public Class Methods
Initializes a new AnalyticsClientCompositeOperations
@param [OCI::Analytics::AnalyticsClient] service_client
The client used to communicate with the service.
Defaults to a new service client created via {OCI::Analytics::AnalyticsClient#initialize} with no arguments
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 20 def initialize(service_client = OCI::Analytics::AnalyticsClient.new) @service_client = service_client end
Public Instance Methods
Calls {OCI::Analytics::AnalyticsClient#change_analytics_instance_compartment} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::ChangeCompartmentDetails] change_compartment_details Input payload to move the resource to a different compartment.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#change_analytics_instance_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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 42 def change_analytics_instance_compartment_and_wait_for_state(analytics_instance_id, change_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_analytics_instance_compartment(analytics_instance_id, change_compartment_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#change_analytics_instance_network_endpoint} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::ChangeAnalyticsInstanceNetworkEndpointDetails] change_analytics_instance_network_endpoint_details Input payload for changing an Analytics
instance network endpoint.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#change_analytics_instance_network_endpoint} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 94 def change_analytics_instance_network_endpoint_and_wait_for_state(analytics_instance_id, change_analytics_instance_network_endpoint_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_analytics_instance_network_endpoint(analytics_instance_id, change_analytics_instance_network_endpoint_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#create_analytics_instance} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [OCI::Analytics::Models::CreateAnalyticsInstanceDetails] create_analytics_instance_details Analytics
Instance details.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#create_analytics_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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 144 def create_analytics_instance_and_wait_for_state(create_analytics_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_analytics_instance(create_analytics_instance_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#create_private_access_channel} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::CreatePrivateAccessChannelDetails] create_private_access_channel_details Input payload for creating a private access channel for an Analytics
instance.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#create_private_access_channel} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 196 def create_private_access_channel_and_wait_for_state(analytics_instance_id, create_private_access_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_private_access_channel(analytics_instance_id, create_private_access_channel_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#create_vanity_url} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::CreateVanityUrlDetails] create_vanity_url_details Vanity url details.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#create_vanity_url} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 248 def create_vanity_url_and_wait_for_state(analytics_instance_id, create_vanity_url_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_vanity_url(analytics_instance_id, create_vanity_url_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#delete_analytics_instance} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#delete_analytics_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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 298 def delete_analytics_instance_and_wait_for_state(analytics_instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_analytics_instance(analytics_instance_id, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#delete_private_access_channel} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] private_access_channel_key The unique identifier key of the Private Access Channel.
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#delete_private_access_channel} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 350 def delete_private_access_channel_and_wait_for_state(private_access_channel_key, analytics_instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_private_access_channel(private_access_channel_key, analytics_instance_id, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#delete_vanity_url} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [String] vanity_url_key Specify unique identifier key of a vanity url to update or delete.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#delete_vanity_url} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 402 def delete_vanity_url_and_wait_for_state(analytics_instance_id, vanity_url_key, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_vanity_url(analytics_instance_id, vanity_url_key, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#scale_analytics_instance} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::ScaleAnalyticsInstanceDetails] scale_analytics_instance_details Input payload for scaling an Analytics
instance up or down.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#scale_analytics_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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 454 def scale_analytics_instance_and_wait_for_state(analytics_instance_id, scale_analytics_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.scale_analytics_instance(analytics_instance_id, scale_analytics_instance_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#start_analytics_instance} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#start_analytics_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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 504 def start_analytics_instance_and_wait_for_state(analytics_instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.start_analytics_instance(analytics_instance_id, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#stop_analytics_instance} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#stop_analytics_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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 554 def stop_analytics_instance_and_wait_for_state(analytics_instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.stop_analytics_instance(analytics_instance_id, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#update_analytics_instance} and then waits for the {OCI::Analytics::Models::AnalyticsInstance} acted upon to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::UpdateAnalyticsInstanceDetails] update_analytics_instance_details The Analytics
Instance fields to update. Fields that are not provided
will not be updated.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::AnalyticsInstance#lifecycle_state} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#update_analytics_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::Analytics::Models::AnalyticsInstance}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 607 def update_analytics_instance_and_wait_for_state(analytics_instance_id, update_analytics_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_analytics_instance(analytics_instance_id, update_analytics_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_analytics_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::Analytics::AnalyticsClient#update_private_access_channel} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] private_access_channel_key The unique identifier key of the Private Access Channel.
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [OCI::Analytics::Models::UpdatePrivateAccessChannelDetails] update_private_access_channel_details Update the Private Access Channel with the given unique identifier key in the specified Analytics
Instance.
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#update_private_access_channel} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 651 def update_private_access_channel_and_wait_for_state(private_access_channel_key, analytics_instance_id, update_private_access_channel_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_private_access_channel(private_access_channel_key, analytics_instance_id, update_private_access_channel_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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::Analytics::AnalyticsClient#update_vanity_url} and then waits for the {OCI::Analytics::Models::WorkRequest} to enter the given state(s).
@param [String] analytics_instance_id The OCID of the AnalyticsInstance.
@param [String] vanity_url_key Specify unique identifier key of a vanity url to update or delete.
@param [OCI::Analytics::Models::UpdateVanityUrlDetails] update_vanity_url_details Vanity url details to update (certificate).
@param [Array<String>] wait_for_states An array of states to wait on. These should be valid values for {OCI::Analytics::Models::WorkRequest#status} @param [Hash] base_operation_opts Any optional arguments accepted by {OCI::Analytics::AnalyticsClient#update_vanity_url} @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::Analytics::Models::WorkRequest}
# File lib/oci/analytics/analytics_client_composite_operations.rb, line 705 def update_vanity_url_and_wait_for_state(analytics_instance_id, vanity_url_key, update_vanity_url_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_vanity_url(analytics_instance_id, vanity_url_key, update_vanity_url_details, base_operation_opts) use_util = OCI::Analytics::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::Analytics::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