Class: OCI::LogAnalytics::LogAnalyticsClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::LogAnalyticsClientCompositeOperations
- Defined in:
- lib/oci/log_analytics/log_analytics_client_composite_operations.rb
Overview
This class provides a wrapper around LogAnalyticsClient 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
Instance Attribute Summary collapse
-
#service_client ⇒ OCI::LogAnalytics::LogAnalyticsClient
readonly
The LogAnalyticsClient used to communicate with the service_client.
Instance Method Summary collapse
-
#append_lookup_data_and_wait_for_state(namespace_name, lookup_name, append_lookup_file_body, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#append_lookup_data and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_log_analytics_em_bridge_and_wait_for_state(namespace_name, create_log_analytics_em_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_log_analytics_em_bridge and then waits for the Models::LogAnalyticsEmBridge acted upon to enter the given state(s).
-
#create_log_analytics_entity_and_wait_for_state(namespace_name, create_log_analytics_entity_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_log_analytics_entity and then waits for the Models::LogAnalyticsEntity acted upon to enter the given state(s).
-
#create_log_analytics_object_collection_rule_and_wait_for_state(namespace_name, create_log_analytics_object_collection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_log_analytics_object_collection_rule and then waits for the Models::LogAnalyticsObjectCollectionRule acted upon to enter the given state(s).
-
#create_scheduled_task_and_wait_for_state(namespace_name, create_scheduled_task_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
-
#delete_associations_and_wait_for_state(namespace_name, delete_log_analytics_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#delete_associations and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_lookup_and_wait_for_state(namespace_name, lookup_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#delete_lookup and then waits for the Models::WorkRequest to enter the given state(s).
-
#disable_auto_association_and_wait_for_state(namespace_name, source_name, disable_auto_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#disable_auto_association and then waits for the Models::WorkRequest to enter the given state(s).
-
#enable_auto_association_and_wait_for_state(namespace_name, source_name, enable_auto_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#enable_auto_association and then waits for the Models::WorkRequest to enter the given state(s).
-
#initialize(service_client = OCI::LogAnalytics::LogAnalyticsClient.new) ⇒ LogAnalyticsClientCompositeOperations
constructor
Initializes a new LogAnalyticsClientCompositeOperations.
-
#offboard_namespace_and_wait_for_state(namespace_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#offboard_namespace and then waits for the Models::WorkRequest to enter the given state(s).
-
#onboard_namespace_and_wait_for_state(namespace_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#onboard_namespace and then waits for the Models::WorkRequest to enter the given state(s).
-
#pause_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#pause_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
-
#purge_storage_data_and_wait_for_state(namespace_name, purge_storage_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#purge_storage_data and then waits for the Models::WorkRequest to enter the given state(s).
-
#query_and_wait_for_state(namespace_name, query_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#query and then waits for the Models::WorkRequest to enter the given state(s).
-
#recall_archived_data_and_wait_for_state(namespace_name, recall_archived_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#recall_archived_data and then waits for the Models::WorkRequest to enter the given state(s).
-
#release_recalled_data_and_wait_for_state(namespace_name, release_recalled_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#release_recalled_data and then waits for the Models::WorkRequest to enter the given state(s).
-
#resume_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#resume_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
-
#update_log_analytics_em_bridge_and_wait_for_state(namespace_name, log_analytics_em_bridge_id, update_log_analytics_em_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_log_analytics_em_bridge and then waits for the Models::LogAnalyticsEmBridge acted upon to enter the given state(s).
-
#update_log_analytics_entity_and_wait_for_state(namespace_name, log_analytics_entity_id, update_log_analytics_entity_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_log_analytics_entity and then waits for the Models::LogAnalyticsEntity acted upon to enter the given state(s).
-
#update_log_analytics_object_collection_rule_and_wait_for_state(namespace_name, log_analytics_object_collection_rule_id, update_log_analytics_object_collection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_log_analytics_object_collection_rule and then waits for the Models::LogAnalyticsObjectCollectionRule acted upon to enter the given state(s).
-
#update_lookup_data_and_wait_for_state(namespace_name, lookup_name, update_lookup_file_body, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_lookup_data and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, update_scheduled_task_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
-
#upsert_associations_and_wait_for_state(namespace_name, upsert_log_analytics_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#upsert_associations and then waits for the Models::WorkRequest to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::LogAnalytics::LogAnalyticsClient.new) ⇒ LogAnalyticsClientCompositeOperations
Initializes a new LogAnalyticsClientCompositeOperations
20 21 22 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 20 def initialize(service_client = OCI::LogAnalytics::LogAnalyticsClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::LogAnalytics::LogAnalyticsClient (readonly)
The OCI::LogAnalytics::LogAnalyticsClient used to communicate with the service_client
14 15 16 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 14 def service_client @service_client end |
Instance Method Details
#append_lookup_data_and_wait_for_state(namespace_name, lookup_name, append_lookup_file_body, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#append_lookup_data and then waits for the Models::WorkRequest to enter the given state(s).
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 42 def append_lookup_data_and_wait_for_state(namespace_name, lookup_name, append_lookup_file_body, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.append_lookup_data(namespace_name, lookup_name, append_lookup_file_body, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_log_analytics_em_bridge_and_wait_for_state(namespace_name, create_log_analytics_em_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_log_analytics_em_bridge and then waits for the Models::LogAnalyticsEmBridge acted upon to enter the given state(s).
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 93 def create_log_analytics_em_bridge_and_wait_for_state(namespace_name, create_log_analytics_em_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_log_analytics_em_bridge(namespace_name, create_log_analytics_em_bridge_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_log_analytics_em_bridge(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_log_analytics_entity_and_wait_for_state(namespace_name, create_log_analytics_entity_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_log_analytics_entity and then waits for the Models::LogAnalyticsEntity acted upon to enter the given state(s).
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 134 def create_log_analytics_entity_and_wait_for_state(namespace_name, create_log_analytics_entity_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_log_analytics_entity(namespace_name, create_log_analytics_entity_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_log_analytics_entity(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_log_analytics_object_collection_rule_and_wait_for_state(namespace_name, create_log_analytics_object_collection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_log_analytics_object_collection_rule and then waits for the Models::LogAnalyticsObjectCollectionRule acted upon to enter the given state(s).
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 175 def create_log_analytics_object_collection_rule_and_wait_for_state(namespace_name, create_log_analytics_object_collection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_log_analytics_object_collection_rule(namespace_name, create_log_analytics_object_collection_rule_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_log_analytics_object_collection_rule(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_scheduled_task_and_wait_for_state(namespace_name, create_scheduled_task_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#create_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 216 def create_scheduled_task_and_wait_for_state(namespace_name, create_scheduled_task_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_scheduled_task(namespace_name, create_scheduled_task_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_scheduled_task(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 |
#delete_associations_and_wait_for_state(namespace_name, delete_log_analytics_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#delete_associations and then waits for the Models::WorkRequest to enter the given state(s).
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 257 def delete_associations_and_wait_for_state(namespace_name, delete_log_analytics_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_associations(namespace_name, delete_log_analytics_association_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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_lookup_and_wait_for_state(namespace_name, lookup_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#delete_lookup and then waits for the Models::WorkRequest to enter the given state(s).
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 308 def delete_lookup_and_wait_for_state(namespace_name, lookup_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_lookup(namespace_name, lookup_name, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#disable_auto_association_and_wait_for_state(namespace_name, source_name, disable_auto_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#disable_auto_association and then waits for the Models::WorkRequest to enter the given state(s).
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 360 def disable_auto_association_and_wait_for_state(namespace_name, source_name, disable_auto_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.disable_auto_association(namespace_name, source_name, disable_auto_association_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#enable_auto_association_and_wait_for_state(namespace_name, source_name, enable_auto_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#enable_auto_association and then waits for the Models::WorkRequest to enter the given state(s).
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 412 def enable_auto_association_and_wait_for_state(namespace_name, source_name, enable_auto_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.enable_auto_association(namespace_name, source_name, enable_auto_association_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#offboard_namespace_and_wait_for_state(namespace_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#offboard_namespace and then waits for the Models::WorkRequest to enter the given state(s).
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 462 def offboard_namespace_and_wait_for_state(namespace_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.offboard_namespace(namespace_name, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#onboard_namespace_and_wait_for_state(namespace_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#onboard_namespace and then waits for the Models::WorkRequest to enter the given state(s).
512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 512 def onboard_namespace_and_wait_for_state(namespace_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.onboard_namespace(namespace_name, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#pause_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#pause_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 565 def pause_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.pause_scheduled_task(namespace_name, scheduled_task_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_scheduled_task(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 |
#purge_storage_data_and_wait_for_state(namespace_name, purge_storage_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#purge_storage_data and then waits for the Models::WorkRequest to enter the given state(s).
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 606 def purge_storage_data_and_wait_for_state(namespace_name, purge_storage_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.purge_storage_data(namespace_name, purge_storage_data_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#query_and_wait_for_state(namespace_name, query_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#query and then waits for the Models::WorkRequest to enter the given state(s).
657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 657 def query_and_wait_for_state(namespace_name, query_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.query(namespace_name, query_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#recall_archived_data_and_wait_for_state(namespace_name, recall_archived_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#recall_archived_data and then waits for the Models::WorkRequest to enter the given state(s).
708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 708 def recall_archived_data_and_wait_for_state(namespace_name, recall_archived_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.recall_archived_data(namespace_name, recall_archived_data_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#release_recalled_data_and_wait_for_state(namespace_name, release_recalled_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#release_recalled_data and then waits for the Models::WorkRequest to enter the given state(s).
759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 759 def release_recalled_data_and_wait_for_state(namespace_name, release_recalled_data_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.release_recalled_data(namespace_name, release_recalled_data_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |
#resume_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#resume_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 812 def resume_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.resume_scheduled_task(namespace_name, scheduled_task_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_scheduled_task(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_log_analytics_em_bridge_and_wait_for_state(namespace_name, log_analytics_em_bridge_id, update_log_analytics_em_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_log_analytics_em_bridge and then waits for the Models::LogAnalyticsEmBridge acted upon to enter the given state(s).
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 855 def update_log_analytics_em_bridge_and_wait_for_state(namespace_name, log_analytics_em_bridge_id, update_log_analytics_em_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_log_analytics_em_bridge(namespace_name, log_analytics_em_bridge_id, update_log_analytics_em_bridge_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_log_analytics_em_bridge(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_log_analytics_entity_and_wait_for_state(namespace_name, log_analytics_entity_id, update_log_analytics_entity_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_log_analytics_entity and then waits for the Models::LogAnalyticsEntity acted upon to enter the given state(s).
898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 898 def update_log_analytics_entity_and_wait_for_state(namespace_name, log_analytics_entity_id, update_log_analytics_entity_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_log_analytics_entity(namespace_name, log_analytics_entity_id, update_log_analytics_entity_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_log_analytics_entity(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_log_analytics_object_collection_rule_and_wait_for_state(namespace_name, log_analytics_object_collection_rule_id, update_log_analytics_object_collection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_log_analytics_object_collection_rule and then waits for the Models::LogAnalyticsObjectCollectionRule acted upon to enter the given state(s).
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 940 def update_log_analytics_object_collection_rule_and_wait_for_state(namespace_name, log_analytics_object_collection_rule_id, update_log_analytics_object_collection_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_log_analytics_object_collection_rule(namespace_name, log_analytics_object_collection_rule_id, update_log_analytics_object_collection_rule_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_log_analytics_object_collection_rule(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_lookup_data_and_wait_for_state(namespace_name, lookup_name, update_lookup_file_body, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_lookup_data and then waits for the Models::WorkRequest to enter the given state(s).
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 982 def update_lookup_data_and_wait_for_state(namespace_name, lookup_name, update_lookup_file_body, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_lookup_data(namespace_name, lookup_name, update_lookup_file_body, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, update_scheduled_task_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#update_scheduled_task and then waits for the Models::ScheduledTask acted upon to enter the given state(s).
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1038 def update_scheduled_task_and_wait_for_state(namespace_name, scheduled_task_id, update_scheduled_task_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_scheduled_task(namespace_name, scheduled_task_id, update_scheduled_task_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_scheduled_task(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 |
#upsert_associations_and_wait_for_state(namespace_name, upsert_log_analytics_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::LogAnalytics::LogAnalyticsClient#upsert_associations and then waits for the Models::WorkRequest to enter the given state(s).
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 |
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1079 def upsert_associations_and_wait_for_state(namespace_name, upsert_log_analytics_association_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.upsert_associations(namespace_name, upsert_log_analytics_association_details, base_operation_opts) use_util = OCI::LogAnalytics::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::LogAnalytics::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 |