Class: OCI::LoadBalancer::LoadBalancerClient

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil) ⇒ LoadBalancerClient

Creates a new LoadBalancerClient. If a config is not specified, then the global OCI.config will be used.

A region must be specified in either the config or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.



32
33
34
35
36
37
38
39
40
41
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 32

def initialize(config:nil, region:nil)
  config ||= OCI.config
  config.validate

  signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content, signing_strategy: Signer::STANDARD)
  @api_client = ApiClient.new(config, signer)

  region ||= config.region
  self.region = region
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



12
13
14
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 12

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


16
17
18
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 16

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


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

def region
  @region
end

Instance Method Details

#create_backend(create_backend_details, load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Adds a backend server to a backend set.

Parameters:

  • create_backend_details (CreateBackendDetails)

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

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) 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: ‘My_backend_set`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 79

def create_backend(create_backend_details, load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#create_backend." if logger

  fail "Missing the required parameter 'create_backend_details' when calling create_backend." if create_backend_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling create_backend." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling create_backend." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(create_backend_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#create_backend_set(create_backend_set_details, load_balancer_id, opts = {}) ⇒ Response

Adds a backend set to a load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 123

def create_backend_set(create_backend_set_details, load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#create_backend_set." if logger

  fail "Missing the required parameter 'create_backend_set_details' when calling create_backend_set." if create_backend_set_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling create_backend_set." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(create_backend_set_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#create_certificate(create_certificate_details, load_balancer_id, opts = {}) ⇒ Response

Creates an asynchronous request to add an SSL certificate.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 166

def create_certificate(create_certificate_details, load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#create_certificate." if logger

  fail "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling create_certificate." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/certificates".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(create_certificate_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#create_listener(create_listener_details, load_balancer_id, opts = {}) ⇒ Response

Adds a listener to a load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 209

def create_listener(create_listener_details, load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#create_listener." if logger

  fail "Missing the required parameter 'create_listener_details' when calling create_listener." if create_listener_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling create_listener." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/listeners".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(create_listener_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#create_load_balancer(create_load_balancer_details, opts = {}) ⇒ Response

Creates a new load balancer in the specified compartment. For general information about load balancers, see [Overview of the Load Balancing Service](docs.us-phoenix-1.oraclecloud.com/Content/Balance/Concepts/balanceoverview.htm).

For the purposes of access control, you must provide the OCID of the compartment where you want the load balancer to reside. Notice that the load balancer doesn’t have to be in the same compartment as the VCN or backend set. If you’re not sure which compartment to use, put the load balancer in the same compartment as the VCN. For information about access control and compartments, see [Overview of the IAM Service](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm).

You must specify a display name for the load balancer. It does not have to be unique, and you can change it.

For information about Availability Domains, see [Regions and Availability Domains](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm). To get a list of Availability Domains, use the ‘ListAvailabilityDomains` operation in the Identity and Access Management Service API.

All Oracle Cloud Infrastructure resources, including load balancers, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource’s OCID by using a List API operation on that resource type, or by viewing the resource in the Console. Fore more information, see [Resource Identifiers](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm).

After you send your request, the new object’s state will temporarily be PROVISIONING. Before using the object, first make sure its state has changed to RUNNING.

When you create a load balancer, the system assigns an IP address. To get the IP address, use the get_load_balancer operation.

Parameters:

  • create_load_balancer_details (CreateLoadBalancerDetails)

    The configuration details for creating a load balancer.

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 278

def create_load_balancer(create_load_balancer_details, opts = {})
  logger.debug "Calling operation LoadBalancerClient#create_load_balancer." if logger

  fail "Missing the required parameter 'create_load_balancer_details' when calling create_load_balancer." if create_load_balancer_details.nil?

  path = "/loadBalancers"

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(create_load_balancer_details)

  return @api_client.call_api(
    :POST,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#delete_backend(load_balancer_id, backend_set_name, backend_name, opts = {}) ⇒ Response

Removes a backend server from a given load balancer and backend set.

Parameters:

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) 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: ‘My_backend_set`

  • backend_name (String)

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

    Example: ‘1.1.1.7:42`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type nil



321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 321

