wx-ai deployment update

Updates the deployment metadata.

Extended description

The following parameters of deployment metadata are supported for the patch operation.

  • /name
  • /description
  • /tags
  • /custom
  • /online/parameters
  • /asset
  • /prompt_template
  • /hardware_spec

The patch operation with path specified as /online/parameters can be used to update the serving_name.

Patching /asset or /prompt_template must be used when these fields exist.

Syntax

cpd-cli wx-ai deployment update \
--deployment-id=<deployment-id-or-serving-name> \
--version=<version> \
[--asset=<Rel>] \
[--custom=<map<key,value>>] \
[--description=<deployment-description>] \
[--name=<deployment-name>] \
[--project-id=<project-id>] \
[--space-id=<space-identifier>] \
[--tags=<tag1,tag2,...>]

Options

Table 1: Command options
Option Description
--asset Specify a reference to a deployment. This JSON option can instead be provided by setting individual fields with other options such as the --asset-id option. It is mutually exclusive with those options.
Status
Optional.
Syntax
--asset=<Rel>
Default value
No default.
Valid values

Provide a JSON string option or specify a JSON file to read from by providing a file path option that begins with a @. For example --asset=@path/to/file.json.

The following example shows the format of the Rel object.
{
  "id" : "4cedab6d-e8e4-4214-b81a-2ddb122db2ab",
  "rev" : "2"
}
--custom Specify user-defined properties as key-value pairs.
Status
Optional.
Syntax
--custom=<map<key,value>>
Default value
No default.
--deployment-id Specify either the 'deployment_id' that identifies the deployment or a 'serving_name' that allows a predefined URL to post a prediction.
Status
Required.
Syntax
--deployment-id=<deployment-id-or-serving-name>
Default value
No default.
--description A description of the deployment.
Status
Optional.
Syntax
--description=<deployment-description>
Default value
No default.
--json-patch Specify a JSON array of patch operations as defined in RFC 6902. For more information, see http://jsonpatch.com.
Status
Optional.
Syntax
--json-patch=<json-array>
Default value
No default.
Input type
string
Valid values

Provide a JSON string option or specify a JSON file to read from by providing a file path option that begins with a @, for example --json-patch=@path/to/file.json.

The following example shows the format of the JSONPatchOperation object.

[ {
  "op" : "add",
  "path" : "exampleString",
  "from" : "exampleString",
  "value" : "exampleString"
} ]
--name Specify the name of the deployment.
Status
Required.
Syntax
--name=<deployment-name>
Default value
No default.
Input type
string
--project-id The project that contains the deployment. Either space_id or project_id must be given.
Status
Optional.
Syntax
--project-id=<project-id>
Input type
string
Default value
No default.
--space-id The space that contains the deployment. Either space_id or project_id must be given.
Status
Optional.
Syntax
--space-id=<space-identifier>
Default value
No default.
Input type
string
--tags A list of tags for this deployment.
Status
Optional.
Syntax
--tags=<tag1,tag2,...>
Default value
No default.
Input type
string
--version Display the cpdctl command version information.
Status
Required.
Syntax
--version=<version>
Default value
No default.
Input type
string

Examples

Standard run.

cpd-cli wx-ai deployment update \
    --asset '{"id": "4cedab6d-e8e4-4214-b81a-2ddb122db2ab", "rev": "2"}' \
    --custom '{"anyKey": "anyValue"}' \
    --description 'This is my first resource.' \
    --name my-resource \
    --tags= t1,t2