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, signer: 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.

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 34

def initialize(config:nil, region:nil, signer:nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
  config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)

  if signer.nil?
    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)
  end

  @api_client = ApiClient.new(config, signer)

  region ||= config.region
  region ||= signer.region if signer.respond_to?(: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



93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 93

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

  raise "Missing the required parameter 'create_backend_details' when calling create_backend." if create_backend_details.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling create_backend." if load_balancer_id.nil?
  raise "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



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 137

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

  raise "Missing the required parameter 'create_backend_set_details' when calling create_backend_set." if create_backend_set_details.nil?
  raise "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



180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 180

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

  raise "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?
  raise "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



223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 223

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

  raise "Missing the required parameter 'create_listener_details' when calling create_listener." if create_listener_details.nil?
  raise "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



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

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

  raise "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

#create_path_route_set(create_path_route_set_details, load_balancer_id, opts = {}) ⇒ Response

Adds a path route set to a load balancer. For more information, see [Managing Request Routing](docs.us-phoenix-1.oraclecloud.com/Content/Balance/Tasks/managingrequest.htm).

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



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 336

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

  raise "Missing the required parameter 'create_path_route_set_details' when calling create_path_route_set." if create_path_route_set_details.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling create_path_route_set." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/pathRouteSets".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_path_route_set_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



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 380

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

  raise "Missing the required parameter 'load_balancer_id' when calling delete_backend." if load_balancer_id.nil?
  raise "Missing the required parameter 'backend_set_name' when calling delete_backend." if backend_set_name.nil?
  raise "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



423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 423

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

  raise "Missing the required parameter 'load_balancer_id' when calling delete_backend_set." if load_balancer_id.nil?
  raise "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



462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 462

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

  raise "Missing the required parameter 'load_balancer_id' when calling delete_certificate." if load_balancer_id.nil?
  raise "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



501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 501

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

  raise "Missing the required parameter 'load_balancer_id' when calling delete_listener." if load_balancer_id.nil?
  raise "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



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

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

  raise "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

#delete_path_route_set(load_balancer_id, path_route_set_name, opts = {}) ⇒ Response

Deletes a path route set from the specified load balancer.

To delete a path route rule from a path route set, use the update_path_route_set operation.

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



578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 578

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

  raise "Missing the required parameter 'load_balancer_id' when calling delete_path_route_set." if load_balancer_id.nil?
  raise "Missing the required parameter 'path_route_set_name' when calling delete_path_route_set." if path_route_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{pathRouteSetName}', path_route_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

#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



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling get_backend." if load_balancer_id.nil?
  raise "Missing the required parameter 'backend_set_name' when calling get_backend." if backend_set_name.nil?
  raise "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



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling get_backend_health." if load_balancer_id.nil?
  raise "Missing the required parameter 'backend_set_name' when calling get_backend_health." if backend_set_name.nil?
  raise "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



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling get_backend_set." if load_balancer_id.nil?
  raise "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



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 747

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

  raise "Missing the required parameter 'load_balancer_id' when calling get_backend_set_health." if load_balancer_id.nil?
  raise "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



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling get_health_checker." if load_balancer_id.nil?
  raise "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



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

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

  raise "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



858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 858

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

  raise "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_path_route_set(load_balancer_id, path_route_set_name, opts = {}) ⇒ Response

Gets the specified path route 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::PathRouteSet



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling get_path_route_set." if load_balancer_id.nil?
  raise "Missing the required parameter 'path_route_set_name' when calling get_path_route_set." if path_route_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{pathRouteSetName}', path_route_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::PathRouteSet')
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



933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 933

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

  raise "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>



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

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

  raise "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>



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling list_backends." if load_balancer_id.nil?
  raise "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>



1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1043

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

  raise "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>



1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1086

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

  raise "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. You can provide one sort order (‘sortOrder`). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive.

    Allowed values are: TIMECREATED, DISPLAYNAME

  • :sort_order (String)

    The sort order to use, either ascending (‘ASC`) or descending (`DESC`). The DISPLAYNAME sort order is case sensitive.

    Allowed values are: ASC, DESC

  • :display_name (String)

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

  • :lifecycle_state (String)

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

Returns:

  • (Response)

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



1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
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
1189
1190
1191
1192
1193
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1147

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

  raise "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'])
    raise 'Invalid value for "sort_by", must be one of TIMECREATED, DISPLAYNAME.'
  end

  if opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
    raise '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'])
    raise '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_path_route_sets(load_balancer_id, opts = {}) ⇒ Response

Lists all path route sets associated with 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 Array<OCI::LoadBalancer::Models::PathRouteSet>



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

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

  raise "Missing the required parameter 'load_balancer_id' when calling list_path_route_sets." if load_balancer_id.nil?

  path = "/loadBalancers/{loadBalancerId}/pathRouteSets".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::PathRouteSet>')
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>



1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1247

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

  raise "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>



1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1293

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

  raise "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>



1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1339

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

  raise "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>



1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1385

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

  raise "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.



70
71
72
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 70

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



1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1437

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

  raise "Missing the required parameter 'update_backend_details' when calling update_backend." if update_backend_details.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling update_backend." if load_balancer_id.nil?
  raise "Missing the required parameter 'backend_set_name' when calling update_backend." if backend_set_name.nil?
  raise "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



1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1486

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

  raise "Missing the required parameter 'update_backend_set_details' when calling update_backend_set." if update_backend_set_details.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling update_backend_set." if load_balancer_id.nil?
  raise "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



1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1534

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

  raise "Missing the required parameter 'health_checker' when calling update_health_checker." if health_checker.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling update_health_checker." if load_balancer_id.nil?
  raise "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



1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1582

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

  raise "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling update_listener." if load_balancer_id.nil?
  raise "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



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

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

  raise "Missing the required parameter 'update_load_balancer_details' when calling update_load_balancer." if update_load_balancer_details.nil?
  raise "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

#update_path_route_set(update_path_route_set_details, load_balancer_id, path_route_set_name, opts = {}) ⇒ Response

Overwrites an existing path route set on the specified load balancer. Use this operation to add, delete, or alter path route rules in a path route set.

To add a new path route rule to a path route set, the ‘pathRoutes` in the update_path_route_set_details object must include both the new path route rule to add and the existing path route rules to retain.

Parameters:

  • update_path_route_set_details (UpdatePathRouteSetDetails)

    The configuration details to update a path route 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 path route set to update.

  • path_route_set_name (String)

    The name of the path route set to update.

    Example: ‘path-route-set-001`

  • 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



1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1679

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

  raise "Missing the required parameter 'update_path_route_set_details' when calling update_path_route_set." if update_path_route_set_details.nil?
  raise "Missing the required parameter 'load_balancer_id' when calling update_path_route_set." if load_balancer_id.nil?
  raise "Missing the required parameter 'path_route_set_name' when calling update_path_route_set." if path_route_set_name.nil?

  path = "/loadBalancers/{loadBalancerId}/pathRouteSets/{pathRouteSetName}".sub('{loadBalancerId}', load_balancer_id.to_s).sub('{pathRouteSetName}', path_route_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_path_route_set_details)

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