ml deployment update

Update the deployment metadata.

Syntax

cpd-cli ml deployment update \
[--asset=<resource-reference>] \
[--context=<catalog-project-or-space-id>] \
[--cpd-config=<cpd-config-location>] \
[--cpd-scope=<cpd-scope>] \
[--custom=<map<key,value>>] \
--deployment-id=<deployment-id-or-serving-name> \
[--description=<deployment-description>] \
[--hardware-spec=<hardware-specification>] \
[--hybrid-pipeline-hardware-specs=<hybrid-pipeline-hardware-specification>] \
[--jmes-query=<jmespath-query>] \
--json-patch=<json-array> \
[--name=<deployment-name>] \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
--profile=<cpd-profile-name> \
[--quiet] \
[--r-shiny] \
[--raw-output=true|false] \
--space-id=<space-identifier> \
[--tags=<tag1,tag2,...>] \
[--verbose]

Arguments

The ml deployment update command has no arguments.

Options

Table 1: Command options
Option Description
--asset Specify a resource reference.
Status
Optional.
Syntax
--asset=<resource-reference>
Default value
No default.
Valid values
A valid resource reference.
--async Run the command asynchronously. By default, processing finishes before the command runs.
Status
Optional.
Syntax
--async
Default value
Not applicable.
Valid values
Not
 applicable.
--batch Specify an empty object. The option indicates a batch deployment. More properties can be added later when setting up the batch deployment.
Status
Optional.
Syntax
--batch=<empty-object>
Default value
No default.
Valid values
An empty object.
--context Specify the configuration context
 name.
Status
Optional.
Syntax
--context=<catalog-project-or-space-id>
Default value
Not applicable.
Valid values
A valid configuration context name.
--cpd-config The Cloud Pak for Data
 configuration location. For example, $HOME/.cpd-cli/config.
Status
Required.
Syntax
--cpd-config=<cpd-config-location>
Default value
$HOME/.cpd-cli/config
Valid values
A valid Cloud Pak for Data configuration location.
--cpd-scope The Cloud Pak for Data space, project, or catalog scope. For example, cpd://default-context/spaces/7bccdda4-9752-4f37-868e-891de6c48135.
Status
Optional.
Syntax
--cpd-scope=<cpd-scope>
Default value
No default.
Valid values
A valid Cloud Pak for Data space, project, or catalog scope.
--custom Specify user-defined properties as key-value pairs.
Status
Optional.
Syntax
--custom=<map<key,value>>
Default value
No default.
Valid values
Valid key-value pairs.
--description Specify a deployment
 description.
Status
Optional.
Syntax
--description=<deployment-description>
Default value
No default.
Valid values
A valid deployment description.
--hardware-spec Specify a hardware specification.
Status
Optional.
Syntax
--hardware-spec=<hardware-specification>
Default value
No default.
Valid values
A valid hardware specification.

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.
--hybrid-pipeline-hardware-specs Specify a hybrid pipeline hardware specification.
Status
Optional.
Syntax
--hybrid-pipeline-hardware-specs=<hybrid-pipeline-hardware-specification>
Default value
No default.
Valid values
A valid hybrid pipeline hardware specification.
--jmes-query Provide a JMESPath query to customize the output.
Status
Optional.
Syntax
--jmes-query=<jmespath-query>
Default value
No default.
Valid values
A valid JMESPath query.
--name Specify a deployment name.
Status
Optional.
Syntax
--name=<deployment-name>
Default value
No default.
Valid values
A valid deployment name.
--online Specify an empty object. The option indicates an online deployment. More properties can be added later during online deployment setup. The 'serving_name' can be provided in the 'online.parameters'. The 'serving_name' can include only the characters [a-z,0-9,_] and the length cannot exceed 36 characters. The 'serving_name' can be used in the prediction URL in place of the 'deployment_id'.
Status
Optional.
Syntax
--online=<empty-object>
Default value
No default.
Valid values
An empty object.
--output Specify an output format.
Status
Optional.
Syntax
--output=json|yaml|text
Default value
text
Valid values
Valid formats include JSON, YAML, or text (the default format).
--output-file Specify a file path where all output is redirected.
Status
Optional.
Syntax
--output-file=<output-file-location>
Default value
No default.
Valid values
A valid output file path location.
--profile The name of the profile that you created to store information about an instance of Cloud Pak for Data and your credentials for the instance.
Status
Required.
Syntax
--profile=<cpd-profile-name>
Default value
No default.
Valid values

The name of the profile that you created.

--quiet Suppress verbose messages.
Status
Optional.
Syntax
--quiet
Default value
No default.
Valid values
Not applicable.
--r-shiny Indicates a Shiny application deployment.
Status
Optional.
Syntax
--r-shiny
Default value
Not applicable.
Valid values
Not applicable.
--raw-output When set to true, single values are not surrounded by quotation marks in
 JSON output mode.
Status
Optional.
Syntax
--raw-output=true|false
Default value
false
Valid values
false
Single values in JSON output mode are surrounded by quotation marks.
true
Single values in JSON output mode are not surrounded by quotation marks.
--space-id Specify a space identifier.
Status
Required.
Syntax
--space-id=<space-identifier>
Default value
No default.
Valid values
A valid space identifier.
--tags Specify the data asset tags. Multiple tags can be specified.
Status
Optional.
Syntax
--tags=<tag1,tag2,...>
Default value
No default.
Valid values
A valid list of comma-separated data asset tags.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Examples

Note: The following examples use environment variables. Use a script to create environment variables with the correct values for your environment. You can add the listed environment variables to the installation variables script. For more information, see Setting up installation environment variables.
Specify the environment variables in a script file.
asset = {
    'id': prod_script_id
}
asset_json = json.dumps(asset)
deployment_name = 'script_batch_deployment'
space_id = <The deployment space identifier>
Update a deployed asset with a new script.
cpd-cli ml deployment update \
--asset=${asset_json} \
--deployment-id=${deployment_name} \
--space-id=${space_id}
Example results.

ID:        25e17b86-9deb-4950-920d-47ba1fc781c1   
Name:      script_batch_deployment   
Created:   2021-04-30T12:39:28.441Z   
State:     ready   
Tags:      []