ContainerEngineClient

class oci.container_engine.ContainerEngineClient(config, **kwargs)

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

__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) -- Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) -- (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) -- (optional) The connection and read timeouts for the client. The default is that the client never times out. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) --

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) --

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

create_cluster(create_cluster_details, **kwargs)

Create a new cluster. Create a new cluster.

Parameters:
  • create_cluster_details (CreateClusterDetails) -- (required) The details of the cluster to create.
  • opc_retry_token (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

create_kubeconfig(cluster_id, **kwargs)

Create the cluster kubeconfig. Create the Kubeconfig YAML for a cluster.

Parameters:
  • cluster_id (str) -- (required) The OCID of the cluster.
  • opc_request_id (str) -- (optional) 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 (CreateClusterKubeconfigContentDetails) -- (optional) The details of the cluster kubeconfig to create.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type stream

Return type:

Response

create_node_pool(create_node_pool_details, **kwargs)

Create a new node pool. Create a new node pool.

Parameters:
  • create_node_pool_details (CreateNodePoolDetails) -- (required) The details of the node pool to create.
  • opc_retry_token (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_cluster(cluster_id, **kwargs)

Delete a cluster. Delete a cluster.

Parameters:
  • cluster_id (str) -- (required) The OCID of the cluster.
  • if_match (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_node_pool(node_pool_id, **kwargs)

Delete a node pool. Delete a node pool.

Parameters:
  • node_pool_id (str) -- (required) The OCID of the node pool.
  • if_match (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

delete_work_request(work_request_id, **kwargs)

Cancel a work request. Cancel a work request that has not started.

Parameters:
  • work_request_id (str) -- (required) The OCID of the work request.
  • if_match (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

get_cluster(cluster_id, **kwargs)

Get cluster details. Get the details of a cluster.

Parameters:
  • cluster_id (str) -- (required) The OCID of the cluster.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type Cluster

Return type:

Response

get_cluster_options(cluster_option_id, **kwargs)

Get cluster options. Get options available for clusters.

Parameters:
  • cluster_option_id (str) -- (required) The id of the option set to retrieve. Only "all" is supported.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type ClusterOptions

Return type:

Response

get_node_pool(node_pool_id, **kwargs)

Get node pool details. Get the details of a node pool.

Parameters:
  • node_pool_id (str) -- (required) The OCID of the node pool.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type NodePool

Return type:

Response

get_node_pool_options(node_pool_option_id, **kwargs)

Get node pool options. Get options available for node pools.

Parameters:
  • node_pool_option_id (str) -- (required) 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.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type NodePoolOptions

Return type:

Response

get_work_request(work_request_id, **kwargs)

Get work request details. Get the details of a work request.

Parameters:
  • work_request_id (str) -- (required) The OCID of the work request.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type WorkRequest

Return type:

Response

list_clusters(compartment_id, **kwargs)

List all cluster objects. List all the cluster objects in a compartment.

Parameters:
  • compartment_id (str) -- (required) The OCID of the compartment.
  • lifecycle_state (list[str]) --

    (optional) A cluster lifecycle state to filter on. Can have multiple parameters of this name.

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

  • name (str) -- (optional) The name to filter on.
  • limit (int) --

    (optional) 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.

  • page (str) --

    (optional) 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 (str) --

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

    Allowed values are: "ASC", "DESC"

  • sort_by (str) --

    (optional) The optional field to sort the results by.

    Allowed values are: "ID", "NAME", "TIME_CREATED"

  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of ClusterSummary

Return type:

Response

list_node_pools(compartment_id, **kwargs)

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

Parameters:
  • compartment_id (str) -- (required) The OCID of the compartment.
  • cluster_id (str) -- (optional) The OCID of the cluster.
  • name (str) -- (optional) The name to filter on.
  • limit (int) --

    (optional) 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.

  • page (str) --

    (optional) 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 (str) --

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

    Allowed values are: "ASC", "DESC"

  • sort_by (str) --

    (optional) The optional field to sort the results by.

    Allowed values are: "ID", "NAME", "TIME_CREATED"

  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of NodePoolSummary

Return type:

Response

list_work_request_errors(compartment_id, work_request_id, **kwargs)

Get work request errors. Get the errors of a work request.

Parameters:
  • compartment_id (str) -- (required) The OCID of the compartment.
  • work_request_id (str) -- (required) The OCID of the work request.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of WorkRequestError

Return type:

Response

list_work_request_logs(compartment_id, work_request_id, **kwargs)

Get work request logs. Get the logs of a work request.

Parameters:
  • compartment_id (str) -- (required) The OCID of the compartment.
  • work_request_id (str) -- (required) The OCID of the work request.
  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of WorkRequestLogEntry

Return type:

Response

list_work_requests(compartment_id, **kwargs)

List all work requests. List all work requests in a compartment.

Parameters:
  • compartment_id (str) -- (required) The OCID of the compartment.
  • cluster_id (str) -- (optional) The OCID of the cluster.
  • resource_id (str) -- (optional) The OCID of the resource associated with a work request
  • resource_type (str) --

    (optional) Type of the resource associated with a work request

    Allowed values are: "CLUSTER", "NODEPOOL"

  • status (list[str]) --

    (optional) A work request status to filter on. Can have multiple parameters of this name.

    Allowed values are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"

  • limit (int) --

    (optional) 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.

  • page (str) --

    (optional) 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 (str) --

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

    Allowed values are: "ASC", "DESC"

  • sort_by (str) --

    (optional) The optional field to sort the results by.

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

  • opc_request_id (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type list of WorkRequestSummary

Return type:

Response

update_cluster(cluster_id, update_cluster_details, **kwargs)

Update cluster details. Update the details of a cluster.

Parameters:
  • cluster_id (str) -- (required) The OCID of the cluster.
  • update_cluster_details (UpdateClusterDetails) -- (required) The details of the cluster to update.
  • if_match (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response

update_node_pool(node_pool_id, update_node_pool_details, **kwargs)

Update node pool details. Update the details of a node pool.

Parameters:
  • node_pool_id (str) -- (required) The OCID of the node pool.
  • update_node_pool_details (UpdateNodePoolDetails) -- (required) The fields to update in a node pool.
  • if_match (str) -- (optional) 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 (str) -- (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
  • retry_strategy (obj) --

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

Returns:

A Response object with data of type None

Return type:

Response