connection update
Important: IBM Cloud Pak® for Data
Version 4.6 will reach end of support (EOS) on 31 July, 2025. For more information, see the Discontinuance of service announcement for IBM Cloud Pak for Data Version 4.X.
Upgrade to IBM Software Hub Version 5.1 before IBM Cloud Pak for Data Version 4.6 reaches end of support. For more information, see Upgrading IBM Software Hub in the IBM Software Hub Version 5.1 documentation.
Update the connection definition.
Syntax
cpd-cli connection update \
[--catalog-id=<catalog-id>] \
--connection-id=<connection-id> \
[--context=<catalog-project-or-space-id>] \
[--cpd-config=<cpd-config-location>] \
[--cpd-scope=<cpd-config-location>] \
[--jmes-query=<jmespath-query>] \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
--patch-request=<connection-fields> \
--profile=<cpd-configuration-profile-name> \
[--project-id=<cpd-project-id>] \
[--quiet] \
[--raw-output=true|false] \
[--skip-enforcement] \
[--space-id=<space-identifier>] \
[--test=true|false] \
[--verbose]
Arguments
The connection update command has
no arguments.
Options
| Option | Description |
|---|---|
--catalog-id |
Specify either a catalog ID,
project ID, or space ID (specify only one).
|
--connection-id |
Specify the connection ID.
|
--context |
Specify whether assets are discovered for the purpose of reading (source) or writing (target). 'source' is the default when
no value is specified.
|
--cpd-config |
The Cloud Pak for Data
configuration location (for example, $HOME/.cpd-cli/config).
|
--cpd-scope |
The Cloud Pak for Data space, project, or catalog scope (for example, cpd://default-context/spaces/7bccdda4-9752-4f37-868e-891de6c48135).
|
|
|
Display command
help.
|
--jmes-query |
The Lucene
query.
|
--output |
Specify an output format.
Valid formats include json, yaml, or text (the default
format).
|
--output-file |
Specify a file path where all output is redirected.
|
--patch-request |
Specify fields to update within the connection.
|
--profile |
The profile-name from the Cloud
Pak for Data configuration.
|
--project-id |
Specify a Cloud Pak for Data project instance.
|
--quiet |
Suppress verbose messages.
|
--raw-output |
When set to true, single values in
JSON output mode are not surrounded by quotes.
|
--skip-enforcement |
When the option is specified,
shared credentials disablement and vault credentials enforcement guards are disabled for creation
and updates.
|
--space-id |
Specify a space identifier.
|
--test |
When the option is set to 'true', the connection is tested before it is saved The connection is not saved when a connection is not
established.
|
--verbose |
Logs include more detailed
messages.
|
Examples
Note: The following examples use environment variables. Use a script to create
environment variables with the correct values for your environment. You can optionally add the
listed environment variables to the install variables script. For more information, see Best practice: Setting up install variables.
- Define the environment variables.
- Replace the following properties with your
data.
export CONNECTION_ID=<The connection identifier> export PROJECT_CPD_INSTANCE=<The Cloud Pak for Data project instance> export UPDATE_CONN_PROPERTIES=''' [{ "op": "replace", "path": "/name", "from": "original-connection-name", "value": "updated-connection-name" }] ''' - Update a connection name.
-
cpd-cli connection update \ --connection-id=${CONNECTION_ID} \ --patch-request=${UPDATE_CONN_PROPERTIES} --project-id=${PROJECT_CPD_INSTANCE}