def delete_backend(load_balancer_id, backend_set_name, backend_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#delete_backend." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling delete_backend." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling delete_backend." if backend_set_name.nil?
  fail "Missing the required parameter 'backend_name' when calling delete_backend." if backend_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#delete_backend_set(load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Deletes the specified backend set. Note that deleting a backend set removes its backend servers from the load balancer.

Before you can delete a backend set, you must remove it from any active listeners.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type nil



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 364

def delete_backend_set(load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#delete_backend_set." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling delete_backend_set." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling delete_backend_set." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#delete_certificate(load_balancer_id, certificate_name, opts = {}) ⇒ Response

Deletes an SSL certificate from a load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type nil



403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 403

def delete_certificate(load_balancer_id, certificate_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#delete_certificate." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling delete_certificate." if load_balancer_id.nil?
  fail "Missing the required parameter 'certificate_name' when calling delete_certificate." if certificate_name.nil?

  path = "/loadBalancers/{loadBalancerId}/certificates/{certificateName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{certificateName}', certificate_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#delete_listener(load_balancer_id, listener_name, opts = {}) ⇒ Response

Deletes a listener from a load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type nil



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

def delete_listener(load_balancer_id, listener_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#delete_listener." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling delete_listener." if load_balancer_id.nil?
  fail "Missing the required parameter 'listener_name' when calling delete_listener." if listener_name.nil?

  path = "/loadBalancers/{loadBalancerId}/listeners/{listenerName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#delete_load_balancer(load_balancer_id, opts = {}) ⇒ Response

Stops a load balancer and removes it from service.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type nil



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 477

def delete_load_balancer(load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#delete_load_balancer." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling delete_load_balancer." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :DELETE,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#get_backend(load_balancer_id, backend_set_name, backend_name, opts = {}) ⇒ Response

Gets the specified backend server’s configuration information.

Parameters:

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set and server.

  • backend_set_name (String)

    The name of the backend set that includes the backend server.

    Example: ‘My_backend_set`

  • backend_name (String)

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

    Example: ‘1.1.1.7:42`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::Backend



519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 519

def get_backend(load_balancer_id, backend_set_name, backend_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_backend." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_backend." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling get_backend." if backend_set_name.nil?
  fail "Missing the required parameter 'backend_name' when calling get_backend." if backend_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::Backend')
end

#get_backend_health(load_balancer_id, backend_set_name, backend_name, opts = {}) ⇒ Response

Gets the current health status of the specified backend server.

Parameters:

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend server health status to be retrieved.

  • backend_set_name (String)

    The name of the backend set associated with the backend server to retrieve the health status for.

    Example: ‘My_backend_set`

  • backend_name (String)

    The IP address and port of the backend server to retrieve the health status for.

    Example: ‘1.1.1.7:42`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::BackendHealth



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

def get_backend_health(load_balancer_id, backend_set_name, backend_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_backend_health." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_backend_health." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling get_backend_health." if backend_set_name.nil?
  fail "Missing the required parameter 'backend_name' when calling get_backend_health." if backend_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}/health".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::BackendHealth')
end

#get_backend_set(load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Gets the specified backend set’s configuration information.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::BackendSet



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
632
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 605

def get_backend_set(load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_backend_set." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_backend_set." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling get_backend_set." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::BackendSet')
end

#get_backend_set_health(load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Gets the health status for the specified backend set.

Parameters:

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set health status to be retrieved.

  • backend_set_name (String)

    The name of the backend set to retrieve the health status for.

    Example: ‘My_backend_set`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::BackendSetHealth



645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 645

def get_backend_set_health(load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_backend_set_health." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_backend_set_health." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling get_backend_set_health." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/health".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::BackendSetHealth')
end

#get_health_checker(load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Gets the health check policy information for a given load balancer and backend set.

Parameters:

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the health check policy to be retrieved.

  • backend_set_name (String)

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

    Example: ‘My_backend_set`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::HealthChecker



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

def get_health_checker(load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_health_checker." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_health_checker." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling get_health_checker." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::HealthChecker')
end

#get_load_balancer(load_balancer_id, opts = {}) ⇒ Response

Gets the specified load balancer’s configuration information.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::LoadBalancer



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

def get_load_balancer(load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_load_balancer." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_load_balancer." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::LoadBalancer')
end

#get_load_balancer_health(load_balancer_id, opts = {}) ⇒ Response

Gets the health status for the specified load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::LoadBalancerHealth



756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 756

def get_load_balancer_health(load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_load_balancer_health." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling get_load_balancer_health." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/health".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::LoadBalancerHealth')
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Gets the details of a work request.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type OCI::LoadBalancer::Models::WorkRequest



791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 791

def get_work_request(work_request_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#get_work_request." if logger

  fail "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?

  path = "/loadBalancerWorkRequests/{workRequestId}".sub('{workRequestId}', work_request_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'OCI::LoadBalancer::Models::WorkRequest')
end

#list_backend_sets(load_balancer_id, opts = {}) ⇒ Response

Lists all backend sets associated with a given load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::BackendSet>



826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 826

def list_backend_sets(load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_backend_sets." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling list_backend_sets." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::BackendSet>')
end

#list_backends(load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Lists the backend servers for a given load balancer and backend set.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::Backend>



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

def list_backends(load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_backends." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling list_backends." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling list_backends." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::Backend>')
end

#list_certificates(load_balancer_id, opts = {}) ⇒ Response

Lists all SSL certificates associated with a given load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::Certificate>



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 901

def list_certificates(load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_certificates." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling list_certificates." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/certificates".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::Certificate>')
end

#list_load_balancer_healths(compartment_id, opts = {}) ⇒ Response

Lists the summary health statuses for all load balancers in the specified compartment.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

    (default to 10)
    
  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

    Example: ‘3`

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerHealthSummary>



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 944

def list_load_balancer_healths(compartment_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_load_balancer_healths." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_load_balancer_healths." if compartment_id.nil?

  path = "/loadBalancerHealths"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerHealthSummary>')
end

#list_load_balancers(compartment_id, opts = {}) ⇒ Response

Lists all load balancers in the specified compartment.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

    (default to 10)
    
  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

    Example: ‘3`

  • :detail (String)

    The level of detail to return for each result. Can be ‘full` or `simple`.

    Example: ‘full`

    (default to full)
    
  • :sort_by (String)

    The field to sort by. Only one sort order may be provided. Time created is default ordered as descending. Display name is default ordered as ascending.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ‘asc’ or ‘desc’

    Allowed values are: ASC, DESC

  • :display_name (String)

    A filter to only return resources that match the given display name exactly.

  • :lifecycle_state (String)

    A filter to only return resources that match the given lifecycle state.

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancer>



1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
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
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1004

def list_load_balancers(compartment_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_load_balancers." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_load_balancers." if compartment_id.nil?

  if opts[:'sort_by'] && !['TIMECREATED', 'DISPLAYNAME'].include?(opts[:'sort_by'])
    fail 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
    fail 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  if opts[:'lifecycle_state'] && !OCI::LoadBalancer::Models::LoadBalancer::LIFECYCLE_STATE_ENUM.include?(opts[:'lifecycle_state'])
    fail 'Invalid value for "lifecycle_state", must be one of the values in OCI::LoadBalancer::Models::LoadBalancer::LIFECYCLE_STATE_ENUM.'
  end

  path = "/loadBalancers"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']
  query_params[:'detail'] = opts[:'detail'] if opts[:'detail']
  query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
  query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
  query_params[:'displayName'] = opts[:'display_name'] if opts[:'display_name']
  query_params[:'lifecycleState'] = opts[:'lifecycle_state'] if opts[:'lifecycle_state']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancer>')
end

#list_policies(compartment_id, opts = {}) ⇒ Response

Lists the available load balancer policies.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

    (default to 16)
    
  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

    Example: ‘3`

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerPolicy>



1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1067

def list_policies(compartment_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_policies." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_policies." if compartment_id.nil?

  path = "/loadBalancerPolicies"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerPolicy>')
end

#list_protocols(compartment_id, opts = {}) ⇒ Response

Lists all supported traffic protocols.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

    (default to 16)
    
  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

    Example: ‘3`

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerProtocol>



1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1113

def list_protocols(compartment_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_protocols." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_protocols." if compartment_id.nil?

  path = "/loadBalancerProtocols"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerProtocol>')
end

#list_shapes(compartment_id, opts = {}) ⇒ Response

Lists the valid load balancer shapes.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

    (default to 16)
    
  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

    Example: ‘3`

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::LoadBalancerShape>



1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1159

def list_shapes(compartment_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_shapes." if logger

  fail "Missing the required parameter 'compartment_id' when calling list_shapes." if compartment_id.nil?

  path = "/loadBalancerShapes"

  # Query Params
  query_params = {}
  query_params[:'compartmentId'] = compartment_id
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::LoadBalancerShape>')
end

#list_work_requests(load_balancer_id, opts = {}) ⇒ Response

Lists the work requests for a given load balancer.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :limit (Integer)

    The maximum number of items to return in a paginated "List" call.

    Example: ‘500`

    (default to 100)
    
  • :page (String)

    The value of the ‘opc-next-page` response header from the previous "List" call.

    Example: ‘3`

Returns:

  • (Response)

    A Response object with data of type Array<OCI::LoadBalancer::Models::WorkRequest>



1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1205

def list_work_requests(load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#list_work_requests." if logger

  fail "Missing the required parameter 'load_balancer_id' when calling list_work_requests." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/workRequests".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'page'] = opts[:'page'] if opts[:'page']

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']

  post_body = nil

  return @api_client.call_api(
    :GET,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body,
    :return_type => 'Array<OCI::LoadBalancer::Models::WorkRequest>')
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



56
57
58
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 56

def logger
  @api_client.config.logger
end

#update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, opts = {}) ⇒ Response

Updates the configuration of a backend server within the specified backend set.

Parameters:

  • update_backend_details (UpdateBackendDetails)

    Details for updating a backend server.

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) 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: ‘My_backend_set`

  • backend_name (String)

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

    Example: ‘1.1.1.7:42`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1257

def update_backend(update_backend_details, load_balancer_id, backend_set_name, backend_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#update_backend." if logger

  fail "Missing the required parameter 'update_backend_details' when calling update_backend." if update_backend_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling update_backend." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling update_backend." if backend_set_name.nil?
  fail "Missing the required parameter 'backend_name' when calling update_backend." if backend_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/backends/{backendName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s).sub('{backendName}', backend_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(update_backend_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Updates a backend set.

Parameters:

  • update_backend_set_details (UpdateBackendSetDetails)

    The details to update a backend set.

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the backend set.

  • backend_set_name (String)

    The name of the backend set to update.

    Example: ‘My_backend_set`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1306

def update_backend_set(update_backend_set_details, load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#update_backend_set." if logger

  fail "Missing the required parameter 'update_backend_set_details' when calling update_backend_set." if update_backend_set_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling update_backend_set." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling update_backend_set." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(update_backend_set_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#update_health_checker(health_checker, load_balancer_id, backend_set_name, opts = {}) ⇒ Response

Updates the health check policy for a given load balancer and backend set.

Parameters:

  • health_checker (UpdateHealthCheckerDetails)

    The health check policy configuration details.

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) 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: ‘My_backend_set`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



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

def update_health_checker(health_checker, load_balancer_id, backend_set_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#update_health_checker." if logger

  fail "Missing the required parameter 'health_checker' when calling update_health_checker." if health_checker.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling update_health_checker." if load_balancer_id.nil?
  fail "Missing the required parameter 'backend_set_name' when calling update_health_checker." if backend_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/backendSets/{backendSetName}/healthChecker".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{backendSetName}', backend_set_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(health_checker)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#update_listener(update_listener_details, load_balancer_id, listener_name, opts = {}) ⇒ Response

Updates a listener for a given load balancer.

Parameters:

  • update_listener_details (UpdateListenerDetails)

    Details to update a listener.

  • load_balancer_id (String)

    The [OCID](docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the load balancer associated with the listener to update.

  • listener_name (String)

    The name of the listener to update.

    Example: ‘My listener`

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

    the optional parameters

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



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

def update_listener(update_listener_details, load_balancer_id, listener_name, opts = {})
  logger.debug "Calling operation LoadBalancerClient#update_listener." if logger

  fail "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling update_listener." if load_balancer_id.nil?
  fail "Missing the required parameter 'listener_name' when calling update_listener." if listener_name.nil?

  path = "/loadBalancers/{loadBalancerId}/listeners/{listenerName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(update_listener_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end

#update_load_balancer(update_load_balancer_details, load_balancer_id, opts = {}) ⇒ Response

Updates a load balancer’s configuration.

Parameters:

Options Hash (opts):

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

    (default to )
    
  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (e.g., if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).

Returns:

  • (Response)

    A Response object with data of type nil



1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1446

def update_load_balancer(update_load_balancer_details, load_balancer_id, opts = {})
  logger.debug "Calling operation LoadBalancerClient#update_load_balancer." if logger

  fail "Missing the required parameter 'update_load_balancer_details' when calling update_load_balancer." if update_load_balancer_details.nil?
  fail "Missing the required parameter 'load_balancer_id' when calling update_load_balancer." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}".sub('{loadBalancerId}', load_balancer_id.to_s)

  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:'opc_request_id'] if opts[:'opc_request_id']
  header_params[:'opc-retry-token'] = opts[:'opc_retry_token'] if opts[:'opc_retry_token']

  post_body = @api_client.object_to_http_body(update_load_balancer_details)

  return @api_client.call_api(
    :PUT,
    path,
    endpoint,
    :header_params => header_params,
    :query_params => query_params,
    :body => post_body)
end