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, proxy_settings: 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

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter



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

def initialize(config: nil, region: nil, signer: nil, proxy_settings: 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, proxy_settings: proxy_settings)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 185

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 229

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 299

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



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 343

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)
  raise "Parameter value for 'backend_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_name)

  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



434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 434

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'certificate_name' must not be blank" if OCI::Internal::Util::blank_string?(certificate_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'listener_name' must not be blank" if OCI::Internal::Util::blank_string?(listener_name)

  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



553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 553

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'path_route_set_name' must not be blank" if OCI::Internal::Util::blank_string?(path_route_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)
  raise "Parameter value for 'backend_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_name)

  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



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 689

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)
  raise "Parameter value for 'backend_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 891

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'path_route_set_name' must not be blank" if OCI::Internal::Util::blank_string?(path_route_set_name)

  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



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

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?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util::blank_string?(work_request_id)

  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>



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1005

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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>



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
1070
1071
1072
1073
1074
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1045

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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>



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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>



1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1127

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>



1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1188

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>



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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>



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

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>



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

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>



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

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>



1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1427

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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.



72
73
74
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 72

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



1480
1481
1482
1483
1484
1485
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
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1480

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)
  raise "Parameter value for 'backend_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_name)

  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



1532
1533
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 1532

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'backend_set_name' must not be blank" if OCI::Internal::Util::blank_string?(backend_set_name)

  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



1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1632

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'listener_name' must not be blank" if OCI::Internal::Util::blank_string?(listener_name)

  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



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

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)

  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



1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
# File 'lib/oci/load_balancer/load_balancer_client.rb', line 1732

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?
  raise "Parameter value for 'load_balancer_id' must not be blank" if OCI::Internal::Util::blank_string?(load_balancer_id)
  raise "Parameter value for 'path_route_set_name' must not be blank" if OCI::Internal::Util::blank_string?(path_route_set_name)

  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