Class: OCI::ContainerEngine::ContainerEngineClient

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

Overview

API for the Container Engine for Kubernetes service. Use this API to build, deploy, and manage cloud-native applications. For more information, see Overview of Container Engine for Kubernetes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

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

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via 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.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • 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



57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/oci/container_engine/container_engine_client.rb', line 57

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # 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.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

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

  if endpoint
    @endpoint = endpoint + '/20180222'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "ContainerEngineClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



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

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


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

def endpoint
  @endpoint
end

#regionString

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

Returns:

  • (String)


31
32
33
# File 'lib/oci/container_engine/container_engine_client.rb', line 31

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



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

def retry_config
  @retry_config
end

Instance Method Details

#cluster_migrate_to_native_vcn(cluster_id, cluster_migrate_to_native_vcn_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use cluster_migrate_to_native_vcn API.

Initiates cluster migration to use native VCN.

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



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
151
152
153
154
155
156
157
# File 'lib/oci/container_engine/container_engine_client.rb', line 120

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

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

  path = '/clusters/{clusterId}/actions/migrateToNativeVcn'.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(cluster_migrate_to_native_vcn_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#cluster_migrate_to_native_vcn') 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

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

Note:

Click here to see an example of how to use complete_credential_rotation API.

Complete cluster credential rotation. Retire old credentials from kubernetes components.

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_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.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/container_engine/container_engine_client.rb', line 184

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

  raise "Missing the required parameter 'cluster_id' when calling complete_credential_rotation." 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}/actions/completeCredentialRotation'.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-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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#complete_credential_rotation') 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_cluster(create_cluster_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_cluster API.

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



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
# File 'lib/oci/container_engine/container_engine_client.rb', line 245

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

Note:

Click here to see an example of how to use create_kubeconfig API.

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



304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
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
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/oci/container_engine/container_engine_client.rb', line 304

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] = opts[:accept] if opts[:accept]
  header_params[:accept] ||= 'application/x-yaml'
  header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding]
  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

Note:

Click here to see an example of how to use create_node_pool API.

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



407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
# File 'lib/oci/container_engine/container_engine_client.rb', line 407

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

#create_virtual_node_pool(create_virtual_node_pool_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_virtual_node_pool API.

Create a new virtual 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



466
467
468
469
470
471
472
473
474
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
# File 'lib/oci/container_engine/container_engine_client.rb', line 466

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

  raise "Missing the required parameter 'create_virtual_node_pool_details' when calling create_virtual_node_pool." if create_virtual_node_pool_details.nil?

  path = '/virtualNodePools'
  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_virtual_node_pool_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_virtual_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

#create_workload_mapping(cluster_id, create_workload_mapping_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_workload_mapping API.

Create the specified workloadMapping for 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

  • :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:



526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/oci/container_engine/container_engine_client.rb', line 526

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

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

  path = '/clusters/{clusterId}/workloadMappings'.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-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_workload_mapping_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_workload_mapping') 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,
      return_type: 'OCI::ContainerEngine::Models::WorkloadMapping'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use delete_cluster API.

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



589
590
591
592
593
594
595
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
625
# File 'lib/oci/container_engine/container_engine_client.rb', line 589

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(node_pool_id, node_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_node API.

Delete node.

Parameters:

  • node_pool_id (String)

    The OCID of the node pool.

  • node_id (String)

    The OCID of the compute instance.

  • 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

  • :is_decrement_size (BOOLEAN)

    If the nodepool should be scaled down after the node is deleted. (default to true)

  • :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.

  • :override_eviction_grace_duration (String)

    Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M

  • :is_force_deletion_after_override_grace_duration (BOOLEAN)

    If the underlying compute instance should be deleted if you cannot evict all the pods in grace period

Returns:

  • (Response)

    A Response object with data of type nil



655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# File 'lib/oci/container_engine/container_engine_client.rb', line 655

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

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

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isDecrementSize] = opts[:is_decrement_size] if !opts[:is_decrement_size].nil?
  query_params[:overrideEvictionGraceDuration] = opts[:override_eviction_grace_duration] if opts[:override_eviction_grace_duration]
  query_params[:isForceDeletionAfterOverrideGraceDuration] = opts[:is_force_deletion_after_override_grace_duration] if !opts[:is_force_deletion_after_override_grace_duration].nil?

  # 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') 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

Note:

