DataScienceClient

class oci.data_science.DataScienceClient(config, **kwargs)

Use the Data Science APIs to organize your data science work, access data and computing resources, and build, train, deploy, and manage models on Oracle Cloud.

Methods

__init__(config, **kwargs) Creates a new service client
activate_model(model_id, **kwargs) Activates the model.
activate_notebook_session(…) Activates the notebook session.
cancel_work_request(work_request_id, **kwargs) Cancels a work request that has not started.
change_model_compartment(model_id, …) Moves a model resource into a different compartment.
change_notebook_session_compartment(…) Moves a notebook session resource into a different compartment.
change_project_compartment(project_id, …) Moves a project resource into a different compartment.
create_model(create_model_details, **kwargs) Creates a new model.
create_model_artifact(model_id, …) Creates model artifact for specified model.
create_model_provenance(model_id, …) Creates provenance information for the specified model.
create_notebook_session(…) Creates a new notebook session.
create_project(create_project_details, **kwargs) Creates a new project.
deactivate_model(model_id, **kwargs) Deactivates the model.
deactivate_notebook_session(…) Deactivates the notebook session.
delete_model(model_id, **kwargs) Deletes the specified model.
delete_notebook_session(notebook_session_id, …) Deletes the specified notebook session.
delete_project(project_id, **kwargs) Deletes the specified project.
get_model(model_id, **kwargs) Gets the specified model’s information.
get_model_artifact_content(model_id, **kwargs) Downloads model artifact content for specified model.
get_model_provenance(model_id, **kwargs) Gets provenance information for specified model.
get_notebook_session(notebook_session_id, …) Gets the specified notebook session’s information.
get_project(project_id, **kwargs) Gets the specified project’s information.
get_work_request(work_request_id, **kwargs) Gets the specified work request’s information.
head_model_artifact(model_id, **kwargs) Gets model artifact metadata for specified model.
list_models(compartment_id, **kwargs) Lists models in the specified compartment.
list_notebook_session_shapes(compartment_id, …) Lists the valid notebook session shapes.
list_notebook_sessions(compartment_id, **kwargs) Lists notebook sessions in the specified compartment.
list_projects(compartment_id, **kwargs) Lists projects in the specified compartment.
list_work_request_errors(work_request_id, …) Lists work request errors for the specified work request.
list_work_request_logs(work_request_id, **kwargs) Lists work request logs for the specified work request.
list_work_requests(compartment_id, **kwargs) Lists work requests in the specified compartment.
update_model(model_id, update_model_details, …) Updates the properties of a model.
update_model_provenance(model_id, …) Updates provenance information for the specified model.
update_notebook_session(notebook_session_id, …) Updates the properties of a notebook session.
update_project(project_id, …) Updates the properties of a project.
__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.

activate_model(model_id, **kwargs)

Activates the model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

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

Return type:

Response

activate_notebook_session(notebook_session_id, **kwargs)

Activates the notebook session.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • 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

cancel_work_request(work_request_id, **kwargs)

Cancels 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

change_model_compartment(model_id, change_model_compartment_details, **kwargs)

Moves a model resource into a different compartment.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • change_model_compartment_details (ChangeModelCompartmentDetails) – (required) Details for changing the compartment of a model.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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

change_notebook_session_compartment(notebook_session_id, change_notebook_session_compartment_details, **kwargs)

Moves a notebook session resource into a different compartment.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • change_notebook_session_compartment_details (ChangeNotebookSessionCompartmentDetails) – (required) Details for changing the compartment of a notebook session.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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

change_project_compartment(project_id, change_project_compartment_details, **kwargs)

Moves a project resource into a different compartment.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • change_project_compartment_details (ChangeProjectCompartmentDetails) – (required) Details for changing the compartment of a project.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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_model(create_model_details, **kwargs)

Creates a new model.

Parameters:
  • create_model_details (CreateModelDetails) – (required) Details for creating a new model.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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 Model

Return type:

Response

create_model_artifact(model_id, model_artifact, **kwargs)

Creates model artifact for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • model_artifact (stream) – (required) The model artifact to upload.
  • content_length (int) – (optional) The content length of the body.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • content_disposition (str) – (optional) The content disposition of the body.
  • 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_model_provenance(model_id, create_model_provenance_details, **kwargs)

Creates provenance information for the specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • create_model_provenance_details (CreateModelProvenanceDetails) – (required) Provenance information for specified model.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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 ModelProvenance

Return type:

Response

create_notebook_session(create_notebook_session_details, **kwargs)

Creates a new notebook session.

Parameters:
  • create_notebook_session_details (CreateNotebookSessionDetails) – (required) Details for creating a new notebook session.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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 NotebookSession

Return type:

Response

create_project(create_project_details, **kwargs)

Creates a new project.

Parameters:
  • create_project_details (CreateProjectDetails) – (required) Details for creating a new project.
  • 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.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • 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 Project

Return type:

Response

deactivate_model(model_id, **kwargs)

Deactivates the model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

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

Return type:

Response

deactivate_notebook_session(notebook_session_id, **kwargs)

