Class: OCI::Opsi::OperationsInsightsClientCompositeOperations

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/opsi/operations_insights_client_composite_operations.rb

Overview

This class provides a wrapper around OperationsInsightsClient 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::Opsi::OperationsInsightsClient.new) ⇒ OperationsInsightsClientCompositeOperations

Initializes a new OperationsInsightsClientCompositeOperations

Parameters:



20
21
22
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 20

def initialize(service_client = OCI::Opsi::OperationsInsightsClient.new)
  @service_client = service_client
end

Instance Attribute Details

#service_clientOCI::Opsi::OperationsInsightsClient (readonly)

The OCI::Opsi::OperationsInsightsClient used to communicate with the service_client

Returns:



14
15
16
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 14

def service_client
  @service_client
end

Instance Method Details

#add_exadata_insight_members_and_wait_for_state(add_exadata_insight_members_details, exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#add_exadata_insight_members and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the members (e.g. databases and hosts) of an Exadata system to be added in Operations Insights.

  • Unique Exadata insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



40
41
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
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 40

def add_exadata_insight_members_and_wait_for_state(add_exadata_insight_members_details, exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.add_exadata_insight_members(add_exadata_insight_members_details, exadata_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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

#change_database_insight_compartment_and_wait_for_state(database_insight_id, change_database_insight_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#change_database_insight_compartment and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique database insight identifier

  • The information to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



90
91
92
93
94
95
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
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 90

def change_database_insight_compartment_and_wait_for_state(database_insight_id, change_database_insight_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_database_insight_compartment(database_insight_id, change_database_insight_compartment_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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

#change_enterprise_manager_bridge_compartment_and_wait_for_state(enterprise_manager_bridge_id, change_enterprise_manager_bridge_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • Unique Enterprise Manager bridge identifier

  • The information to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 140

def change_enterprise_manager_bridge_compartment_and_wait_for_state(enterprise_manager_bridge_id, change_enterprise_manager_bridge_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_enterprise_manager_bridge_compartment(enterprise_manager_bridge_id, change_enterprise_manager_bridge_compartment_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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

#change_exadata_insight_compartment_and_wait_for_state(exadata_insight_id, change_exadata_insight_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#change_exadata_insight_compartment and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Exadata insight identifier

  • The information to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 190

def change_exadata_insight_compartment_and_wait_for_state(exadata_insight_id, change_exadata_insight_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_exadata_insight_compartment(exadata_insight_id, change_exadata_insight_compartment_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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

#change_host_insight_compartment_and_wait_for_state(host_insight_id, change_host_insight_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#change_host_insight_compartment and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique host insight identifier

  • The information to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 240

def change_host_insight_compartment_and_wait_for_state(host_insight_id, change_host_insight_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_host_insight_compartment(host_insight_id, change_host_insight_compartment_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_awr_hub_and_wait_for_state(create_awr_hub_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#create_awr_hub and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details using which an AWR hub resource will be created in Operations Insights.

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#create_awr_hub

  • (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:



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 289

def create_awr_hub_and_wait_for_state(create_awr_hub_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_awr_hub(create_awr_hub_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_database_insight_and_wait_for_state(create_database_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#create_database_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the database for which a Database Insight resource will be created in Operations Insights.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 338

def create_database_insight_and_wait_for_state(create_database_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_database_insight(create_database_insight_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_enterprise_manager_bridge_and_wait_for_state(create_enterprise_manager_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#create_enterprise_manager_bridge and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the Enterprise Manager bridge to be created in Operations Insights.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 387

def create_enterprise_manager_bridge_and_wait_for_state(create_enterprise_manager_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_enterprise_manager_bridge(create_enterprise_manager_bridge_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_exadata_insight_and_wait_for_state(create_exadata_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#create_exadata_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the Exadata system for which an Exadata insight resource will be created in Operations Insights.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 436

def create_exadata_insight_and_wait_for_state(create_exadata_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_exadata_insight(create_exadata_insight_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_host_insight_and_wait_for_state(create_host_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#create_host_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the host for which a Host Insight resource will be created in Operations Insights.

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#create_host_insight

  • (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:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 485

def create_host_insight_and_wait_for_state(create_host_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_host_insight(create_host_insight_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_operations_insights_warehouse_and_wait_for_state(create_operations_insights_warehouse_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#create_operations_insights_warehouse and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details using which an Operations Insights Warehouse resource will be created in Operations Insights.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 534

def create_operations_insights_warehouse_and_wait_for_state(create_operations_insights_warehouse_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_operations_insights_warehouse(create_operations_insights_warehouse_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_operations_insights_warehouse_user_and_wait_for_state(create_operations_insights_warehouse_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • Parameter using which an Operations Insights Warehouse user resource will be created.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 583

def create_operations_insights_warehouse_user_and_wait_for_state(create_operations_insights_warehouse_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_operations_insights_warehouse_user(create_operations_insights_warehouse_user_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_awr_hub_and_wait_for_state(awr_hub_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#delete_awr_hub and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Awr Hub identifier

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#delete_awr_hub

  • (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:



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 632

def delete_awr_hub_and_wait_for_state(awr_hub_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_awr_hub(awr_hub_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_database_insight_and_wait_for_state(database_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#delete_database_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique database insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 681

def delete_database_insight_and_wait_for_state(database_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_database_insight(database_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_enterprise_manager_bridge_and_wait_for_state(enterprise_manager_bridge_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#delete_enterprise_manager_bridge and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Enterprise Manager bridge identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 730

def delete_enterprise_manager_bridge_and_wait_for_state(enterprise_manager_bridge_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_enterprise_manager_bridge(enterprise_manager_bridge_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_exadata_insight_and_wait_for_state(exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#delete_exadata_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Exadata insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 779

def delete_exadata_insight_and_wait_for_state(exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_exadata_insight(exadata_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_host_insight_and_wait_for_state(host_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#delete_host_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique host insight identifier

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#delete_host_insight

  • (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:



828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 828

def delete_host_insight_and_wait_for_state(host_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_host_insight(host_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_operations_insights_warehouse_and_wait_for_state(operations_insights_warehouse_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#delete_operations_insights_warehouse and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Operations Insights Warehouse identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 877

def delete_operations_insights_warehouse_and_wait_for_state(operations_insights_warehouse_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_operations_insights_warehouse(operations_insights_warehouse_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_operations_insights_warehouse_user_and_wait_for_state(operations_insights_warehouse_user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • Unique Operations Insights Warehouse User identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 926

def delete_operations_insights_warehouse_user_and_wait_for_state(operations_insights_warehouse_user_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_operations_insights_warehouse_user(operations_insights_warehouse_user_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_database_insight_and_wait_for_state(database_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#disable_database_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique database insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



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
1002
1003
1004
1005
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 975

def disable_database_insight_and_wait_for_state(database_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.disable_database_insight(database_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_exadata_insight_and_wait_for_state(exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#disable_exadata_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Exadata insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1024

def disable_exadata_insight_and_wait_for_state(exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.disable_exadata_insight(exadata_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_host_insight_and_wait_for_state(host_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#disable_host_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique host insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1073
1074
1075
1076
1077
1078
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
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1073

def disable_host_insight_and_wait_for_state(host_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.disable_host_insight(host_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_database_insight_and_wait_for_state(enable_database_insight_details, database_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#enable_database_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the database to be enabled in Operations Insights.

  • Unique database insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1123

def enable_database_insight_and_wait_for_state(enable_database_insight_details, database_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.enable_database_insight(enable_database_insight_details, database_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_exadata_insight_and_wait_for_state(enable_exadata_insight_details, exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#enable_exadata_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the Exadata system to be enabled in Operations Insights.

  • Unique Exadata insight identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1173

def enable_exadata_insight_and_wait_for_state(enable_exadata_insight_details, exadata_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.enable_exadata_insight(enable_exadata_insight_details, exadata_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_host_insight_and_wait_for_state(enable_host_insight_details, host_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#enable_host_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Details for the host to be enabled in Operations Insights.

  • Unique host insight identifier

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#enable_host_insight

  • (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:



1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1223

def enable_host_insight_and_wait_for_state(enable_host_insight_details, host_insight_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.enable_host_insight(enable_host_insight_details, host_insight_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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

#rotate_operations_insights_warehouse_wallet_and_wait_for_state(operations_insights_warehouse_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • Unique Operations Insights Warehouse identifier

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1272

def rotate_operations_insights_warehouse_wallet_and_wait_for_state(operations_insights_warehouse_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.rotate_operations_insights_warehouse_wallet(operations_insights_warehouse_id, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_awr_hub_and_wait_for_state(awr_hub_id, update_awr_hub_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#update_awr_hub and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Awr Hub identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#update_awr_hub

  • (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:



1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1322

def update_awr_hub_and_wait_for_state(awr_hub_id, update_awr_hub_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_awr_hub(awr_hub_id, update_awr_hub_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_database_insight_and_wait_for_state(database_insight_id, update_database_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#update_database_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique database insight identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1372

def update_database_insight_and_wait_for_state(database_insight_id, update_database_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_database_insight(database_insight_id, update_database_insight_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_enterprise_manager_bridge_and_wait_for_state(enterprise_manager_bridge_id, update_enterprise_manager_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#update_enterprise_manager_bridge and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Enterprise Manager bridge identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1422

def update_enterprise_manager_bridge_and_wait_for_state(enterprise_manager_bridge_id, update_enterprise_manager_bridge_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_enterprise_manager_bridge(enterprise_manager_bridge_id, update_enterprise_manager_bridge_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_exadata_insight_and_wait_for_state(exadata_insight_id, update_exadata_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#update_exadata_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Exadata insight identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1472

def update_exadata_insight_and_wait_for_state(exadata_insight_id, update_exadata_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_exadata_insight(exadata_insight_id, update_exadata_insight_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_host_insight_and_wait_for_state(host_insight_id, update_host_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#update_host_insight and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique host insight identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})

    Any optional arguments accepted by OCI::Opsi::OperationsInsightsClient#update_host_insight

  • (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:



1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1522

def update_host_insight_and_wait_for_state(host_insight_id, update_host_insight_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_host_insight(host_insight_id, update_host_insight_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_operations_insights_warehouse_and_wait_for_state(operations_insights_warehouse_id, update_operations_insights_warehouse_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::Opsi::OperationsInsightsClient#update_operations_insights_warehouse and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • Unique Operations Insights Warehouse identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1572

def update_operations_insights_warehouse_and_wait_for_state(operations_insights_warehouse_id, update_operations_insights_warehouse_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_operations_insights_warehouse(operations_insights_warehouse_id, update_operations_insights_warehouse_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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_operations_insights_warehouse_user_and_wait_for_state(operations_insights_warehouse_user_id, update_operations_insights_warehouse_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Parameters:

  • Unique Operations Insights Warehouse User identifier

  • The configuration to be updated.

  • (defaults to: [])

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

  • (defaults to: {})
  • (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:



1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
# File 'lib/oci/opsi/operations_insights_client_composite_operations.rb', line 1622

def update_operations_insights_warehouse_user_and_wait_for_state(operations_insights_warehouse_user_id, update_operations_insights_warehouse_user_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_operations_insights_warehouse_user(operations_insights_warehouse_user_id, update_operations_insights_warehouse_user_details, base_operation_opts)
  use_util = OCI::Opsi::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::Opsi::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