Click here to see an example of how to use delete_node_pool API.

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.

  • :override_eviction_grace_duration (String)

    Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M

  • :is_force_deletion_after_override_grace_duration (BOOLEAN)

    If the underlying compute instance should be deleted if you cannot evict all the pods in grace period

Returns:

  • (Response)

    A Response object with data of type nil



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
761
762
# File 'lib/oci/container_engine/container_engine_client.rb', line 724

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 = {}
  query_params[:overrideEvictionGraceDuration] = opts[:override_eviction_grace_duration] if opts[:override_eviction_grace_duration]
  query_params[:isForceDeletionAfterOverrideGraceDuration] = opts[:is_force_deletion_after_override_grace_duration] if !opts[:is_force_deletion_after_override_grace_duration].nil?

  # 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_virtual_node_pool(virtual_node_pool_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_virtual_node_pool API.

Delete a virtual node pool.

Parameters:

  • virtual_node_pool_id (String)

    The OCID of the virtual 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.

  • :override_eviction_grace_duration_vnp (String)

    Duration after which Sk8s will give up eviction of the pods on the node. PT0M will indicate you want to delete the virtual node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M

  • :is_force_deletion_after_override_grace_duration_vnp (BOOLEAN)

    If the underlying compute instance should be deleted if you cannot evict all the pods in grace period

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/container_engine/container_engine_client.rb', line 790

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

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

  path = '/virtualNodePools/{virtualNodePoolId}'.sub('{virtualNodePoolId}', virtual_node_pool_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:overrideEvictionGraceDurationVnp] = opts[:override_eviction_grace_duration_vnp] if opts[:override_eviction_grace_duration_vnp]
  query_params[:isForceDeletionAfterOverrideGraceDurationVnp] = opts[:is_force_deletion_after_override_grace_duration_vnp] if !opts[:is_force_deletion_after_override_grace_duration_vnp].nil?

  # 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_virtual_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

Note:

Click here to see an example of how to use delete_work_request API.

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



852
853
854
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
883
884
885
886
887
888
# File 'lib/oci/container_engine/container_engine_client.rb', line 852

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

#delete_workload_mapping(cluster_id, workload_mapping_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_workload_mapping API.

Delete workloadMapping for a provisioned cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

  • workload_mapping_id (String)

    The OCID of the workloadMapping.

  • 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



913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/oci/container_engine/container_engine_client.rb', line 913

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

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

  path = '/clusters/{clusterId}/workloadMappings/{workloadMappingId}'.sub('{clusterId}', cluster_id.to_s).sub('{workloadMappingId}', workload_mapping_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_workload_mapping') 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

#disable_addon(cluster_id, addon_name, is_remove_existing_add_on, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use disable_addon API.

Disable addon for a provisioned cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

  • addon_name (String)

    The name of the addon.

  • is_remove_existing_add_on (BOOLEAN)

    Whether existing addon resources should be deleted or not. True would remove the underlying resources completely.

  • 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



977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
# File 'lib/oci/container_engine/container_engine_client.rb', line 977

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

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

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:isRemoveExistingAddOn] = is_remove_existing_add_on

  # 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#disable_addon') 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_addon(cluster_id, addon_name, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_addon API.

Get the specified addon for a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

  • addon_name (String)

    The name of the addon.

  • 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:



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
# File 'lib/oci/container_engine/container_engine_client.rb', line 1038

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

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

  path = '/clusters/{clusterId}/addons/{addonName}'.sub('{clusterId}', cluster_id.to_s).sub('{addonName}', addon_name.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_addon') 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::Addon'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use get_cluster API.

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:



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
# File 'lib/oci/container_engine/container_engine_client.rb', line 1096

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_migrate_to_native_vcn_status(cluster_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_cluster_migrate_to_native_vcn_status API.

Get details on a cluster's migration to native VCN.

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:



1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
# File 'lib/oci/container_engine/container_engine_client.rb', line 1152

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

  raise "Missing the required parameter 'cluster_id' when calling get_cluster_migrate_to_native_vcn_status." 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}/migrateToNativeVcnStatus'.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_migrate_to_native_vcn_status') 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::ClusterMigrateToNativeVcnStatus'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use get_cluster_options API.

Get options available for clusters.

Parameters:

  • cluster_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

  • :compartment_id (String)

    The OCID of the compartment.

  • :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:



