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

Methods

__init__(config, **kwargs) Creates a new service client
cluster_migrate_to_native_vcn(cluster_id, …) Initiates cluster migration to use native VCN.
create_cluster(create_cluster_details, **kwargs) Create a new cluster.
create_kubeconfig(cluster_id, **kwargs) Create the Kubeconfig YAML for a cluster.
create_node_pool(create_node_pool_details, …) Create a new node pool.
delete_cluster(cluster_id, **kwargs) Delete a cluster.
delete_node(node_pool_id, node_id, **kwargs) Delete node.
delete_node_pool(node_pool_id, **kwargs) Delete a node pool.
delete_work_request(work_request_id, **kwargs) Cancel a work request that has not started.
get_cluster(cluster_id, **kwargs) Get the details of a cluster.
get_cluster_migrate_to_native_vcn_status(…) Get details on a cluster’s migration to native VCN.
get_cluster_options(cluster_option_id, **kwargs) Get options available for clusters.
get_node_pool(node_pool_id, **kwargs) Get the details of a node pool.
get_node_pool_options(node_pool_option_id, …) Get options available for node pools.
get_work_request(work_request_id, **kwargs) Get the details of a work request.
list_clusters(compartment_id, **kwargs) List all the cluster objects in a compartment.
list_node_pools(compartment_id, **kwargs) List all the node pools in a compartment, and optionally filter by cluster.
list_work_request_errors(compartment_id, …) Get the errors of a work request.
list_work_request_logs(compartment_id, …) Get the logs of a work request.
list_work_requests(compartment_id, **kwargs) List all work requests in a compartment.
update_cluster(cluster_id, …) Update the details of a cluster.
update_cluster_endpoint_config(cluster_id, …) Update the details of the cluster endpoint configuration.
update_node_pool(node_pool_id, …) Update the details of a node pool.
__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 values are connection timeout 10 seconds and read timeout 60 seconds. 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.

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
cluster_migrate_to_native_vcn(cluster_id, cluster_migrate_to_native_vcn_details, **kwargs)

Initiates cluster migration to use native VCN.

Parameters:
  • cluster_id (str) – (required) The OCID of the cluster.
  • cluster_migrate_to_native_vcn_details (oci.container_engine.models.ClusterMigrateToNativeVcnDetails) – (required) The details for the cluster’s migration to native VCN.
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

create_cluster(create_cluster_details, **kwargs)

Create a new cluster.

Parameters:
  • create_cluster_details (oci.container_engine.models.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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

create_kubeconfig(cluster_id, **kwargs)

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 (oci.container_engine.models.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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type stream

Return type:

Response

Example:

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

create_node_pool(create_node_pool_details, **kwargs)

Create a new node pool.

Parameters:
  • create_node_pool_details (oci.container_engine.models.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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

delete_cluster(cluster_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

delete_node(node_pool_id, node_id, **kwargs)

Delete node.

Parameters:
  • node_pool_id (str) – (required) The OCID of the node pool.
  • node_id (str) – (required) The OCID of the compute instance.
  • is_decrement_size (bool) – (optional) If the nodepool should be scaled down after the node is deleted.
  • 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.
  • override_eviction_grace_duration (str) – (optional) Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M
  • is_force_deletion_after_override_grace_duration (bool) – (optional) If the underlying compute instance should be deleted if you cannot evict all the pods in grace period
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

delete_node_pool(node_pool_id, **kwargs)

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.
  • override_eviction_grace_duration (str) – (optional) Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M
  • is_force_deletion_after_override_grace_duration (bool) – (optional) If the underlying compute instance should be deleted if you cannot evict all the pods in grace period
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

delete_work_request(work_request_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

get_cluster(cluster_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Cluster

Return type:

Response

Example:

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

get_cluster_migrate_to_native_vcn_status(cluster_id, **kwargs)

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

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ClusterMigrateToNativeVcnStatus

Return type:

Response

Example:

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

get_cluster_options(cluster_option_id, **kwargs)

Get options available for clusters.

Parameters:
  • cluster_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.
  • compartment_id (str) – (optional) The OCID of the compartment.
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ClusterOptions

Return type:

Response

Example:

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

get_node_pool(node_pool_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type NodePool

Return type:

Response

Example:

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

get_node_pool_options(node_pool_option_id, **kwargs)

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.
  • compartment_id (str) – (optional) The OCID of the compartment.
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type NodePoolOptions

Return type:

Response

Example:

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

get_work_request(work_request_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type WorkRequest

Return type:

Response

Example:

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

list_clusters(compartment_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ClusterSummary

Return type:

Response

Example:

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

list_node_pools(compartment_id, **kwargs)

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.
  • lifecycle_state (list[str]) –

    (optional) A list of nodepool lifecycle states on which to filter on, matching any of the list items (OR logic). eg. [ACTIVE, DELETING]

    Allowed values are: “DELETED”, “CREATING”, “ACTIVE”, “UPDATING”, “DELETING”, “FAILED”, “INACTIVE”, “NEEDS_ATTENTION”

  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of NodePoolSummary

Return type:

Response

Example:

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

list_work_request_errors(compartment_id, work_request_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestError

Return type:

Response

Example:

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

list_work_request_logs(compartment_id, work_request_id, **kwargs)

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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestLogEntry

Return type:

Response

Example:

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

list_work_requests(compartment_id, **kwargs)

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.
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestSummary

Return type:

Response

Example:

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

update_cluster(cluster_id, update_cluster_details, **kwargs)

Update the details of a cluster.

Parameters:
  • cluster_id (str) – (required) The OCID of the cluster.
  • update_cluster_details (oci.container_engine.models.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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

update_cluster_endpoint_config(cluster_id, update_cluster_endpoint_config_details, **kwargs)

Update the details of the cluster endpoint configuration.

Parameters:
  • cluster_id (str) – (required) The OCID of the cluster.
  • update_cluster_endpoint_config_details (oci.container_engine.models.UpdateClusterEndpointConfigDetails) – (required) The details of the cluster’s endpoint 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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

update_node_pool(node_pool_id, update_node_pool_details, **kwargs)

Update the details of a node pool.

Parameters:
  • node_pool_id (str) – (required) The OCID of the node pool.
  • update_node_pool_details (oci.container_engine.models.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.
  • override_eviction_grace_duration (str) – (optional) Duration after which OKE will give up eviction of the pods on the node. PT0M will indicate you want to delete the node without cordon and drain. Default PT60M, Min PT0M, Max: PT60M. Format ISO 8601 e.g PT30M
  • is_force_deletion_after_override_grace_duration (bool) – (optional) If the underlying compute instance should be deleted if you cannot evict all the pods in grace period
  • 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. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

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

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

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