service-instance get

Retrieve an IBM Software Hub service instance.

Syntax

cpd-cli service-instance get <cpd-service-instance-name> \
[--all] \
[--cpdconfig=<cpd-configuration-location>] \
[--exclude-user-count=true|false] \
[--output=json|yaml|text] \
[--output-dir=<output-directory>] \
--profile=<profile-name> \
[--service-type=<cpd-service-type>] \
[--verbose]

Arguments

Table 1: Command arguments
Argument Description
<cpd-service-instance-name> The IBM® Software Hub service instance name to retrieve.

Options

Table 1: Command options
Option Description

--all

-a

Retrieve all IBM Software Hub service instances and save to the specified --output-dir location (when an --output-dir location is specified).
Status
Optional.
Syntax
--all
Default value
No default.
Valid values
Not applicable.
--cpdconfig The IBM Software Hub
 configuration location. For example, $HOME/.cpd-cli/config.
Status
Optional.
Syntax
--cpdconfig=<cpd-configuration-location>
Default value
$HOME/.cpd-cli/config
Valid values
A valid IBM Software Hub configuration location.

--exclude-user-count

If set to true, computation of the total number of users added to a service instance will be skipped for all instances and omitted from the output.
Status
Optional.
Syntax
--exclude-user-count=true|false
Default value
The default is false for service-instance list and service-instance get commands.
The --exclude-user-count option defaults to true for all other service-instance commands since the option does not apply to these commands.
Valid values
true|false

--help

-h

Display command help.
Status
Optional.
Syntax
--help
Default value
No default.
Valid values
Not applicable.

--output

-o

Specify an output format. Valid formats include yaml or json (the default format). The option applies only when a single instance is specified.
Status
Optional.
Syntax
--output=json|yaml|text
Default value
json
Valid values
json|yaml|text

--output-dir

-f

Specify a directory in which to write output. The option applies only when the --all option is specified.
Status
Optional.
Syntax
--output-dir=<output-directory>
Default value
<$HOME/cpd-service-instance-name>
Valid values
A valid IBM Software Hub service instance directory.
--profile The name of the profile that you created to store information about an instance of IBM Software Hub and your credentials for the instance.
Status
Required.
Syntax
--profile=<profile-name>
Default value
No default.
Valid values

The name of the profile that you created.

--service-type

-t

The IBM Software Hub service instance type.
Status
Optional.
Syntax
--service-type=<cpd-service-type>
Default value
No default.
Valid values
Any valid IBM Software Hub service type. For example, 'dv'. Use the 'cpd-cli service-instance list' command to find the service type.
--verbose Logs include more detailed messages.
Status
Optional.
Syntax
--verbose
Default value
No default.
Valid values
Not applicable.

Examples

Note: The following examples use the recommended installation environment variables.

It is strongly recommended that you use a script to create environment variables with the correct values for your environment. For more information, see Setting up installation environment variables.

Retrieve details on all service instances of the same service type (<cpd-service-type>.
cpd-cli service-instance get <cpd-service-type> \
--all \
--service-type=<cpd-service-type> \
--output-dir=<output-directory> \
--profile=${CPD_PROFILE_NAME}