1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/oci/container_engine/container_engine_client.rb', line 1209

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 = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[: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#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_credential_rotation_status(cluster_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_credential_rotation_status API.

Get cluster credential rotation status.

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:



1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
# File 'lib/oci/container_engine/container_engine_client.rb', line 1266

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

  raise "Missing the required parameter 'cluster_id' when calling get_credential_rotation_status." 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}/credentialRotationStatus'.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_credential_rotation_status') 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::CredentialRotationStatus'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use get_node_pool API.

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:



1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# File 'lib/oci/container_engine/container_engine_client.rb', line 1322

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

Note:

Click here to see an example of how to use get_node_pool_options API.

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

  • :compartment_id (String)

    The OCID of the compartment.

  • :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:



1379
1380
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
1411
1412
1413
1414
1415
1416
# File 'lib/oci/container_engine/container_engine_client.rb', line 1379

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 = {}
  query_params[:compartmentId] = opts[:compartment_id] if opts[: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#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_virtual_node(virtual_node_pool_id, virtual_node_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_virtual_node API.

Get the details of a virtual node.

Parameters:

  • virtual_node_pool_id (String)

    The OCID of the virtual node pool.

  • virtual_node_id (String)

    The OCID of the virtual node.

  • 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:



1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
# File 'lib/oci/container_engine/container_engine_client.rb', line 1437

def get_virtual_node(virtual_node_pool_id, virtual_node_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#get_virtual_node.' if logger

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

  path = '/virtualNodePools/{virtualNodePoolId}/virtualNodes/{virtualNodeId}'.sub('{virtualNodePoolId}', virtual_node_pool_id.to_s).sub('{virtualNodeId}', virtual_node_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_virtual_node') 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::VirtualNode'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_virtual_node_pool(virtual_node_pool_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_virtual_node_pool API.

Get the details of a virtual node pool.

Parameters:

  • virtual_node_pool_id (String)

    The OCID of the virtual 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:



1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
# File 'lib/oci/container_engine/container_engine_client.rb', line 1495

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

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

  path = '/virtualNodePools/{virtualNodePoolId}'.sub('{virtualNodePoolId}', virtual_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_virtual_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::VirtualNodePool'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use get_work_request API.

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:



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/oci/container_engine/container_engine_client.rb', line 1551

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

#get_workload_mapping(cluster_id, workload_mapping_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_workload_mapping API.

Get the specified workloadMapping for a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

  • workload_mapping_id (String)

    The OCID of the workloadMapping.

  • 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:



1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'lib/oci/container_engine/container_engine_client.rb', line 1608

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

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

  path = '/clusters/{clusterId}/workloadMappings/{workloadMappingId}'.sub('{clusterId}', cluster_id.to_s).sub('{workloadMappingId}', workload_mapping_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_workload_mapping') 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::WorkloadMapping'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#install_addon(cluster_id, install_addon_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use install_addon API.

Install the specified addon for 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

  • :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.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



1674
1675
1676
1677
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
1707
1708
1709
1710
1711
1712
1713
# File 'lib/oci/container_engine/container_engine_client.rb', line 1674

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

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

  path = '/clusters/{clusterId}/addons'.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-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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(install_addon_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#install_addon') 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

#list_addon_options(kubernetes_version, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_addon_options API.

Get list of supported addons for a specific kubernetes version.

Parameters:

  • kubernetes_version (String)

    The kubernetes version to fetch the addons.

  • 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

  • :addon_name (String)

    The name of the addon.

  • :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.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :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: NAME, TIME_CREATED

Returns:



1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
# File 'lib/oci/container_engine/container_engine_client.rb', line 1744

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

  raise "Missing the required parameter 'kubernetes_version' when calling list_addon_options." if kubernetes_version.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[NAME TIME_CREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of NAME, TIME_CREATED.'
  end

  path = '/addonOptions'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:kubernetesVersion] = kubernetes_version
  query_params[:addonName] = opts[:addon_name] if opts[:addon_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_addon_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: 'Array<OCI::ContainerEngine::Models::AddonOptionSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use list_addons API.

List addon for a provisioned 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.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :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: NAME, TIME_CREATED

Returns:



1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
# File 'lib/oci/container_engine/container_engine_client.rb', line 1823

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

  raise "Missing the required parameter 'cluster_id' when calling list_addons." if cluster_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[NAME TIME_CREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of NAME, TIME_CREATED.'
  end
  raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  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_addons') 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::AddonSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use list_clusters API.

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)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :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:



1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
# File 'lib/oci/container_engine/container_engine_client.rb', line 1904

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

Note:

Click here to see an example of how to use list_node_pools API.

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)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :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.

  • :lifecycle_state (Array<String>)

    A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING] Allowed values are: DELETED, CREATING, ACTIVE, UPDATING, DELETING, FAILED, INACTIVE, NEEDS_ATTENTION

Returns:



1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
# File 'lib/oci/container_engine/container_engine_client.rb', line 1998

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


  lifecycle_state_allowable_values = %w[DELETED CREATING ACTIVE UPDATING DELETING FAILED INACTIVE NEEDS_ATTENTION]
  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 DELETED, CREATING, ACTIVE, UPDATING, DELETING, FAILED, INACTIVE, NEEDS_ATTENTION.'
      end
    end
  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]
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?

  # 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_pod_shapes(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_pod_shapes API.

List all the Pod Shapes 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

  • :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.

  • :availability_domain (String)

    The availability domain of the pod shape.

  • :name (String)

    The name to filter on.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The optional order in which to sort the results. (default to ASC)

  • :sort_by (String)

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

Returns:



2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
# File 'lib/oci/container_engine/container_engine_client.rb', line 2091

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

  raise "Missing the required parameter 'compartment_id' when calling list_pod_shapes." 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 = '/podShapes'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:availabilityDomain] = opts[:availability_domain] if opts[:availability_domain]
  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_pod_shapes') 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::PodShapeSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use list_virtual_node_pools API.

List all the virtual 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

  • :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.

  • :cluster_id (String)

    The OCID of the cluster.

  • :name (String)

    The name to filter on.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The optional order in which to sort the results. (default to ASC)

  • :sort_by (String)

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

  • :lifecycle_state (Array<String>)

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

Returns:



2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
# File 'lib/oci/container_engine/container_engine_client.rb', line 2175

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

  raise "Missing the required parameter 'compartment_id' when calling list_virtual_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


  lifecycle_state_allowable_values = %w[CREATING ACTIVE UPDATING DELETING DELETED FAILED NEEDS_ATTENTION]
  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, UPDATING, DELETING, DELETED, FAILED, NEEDS_ATTENTION.'
      end
    end
  end

  path = '/virtualNodePools'
  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]
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?

  # 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_virtual_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::VirtualNodePoolSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_virtual_nodes(virtual_node_pool_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_virtual_nodes API.

List virtual nodes in a virtual node pool.

Parameters:

  • virtual_node_pool_id (String)

    The OCID of the virtual 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.

  • :name (String)

    The name to filter on.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The optional order in which to sort the results. (default to ASC)

  • :sort_by (String)

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

Returns:



2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
# File 'lib/oci/container_engine/container_engine_client.rb', line 2267

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

  raise "Missing the required parameter 'virtual_node_pool_id' when calling list_virtual_nodes." if virtual_node_pool_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
  raise "Parameter value for 'virtual_node_pool_id' must not be blank" if OCI::Internal::Util.blank_string?(virtual_node_pool_id)

  path = '/virtualNodePools/{virtualNodePoolId}/virtualNodes'.sub('{virtualNodePoolId}', virtual_node_pool_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  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_virtual_nodes') 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::VirtualNodeSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

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

Note:

Click here to see an example of how to use list_work_request_errors API.

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:



2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
# File 'lib/oci/container_engine/container_engine_client.rb', line 2337

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

Note:

Click here to see an example of how to use list_work_request_logs API.

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:



2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
# File 'lib/oci/container_engine/container_engine_client.rb', line 2396

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

Note:

Click here to see an example of how to use list_work_requests API.

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.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :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:



2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
# File 'lib/oci/container_engine/container_engine_client.rb', line 2469

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

  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

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

Note:

Click here to see an example of how to use list_workload_mappings API.

List workloadMappings for a provisioned 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.

  • :limit (Integer)

    For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. 1 is the minimum, 1000 is the maximum. For important details about how pagination works, see List Pagination. (default to 100)

  • :page (String)

    For list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see List Pagination.

  • :sort_order (String)

    The optional order in which to sort the results.

  • :sort_by (String)

    The optional field to sort the results by. (default to NAMESPACE) Allowed values are: NAMESPACE, TIMECREATED

Returns:



2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
# File 'lib/oci/container_engine/container_engine_client.rb', line 2555

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

  raise "Missing the required parameter 'cluster_id' when calling list_workload_mappings." if cluster_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[NAMESPACE TIMECREATED].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of NAMESPACE, TIMECREATED.'
  end
  raise "Parameter value for 'cluster_id' must not be blank" if OCI::Internal::Util.blank_string?(cluster_id)

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

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  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_workload_mappings') 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::WorkloadMappingSummary>'
    )
  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.



96
97
98
# File 'lib/oci/container_engine/container_engine_client.rb', line 96

def logger
  @api_client.config.logger
end

#start_credential_rotation(cluster_id, start_credential_rotation_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use start_credential_rotation API.

Start cluster credential rotation by adding new credentials, old credentials will still work after this operation.

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.

  • :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.

Returns:

  • (Response)

    A Response object with data of type nil



2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
# File 'lib/oci/container_engine/container_engine_client.rb', line 2631

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

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

  path = '/clusters/{clusterId}/actions/startCredentialRotation'.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-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]
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(start_credential_rotation_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#start_credential_rotation') 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

#update_addon(cluster_id, addon_name, update_addon_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_addon API.

Update addon details for a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

  • addon_name (String)

    The name of the addon.

  • update_addon_details (OCI::ContainerEngine::Models::UpdateAddonDetails)

    The details of the addon to be updated.

  • 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



2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
# File 'lib/oci/container_engine/container_engine_client.rb', line 2696

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

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

  path = '/clusters/{clusterId}/addons/{addonName}'.sub('{clusterId}', cluster_id.to_s).sub('{addonName}', addon_name.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_addon_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_addon') 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_cluster(cluster_id, update_cluster_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_cluster API.

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



2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
# File 'lib/oci/container_engine/container_engine_client.rb', line 2760

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_cluster_endpoint_config(cluster_id, update_cluster_endpoint_config_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_cluster_endpoint_config API.

Update the details of the cluster endpoint configuration.

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



2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
# File 'lib/oci/container_engine/container_engine_client.rb', line 2822

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

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

  path = '/clusters/{clusterId}/actions/updateEndpointConfig'.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_endpoint_config_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_cluster_endpoint_config') 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

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

Note:

Click here to see an example of how to use update_node_pool API.

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.

  • :override_eviction_grace_duration (String)

    Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M

  • :is_force_deletion_after_override_grace_duration (BOOLEAN)

    If the underlying compute instance should be deleted if you cannot evict all the pods in grace period

Returns:

  • (Response)

    A Response object with data of type nil



2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
# File 'lib/oci/container_engine/container_engine_client.rb', line 2888

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 = {}
  query_params[:overrideEvictionGraceDuration] = opts[:override_eviction_grace_duration] if opts[:override_eviction_grace_duration]
  query_params[:isForceDeletionAfterOverrideGraceDuration] = opts[:is_force_deletion_after_override_grace_duration] if !opts[:is_force_deletion_after_override_grace_duration].nil?

  # 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

#update_virtual_node_pool(virtual_node_pool_id, update_virtual_node_pool_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_virtual_node_pool API.

Update the details of a virtual 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



2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
# File 'lib/oci/container_engine/container_engine_client.rb', line 2952

def update_virtual_node_pool(virtual_node_pool_id, update_virtual_node_pool_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#update_virtual_node_pool.' if logger

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

  path = '/virtualNodePools/{virtualNodePoolId}'.sub('{virtualNodePoolId}', virtual_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_virtual_node_pool_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_virtual_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

#update_workload_mapping(cluster_id, workload_mapping_id, update_workload_mapping_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_workload_mapping API.

Update workloadMapping details for a cluster.

Parameters:

  • cluster_id (String)

    The OCID of the cluster.

  • workload_mapping_id (String)

    The OCID of the workloadMapping.

  • update_workload_mapping_details (OCI::ContainerEngine::Models::UpdateWorkloadMappingDetails)

    The details of the workloadMapping to be updated.

  • 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:



3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
# File 'lib/oci/container_engine/container_engine_client.rb', line 3015

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

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

  path = '/clusters/{clusterId}/workloadMappings/{workloadMappingId}'.sub('{clusterId}', cluster_id.to_s).sub('{workloadMappingId}', workload_mapping_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_workload_mapping_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#update_workload_mapping') 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,
      return_type: 'OCI::ContainerEngine::Models::WorkloadMapping'
    )
  end
  # rubocop:enable Metrics/BlockLength
end