Class: OCI::LoadBalancer::LoadBalancerClientCompositeOperations

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/load_balancer/load_balancer_client_composite_operations.rb

Overview

This class provides a wrapper around LoadBalancerClient 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::LoadBalancer::LoadBalancerClient.new) ⇒ LoadBalancerClientCompositeOperations

Initializes a new LoadBalancerClientCompositeOperations

Parameters:



20
21
22
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 20

def initialize(service_client = OCI::LoadBalancer::LoadBalancerClient.new)
  @service_client = service_client
end

Instance Attribute Details

#service_clientOCI::LoadBalancer::LoadBalancerClient (readonly)

The OCI::LoadBalancer::LoadBalancerClient used to communicate with the service_client



14
15
16
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 14

def service_client
  @service_client
end

Instance Method Details

#change_load_balancer_compartment_and_wait_for_state(load_balancer_id, change_load_balancer_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#change_load_balancer_compartment and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

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/load_balancer/load_balancer_client_composite_operations.rb', line 40

def change_load_balancer_compartment_and_wait_for_state(load_balancer_id, change_load_balancer_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.change_load_balancer_compartment(load_balancer_id, change_load_balancer_compartment_details, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_backend_and_wait_for_state(create_backend_details, load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_backend and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_backend_details (OCI::LoadBalancer::Models::CreateBackendDetails)

    The details to add a backend server to a backend set.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the backend set and servers.

  • backend_set_name (String)

    The name of the backend set to add the backend server to.

    Example: example_backend_set

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#create_backend

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



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
121
122
123
124
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 94

def create_backend_and_wait_for_state(create_backend_details, load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_backend(create_backend_details, load_balancer_id, backend_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_backend_set_and_wait_for_state(create_backend_set_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_backend_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_backend_set_details (OCI::LoadBalancer::Models::CreateBackendSetDetails)

    The details for adding a backend set.

  • load_balancer_id (String)

    The OCID of the load balancer on which to add a backend set.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



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
171
172
173
174
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 144

def create_backend_set_and_wait_for_state(create_backend_set_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_backend_set(create_backend_set_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_certificate_and_wait_for_state(create_certificate_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_certificate and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_certificate_details (OCI::LoadBalancer::Models::CreateCertificateDetails)

    The details of the certificate bundle to add.

  • load_balancer_id (String)

    The OCID of the load balancer on which to add the certificate bundle.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



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
221
222
223
224
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 194

def create_certificate_and_wait_for_state(create_certificate_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_certificate(create_certificate_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_hostname_and_wait_for_state(create_hostname_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_hostname and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_hostname_details (OCI::LoadBalancer::Models::CreateHostnameDetails)

    The details of the hostname resource to add to the specified load balancer.

  • load_balancer_id (String)

    The OCID of the load balancer to add the hostname to.

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#create_hostname

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



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
271
272
273
274
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 244

def create_hostname_and_wait_for_state(create_hostname_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_hostname(create_hostname_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_listener_and_wait_for_state(create_listener_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_listener and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_listener_details (OCI::LoadBalancer::Models::CreateListenerDetails)

    Details to add a listener.

  • load_balancer_id (String)

    The OCID of the load balancer on which to add a listener.

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#create_listener

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



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
320
321
322
323
324
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 294

def create_listener_and_wait_for_state(create_listener_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_listener(create_listener_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

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

Calls OCI::LoadBalancer::LoadBalancerClient#create_load_balancer and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

Returns:



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
369
370
371
372
373
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 343

def create_load_balancer_and_wait_for_state(create_load_balancer_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_load_balancer(create_load_balancer_details, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = @service_client.get_load_balancer(waiter_result.data.load_balancer_id)

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_path_route_set_and_wait_for_state(create_path_route_set_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_path_route_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_path_route_set_details (OCI::LoadBalancer::Models::CreatePathRouteSetDetails)

    The details of the path route set to add.

  • load_balancer_id (String)

    The OCID of the load balancer to add the path route set to.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



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
418
419
420
421
422
423
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 393

def create_path_route_set_and_wait_for_state(create_path_route_set_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_path_route_set(create_path_route_set_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_routing_policy_and_wait_for_state(create_routing_policy_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_routing_policy and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_routing_policy_details (OCI::LoadBalancer::Models::CreateRoutingPolicyDetails)

    The details of the routing policy rules to add.

  • load_balancer_id (String)

    The OCID of the load balancer to add the routing policy rule list to.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 443

def create_routing_policy_and_wait_for_state(create_routing_policy_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_routing_policy(create_routing_policy_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_rule_set_and_wait_for_state(load_balancer_id, create_rule_set_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_rule_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the specified load balancer.

  • create_rule_set_details (OCI::LoadBalancer::Models::CreateRuleSetDetails)

    The configuration details for the rule set to create.

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#create_rule_set

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



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 493

def create_rule_set_and_wait_for_state(load_balancer_id, create_rule_set_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_rule_set(load_balancer_id, create_rule_set_details, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#create_ssl_cipher_suite_and_wait_for_state(create_ssl_cipher_suite_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#create_ssl_cipher_suite and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • create_ssl_cipher_suite_details (OCI::LoadBalancer::Models::CreateSSLCipherSuiteDetails)

    The details of the SSL cipher suite to add.

  • load_balancer_id (String)

    The OCID of the associated load balancer.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 544

def create_ssl_cipher_suite_and_wait_for_state(create_ssl_cipher_suite_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.create_ssl_cipher_suite(create_ssl_cipher_suite_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_backend_and_wait_for_state(load_balancer_id, backend_set_name, backend_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_backend and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the backend set and server.

  • backend_set_name (String)

    The name of the backend set associated with the backend server.

    Example: example_backend_set

  • backend_name (String)

    The IP address and port of the backend server to remove.

    Example: 10.0.0.3:8080

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#delete_backend

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



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 601

def delete_backend_and_wait_for_state(load_balancer_id, backend_set_name, backend_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_backend(load_balancer_id, backend_set_name, backend_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_backend_set_and_wait_for_state(load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_backend_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the backend set.

  • backend_set_name (String)

    The name of the backend set to delete.

    Example: example_backend_set

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 654

def delete_backend_set_and_wait_for_state(load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_backend_set(load_balancer_id, backend_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_certificate_and_wait_for_state(load_balancer_id, certificate_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_certificate and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the certificate bundle to be deleted.

  • certificate_name (String)

    The name of the certificate bundle to delete.

    Example: example_certificate_bundle

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 709

def delete_certificate_and_wait_for_state(load_balancer_id, certificate_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_certificate(load_balancer_id, certificate_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_hostname_and_wait_for_state(load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_hostname and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the hostname to delete.

  • name (String)

    The name of the hostname resource to delete.

    Example: example_hostname_001

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#delete_hostname

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



762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 762

def delete_hostname_and_wait_for_state(load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_hostname(load_balancer_id, name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_listener_and_wait_for_state(load_balancer_id, listener_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_listener and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the listener to delete.

  • listener_name (String)

    The name of the listener to delete.

    Example: example_listener

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#delete_listener

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



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/load_balancer/load_balancer_client_composite_operations.rb', line 815

def delete_listener_and_wait_for_state(load_balancer_id, listener_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_listener(load_balancer_id, listener_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

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

Calls OCI::LoadBalancer::LoadBalancerClient#delete_load_balancer and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer to delete.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



864
865
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
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 864

def delete_load_balancer_and_wait_for_state(load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_load_balancer(load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_path_route_set_and_wait_for_state(load_balancer_id, path_route_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_path_route_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the path route set to delete.

  • path_route_set_name (String)

    The name of the path route set to delete.

    Example: example_path_route_set

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



917
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
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 917

def delete_path_route_set_and_wait_for_state(load_balancer_id, path_route_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_path_route_set(load_balancer_id, path_route_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_routing_policy_and_wait_for_state(load_balancer_id, routing_policy_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_routing_policy and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer associated with the routing policy to delete.

  • routing_policy_name (String)

    The name of the routing policy to delete.

    Example: example_routing_policy

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



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
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 970

def delete_routing_policy_and_wait_for_state(load_balancer_id, routing_policy_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_routing_policy(load_balancer_id, routing_policy_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_rule_set_and_wait_for_state(load_balancer_id, rule_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_rule_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the specified load balancer.

  • rule_set_name (String)

    The name of the rule set to delete.

    Example: example_rule_set

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#delete_rule_set

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



1023
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
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1023

def delete_rule_set_and_wait_for_state(load_balancer_id, rule_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_rule_set(load_balancer_id, rule_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#delete_ssl_cipher_suite_and_wait_for_state(load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#delete_ssl_cipher_suite and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the associated load balancer.

  • name (String)

    The name of the SSL cipher suite to delete.

    example: example_cipher_suite

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



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
1104
1105
1106
1107
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1077

def delete_ssl_cipher_suite_and_wait_for_state(load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.delete_ssl_cipher_suite(load_balancer_id, name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_backend_and_wait_for_state(update_backend_details, load_balancer_id, backend_set_name, backend_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_backend and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_backend_details (OCI::LoadBalancer::Models::UpdateBackendDetails)

    Details for updating a backend server.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the backend set and server.

  • backend_set_name (String)

    The name of the backend set associated with the backend server.

    Example: example_backend_set

  • backend_name (String)

    The IP address and port of the backend server to update.

    Example: 10.0.0.3:8080

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#update_backend

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



1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1135

def update_backend_and_wait_for_state(update_backend_details, load_balancer_id, backend_set_name, backend_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_backend_set_and_wait_for_state(update_backend_set_details, load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_backend_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_backend_set_details (OCI::LoadBalancer::Models::UpdateBackendSetDetails)

    The details to update a backend set.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the backend set.

  • backend_set_name (String)

    The name of the backend set to update.

    Example: example_backend_set

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1189

def update_backend_set_and_wait_for_state(update_backend_set_details, load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_health_checker_and_wait_for_state(health_checker, load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_health_checker and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • health_checker (OCI::LoadBalancer::Models::UpdateHealthCheckerDetails)

    The health check policy configuration details.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the health check policy to be updated.

  • backend_set_name (String)

    The name of the backend set associated with the health check policy to be retrieved.

    Example: example_backend_set

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



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
1269
1270
1271
1272
1273
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1243

def update_health_checker_and_wait_for_state(health_checker, load_balancer_id, backend_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_health_checker(health_checker, load_balancer_id, backend_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_hostname_and_wait_for_state(update_hostname_details, load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_hostname and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_hostname_details (OCI::LoadBalancer::Models::UpdateHostnameDetails)

    The configuration details to update a virtual hostname.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the virtual hostname to update.

  • name (String)

    The name of the hostname resource to update.

    Example: example_hostname_001

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#update_hostname

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



1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1299

def update_hostname_and_wait_for_state(update_hostname_details, load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_hostname(update_hostname_details, load_balancer_id, name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_listener_and_wait_for_state(update_listener_details, load_balancer_id, listener_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_listener and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_listener_details (OCI::LoadBalancer::Models::UpdateListenerDetails)

    Details to update a listener.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the listener to update.

  • listener_name (String)

    The name of the listener to update.

    Example: example_listener

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#update_listener

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



1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1353

def update_listener_and_wait_for_state(update_listener_details, load_balancer_id, listener_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_listener(update_listener_details, load_balancer_id, listener_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_load_balancer_and_wait_for_state(update_load_balancer_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_load_balancer and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_load_balancer_details (OCI::LoadBalancer::Models::UpdateLoadBalancerDetails)

    The details for updating a load balancer's configuration.

  • load_balancer_id (String)

    The OCID of the load balancer to update.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1403

def update_load_balancer_and_wait_for_state(update_load_balancer_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_load_balancer(update_load_balancer_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = @service_client.get_load_balancer(waiter_result.data.load_balancer_id)

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_load_balancer_shape_and_wait_for_state(load_balancer_id, update_load_balancer_shape_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_load_balancer_shape and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the load balancer whose shape will be updated.

  • update_load_balancer_shape_details (OCI::LoadBalancer::Models::UpdateLoadBalancerShapeDetails)

    The details for updating a load balancer's shape. This contains the new, desired shape.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1453

def update_load_balancer_shape_and_wait_for_state(load_balancer_id, update_load_balancer_shape_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_load_balancer_shape(load_balancer_id, update_load_balancer_shape_details, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_network_security_groups_and_wait_for_state(update_network_security_groups_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_network_security_groups and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_network_security_groups_details (OCI::LoadBalancer::Models::UpdateNetworkSecurityGroupsDetails)

    The details for updating the NSGs associated with the specified load balancer.

  • load_balancer_id (String)

    The OCID of the load balancer to update the NSGs for.

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1503

def update_network_security_groups_and_wait_for_state(update_network_security_groups_details, load_balancer_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_network_security_groups(update_network_security_groups_details, load_balancer_id, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_path_route_set_and_wait_for_state(update_path_route_set_details, load_balancer_id, path_route_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_path_route_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_path_route_set_details (OCI::LoadBalancer::Models::UpdatePathRouteSetDetails)

    The configuration details to update a path route set.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the path route set to update.

  • path_route_set_name (String)

    The name of the path route set to update.

    Example: example_path_route_set

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1557

def update_path_route_set_and_wait_for_state(update_path_route_set_details, load_balancer_id, path_route_set_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_path_route_set(update_path_route_set_details, load_balancer_id, path_route_set_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_routing_policy_and_wait_for_state(update_routing_policy_details, load_balancer_id, routing_policy_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_routing_policy and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_routing_policy_details (OCI::LoadBalancer::Models::UpdateRoutingPolicyDetails)

    The configuration details needed to update a routing policy.

  • load_balancer_id (String)

    The OCID of the load balancer associated with the routing policy to update.

  • routing_policy_name (String)

    The name of the routing policy to update.

    Example: example_routing_policy_name

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1611

def update_routing_policy_and_wait_for_state(update_routing_policy_details, load_balancer_id, routing_policy_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_routing_policy(update_routing_policy_details, load_balancer_id, routing_policy_name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_rule_set_and_wait_for_state(load_balancer_id, rule_set_name, update_rule_set_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_rule_set and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • load_balancer_id (String)

    The OCID of the specified load balancer.

  • rule_set_name (String)

    The name of the rule set to update.

    Example: example_rule_set

  • update_rule_set_details (OCI::LoadBalancer::Models::UpdateRuleSetDetails)

    The configuration details to update a set of rules.

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

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

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

    Any optional arguments accepted by OCI::LoadBalancer::LoadBalancerClient#update_rule_set

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



1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1665

def update_rule_set_and_wait_for_state(load_balancer_id, rule_set_name, update_rule_set_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_rule_set(load_balancer_id, rule_set_name, update_rule_set_details, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end

#update_ssl_cipher_suite_and_wait_for_state(update_ssl_cipher_suite_details, load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response

Calls OCI::LoadBalancer::LoadBalancerClient#update_ssl_cipher_suite and then waits for the Models::WorkRequest to enter the given state(s).

Parameters:

  • update_ssl_cipher_suite_details (OCI::LoadBalancer::Models::UpdateSSLCipherSuiteDetails)

    The configuration details to update an SSL cipher suite.

  • load_balancer_id (String)

    The OCID of the associated load balancer.

  • name (String)

    The name of the SSL cipher suite to update.

    example: example_cipher_suite

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

    An array of states to wait on. These should be valid values for Models::WorkRequest#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:



1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
# File 'lib/oci/load_balancer/load_balancer_client_composite_operations.rb', line 1720

def update_ssl_cipher_suite_and_wait_for_state(update_ssl_cipher_suite_details, load_balancer_id, name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {})
  operation_result = @service_client.update_ssl_cipher_suite(update_ssl_cipher_suite_details, load_balancer_id, name, base_operation_opts)
  use_util = OCI::LoadBalancer::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::LoadBalancer::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?(: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
      )
    end
    result_to_return = waiter_result

    return result_to_return
  rescue StandardError
    raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result])
  end
end