space list
Retrieve the space list.
Syntax
cpd-cli space list \
--profile=<profile-name> \
[--bss-account-id=<bss-account-id>] \
[--compute-crn=<compute.crn>] \
[--context=<catalog-project-or-space-id>] \
[--cpd-config=<cpd-config-location>] \
[--id=<comma-separated-list-of-ids>] \
[--include=<comma-separated-list-of-space-sections>] \
[--jmes-query=<jmespath-query>] \
[--limit=<resource-limit>] \
[--member=<user-id>] \
[--output=json|yaml|table] \
[--output-file=<output-file-location>] \
[--quiet] \
[--raw-output=true|false] \
[--roles=<comma-separated-list-of-space-roles>] \
[--start=<start-token>] \
[--tags=<tag1,tag2,...>] \
[--total-count=<total-resource-value>] \
[--verbose]
Arguments
The space list command has no
arguments.
Options
Table 1: Command options
| Option | Description |
|---|---|
--bss-account-id |
Specify the BSS account ID.
Filtering by 'bss_account_id' is allowed only for accredited
services.
|
--compute-crn |
Specify a compute.crn. The results
are filtered to include only spaces with the specified
compute.crn.
|
--context |
Specify the configuration context
name.
|
--cpd-config |
The IBM Software Hub
configuration location. For example,
$HOME/.cpd-cli/config.
|
|
|
Display command
help.
|
--id |
Provide a comma-separated
list of IDs to return.
|
--include |
Specify a list of
comma-separated space sections to include in the query
results.
|
--jmes-query |
Provide a JMESPath query to
customize the output.
|
--limit |
Specify the total number of
resources.
|
--member |
Specify a user ID. The
results list is filtered to include only spaces where the user with a matching user ID is a
member.
|
--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.
|
--quiet |
Suppress verbose
messages.
|
--raw-output |
When set to true, single values
are not surrounded by quotation marks in
JSON output
mode.
|
--roles |
Specify a list of
comma-separated space roles to use when filtering the query results. The results are filtered to
include only spaces where the specified member has one of the specified roles. The option must be
used in conjunction with the 'member' option.
|
--start |
Specify the token that represents
the first resource.
|
--tags |
Specify a list of tags that
are associated with a space.
|
--total-count |
Specify a value to compute the
total count. This setting might have a negative performance
impact.
|
--verbose |
Logs include more detailed
messages.
|
Examples
- List all spaces.
-
cpd-cli space list \ - Example results
-
ID Name Created State Tags d9bfa660-1be7-46ab-aa53-e9010a634bba cpdctl-demo-space 2021-01-29T08:56:07.389Z active [] 6c205951-1c61-49b9-b46d-e5e199492775 cpdctl-prod-space-for-scripts 2021-02-22T07:45:34.787Z active [] 51824744-7b11-4a6b-aff0-6ee16de709d0 cpdctl-demo-new-qa-space 2021-02-22T13:31:23.319Z active [] 77ece893-36c2-43cd-b1ce-b155decbc05c cpdctl-qa-space-for-scripts 2021-04-30T12:02:24.332Z active []