project create
Create a project with the provided parameters (including all of the storage and credentials) in a single transaction.
Syntax
cpd-cli project create \
[--compute=<list-of-project-computes>] \
[--description=<project-description>] \
[--enforce-members=true|false] \
[--jmes-query=<jmespath-query>] \
--name=<project-name> \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
--profile=<cpd-configuration-profile-name> \
[--public=true|false] \
[--raw-output=true|false] \
--storage=<object-storage-properties> \
[--tags=<tag1,tag2,...>] \
[--tools=<list-of-project-tools>]
Arguments
The project create
command has no
arguments.
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.
Valid formats include json, yaml, or text (the default
format).
|
--output-file |
Specify a file path where all output is redirected.
|
--profile |
The profile-name from the Cloud
Pak for Data configuration.
|
--public
|
When set to true, the project is public.
|
--raw-output |
When set to true, single values in
JSON output mode are not surrounded by quotes.
|
--storage
|
Specify the object storage properties that are associated with the project. This option is required on public cloud and optional on Cloud Pak for Data.
|
--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 optionally add the
listed environment variables to the install variables script. For more information, see Best practice: Setting up install variables.
- Specify the environment variables in a script file.
-
RESTORED_PROJECT_NAME = <A restored Cloud Pak for Data 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}