Class: OCI::ContainerEngine::ContainerEngineClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/container_engine/container_engine_client.rb

Overview

Container Engine for Kubernetes API

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ ContainerEngineClient

Creates a new ContainerEngineClient. 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

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is ‘nil`, which means that an operation will not perform any retries



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/oci/container_engine/container_engine_client.rb', line 48

def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: 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 = OCI::Signer.new(
      config.user,
      config.fingerprint,
      config.tenancy,
      config.key_file,
      pass_phrase: config.pass_phrase,
      private_key_content: config.key_content
    )
  end

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  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/container_engine/container_engine_client.rb', line 12

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


16
17
18
# File 'lib/oci/container_engine/container_engine_client.rb', line 16

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


26
27
28
# File 'lib/oci/container_engine/container_engine_client.rb', line 26

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is ‘nil`, which means that an operation will not perform any retries



22
23
24
# File 'lib/oci/container_engine/container_engine_client.rb', line 22

def retry_config
  @retry_config
end

Instance Method Details

#create_cluster(create_cluster_details, opts = {}) ⇒ Response

Create a new cluster.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/oci/container_engine/container_engine_client.rb', line 114

def create_cluster(create_cluster_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#create_cluster.' if logger

  raise "Missing the required parameter 'create_cluster_details' when calling create_cluster." if create_cluster_details.nil?

  path = '/clusters'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_cluster_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_cluster') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_kubeconfig(cluster_id, opts = {}, &block) ⇒ Response

Create the Kubeconfig YAML for a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

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

    the optional parameters

  • [Block] (Hash)

    a customizable set of options

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

  • :create_cluster_kubeconfig_content_details (OCI::ContainerEngine::Models::CreateClusterKubeconfigContentDetails)

    The details of the cluster kubeconfig to create.

  • :response_target (String, IO)

    Streaming http body into a file (specified by file name or File object) or IO object if the block is not given

Returns:

  • (Response)

    A Response object with data of type String if response_target and block are not given, otherwise with nil data



172
173
174
175
176
177
178
179
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/oci/container_engine/container_engine_client.rb', line 172

def create_kubeconfig(cluster_id, opts = {}, &block)
  logger.debug 'Calling operation ContainerEngineClient#create_kubeconfig.' if logger

  raise "Missing the required parameter 'cluster_id' when calling create_kubeconfig." if cluster_id.nil?
  raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)

  path = '/clusters/{clusterId}/kubeconfig/content'.sub('{clusterId}', cluster_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

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

  post_body = @api_client.object_to_http_body(opts[:create_cluster_kubeconfig_content_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_kubeconfig') do
    if !block.nil?
      @api_client.call_api(
        :POST,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'Stream',
        &block
      )
    elsif opts[:response_target]
      if opts[:response_target].respond_to? :write
        @api_client.call_api(
          :POST,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body,
          return_type: 'Stream',
          &proc { |chunk, _response| opts[:response_target].write(chunk) }
        )
      elsif opts[:response_target].is_a?(String)
        File.open(opts[:response_target], 'wb') do |output|
          return @api_client.call_api(
            :POST,
            path,
            endpoint,
            header_params: header_params,
            query_params: query_params,
            operation_signing_strategy: operation_signing_strategy,
            body: post_body,
            return_type: 'Stream',
            &proc { |chunk, _response| output.write(chunk) }
          )
        end
      end
    else
      @api_client.call_api(
        :POST,
        path,
        endpoint,
        header_params: header_params,
        query_params: query_params,
        operation_signing_strategy: operation_signing_strategy,
        body: post_body,
        return_type: 'String'
      )
    end
  end
  # rubocop:enable Metrics/BlockLength
end

#create_node_pool(create_node_pool_details, opts = {}) ⇒ Response

Create a new node pool.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_retry_token (String)

    A token you supply to uniquely identify the request and provide idempotency if the request is retried. Idempotency tokens expire after 24 hours.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/oci/container_engine/container_engine_client.rb', line 272

def create_node_pool(create_node_pool_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#create_node_pool.' if logger

  raise "Missing the required parameter 'create_node_pool_details' when calling create_node_pool." if create_node_pool_details.nil?

  path = '/nodePools'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params['accept'] = 'application/json'
  header_params['content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_node_pool_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_node_pool') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_cluster(cluster_id, opts = {}) ⇒ Response

Delete a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



331
332
333
334
335
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
364
365
366
367
# File 'lib/oci/container_engine/container_engine_client.rb', line 331

def delete_cluster(cluster_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#delete_cluster.' if logger

  raise "Missing the required parameter 'cluster_id' when calling delete_cluster." if cluster_id.nil?
  raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)

  path = '/clusters/{clusterId}'.sub('{clusterId}', cluster_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_cluster') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#delete_node_pool(node_pool_id, opts = {}) ⇒ Response

Delete a node pool.

Parameters:

  • node_pool_id (String)

    The OCID of the node pool.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
419
420
421
422
423
424
425
426
# File 'lib/oci/container_engine/container_engine_client.rb', line 390

def delete_node_pool(node_pool_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#delete_node_pool.' if logger

  raise "Missing the required parameter 'node_pool_id' when calling delete_node_pool." if node_pool_id.nil?
  raise "Parameter value for 'node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_id)

  path = '/nodePools/{nodePoolId}'.sub('{nodePoolId}', node_pool_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_node_pool') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Cancel a work request that has not started.

Parameters:

  • work_request_id (String)

    The OCID of the work request.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/oci/container_engine/container_engine_client.rb', line 449

def delete_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#delete_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling delete_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 = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_work_request') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cluster(cluster_id, opts = {}) ⇒ Response

Get the details of a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type Cluster



504
505
506
507
508
509
510
511
512
513
514
515
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
# File 'lib/oci/container_engine/container_engine_client.rb', line 504

def get_cluster(cluster_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#get_cluster.' if logger

  raise "Missing the required parameter 'cluster_id' when calling get_cluster." if cluster_id.nil?
  raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)

  path = '/clusters/{clusterId}'.sub('{clusterId}', cluster_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_cluster') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ContainerEngine::Models::Cluster'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_cluster_options(cluster_option_id, opts = {}) ⇒ Response

Get options available for clusters.

Parameters:

  • cluster_option_id (String)

    The id of the option set to retrieve. Only "all" is supported.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:



559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# File 'lib/oci/container_engine/container_engine_client.rb', line 559

def get_cluster_options(cluster_option_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#get_cluster_options.' if logger

  raise "Missing the required parameter 'cluster_option_id' when calling get_cluster_options." if cluster_option_id.nil?
  raise "Parameter value for 'cluster_option_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_option_id)

  path = '/clusterOptions/{clusterOptionId}'.sub('{clusterOptionId}', cluster_option_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_cluster_options') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ContainerEngine::Models::ClusterOptions'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_node_pool(node_pool_id, opts = {}) ⇒ Response

Get the details of a node pool.

Parameters:

  • node_pool_id (String)

    The OCID of the node pool.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:



614
615
616
617
618
619
620
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
650
# File 'lib/oci/container_engine/container_engine_client.rb', line 614

def get_node_pool(node_pool_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#get_node_pool.' if logger

  raise "Missing the required parameter 'node_pool_id' when calling get_node_pool." if node_pool_id.nil?
  raise "Parameter value for 'node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_id)

  path = '/nodePools/{nodePoolId}'.sub('{nodePoolId}', node_pool_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_node_pool') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ContainerEngine::Models::NodePool'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_node_pool_options(node_pool_option_id, opts = {}) ⇒ Response

Get options available for node pools.

Parameters:

  • node_pool_option_id (String)

    The id of the option set to retrieve. Use "all" get all options, or use a cluster ID to get options specific to the provided cluster.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/oci/container_engine/container_engine_client.rb', line 669

def get_node_pool_options(node_pool_option_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#get_node_pool_options.' if logger

  raise "Missing the required parameter 'node_pool_option_id' when calling get_node_pool_options." if node_pool_option_id.nil?
  raise "Parameter value for 'node_pool_option_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_option_id)

  path = '/nodePoolOptions/{nodePoolOptionId}'.sub('{nodePoolOptionId}', node_pool_option_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_node_pool_options') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ContainerEngine::Models::NodePoolOptions'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Get the details of a work request.

Parameters:

  • work_request_id (String)

    The OCID of the work request.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:



724
725
726
727
728
729
730
731
732
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
# File 'lib/oci/container_engine/container_engine_client.rb', line 724

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#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 = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::ContainerEngine::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

List all the cluster objects in a compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :lifecycle_state (Array<String>)

    A cluster lifecycle state to filter on. Can have multiple parameters of this name. Allowed values are: CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING

  • :name (String)

    The name to filter on.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The optional order in which to sort the results.

  • :sort_by (String)

    The optional field to sort the results by. Allowed values are: ID, NAME, TIME_CREATED

  • :opc_request_id (String)

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

Returns:



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
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
# File 'lib/oci/container_engine/container_engine_client.rb', line 789

def list_clusters(compartment_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#list_clusters.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_clusters." if compartment_id.nil?


  lifecycle_state_allowable_values = %w[CREATING ACTIVE FAILED DELETING DELETED UPDATING]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING.'
      end
    end
  end

  if opts[:sort_order] && !OCI::ContainerEngine::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::ContainerEngine::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[ID NAME TIME_CREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of ID, NAME, TIME_CREATED.'
  end

  path = '/clusters'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_clusters') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::ContainerEngine::Models::ClusterSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

List all the node pools in a compartment, and optionally filter by cluster.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :cluster_id (String)

    The OCID of the cluster.

  • :name (String)

    The name to filter on.

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The optional order in which to sort the results.

  • :sort_by (String)

    The optional field to sort the results by. Allowed values are: ID, NAME, TIME_CREATED

  • :opc_request_id (String)

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

Returns:



877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
# File 'lib/oci/container_engine/container_engine_client.rb', line 877

def list_node_pools(compartment_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#list_node_pools.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_node_pools." if compartment_id.nil?

  if opts[:sort_order] && !OCI::ContainerEngine::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::ContainerEngine::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[ID NAME TIME_CREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of ID, NAME, TIME_CREATED.'
  end

  path = '/nodePools'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:clusterId] = opts[:cluster_id] if opts[:cluster_id]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_node_pools') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::ContainerEngine::Models::NodePoolSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_errors(compartment_id, work_request_id, opts = {}) ⇒ Response

Get the errors of a work request.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • work_request_id (String)

    The OCID of the work request.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:



947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'lib/oci/container_engine/container_engine_client.rb', line 947

def list_work_request_errors(compartment_id, work_request_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_request_errors." if compartment_id.nil?
  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." 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 = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::ContainerEngine::Models::WorkRequestError>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_request_logs(compartment_id, work_request_id, opts = {}) ⇒ Response

Get the logs of a work request.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

  • work_request_id (String)

    The OCID of the work request.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :opc_request_id (String)

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

Returns:



1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
# File 'lib/oci/container_engine/container_engine_client.rb', line 1005

def list_work_request_logs(compartment_id, work_request_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_request_logs." if compartment_id.nil?
  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." 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 = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::ContainerEngine::Models::WorkRequestLogEntry>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

List all work requests in a compartment.

Parameters:

  • compartment_id (String)

    The OCID of the compartment.

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

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :cluster_id (String)

    The OCID of the cluster.

  • :resource_id (String)

    The OCID of the resource associated with a work request

  • :resource_type (String)

    Type of the resource associated with a work request Allowed values are: CLUSTER, NODEPOOL

  • :status (Array<String>)

    A work request status to filter on. Can have multiple parameters of this name. Allowed values are: ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED

  • :limit (Integer)

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

  • :page (String)

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

  • :sort_order (String)

    The optional order in which to sort the results.

  • :sort_by (String)

    The optional field to sort the results by. Allowed values are: ID, OPERATION_TYPE, STATUS, TIME_ACCEPTED, TIME_STARTED, TIME_FINISHED

  • :opc_request_id (String)

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

Returns:



1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
# File 'lib/oci/container_engine/container_engine_client.rb', line 1075

def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  if opts[:resource_type] && !%w[CLUSTER NODEPOOL].include?(opts[:resource_type])
    raise 'Invalid value for "resource_type", must be one of CLUSTER, NODEPOOL.'
  end


  status_allowable_values = %w[ACCEPTED IN_PROGRESS FAILED SUCCEEDED CANCELING CANCELED]
  if opts[:status] && !opts[:status].empty?
    opts[:status].each do |val_to_check|
      unless status_allowable_values.include?(val_to_check)
        raise 'Invalid value for "status", must be one of ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED.'
      end
    end
  end

  if opts[:sort_order] && !OCI::ContainerEngine::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::ContainerEngine::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[ID OPERATION_TYPE STATUS TIME_ACCEPTED TIME_STARTED TIME_FINISHED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of ID, OPERATION_TYPE, STATUS, TIME_ACCEPTED, TIME_STARTED, TIME_FINISHED.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:clusterId] = opts[:cluster_id] if opts[:cluster_id]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:resourceType] = opts[:resource_type] if opts[:resource_type]
  query_params[:status] = OCI::ApiClient.build_collection_params(opts[:status], :multi) if opts[:status] && !opts[:status].empty?
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::ContainerEngine::Models::WorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



93
94
95
# File 'lib/oci/container_engine/container_engine_client.rb', line 93

def logger
  @api_client.config.logger
end

#update_cluster(cluster_id, update_cluster_details, opts = {}) ⇒ Response

Update the details of a cluster.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



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
1194
1195
1196
1197
1198
1199
1200
1201
1202
# File 'lib/oci/container_engine/container_engine_client.rb', line 1165

def update_cluster(cluster_id, update_cluster_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#update_cluster.' if logger

  raise "Missing the required parameter 'cluster_id' when calling update_cluster." if cluster_id.nil?
  raise "Missing the required parameter 'update_cluster_details' when calling update_cluster." if update_cluster_details.nil?
  raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)

  path = '/clusters/{clusterId}'.sub('{clusterId}', cluster_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

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

  post_body = @api_client.object_to_http_body(update_cluster_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_cluster') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_node_pool(node_pool_id, update_node_pool_details, opts = {}) ⇒ Response

Update the details of a node pool.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    The retry configuration to apply to this operation. If no key is provided then the service-level retry configuration defined by #retry_config will be used. If an explicit ‘nil` value is provided then the operation will not retry

  • :if_match (String)

    For optimistic concurrency control. In the PUT or DELETE call for a resource, set the ‘if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource’s current etag value.

  • :opc_request_id (String)

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

Returns:

  • (Response)

    A Response object with data of type nil



1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
# File 'lib/oci/container_engine/container_engine_client.rb', line 1226

def update_node_pool(node_pool_id, update_node_pool_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#update_node_pool.' if logger

  raise "Missing the required parameter 'node_pool_id' when calling update_node_pool." if node_pool_id.nil?
  raise "Missing the required parameter 'update_node_pool_details' when calling update_node_pool." if update_node_pool_details.nil?
  raise "Parameter value for 'node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(node_pool_id)

  path = '/nodePools/{nodePoolId}'.sub('{nodePoolId}', node_pool_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

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

  post_body = @api_client.object_to_http_body(update_node_pool_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_node_pool') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end