class OCI::ContainerEngine::ContainerEngineClient

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](/iaas/Content/ContEng/Concepts/contengoverview.htm).

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

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 @return [OCI::Retry::RetryConfig]

Public Class Methods

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

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.

@param [Config] config A Config object. @param [String] region A region used to determine the service endpoint. This will usually

correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer 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

@param [OCI::ApiClientProxySettings] proxy_settings 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

@param [OCI::Retry::RetryConfig] retry_config 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
# File lib/oci/container_engine/container_engine_client.rb, line 55
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

Public Instance Methods

cluster_migrate_to_native_vcn(cluster_id, cluster_migrate_to_native_vcn_details, opts = {}) click to toggle source

Initiates cluster migration to use native VCN. @param [String] cluster_id The OCID of the cluster. @param [OCI::ContainerEngine::Models::ClusterMigrateToNativeVcnDetails] cluster_migrate_to_native_vcn_details The details for the cluster's migration to native VCN. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/cluster_migrate_to_native_vcn.rb.html) to see an example of how to use cluster_migrate_to_native_vcn API.

# File lib/oci/container_engine/container_engine_client.rb, line 118
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
create_cluster(create_cluster_details, opts = {}) click to toggle source

Create a new cluster. @param [OCI::ContainerEngine::Models::CreateClusterDetails] create_cluster_details The details of the cluster to create. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token A token you supply to uniquely identify the request and provide idempotency if

the request is retried. Idempotency tokens expire after 24 hours.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/create_cluster.rb.html) to see an example of how to use create_cluster API.

# File lib/oci/container_engine/container_engine_client.rb, line 178
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) click to toggle source

Create the Kubeconfig YAML for a cluster. @param [String] cluster_id The OCID of the cluster. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@option opts [OCI::ContainerEngine::Models::CreateClusterKubeconfigContentDetails] :create_cluster_kubeconfig_content_details The details of the cluster kubeconfig to create. @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given @option [Block] &block Streaming http body to the block @return [Response] A Response object with data of type String if response_target and block are not given, otherwise with nil data @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/create_kubeconfig.rb.html) to see an example of how to use create_kubeconfig API.

# File lib/oci/container_engine/container_engine_client.rb, line 237
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 = {}) click to toggle source

Create a new node pool. @param [OCI::ContainerEngine::Models::CreateNodePoolDetails] create_node_pool_details The details of the node pool to create. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_retry_token A token you supply to uniquely identify the request and provide idempotency if

the request is retried. Idempotency tokens expire after 24 hours.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/create_node_pool.rb.html) to see an example of how to use create_node_pool API.

# File lib/oci/container_engine/container_engine_client.rb, line 340
def create_node_pool(create_node_pool_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#create_node_pool.' if logger

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

  path = '/nodePools'
  operation_signing_strategy = :standard

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

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

  post_body = @api_client.object_to_http_body(create_node_pool_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#create_node_pool') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_cluster(cluster_id, opts = {}) click to toggle source

Delete a cluster. @param [String] cluster_id The OCID of the cluster. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/delete_cluster.rb.html) to see an example of how to use delete_cluster API.

# File lib/oci/container_engine/container_engine_client.rb, line 400
def delete_cluster(cluster_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#delete_cluster.' if logger

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

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

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_cluster') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_node_pool(node_pool_id, opts = {}) click to toggle source

Delete a node pool. @param [String] node_pool_id The OCID of the node pool. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/delete_node_pool.rb.html) to see an example of how to use delete_node_pool API.

# File lib/oci/container_engine/container_engine_client.rb, line 460
def delete_node_pool(node_pool_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#delete_node_pool.' if logger

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

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

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_node_pool') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_work_request(work_request_id, opts = {}) click to toggle source

Cancel a work request that has not started. @param [String] work_request_id The OCID of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/delete_work_request.rb.html) to see an example of how to use delete_work_request API.

# File lib/oci/container_engine/container_engine_client.rb, line 520
def delete_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#delete_work_request.' if logger

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

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'ContainerEngineClient#delete_work_request') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_cluster(cluster_id, opts = {}) click to toggle source

Get the details of a cluster. @param [String] cluster_id The OCID of the cluster. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::ContainerEngine::Models::Cluster Cluster} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/get_cluster.rb.html) to see an example of how to use get_cluster API.

# File lib/oci/container_engine/container_engine_client.rb, line 576
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 = {}) click to toggle source

Get details on a cluster's migration to native VCN. @param [String] cluster_id The OCID of the cluster. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::ContainerEngine::Models::ClusterMigrateToNativeVcnStatus ClusterMigrateToNativeVcnStatus} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/get_cluster_migrate_to_native_vcn_status.rb.html) to see an example of how to use get_cluster_migrate_to_native_vcn_status API.

# File lib/oci/container_engine/container_engine_client.rb, line 632
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 = {}) click to toggle source

Get options available for clusters. @param [String] cluster_option_id 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. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :compartment_id The OCID of the compartment. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::ContainerEngine::Models::ClusterOptions ClusterOptions} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/get_cluster_options.rb.html) to see an example of how to use get_cluster_options API.

# File lib/oci/container_engine/container_engine_client.rb, line 689
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_node_pool(node_pool_id, opts = {}) click to toggle source

Get the details of a node pool. @param [String] node_pool_id The OCID of the node pool. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::ContainerEngine::Models::NodePool NodePool} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/get_node_pool.rb.html) to see an example of how to use get_node_pool API.

# File lib/oci/container_engine/container_engine_client.rb, line 746
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 = {}) click to toggle source

