environment software-specification create
Create a software specification.
Syntax
cpd-cli environment software-specification create \
[--base-software-specification=<base-software-specification>] \
[--context=<catalog-project-or-space-id>] \
[--cpd-config=<cpd-config-location>] \
[--cpd-scope=<cpd-scope>] \
[--description=<software-specification-description>] \
[--jmes-query=<jmespath-query>] \
--name=<software-specification-name> \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
[--package-extensions=<software-specification-package-extensions>] \
--profile=<cpd-profile-name> \
[--project-id=<cpd-project-id>] \
[--quiet] \
[--raw-output=true|false] \
--software-configuration=<software-configuration> \
[--space-id=<space-identifier>] \
[--verbose]
Arguments
The environment software-specification create command has no arguments.
Options
Table 1: Command options
| Option | Description |
|---|---|
--base-software-specification |
Specify a reference to a base
software specification.
|
--context |
Specify the configuration context
name.
|
--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.
|
--description |
Specify a
software specification description.
|
|
|
Display command
help.
|
--jmes-query |
The Lucene
query.
|
--name |
Specify the
software specification name.
|
--output |
Specify an output
format.
|
--output-file |
Specify a file path where all
output is redirected.
|
--package-extensions |
Specify the software specification
package extensions.
|
--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.
|
--project-id |
Specify a
Cloud Pak for Data project instance to create the software specification
in.
|
--quiet |
Suppress verbose
messages.
|
--raw-output |
When set to true, single values
are not surrounded by quotation marks in
JSON output
mode.
|
--software-configuration |
Specify a software
configuration.
|
--space-id |
Specify a space
identifier.
|
--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 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.
-
custom_sw_spec_name = "my_sw_spec" base_sw_spec = { 'guid': base_sw_spec_id } base_sw_spec_json = json.dumps(base_sw_spec) sw_conf = {} sw_conf_json = json.dumps(sw_conf) - Create a custom software specification.
-
cpd-cli environment software-specification create \ --base-software-specification=${base_sw_spec_json} \ --jmes-query="metadata.asset_id" \ --name=${custom_sw_spec_name} \ --output=json \ --project-id=${PROJECT_CPD_INST_OPERANDS} \ --software-configuration=${sw_conf_json} \ --raw-output