project create
Create a project with the provided parameters (including all the storage and credentials) in a single transaction.
Syntax
cpd-cli project create \
--name=<project-name> \
--profile=<profile-name> \
--storage=<object-storage-properties> \
[--compute=<list-of-project-computes>] \
[--description=<project-description>] \
[--enforce-members=true|false] \
[--jmes-query=<jmespath-query>] \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
[--public=true|false] \
[--raw-output=true|false] \
[--tags=<tag1,tag2,...>] \
[--tools=<list-of-project-tools>]
Arguments
The project create command has no
arguments.
Options
Table 1: Command options
| Option | Description |
|---|---|
--compute
|
Specify a list of computes
that are associated with the project.
|
--description
|
Specify a project
description.
|
--enforce-members
|
When set to 'true', project
members are scoped to the account or SAML of the creator.
|
|
|
Display command
help.
|
--jmes-query |
Provide a JMESPath query to
customize the output.
|
--name
|
Specify a project name.
The name must be a non-empty string and does not need to be
unique.
|
--output |
Specify an output
format.
|
--output-file |
Specify a file path where all
output is redirected.
|
--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.
|
--public
|
When set to true, the project is
public.
|
--raw-output |
When set to true, single values
are not surrounded by quotation marks in
JSON output
mode.
|
--storage
|
Specify the object storage
properties that are associated with the project. This option is required on public cloud and
optional on IBM Software Hub.
|
--tags
|
Specify a list of tags
that are attached to the project.
|
--tools
|
Specify a list of tools that are
associated with the project.
|
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.
-
RESTORED_PROJECT_NAME = <A restored IBM Software Hub project name> STORAGE = {"type": "assetfiles", "guid": str(uuid.uuid4())} STORAGE_JSON = json.dumps(STORAGE) - Create a project.
-
cpd-cli project create \ --jmes-query='location' \ --name=${RESTORED_PROJECT_NAME} \ --output=json \ --raw-output \ --storage=${STORAGE_JSON}