Get options available for node pools. @param [String] node_pool_option_id 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. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :compartment_id The OCID of the compartment. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::ContainerEngine::Models::NodePoolOptions NodePoolOptions} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/get_node_pool_options.rb.html) to see an example of how to use get_node_pool_options API.

# File lib/oci/container_engine/container_engine_client.rb, line 803
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_work_request(work_request_id, opts = {}) click to toggle source

Get the details of a work request. @param [String] work_request_id The OCID of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type {OCI::ContainerEngine::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/container_engine/container_engine_client.rb, line 860
def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#get_work_request.' if logger

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

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

List all the cluster objects in a compartment. @param [String] compartment_id The OCID of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [Array<String>] :lifecycle_state A cluster lifecycle state to filter on. Can have multiple parameters of this name.

Allowed values are: CREATING, ACTIVE, FAILED, DELETING, DELETED, UPDATING

@option opts [String] :name The name to filter on. @option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :sort_order The optional order in which to sort the results. @option opts [String] :sort_by The optional field to sort the results by.

Allowed values are: ID, NAME, TIME_CREATED

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::ClusterSummary ClusterSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/list_clusters.rb.html) to see an example of how to use list_clusters API.

# File lib/oci/container_engine/container_engine_client.rb, line 929
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 = {}) click to toggle source

List all the node pools in a compartment, and optionally filter by cluster. @param [String] compartment_id The OCID of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :cluster_id The OCID of the cluster. @option opts [String] :name The name to filter on. @option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :sort_order The optional order in which to sort the results. @option opts [String] :sort_by The optional field to sort the results by.

Allowed values are: ID, NAME, TIME_CREATED

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::NodePoolSummary NodePoolSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/list_node_pools.rb.html) to see an example of how to use list_node_pools API.

# File lib/oci/container_engine/container_engine_client.rb, line 1021
def list_node_pools(compartment_id, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#list_node_pools.' if logger

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

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

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

  path = '/nodePools'
  operation_signing_strategy = :standard

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

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

  post_body = nil

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

Get the errors of a work request. @param [String] compartment_id The OCID of the compartment. @param [String] work_request_id The OCID of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::WorkRequestError WorkRequestError}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

# File lib/oci/container_engine/container_engine_client.rb, line 1092
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 = {}) click to toggle source

Get the logs of a work request. @param [String] compartment_id The OCID of the compartment. @param [String] work_request_id The OCID of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::WorkRequestLogEntry WorkRequestLogEntry}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

# File lib/oci/container_engine/container_engine_client.rb, line 1151
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 = {}) click to toggle source

List all work requests in a compartment. @param [String] compartment_id The OCID of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :cluster_id The OCID of the cluster. @option opts [String] :resource_id The OCID of the resource associated with a work request @option opts [String] :resource_type Type of the resource associated with a work request

Allowed values are: CLUSTER, NODEPOOL

@option opts [Array<String>] :status A work request status to filter on. Can have multiple parameters of this name. @option opts [Integer] :limit 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :page 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](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine).

@option opts [String] :sort_order The optional order in which to sort the results. @option opts [String] :sort_by The optional field to sort the results by.

Allowed values are: ID, OPERATION_TYPE, STATUS, TIME_ACCEPTED, TIME_STARTED, TIME_FINISHED

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type Array<{OCI::ContainerEngine::Models::WorkRequestSummary WorkRequestSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

# File lib/oci/container_engine/container_engine_client.rb, line 1224
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
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/container_engine/container_engine_client.rb, line 94
def logger
  @api_client.config.logger
end
region=(new_region) click to toggle source

Set the region that will be used to determine the service endpoint. This will usually correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

# File lib/oci/container_engine/container_engine_client.rb, line 84
def region=(new_region)
  @region = new_region

  raise 'A region must be specified.' unless @region

  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://containerengine.{region}.oci.{secondLevelDomain}') + '/20180222'
  logger.info "ContainerEngineClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
update_cluster(cluster_id, update_cluster_details, opts = {}) click to toggle source

Update the details of a cluster. @param [String] cluster_id The OCID of the cluster. @param [OCI::ContainerEngine::Models::UpdateClusterDetails] update_cluster_details The details of the cluster to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/update_cluster.rb.html) to see an example of how to use update_cluster API.

# File lib/oci/container_engine/container_engine_client.rb, line 1305
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 = {}) click to toggle source

Update the details of the cluster endpoint configuration. @param [String] cluster_id The OCID of the cluster. @param [OCI::ContainerEngine::Models::UpdateClusterEndpointConfigDetails] update_cluster_endpoint_config_details The details of the cluster's endpoint to update. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/update_cluster_endpoint_config.rb.html) to see an example of how to use update_cluster_endpoint_config API.

# File lib/oci/container_engine/container_engine_client.rb, line 1367
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 = {}) click to toggle source

Update the details of a node pool. @param [String] node_pool_id The OCID of the node pool. @param [OCI::ContainerEngine::Models::UpdateNodePoolDetails] update_node_pool_details The fields to update in a node pool. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config 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

@option opts [String] :if_match 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.

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact

Oracle about a particular request, please provide the request ID.

@return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/containerengine/update_node_pool.rb.html) to see an example of how to use update_node_pool API.

# File lib/oci/container_engine/container_engine_client.rb, line 1429
def update_node_pool(node_pool_id, update_node_pool_details, opts = {})
  logger.debug 'Calling operation ContainerEngineClient#update_node_pool.' if logger

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

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

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

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

  post_body = @api_client.object_to_http_body(update_node_pool_details)

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

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/container_engine/container_engine_client.rb, line 1473
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end