Deactivates the notebook session.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • 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_model(model_id, **kwargs)

Deletes the specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • 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_notebook_session(notebook_session_id, **kwargs)

Deletes the specified notebook session. Any unsaved work in this notebook session will be lost.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • 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_project(project_id, **kwargs)

Deletes the specified project. This operation will fail unless all associated resources (such as notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • 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_model(model_id, **kwargs)

Gets the specified model’s information.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

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

Return type:

Response

get_model_artifact_content(model_id, **kwargs)

Downloads model artifact content for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • 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.
  • range (str) –

    (optional) Optional byte range to fetch, as described in RFC 7233, section 2.1. Note that only a single range of bytes is supported.

  • 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

get_model_provenance(model_id, **kwargs)

Gets provenance information for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

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

Return type:

Response

get_notebook_session(notebook_session_id, **kwargs)

Gets the specified notebook session’s information.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

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

Return type:

Response

get_project(project_id, **kwargs)

Gets the specified project’s information.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

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

Return type:

Response

get_work_request(work_request_id, **kwargs)

Gets the specified work request’s information.

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

head_model_artifact(model_id, **kwargs)

Gets model artifact metadata for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • 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

list_models(compartment_id, **kwargs)

Lists models in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • project_id (str) –

    (optional) <b>Filter</b> results by the OCID of the project.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “ACTIVE”, “DELETED”, “FAILED”, “INACTIVE”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • 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. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, results are shown in descending order. All other fields default to ascending order. Sort order for displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”, “lifecycleState”

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

Return type:

Response

list_notebook_session_shapes(compartment_id, **kwargs)

Lists the valid notebook session shapes.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by 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.
  • 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. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

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

Return type:

Response

list_notebook_sessions(compartment_id, **kwargs)

Lists notebook sessions in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • project_id (str) –

    (optional) <b>Filter</b> results by the OCID of the project.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

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

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • 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. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, results are shown in descending order. When you sort by displayName, results are shown in ascending order. Sort order for displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

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

Return type:

Response

list_projects(compartment_id, **kwargs)

Lists projects in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “ACTIVE”, “DELETING”, “DELETED”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • 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. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, results are shown in descending order. When you sort by displayName, results are shown in ascending order. Sort order for displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

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

Return type:

Response

list_work_request_errors(work_request_id, **kwargs)

Lists work request errors for the specified 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 list of WorkRequestError

Return type:

Response

list_work_request_logs(work_request_id, **kwargs)

Lists work request logs for the specified 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 list of WorkRequestLogEntry

Return type:

Response

list_work_requests(compartment_id, **kwargs)

Lists work requests in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • operation_type (str) –

    (optional) <b>Filter</b> results by the type of the operation associated with the work request.

    Allowed values are: “NOTEBOOK_SESSION_CREATE”, “NOTEBOOK_SESSION_DELETE”, “NOTEBOOK_SESSION_ACTIVATE”, “NOTEBOOK_SESSION_DEACTIVATE”, “PROJECT_DELETE”, “WORKREQUEST_CANCEL”

  • status (str) –

    (optional) <b>Filter</b> results by work request status.

    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. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, results are shown in descending order. All other fields default to ascending order.

    Allowed values are: “operationType”, “status”, “timeAccepted”

  • 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_model(model_id, update_model_details, **kwargs)

Updates the properties of a model. You can update the displayName, description, freeformTags, and definedTags properties.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • update_model_details (UpdateModelDetails) – (required) Details for updating a model. You can update the displayName, description, freeformTags, and definedTags properties.
  • 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 Model

Return type:

Response

update_model_provenance(model_id, update_model_provenance_details, **kwargs)

Updates provenance information for the specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • update_model_provenance_details (UpdateModelProvenanceDetails) – (required) Provenance information for the specified model.
  • 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.
  • 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.
  • 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 ModelProvenance

Return type:

Response

update_notebook_session(notebook_session_id, update_notebook_session_details, **kwargs)

Updates the properties of a notebook session. You can update the displayName, freeformTags, and definedTags properties. When the notebook session is in the INACTIVE lifecycle state, you can update notebookSessionConfigurationDetails and change shape, subnetId, and blockStorageSizeInGBs. Changes to the notebookSessionConfigurationDetails will take effect the next time the ActivateNotebookSession action is invoked on the notebook session resource.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • update_notebook_session_details (UpdateNotebookSessionDetails) – (required) Details for updating a notebook session. notebookSessionConfigurationDetails can only be updated while the notebook session is in the INACTIVE state. Changes to the notebookSessionConfigurationDetails will take effect the next time the ActivateNotebookSession action is invoked on the notebook session resource.
  • 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 NotebookSession

Return type:

Response

update_project(project_id, update_project_details, **kwargs)

Updates the properties of a project. You can update the displayName, description, freeformTags, and definedTags properties.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • update_project_details (UpdateProjectDetails) – (required) Details for updating a project. You can update the displayName, description, freeformTags, and definedTags properties.
  • 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 Project

Return type:

Response