class OCI::DataScience::DataScienceClient
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.
Attributes
Client used to make HTTP requests. @return [OCI::ApiClient]
Fully qualified endpoint URL @return [String]
The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation will not perform any retries @return [OCI::Retry::RetryConfig]
Public Class Methods
Creates a new DataScienceClient
. Notes:
If a config is not specified, then the global OCI.config will be used. This client is not thread-safe Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
@param [Config] config A Config
object. @param [String] region A region used to determine the service endpoint. This will usually
correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client
@param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
the details for the proxy can be provided in this parameter
@param [OCI::Retry::RetryConfig] retry_config
The retry configuration for this service client. This represents the default retry configuration to
apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation will not perform any retries
# File lib/oci/data_science/data_science_client.rb, line 53 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20190101' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "DataScienceClient endpoint set to '#{@endpoint}'." if logger end
Public Instance Methods
Activates the model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Model Model} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/activate_model.rb.html) to see an example of how to use activate_model
API.
# File lib/oci/data_science/data_science_client.rb, line 116 def activate_model(model_id, opts = {}) logger.debug 'Calling operation DataScienceClient#activate_model.' if logger raise "Missing the required parameter 'model_id' when calling activate_model." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/actions/activate'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#activate_model') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Model' ) end # rubocop:enable Metrics/BlockLength end
Activates the model deployment. @param [String] model_deployment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/activate_model_deployment.rb.html) to see an example of how to use activate_model_deployment
API.
# File lib/oci/data_science/data_science_client.rb, line 178 def activate_model_deployment(model_deployment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#activate_model_deployment.' if logger raise "Missing the required parameter 'model_deployment_id' when calling activate_model_deployment." if model_deployment_id.nil? raise "Parameter value for 'model_deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(model_deployment_id) path = '/modelDeployments/{modelDeploymentId}/actions/activate'.sub('{modelDeploymentId}', model_deployment_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#activate_model_deployment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Activates the notebook session. @param [String] notebook_session_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the notebook session. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/activate_notebook_session.rb.html) to see an example of how to use activate_notebook_session
API.
# File lib/oci/data_science/data_science_client.rb, line 239 def activate_notebook_session(notebook_session_id, opts = {}) logger.debug 'Calling operation DataScienceClient#activate_notebook_session.' if logger raise "Missing the required parameter 'notebook_session_id' when calling activate_notebook_session." if notebook_session_id.nil? raise "Parameter value for 'notebook_session_id' must not be blank" if OCI::Internal::Util.blank_string?(notebook_session_id) path = '/notebookSessions/{notebookSessionId}/actions/activate'.sub('{notebookSessionId}', notebook_session_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#activate_notebook_session') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Cancels a work request that has not started. @param [String] work_request_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/cancel_work_request.rb.html) to see an example of how to use cancel_work_request
API.
# File lib/oci/data_science/data_science_client.rb, line 300 def cancel_work_request(work_request_id, opts = {}) logger.debug 'Calling operation DataScienceClient#cancel_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling cancel_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#cancel_work_request') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Moves a model resource into a different compartment. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [OCI::DataScience::Models::ChangeModelCompartmentDetails] change_model_compartment_details Details for changing the compartment of a model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/change_model_compartment.rb.html) to see an example of how to use change_model_compartment
API.
# File lib/oci/data_science/data_science_client.rb, line 364 def change_model_compartment(model_id, change_model_compartment_details, opts = {}) logger.debug 'Calling operation DataScienceClient#change_model_compartment.' if logger raise "Missing the required parameter 'model_id' when calling change_model_compartment." if model_id.nil? raise "Missing the required parameter 'change_model_compartment_details' when calling change_model_compartment." if change_model_compartment_details.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/actions/changeCompartment'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_model_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#change_model_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Moves a model deployment into a different compartment. When provided, If-Match is checked against ETag values of the resource. @param [String] model_deployment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. @param [OCI::DataScience::Models::ChangeModelDeploymentCompartmentDetails] change_model_deployment_compartment_details Details for changing the compartment of a model deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/change_model_deployment_compartment.rb.html) to see an example of how to use change_model_deployment_compartment
API.
# File lib/oci/data_science/data_science_client.rb, line 431 def change_model_deployment_compartment(model_deployment_id, change_model_deployment_compartment_details, opts = {}) logger.debug 'Calling operation DataScienceClient#change_model_deployment_compartment.' if logger raise "Missing the required parameter 'model_deployment_id' when calling change_model_deployment_compartment." if model_deployment_id.nil? raise "Missing the required parameter 'change_model_deployment_compartment_details' when calling change_model_deployment_compartment." if change_model_deployment_compartment_details.nil? raise "Parameter value for 'model_deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(model_deployment_id) path = '/modelDeployments/{modelDeploymentId}/actions/changeCompartment'.sub('{modelDeploymentId}', model_deployment_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_model_deployment_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#change_model_deployment_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Moves a notebook session resource into a different compartment. @param [String] notebook_session_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the notebook session. @param [OCI::DataScience::Models::ChangeNotebookSessionCompartmentDetails] change_notebook_session_compartment_details Details for changing the compartment of a notebook session. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/change_notebook_session_compartment.rb.html) to see an example of how to use change_notebook_session_compartment
API.
# File lib/oci/data_science/data_science_client.rb, line 498 def change_notebook_session_compartment(notebook_session_id, change_notebook_session_compartment_details, opts = {}) logger.debug 'Calling operation DataScienceClient#change_notebook_session_compartment.' if logger raise "Missing the required parameter 'notebook_session_id' when calling change_notebook_session_compartment." if notebook_session_id.nil? raise "Missing the required parameter 'change_notebook_session_compartment_details' when calling change_notebook_session_compartment." if change_notebook_session_compartment_details.nil? raise "Parameter value for 'notebook_session_id' must not be blank" if OCI::Internal::Util.blank_string?(notebook_session_id) path = '/notebookSessions/{notebookSessionId}/actions/changeCompartment'.sub('{notebookSessionId}', notebook_session_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_notebook_session_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#change_notebook_session_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Moves a project resource into a different compartment. @param [String] project_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @param [OCI::DataScience::Models::ChangeProjectCompartmentDetails] change_project_compartment_details Details for changing the compartment of a project. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/change_project_compartment.rb.html) to see an example of how to use change_project_compartment
API.
# File lib/oci/data_science/data_science_client.rb, line 565 def change_project_compartment(project_id, change_project_compartment_details, opts = {}) logger.debug 'Calling operation DataScienceClient#change_project_compartment.' if logger raise "Missing the required parameter 'project_id' when calling change_project_compartment." if project_id.nil? raise "Missing the required parameter 'change_project_compartment_details' when calling change_project_compartment." if change_project_compartment_details.nil? raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id) path = '/projects/{projectId}/actions/changeCompartment'.sub('{projectId}', project_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_project_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#change_project_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Creates a new model. @param [OCI::DataScience::Models::CreateModelDetails] create_model_details Details for creating a new model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Model Model} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/create_model.rb.html) to see an example of how to use create_model
API.
# File lib/oci/data_science/data_science_client.rb, line 625 def create_model(create_model_details, opts = {}) logger.debug 'Calling operation DataScienceClient#create_model.' if logger raise "Missing the required parameter 'create_model_details' when calling create_model." if create_model_details.nil? path = '/models' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_model_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#create_model') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Model' ) end # rubocop:enable Metrics/BlockLength end
Creates model artifact for specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [String, IO] model_artifact The model artifact to upload. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [Integer] :content_length The content length of the body. @option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@option opts [String] :content_disposition This header allows you to specify a filename during upload. This file name is used to dispose of the file contents
while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file name when downloading. Example: `{\"Content-Disposition\": \"attachment\" \"filename\"=\"model.tar.gz\" \"Content-Length\": \"2347\" \"Content-Type\": \"application/gzip\"}`
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/create_model_artifact.rb.html) to see an example of how to use create_model_artifact
API.
# File lib/oci/data_science/data_science_client.rb, line 693 def create_model_artifact(model_id, model_artifact, opts = {}) logger.debug 'Calling operation DataScienceClient#create_model_artifact.' if logger raise "Missing the required parameter 'model_id' when calling create_model_artifact." if model_id.nil? raise "Missing the required parameter 'model_artifact' when calling create_model_artifact." if model_artifact.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/artifact'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :exclude_body # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'content-length'] = opts[:content_length] if opts[:content_length] header_params[:'content-disposition'] = opts[:content_disposition] if opts[:content_disposition] # rubocop:enable Style/NegatedIf header_params[:'content-type'] ||= 'application/octet-stream' header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(model_artifact) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#create_model_artifact') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Creates a new model deployment. @param [OCI::DataScience::Models::CreateModelDeploymentDetails] create_model_deployment_details Details for creating a new model deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::ModelDeployment ModelDeployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/create_model_deployment.rb.html) to see an example of how to use create_model_deployment
API.
# File lib/oci/data_science/data_science_client.rb, line 754 def create_model_deployment(create_model_deployment_details, opts = {}) logger.debug 'Calling operation DataScienceClient#create_model_deployment.' if logger raise "Missing the required parameter 'create_model_deployment_details' when calling create_model_deployment." if create_model_deployment_details.nil? path = '/modelDeployments' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_model_deployment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#create_model_deployment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::ModelDeployment' ) end # rubocop:enable Metrics/BlockLength end
Creates provenance information for the specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [OCI::DataScience::Models::CreateModelProvenanceDetails] create_model_provenance_details Provenance information for specified model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::ModelProvenance ModelProvenance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/create_model_provenance.rb.html) to see an example of how to use create_model_provenance
API.
# File lib/oci/data_science/data_science_client.rb, line 813 def create_model_provenance(model_id, create_model_provenance_details, opts = {}) logger.debug 'Calling operation DataScienceClient#create_model_provenance.' if logger raise "Missing the required parameter 'model_id' when calling create_model_provenance." if model_id.nil? raise "Missing the required parameter 'create_model_provenance_details' when calling create_model_provenance." if create_model_provenance_details.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/provenance'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_model_provenance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#create_model_provenance') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::ModelProvenance' ) end # rubocop:enable Metrics/BlockLength end
Creates a new notebook session. @param [OCI::DataScience::Models::CreateNotebookSessionDetails] create_notebook_session_details Details for creating a new notebook session. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::NotebookSession NotebookSession} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/create_notebook_session.rb.html) to see an example of how to use create_notebook_session
API.
# File lib/oci/data_science/data_science_client.rb, line 873 def create_notebook_session(create_notebook_session_details, opts = {}) logger.debug 'Calling operation DataScienceClient#create_notebook_session.' if logger raise "Missing the required parameter 'create_notebook_session_details' when calling create_notebook_session." if create_notebook_session_details.nil? path = '/notebookSessions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_notebook_session_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#create_notebook_session') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::NotebookSession' ) end # rubocop:enable Metrics/BlockLength end
Creates a new project. @param [OCI::DataScience::Models::CreateProjectDetails] create_project_details Details for creating a new project. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :opc_retry_token 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.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Project Project} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/create_project.rb.html) to see an example of how to use create_project
API.
# File lib/oci/data_science/data_science_client.rb, line 931 def create_project(create_project_details, opts = {}) logger.debug 'Calling operation DataScienceClient#create_project.' if logger raise "Missing the required parameter 'create_project_details' when calling create_project." if create_project_details.nil? path = '/projects' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_project_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#create_project') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Project' ) end # rubocop:enable Metrics/BlockLength end
Deactivates the model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Model Model} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/deactivate_model.rb.html) to see an example of how to use deactivate_model
API.
# File lib/oci/data_science/data_science_client.rb, line 993 def deactivate_model(model_id, opts = {}) logger.debug 'Calling operation DataScienceClient#deactivate_model.' if logger raise "Missing the required parameter 'model_id' when calling deactivate_model." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/actions/deactivate'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#deactivate_model') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Model' ) end # rubocop:enable Metrics/BlockLength end
Deactivates the model deployment. @param [String] model_deployment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/deactivate_model_deployment.rb.html) to see an example of how to use deactivate_model_deployment
API.
# File lib/oci/data_science/data_science_client.rb, line 1055 def deactivate_model_deployment(model_deployment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#deactivate_model_deployment.' if logger raise "Missing the required parameter 'model_deployment_id' when calling deactivate_model_deployment." if model_deployment_id.nil? raise "Parameter value for 'model_deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(model_deployment_id) path = '/modelDeployments/{modelDeploymentId}/actions/deactivate'.sub('{modelDeploymentId}', model_deployment_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#deactivate_model_deployment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Deactivates the notebook session. @param [String] notebook_session_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the notebook session. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/deactivate_notebook_session.rb.html) to see an example of how to use deactivate_notebook_session
API.
# File lib/oci/data_science/data_science_client.rb, line 1116 def deactivate_notebook_session(notebook_session_id, opts = {}) logger.debug 'Calling operation DataScienceClient#deactivate_notebook_session.' if logger raise "Missing the required parameter 'notebook_session_id' when calling deactivate_notebook_session." if notebook_session_id.nil? raise "Parameter value for 'notebook_session_id' must not be blank" if OCI::Internal::Util.blank_string?(notebook_session_id) path = '/notebookSessions/{notebookSessionId}/actions/deactivate'.sub('{notebookSessionId}', notebook_session_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#deactivate_notebook_session') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Deletes the specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/delete_model.rb.html) to see an example of how to use delete_model
API.
# File lib/oci/data_science/data_science_client.rb, line 1177 def delete_model(model_id, opts = {}) logger.debug 'Calling operation DataScienceClient#delete_model.' if logger raise "Missing the required parameter 'model_id' when calling delete_model." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#delete_model') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Deletes the specified model deployment. Any unsaved work in this model deployment is lost. @param [String] model_deployment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/delete_model_deployment.rb.html) to see an example of how to use delete_model_deployment
API.
# File lib/oci/data_science/data_science_client.rb, line 1238 def delete_model_deployment(model_deployment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#delete_model_deployment.' if logger raise "Missing the required parameter 'model_deployment_id' when calling delete_model_deployment." if model_deployment_id.nil? raise "Parameter value for 'model_deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(model_deployment_id) path = '/modelDeployments/{modelDeploymentId}'.sub('{modelDeploymentId}', model_deployment_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#delete_model_deployment') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Deletes the specified notebook session. Any unsaved work in this notebook session are lost. @param [String] notebook_session_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the notebook session. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/delete_notebook_session.rb.html) to see an example of how to use delete_notebook_session
API.
# File lib/oci/data_science/data_science_client.rb, line 1299 def delete_notebook_session(notebook_session_id, opts = {}) logger.debug 'Calling operation DataScienceClient#delete_notebook_session.' if logger raise "Missing the required parameter 'notebook_session_id' when calling delete_notebook_session." if notebook_session_id.nil? raise "Parameter value for 'notebook_session_id' must not be blank" if OCI::Internal::Util.blank_string?(notebook_session_id) path = '/notebookSessions/{notebookSessionId}'.sub('{notebookSessionId}', notebook_session_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#delete_notebook_session') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Deletes the specified project. This operation fails unless all associated resources (notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project. @param [String] project_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/delete_project.rb.html) to see an example of how to use delete_project
API.
# File lib/oci/data_science/data_science_client.rb, line 1360 def delete_project(project_id, opts = {}) logger.debug 'Calling operation DataScienceClient#delete_project.' if logger raise "Missing the required parameter 'project_id' when calling delete_project." if project_id.nil? raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id) path = '/projects/{projectId}'.sub('{projectId}', project_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#delete_project') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Gets the specified model's information. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Model Model} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_model.rb.html) to see an example of how to use get_model
API.
# File lib/oci/data_science/data_science_client.rb, line 1415 def get_model(model_id, opts = {}) logger.debug 'Calling operation DataScienceClient#get_model.' if logger raise "Missing the required parameter 'model_id' when calling get_model." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_model') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Model' ) end # rubocop:enable Metrics/BlockLength end
Downloads model artifact content for specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :range Optional byte range to fetch, as described in [RFC 7233](tools.ietf.org/html/rfc7232#section-2.1), section 2.1.
Note that only a single range of bytes is supported.
@option opts [String, IO] :response_target Streaming
http body into a file (specified by file name or File object) or IO object if the block is not given @option [Block] &block Streaming
http body to the block @return [Response] A Response
object with data of type String if response_target and block are not given, otherwise with nil data @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_model_artifact_content.rb.html) to see an example of how to use get_model_artifact_content
API.
# File lib/oci/data_science/data_science_client.rb, line 1475 def get_model_artifact_content(model_id, opts = {}, &block) logger.debug 'Calling operation DataScienceClient#get_model_artifact_content.' if logger raise "Missing the required parameter 'model_id' when calling get_model_artifact_content." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/artifact/content'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'application/octet-stream' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:range] = opts[:range] if opts[:range] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_model_artifact_content') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end
Retrieves the model deployment for the specified `modelDeploymentId`. @param [String] model_deployment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::ModelDeployment ModelDeployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_model_deployment.rb.html) to see an example of how to use get_model_deployment
API.
# File lib/oci/data_science/data_science_client.rb, line 1575 def get_model_deployment(model_deployment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#get_model_deployment.' if logger raise "Missing the required parameter 'model_deployment_id' when calling get_model_deployment." if model_deployment_id.nil? raise "Parameter value for 'model_deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(model_deployment_id) path = '/modelDeployments/{modelDeploymentId}'.sub('{modelDeploymentId}', model_deployment_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_model_deployment') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::ModelDeployment' ) end # rubocop:enable Metrics/BlockLength end
Gets provenance information for specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::ModelProvenance ModelProvenance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_model_provenance.rb.html) to see an example of how to use get_model_provenance
API.
# File lib/oci/data_science/data_science_client.rb, line 1630 def get_model_provenance(model_id, opts = {}) logger.debug 'Calling operation DataScienceClient#get_model_provenance.' if logger raise "Missing the required parameter 'model_id' when calling get_model_provenance." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/provenance'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_model_provenance') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::ModelProvenance' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified notebook session's information. @param [String] notebook_session_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the notebook session. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::NotebookSession NotebookSession} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_notebook_session.rb.html) to see an example of how to use get_notebook_session
API.
# File lib/oci/data_science/data_science_client.rb, line 1685 def get_notebook_session(notebook_session_id, opts = {}) logger.debug 'Calling operation DataScienceClient#get_notebook_session.' if logger raise "Missing the required parameter 'notebook_session_id' when calling get_notebook_session." if notebook_session_id.nil? raise "Parameter value for 'notebook_session_id' must not be blank" if OCI::Internal::Util.blank_string?(notebook_session_id) path = '/notebookSessions/{notebookSessionId}'.sub('{notebookSessionId}', notebook_session_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_notebook_session') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::NotebookSession' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified project's information. @param [String] project_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Project Project} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_project.rb.html) to see an example of how to use get_project
API.
# File lib/oci/data_science/data_science_client.rb, line 1740 def get_project(project_id, opts = {}) logger.debug 'Calling operation DataScienceClient#get_project.' if logger raise "Missing the required parameter 'project_id' when calling get_project." if project_id.nil? raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id) path = '/projects/{projectId}'.sub('{projectId}', project_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_project') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Project' ) end # rubocop:enable Metrics/BlockLength end
Gets the specified work request's information. @param [String] work_request_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/get_work_request.rb.html) to see an example of how to use get_work_request
API.
# File lib/oci/data_science/data_science_client.rb, line 1795 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation DataScienceClient#get_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#get_work_request') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end
Gets model artifact metadata for specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/head_model_artifact.rb.html) to see an example of how to use head_model_artifact
API.
# File lib/oci/data_science/data_science_client.rb, line 1850 def head_model_artifact(model_id, opts = {}) logger.debug 'Calling operation DataScienceClient#head_model_artifact.' if logger raise "Missing the required parameter 'model_id' when calling head_model_artifact." if model_id.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/artifact/content'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#head_model_artifact') do @api_client.call_api( :HEAD, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Lists the valid model deployment shapes. @param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::ModelDeploymentShapeSummary ModelDeploymentShapeSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_model_deployment_shapes.rb.html) to see an example of how to use list_model_deployment_shapes
API.
# File lib/oci/data_science/data_science_client.rb, line 1916 def list_model_deployment_shapes(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_model_deployment_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_model_deployment_shapes." if compartment_id.nil? path = '/modelDeploymentShapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_model_deployment_shapes') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::ModelDeploymentShapeSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists all model deployments in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned.
@param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id Filter results by [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type.
@option opts [String] :project_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @option opts [String] :display_name Filter results by its user-friendly name. @option opts [String] :lifecycle_state Filter results by the specified lifecycle state. Must be a valid
state for the resource type.
@option opts [String] :created_by Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the resource. @option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).
Allowed values are: ASC, DESC
@option opts [String] :sort_by 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 the `displayName` field is case sensitive. Allowed values are: timeCreated, displayName
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::ModelDeploymentSummary ModelDeploymentSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_model_deployments.rb.html) to see an example of how to use list_model_deployments
API.
# File lib/oci/data_science/data_science_client.rb, line 2003 def list_model_deployments(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_model_deployments.' if logger raise "Missing the required parameter 'compartment_id' when calling list_model_deployments." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::DataScience::Models::MODEL_DEPLOYMENT_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::DataScience::Models::MODEL_DEPLOYMENT_LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/modelDeployments' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:projectId] = opts[:project_id] if opts[:project_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:createdBy] = opts[:created_by] if opts[:created_by] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_model_deployments') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::ModelDeploymentSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists models in the specified compartment. @param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id Filter results by [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type.
@option opts [String] :project_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @option opts [String] :display_name Filter results by its user-friendly name. @option opts [String] :lifecycle_state Filter results by the specified lifecycle state. Must be a valid
state for the resource type.
@option opts [String] :created_by Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the resource. @option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).
Allowed values are: ASC, DESC
@option opts [String] :sort_by Specifies the field to sort by. Accepts only one field.
By default, when you sort by `timeCreated`, the results are shown in descending order. All other fields default to ascending order. Sort order for the `displayName` field is case sensitive. Allowed values are: timeCreated, displayName, lifecycleState
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::ModelSummary ModelSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_models.rb.html) to see an example of how to use list_models
API.
# File lib/oci/data_science/data_science_client.rb, line 2107 def list_models(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_models.' if logger raise "Missing the required parameter 'compartment_id' when calling list_models." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::DataScience::Models::MODEL_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::DataScience::Models::MODEL_LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName lifecycleState].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName, lifecycleState.' end path = '/models' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:projectId] = opts[:project_id] if opts[:project_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:createdBy] = opts[:created_by] if opts[:created_by] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_models') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::ModelSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the valid notebook session shapes. @param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::NotebookSessionShapeSummary NotebookSessionShapeSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_notebook_session_shapes.rb.html) to see an example of how to use list_notebook_session_shapes
API.
# File lib/oci/data_science/data_science_client.rb, line 2195 def list_notebook_session_shapes(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_notebook_session_shapes.' if logger raise "Missing the required parameter 'compartment_id' when calling list_notebook_session_shapes." if compartment_id.nil? path = '/notebookSessionShapes' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_notebook_session_shapes') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::NotebookSessionShapeSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists the notebook sessions in the specified compartment. @param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id Filter results by [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type.
@option opts [String] :project_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @option opts [String] :display_name Filter results by its user-friendly name. @option opts [String] :lifecycle_state Filter results by the specified lifecycle state. Must be a valid
state for the resource type.
@option opts [String] :created_by Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the resource. @option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).
Allowed values are: ASC, DESC
@option opts [String] :sort_by Specifies the field to sort by. Accepts only one field.
By default, when you sort by `timeCreated`, the results are shown in descending order. When you sort by `displayName`, results are shown in ascending order. Sort order for the `displayName` field is case sensitive. Allowed values are: timeCreated, displayName
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::NotebookSessionSummary NotebookSessionSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_notebook_sessions.rb.html) to see an example of how to use list_notebook_sessions
API.
# File lib/oci/data_science/data_science_client.rb, line 2281 def list_notebook_sessions(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_notebook_sessions.' if logger raise "Missing the required parameter 'compartment_id' when calling list_notebook_sessions." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::DataScience::Models::NOTEBOOK_SESSION_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::DataScience::Models::NOTEBOOK_SESSION_LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/notebookSessions' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:projectId] = opts[:project_id] if opts[:project_id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:createdBy] = opts[:created_by] if opts[:created_by] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_notebook_sessions') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::NotebookSessionSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists projects in the specified compartment. @param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id Filter results by [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type.
@option opts [String] :display_name Filter results by its user-friendly name. @option opts [String] :lifecycle_state Filter results by the specified lifecycle state. Must be a valid
state for the resource type.
@option opts [String] :created_by Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the user who created the resource. @option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).
Allowed values are: ASC, DESC
@option opts [String] :sort_by Specifies the field to sort by. Accepts only one field.
By default, when you sort by `timeCreated`, the results are shown in descending order. When you sort by `displayName`, the results are shown in ascending order. Sort order for the `displayName` field is case sensitive. Allowed values are: timeCreated, displayName
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::ProjectSummary ProjectSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_projects.rb.html) to see an example of how to use list_projects
API.
# File lib/oci/data_science/data_science_client.rb, line 2385 def list_projects(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_projects.' if logger raise "Missing the required parameter 'compartment_id' when calling list_projects." if compartment_id.nil? if opts[:lifecycle_state] && !OCI::DataScience::Models::PROJECT_LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::DataScience::Models::PROJECT_LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/projects' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:createdBy] = opts[:created_by] if opts[:created_by] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_projects') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::ProjectSummary>' ) end # rubocop:enable Metrics/BlockLength end
Lists work request errors for the specified work request. @param [String] work_request_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::WorkRequestError WorkRequestError}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors
API.
# File lib/oci/data_science/data_science_client.rb, line 2460 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_work_request_errors.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_work_request_errors') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::WorkRequestError>' ) end # rubocop:enable Metrics/BlockLength end
Lists work request logs for the specified work request. @param [String] work_request_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::WorkRequestLogEntry WorkRequestLogEntry}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs
API.
# File lib/oci/data_science/data_science_client.rb, line 2515 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_work_request_logs') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::WorkRequestLogEntry>' ) end # rubocop:enable Metrics/BlockLength end
Lists work requests in the specified compartment. @param [String] compartment_id Filter results by the [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :id Filter results by [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). Must be an OCID of the correct type for the resource type.
@option opts [String] :operation_type Filter 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, MODEL_DEPLOYMENT_CREATE, MODEL_DEPLOYMENT_DELETE, MODEL_DEPLOYMENT_ACTIVATE, MODEL_DEPLOYMENT_DEACTIVATE, MODEL_DEPLOYMENT_UPDATE, PROJECT_DELETE, WORKREQUEST_CANCEL
@option opts [String] :status Filter results by work request status.
Allowed values are: ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED
@option opts [Integer] :limit For list pagination. The maximum number of results per page,
or items to return in a paginated \"List\" call. 1 is the minimum, 1000 is the maximum. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine). Example: `500` (default to 10)
@option opts [String] :page For list pagination. The value of the `opc-next-page` response
header from the previous \"List\" call. See [List Pagination](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/usingapi.htm#nine).
@option opts [String] :sort_order Specifies sort order to use, either `ASC` (ascending) or `DESC` (descending).
Allowed values are: ASC, DESC
@option opts [String] :sort_by Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, the results are shown in descending order. All other fields default to ascending order.
Allowed values are: operationType, status, timeAccepted
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type Array<{OCI::DataScience::Models::WorkRequestSummary WorkRequestSummary}> @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/list_work_requests.rb.html) to see an example of how to use list_work_requests
API.
# File lib/oci/data_science/data_science_client.rb, line 2594 def list_work_requests(compartment_id, opts = {}) logger.debug 'Calling operation DataScienceClient#list_work_requests.' if logger raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil? if opts[:operation_type] && !%w[NOTEBOOK_SESSION_CREATE NOTEBOOK_SESSION_DELETE NOTEBOOK_SESSION_ACTIVATE NOTEBOOK_SESSION_DEACTIVATE MODEL_DEPLOYMENT_CREATE MODEL_DEPLOYMENT_DELETE MODEL_DEPLOYMENT_ACTIVATE MODEL_DEPLOYMENT_DEACTIVATE MODEL_DEPLOYMENT_UPDATE PROJECT_DELETE WORKREQUEST_CANCEL].include?(opts[:operation_type]) raise 'Invalid value for "operation_type", must be one of NOTEBOOK_SESSION_CREATE, NOTEBOOK_SESSION_DELETE, NOTEBOOK_SESSION_ACTIVATE, NOTEBOOK_SESSION_DEACTIVATE, MODEL_DEPLOYMENT_CREATE, MODEL_DEPLOYMENT_DELETE, MODEL_DEPLOYMENT_ACTIVATE, MODEL_DEPLOYMENT_DEACTIVATE, MODEL_DEPLOYMENT_UPDATE, PROJECT_DELETE, WORKREQUEST_CANCEL.' end if opts[:status] && !%w[ACCEPTED IN_PROGRESS FAILED SUCCEEDED CANCELING CANCELED].include?(opts[:status]) raise 'Invalid value for "status", must be one of ACCEPTED, IN_PROGRESS, FAILED, SUCCEEDED, CANCELING, CANCELED.' end if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of ASC, DESC.' end if opts[:sort_by] && !%w[operationType status timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of operationType, status, timeAccepted.' end path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = compartment_id query_params[:id] = opts[:id] if opts[:id] query_params[:operationType] = opts[:operation_type] if opts[:operation_type] query_params[:status] = opts[:status] if opts[:status] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#list_work_requests') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Array<OCI::DataScience::Models::WorkRequestSummary>' ) end # rubocop:enable Metrics/BlockLength end
@return [Logger] The logger for this client. May be nil.
# File lib/oci/data_science/data_science_client.rb, line 92 def logger @api_client.config.logger end
Set the region that will be used to determine the service endpoint. This will usually correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
# File lib/oci/data_science/data_science_client.rb, line 82 def region=(new_region) @region = new_region raise 'A region must be specified.' unless @region @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://datascience.{region}.oci.{secondLevelDomain}') + '/20190101' logger.info "DataScienceClient endpoint set to '#{@endpoint} from region #{@region}'." if logger end
Updates the properties of a model. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [OCI::DataScience::Models::UpdateModelDetails] update_model_details Details for updating a model. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Model Model} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/update_model.rb.html) to see an example of how to use update_model
API.
# File lib/oci/data_science/data_science_client.rb, line 2679 def update_model(model_id, update_model_details, opts = {}) logger.debug 'Calling operation DataScienceClient#update_model.' if logger raise "Missing the required parameter 'model_id' when calling update_model." if model_id.nil? raise "Missing the required parameter 'update_model_details' when calling update_model." if update_model_details.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_model_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#update_model') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Model' ) end # rubocop:enable Metrics/BlockLength end
Updates the properties of a model deployment. Some of the properties of `modelDeploymentConfigurationDetails` or `CategoryLogDetails` can also be updated with zero down time when the model deploymentu2019s lifecycle state is ACTIVE or NEEDS_ATTENTION i.e `instanceShapeName`, `instanceCount` and `modelId`, separately `loadBalancerShape` or `CategoryLogDetails` can also be updated independently. All of the fields can be updated when the deployment is in the INACTIVE lifecycle state. Changes will take effect the next time the model deployment is activated.
@param [String] model_deployment_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model deployment. @param [OCI::DataScience::Models::UpdateModelDeploymentDetails] update_model_deployment_details Details for updating a model deployment. Some of the properties of `modelDeploymentConfigurationDetails` or `CategoryLogDetails` can also be updated with zero down time
when the model deployment\u2019s lifecycle state is ACTIVE or NEEDS_ATTENTION i.e `instanceShapeName`, `instanceCount` and `modelId`, separately `loadBalancerShape` or `CategoryLogDetails` can also be updated independently. All of the fields can be updated when the deployment is in the INACTIVE lifecycle state. Changes will take effect the next time the model deployment is activated.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/update_model_deployment.rb.html) to see an example of how to use update_model_deployment
API.
# File lib/oci/data_science/data_science_client.rb, line 2751 def update_model_deployment(model_deployment_id, update_model_deployment_details, opts = {}) logger.debug 'Calling operation DataScienceClient#update_model_deployment.' if logger raise "Missing the required parameter 'model_deployment_id' when calling update_model_deployment." if model_deployment_id.nil? raise "Missing the required parameter 'update_model_deployment_details' when calling update_model_deployment." if update_model_deployment_details.nil? raise "Parameter value for 'model_deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(model_deployment_id) path = '/modelDeployments/{modelDeploymentId}'.sub('{modelDeploymentId}', model_deployment_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_model_deployment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#update_model_deployment') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end
Updates the provenance information for the specified model. @param [String] model_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the model. @param [OCI::DataScience::Models::UpdateModelProvenanceDetails] update_model_provenance_details Provenance information for the specified model. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::ModelProvenance ModelProvenance} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/update_model_provenance.rb.html) to see an example of how to use update_model_provenance
API.
# File lib/oci/data_science/data_science_client.rb, line 2814 def update_model_provenance(model_id, update_model_provenance_details, opts = {}) logger.debug 'Calling operation DataScienceClient#update_model_provenance.' if logger raise "Missing the required parameter 'model_id' when calling update_model_provenance." if model_id.nil? raise "Missing the required parameter 'update_model_provenance_details' when calling update_model_provenance." if update_model_provenance_details.nil? raise "Parameter value for 'model_id' must not be blank" if OCI::Internal::Util.blank_string?(model_id) path = '/models/{modelId}/provenance'.sub('{modelId}', model_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'if-match'] = opts[:if_match] if opts[:if_match] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_model_provenance_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#update_model_provenance') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::ModelProvenance' ) end # rubocop:enable Metrics/BlockLength end
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` take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource.
@param [String] notebook_session_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the notebook session. @param [OCI::DataScience::Models::UpdateNotebookSessionDetails] update_notebook_session_details Details for updating a notebook session. `notebookSessionConfigurationDetails` can only be updated while the notebook session is in the `INACTIVE` state.
Changes to the `notebookSessionConfigurationDetails` take effect the next time the `ActivateNotebookSession` action is invoked on the notebook session resource.
@param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::NotebookSession NotebookSession} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/update_notebook_session.rb.html) to see an example of how to use update_notebook_session
API.
# File lib/oci/data_science/data_science_client.rb, line 2883 def update_notebook_session(notebook_session_id, update_notebook_session_details, opts = {}) logger.debug 'Calling operation DataScienceClient#update_notebook_session.' if logger raise "Missing the required parameter 'notebook_session_id' when calling update_notebook_session." if notebook_session_id.nil? raise "Missing the required parameter 'update_notebook_session_details' when calling update_notebook_session." if update_notebook_session_details.nil? raise "Parameter value for 'notebook_session_id' must not be blank" if OCI::Internal::Util.blank_string?(notebook_session_id) path = '/notebookSessions/{notebookSessionId}'.sub('{notebookSessionId}', notebook_session_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_notebook_session_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#update_notebook_session') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::NotebookSession' ) end # rubocop:enable Metrics/BlockLength end
Updates the properties of a project. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. @param [String] project_id The [OCID](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the project. @param [OCI::DataScience::Models::UpdateProjectDetails] update_project_details Details for updating a project. You can update the `displayName`, `description`, `freeformTags`, and `definedTags` properties. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the `etag` you provide matches the resource's current `etag` value.
@option opts [String] :opc_request_id Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
@return [Response] A Response
object with data of type {OCI::DataScience::Models::Project Project} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/datascience/update_project.rb.html) to see an example of how to use update_project
API.
# File lib/oci/data_science/data_science_client.rb, line 2947 def update_project(project_id, update_project_details, opts = {}) logger.debug 'Calling operation DataScienceClient#update_project.' if logger raise "Missing the required parameter 'project_id' when calling update_project." if project_id.nil? raise "Missing the required parameter 'update_project_details' when calling update_project." if update_project_details.nil? raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id) path = '/projects/{projectId}'.sub('{projectId}', project_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_project_details) # rubocop:disable Metrics/BlockLength OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DataScienceClient#update_project') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::DataScience::Models::Project' ) end # rubocop:enable Metrics/BlockLength end
Private Instance Methods
rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines
# File lib/oci/data_science/data_science_client.rb, line 2992 def applicable_retry_config(opts = {}) return @retry_config unless opts.key?(:retry_config) opts[:retry_config] end