Class: OCI::LogAnalytics::LogAnalyticsClientCompositeOperations

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(service_client = OCI::LogAnalytics::LogAnalyticsClient.new) ⇒ LogAnalyticsClientCompositeOperations

Initializes a new LogAnalyticsClientCompositeOperations

Parameters:



22
23
24
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 22

def initialize(service_client = OCI::LogAnalytics::LogAnalyticsClient.new)
  @service_client = service_client
end

Instance Attribute Details

#service_clientOCI::LogAnalytics::LogAnalyticsClient (readonly)

The OCI::LogAnalytics::LogAnalyticsClient used to communicate with the service_client



16
17
18
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 16

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • lookup_name (String)

    The name of the lookup to operate on.

  • append_lookup_file_body (String, IO)

    The file to append.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



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
73
74
75
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 44

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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

#assign_encryption_key_and_wait_for_state(namespace_name, assign_encryption_key_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LogAnalytics::LogAnalyticsClient#assign_encryption_key and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • assign_encryption_key_details (OCI::LogAnalytics::Models::AssignEncryptionKeyDetails)

    This is the input to assign customer encryption key.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 96

def assign_encryption_key_and_wait_for_state(namespace_name, assign_encryption_key_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.assign_encryption_key(namespace_name, assign_encryption_key_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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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_ingest_time_rule_and_wait_for_state(namespace_name, create_ingest_time_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LogAnalytics::LogAnalyticsClient#create_ingest_time_rule and then waits for the Models::IngestTimeRule acted upon to enter the given state(s).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • create_ingest_time_rule_details (OCI::LogAnalytics::Models::CreateIngestTimeRuleDetails)

    Details of the new ingest time rule.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::IngestTimeRule#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 148

def create_ingest_time_rule_and_wait_for_state(namespace_name, create_ingest_time_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_ingest_time_rule(namespace_name, create_ingest_time_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_ingest_time_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_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).

Parameters:

Returns:



189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 189

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).

Parameters:

Returns:



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 230

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

Parameters:

Returns:



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 271

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • create_scheduled_task_details (OCI::LogAnalytics::Models::CreateScheduledTaskDetails)

    Scheduled task to be created.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::ScheduledTask#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 312

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • delete_log_analytics_association_details (OCI::LogAnalytics::Models::DeleteLogAnalyticsAssociationDetails)

    details for association

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



353
354
355
356
357
358
359
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
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 353

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • lookup_name (String)

    The name of the lookup to operate on.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::LogAnalytics::LogAnalyticsClient#delete_lookup

  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



405
406
407
408
409
410
411
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
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 405

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • source_name (String)

    The source name.

  • disable_auto_association_details (OCI::LogAnalytics::Models::DisableAutoAssociationDetails)

    Details required to disable auto association for the log source.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



458
459
460
461
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
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 458

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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_ingest_time_rule_and_wait_for_state(namespace_name, ingest_time_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LogAnalytics::LogAnalyticsClient#disable_ingest_time_rule and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • ingest_time_rule_id (String)

    Unique ocid of the ingest time rule.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



511
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 511

def disable_ingest_time_rule_and_wait_for_state(namespace_name, ingest_time_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.disable_ingest_time_rule(namespace_name, ingest_time_rule_id, 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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • source_name (String)

    The source name.

  • enable_auto_association_details (OCI::LogAnalytics::Models::EnableAutoAssociationDetails)

    Details required to enable auto association for the log source.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 564

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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_ingest_time_rule_and_wait_for_state(namespace_name, ingest_time_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LogAnalytics::LogAnalyticsClient#enable_ingest_time_rule and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • ingest_time_rule_id (String)

    Unique ocid of the ingest time rule.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 617

def enable_ingest_time_rule_and_wait_for_state(namespace_name, ingest_time_rule_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.enable_ingest_time_rule(namespace_name, ingest_time_rule_id, 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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 668

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::LogAnalytics::LogAnalyticsClient#onboard_namespace

  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 719

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • scheduled_task_id (String)

    Unique scheduledTask id returned from task create. If invalid will lead to a 404 not found.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::ScheduledTask#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 773

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • purge_storage_data_details (OCI::LogAnalytics::Models::PurgeStorageDataDetails)

    This is the input to purge old data.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 814

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • query_details (OCI::LogAnalytics::Models::QueryDetails)

    Query to be executed.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})

    Any optional arguments accepted by OCI::LogAnalytics::LogAnalyticsClient#query

  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 866

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • recall_archived_data_details (OCI::LogAnalytics::Models::RecallArchivedDataDetails)

    This is the input to recall archived data.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 918

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • release_recalled_data_details (OCI::LogAnalytics::Models::ReleaseRecalledDataDetails)

    This is the input to release recalled data

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 970

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • scheduled_task_id (String)

    Unique scheduledTask id returned from task create. If invalid will lead to a 404 not found.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::ScheduledTask#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1024

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_ingest_time_rule_and_wait_for_state(namespace_name, ingest_time_rule_id, update_ingest_time_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LogAnalytics::LogAnalyticsClient#update_ingest_time_rule and then waits for the Models::IngestTimeRule acted upon to enter the given state(s).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • ingest_time_rule_id (String)

    Unique ocid of the ingest time rule.

  • update_ingest_time_rule_details (OCI::LogAnalytics::Models::IngestTimeRule)

    The information to be updated.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::IngestTimeRule#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1067

def update_ingest_time_rule_and_wait_for_state(namespace_name, ingest_time_rule_id, update_ingest_time_rule_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_ingest_time_rule(namespace_name, ingest_time_rule_id, update_ingest_time_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_ingest_time_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_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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • log_analytics_em_bridge_id (String)

    The log analytics enterprise manager bridge OCID.

  • update_log_analytics_em_bridge_details (OCI::LogAnalytics::Models::UpdateLogAnalyticsEmBridgeDetails)

    Log analytics enterprise manager information to be updated.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::LogAnalyticsEmBridge#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1110

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • log_analytics_entity_id (String)

    The log analytics entity OCID.

  • update_log_analytics_entity_details (OCI::LogAnalytics::Models::UpdateLogAnalyticsEntityDetails)

    Log analytics entity information to be updated.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::LogAnalyticsEntity#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1153

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

Parameters:

Returns:



1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1195

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • lookup_name (String)

    The name of the lookup to operate on.

  • update_lookup_file_body (String, IO)

    The file to use for the lookup update.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1237

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • scheduled_task_id (String)

    Unique scheduledTask id returned from task create. If invalid will lead to a 404 not found.

  • update_scheduled_task_details (OCI::LogAnalytics::Models::UpdateScheduledTaskDetails)

    Update details. Schedules may be updated only for taskType SAVED_SEARCH and PURGE.

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::ScheduledTask#lifecycle_state

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1294

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).

Parameters:

  • namespace_name (String)

    The Logging Analytics namespace used for the request.

  • upsert_log_analytics_association_details (OCI::LogAnalytics::Models::UpsertLogAnalyticsAssociationDetails)

    list of association details

  • wait_for_states (Array<String>) (defaults to: [])

    An array of states to wait on. These should be valid values for Models::WorkRequest#status

  • base_operation_opts (Hash) (defaults to: {})
  • waiter_opts (Hash) (defaults to: {})

    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

Returns:



1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
# File 'lib/oci/log_analytics/log_analytics_client_composite_operations.rb', line 1335

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']
  return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty?

  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