Class: OracleBMC::LoadBalancer::LoadBalancerClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oraclebmc/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 OracleBMC.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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 32

def initialize(config:nil, region:nil)
  config ||= OracleBMC.config
  signer = Signer.new(config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase)
  @api_client = ApiClient.new(config, signer)

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

Instance Attribute Details

#api_clientOracleBMC::ApiClient (readonly)

Client used to make HTTP requests.



12
13
14
# File 'lib/oraclebmc/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/oraclebmc/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/oraclebmc/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



77
78
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 77

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



121
122
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 121

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



164
165
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 164

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



207
208
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 207

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 Bare Metal Cloud Services 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



276
277
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 276

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 name of the backend server to remove.

    Example: ‘My backend server`

  • 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



319
320
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 319

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



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

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



401
402
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 401

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



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

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



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

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 name of the backend server to retrieve.

    Example: ‘My backend server`

  • 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 OracleBMC::LoadBalancer::Models::Backend



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

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 => 'OracleBMC::LoadBalancer::Models::Backend')
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 OracleBMC::LoadBalancer::Models::BackendSet



558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 558

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 => 'OracleBMC::LoadBalancer::Models::BackendSet')
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 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 OracleBMC::LoadBalancer::Models::HealthChecker



598
599
600
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 598

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 => 'OracleBMC::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 OracleBMC::LoadBalancer::Models::LoadBalancer



634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 634

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 => 'OracleBMC::LoadBalancer::Models::LoadBalancer')
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 OracleBMC::LoadBalancer::Models::WorkRequest



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 669

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 => 'OracleBMC::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<OracleBMC::LoadBalancer::Models::BackendSet>



704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 704

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<OracleBMC::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<OracleBMC::LoadBalancer::Models::Backend>



743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 743

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<OracleBMC::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<OracleBMC::LoadBalancer::Models::Certificate>



779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 779

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<OracleBMC::LoadBalancer::Models::Certificate>')
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 &quot;List&quot; call.

    Example: ‘500`

    (default to 10)
    
  • :page (String)

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

    Example: ‘3`

  • :detail (String)

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

    Example: ‘full`

    (default to full)
    

Returns:

  • (Response)

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



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
853
854
855
856
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 826

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?

  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']

  # 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<OracleBMC::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 &quot;List&quot; call.

    Example: ‘500`

    (default to 16)
    
  • :page (String)

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

    Example: ‘3`

Returns:

  • (Response)

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



873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 873

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<OracleBMC::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 &quot;List&quot; call.

    Example: ‘500`

    (default to 16)
    
  • :page (String)

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

    Example: ‘3`

Returns:

  • (Response)

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



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

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<OracleBMC::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 &quot;List&quot; call.

    Example: ‘500`

    (default to 16)
    
  • :page (String)

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

    Example: ‘3`

Returns:

  • (Response)

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



965
966
967
968
969
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 965

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<OracleBMC::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 &quot;List&quot; call.

    Example: ‘500`

    (default to 100)
    
  • :page (String)

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

    Example: ‘3`

Returns:

  • (Response)

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



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

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<OracleBMC::LoadBalancer::Models::WorkRequest>')
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



54
55
56
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 54

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 name of the backend server to update.

    Example: ‘My backend server`

  • 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



1063
1064
1065
1066
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
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 1063

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



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

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



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/oraclebmc/load_balancer/load_balancer_client.rb', line 1160

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



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
1234
1235
1236
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 1208

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



1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
# File 'lib/oraclebmc/load_balancer/load_balancer_client.rb', line 1252

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