chef-dsm-cli reference
chef-dsm-cli
Chef DSM CLI
Options
-h--helphelp for chef-dsm-cli
Default value:
false
chef-dsm-cli completion
Generate the autocompletion script for the specified shell
Synopsis
Generate the autocompletion script for chef-dsm-cli for the specified shell. See each sub-command’s help for details on how to use the generated script.
Options
-h--helphelp for completion
Default value:
false
See also
- chef-dsm-cli completion bash
- chef-dsm-cli completion fish
- chef-dsm-cli completion powershell
- chef-dsm-cli completion zsh
chef-dsm-cli completion bash
Generate the autocompletion script for bash
Synopsis
Generate the autocompletion script for the bash shell.
This script depends on the ‘bash-completion’ package. If it is not installed already, you can install it via your OS’s package manager.
To load completions in your current shell session:
source <(chef-dsm-cli completion bash)
To load completions for every new session, execute once:
Linux:
chef-dsm-cli completion bash > /etc/bash_completion.d/chef-dsm-cli
macOS:
chef-dsm-cli completion bash > $(brew --prefix)/etc/bash_completion.d/chef-dsm-cli
You will need to start a new shell for this setup to take effect.
completion-bash package
You must have the bash-completion package installed on your computer to run the completion bash subcommand.
To install and configure the package, see the Chef 360 Platform CLI documentation.
Usage
chef-dsm-cli completion bashOptions
-h--helphelp for bash
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-dsm-cli completion fish
Generate the autocompletion script for fish
Synopsis
Generate the autocompletion script for the fish shell.
To load completions in your current shell session:
chef-dsm-cli completion fish | source
To load completions for every new session, execute once:
chef-dsm-cli completion fish > ~/.config/fish/completions/chef-dsm-cli.fish
You will need to start a new shell for this setup to take effect.
Usage
chef-dsm-cli completion fish [flags]Options
-h--helphelp for fish
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-dsm-cli completion powershell
Generate the autocompletion script for powershell
Synopsis
Generate the autocompletion script for powershell.
To load completions in your current shell session:
chef-dsm-cli completion powershell | Out-String | Invoke-Expression
To load completions for every new session, add the output of the above command to your powershell profile.
Usage
chef-dsm-cli completion powershell [flags]Options
-h--helphelp for powershell
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-dsm-cli completion zsh
Generate the autocompletion script for zsh
Synopsis
Generate the autocompletion script for the zsh shell.
If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions in your current shell session:
source <(chef-dsm-cli completion zsh)
To load completions for every new session, execute once:
Linux:
chef-dsm-cli completion zsh > "${fpath[1]}/_chef-dsm-cli"
macOS:
chef-dsm-cli completion zsh > $(brew --prefix)/share/zsh/site-functions/_chef-dsm-cli
You will need to start a new shell for this setup to take effect.
Usage
chef-dsm-cli completion zsh [flags]Options
-h--helphelp for zsh
Default value:
false--no-descriptionsdisable completion descriptions
Default value:
false
See also
chef-dsm-cli deregister-device
De-register a device
Synopsis
Use this operation to de-register a device
Usage
chef-dsm-cli deregister-device [flags]Options
--forceforce remove profile from local list of profiles, even on error from server
Default value:
false-f--formatto print response in format
Default value:
json-h--helphelp for deregister-device
Default value:
false--profilename for the profile of the new api-token
Default value:
default-v--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli get-default-profile
Get default profile for request
Usage
chef-dsm-cli get-default-profile [flags]Options
-h--helphelp for get-default-profile
Default value:
false
See also
chef-dsm-cli list-profile-names
Get the list of profile names available
Usage
chef-dsm-cli list-profile-names [flags]Options
-h--helphelp for list-profile-names
Default value:
false
See also
chef-dsm-cli manage
Commands related to manage
Options
-h--helphelp for manage
Default value:
false
See also
chef-dsm-cli manage rotate-credentials
Rotate DSM credential targets
Synopsis
Summary:
Queues a credential rotation operation driven by target selection. The request supports rotating specific credential targets or all targets through a single endpoint.
Note: This endpoint requires site admin role or site admin token authentication.
Behavior:
- Accepts one or more targets and de-duplicates repeated entries
- ‘all’ rotates every supported target and cannot be combined with other targets
- Returns a queued operation identifier for progress tracking
Validation
- ’targets’ must be provided and non-empty
- Targets must be one of: ’erchef-postgres’, ‘bifrost-postgres’, ‘pivotal-key’, ‘webui-key’, or ‘all’
- Mixing ‘all’ with other targets is rejected
Errors
400 (Bad Request)
Invalid target supplied or ‘all’ combined with other targets
401 (Unauthorized)
Authentication required or invalid credentials
403 (Forbidden)
Insufficient permissions to trigger credential rotation
422 (Unprocessable Content)
Request payload is missing ’targets’ or violates validation constraints
500 (Internal Server Error)
An error occurred while queuing the credential rotation request
Usage
chef-dsm-cli manage rotate-credentials [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for rotate-credentials
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli manage trigger-reindex
Trigger OpenSearch reindexing for tenant organizations
Synopsis
Summary:
Triggers a reindexing operation for organizations within a specified tenant. This is an asynchronous operation that will queue the reindexing task for background processing.
Note: This endpoint requires site admin role or site admin token authentication.
Behavior:
- If no organization names are provided, all organizations within the tenant will be reindexed
- If organization names are specified, only those organizations will be reindexed
- The operation processes all relevant OpenSearch indices for the selected organizations
Note:
The reindexing operation may take significant time to complete depending on the size of the data and number of organizations. The operation returns a 202 status with a job identifier that can be used to track the progress of the reindexing task.
Errors
400 (Bad Request)
Invalid tenant name format or organization names contain invalid characters
401 (Unauthorized)
Authentication required or invalid credentials
403 (Forbidden)
Insufficient permissions to trigger reindexing operations for the specified tenant
404 (Not Found)
The specified tenant or one or more organization names do not exist
422 (Unprocessable Content)
The tenant name format is invalid or organization names exceed limits
500 (Internal Server Error)
An error occurred while processing the reindexing request
Usage
chef-dsm-cli manage trigger-reindex [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for trigger-reindex
Default value:
false--organizationsOptional list of organization names to reindex. If not provided or empty, all organizations within the tenant will be reindexed. Multiple organization names can be provided as comma-separated values.
Default value:
[]--profilename of the profile to be used for cmd
Default value:
default--tenantNameThe name of the tenant for which to perform the reindexing operation
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli register-device
register a device and get api-token for device login
Usage
chef-dsm-cli register-device [flags]Options
--cafilepath to ca file
--device-namename of the device
Default value:
device-f--formatto print response in format
Default value:
json-h--helphelp for register-device
Default value:
false-i--insecureinsecure skip verify
Default value:
false--overwritethis flag is used to overwrite the old profile if the profile for profile name provided already exists
Default value:
false--profile-namename for the profile of the new api-token
--urltenant url
-v--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli set-default-profile
Set default profile for request
Usage
chef-dsm-cli set-default-profile [flags]Options
-h--helphelp for set-default-profile
Default value:
false
See also
chef-dsm-cli store
Commands related to DSM store service
Options
-h--helphelp for store
Default value:
false
See also
- chef-dsm-cli store client
- chef-dsm-cli store cookbook
- chef-dsm-cli store databag
- chef-dsm-cli store environment
- chef-dsm-cli store node
- chef-dsm-cli store policyfile
- chef-dsm-cli store policygroup
- chef-dsm-cli store role
- chef-dsm-cli store search
- chef-dsm-cli store user
chef-dsm-cli store client
Commands related to client
Options
-h--helphelp for client
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store client add-key
- chef-dsm-cli store client create-client
- chef-dsm-cli store client delete-client
- chef-dsm-cli store client get-client
- chef-dsm-cli store client get-key
- chef-dsm-cli store client list-clients
- chef-dsm-cli store client list-keys
- chef-dsm-cli store client update-client
chef-dsm-cli store client add-key
Add a key to client
Synopsis
Add a new key to a Chef API client. Provide a public key to register.
Usage
chef-dsm-cli store client add-key [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--clientNameThe name of the client
--formatto print response in format
Default value:
json-h--helphelp for add-key
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client create-client
Create a new API client
Synopsis
Create a new API client on the Chef Infra Server.
An API client is used for authenticating to the Chef Server. A new RSA key pair will be generated and the private key will be returned in the response (this is the only time the private key is available).
Note: Either name or clientName must be specified to create a client.
Usage
chef-dsm-cli store client create-client [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-client
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client delete-client
Delete an API client
Synopsis
Delete a specific API client from the Chef Infra Server.
Usage
chef-dsm-cli store client delete-client [flags]Options
--clientNameThe name of the API client to delete
--formatto print response in format
Default value:
json-h--helphelp for delete-client
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client get-client
Get API client details
Synopsis
Retrieve detailed information about a specific API client.
Usage
chef-dsm-cli store client get-client [flags]Options
--clientNameThe name of the API client to retrieve
--formatto print response in format
Default value:
json-h--helphelp for get-client
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client get-key
Get client key details
Synopsis
Retrieve complete details of a specific key for a Chef API client, including the public key.
Usage
chef-dsm-cli store client get-key [flags]Options
--clientNameThe name of the client
--formatto print response in format
Default value:
json-h--helphelp for get-key
Default value:
false--keyNameThe name of the key
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client list-clients
List API clients
Synopsis
Retrieve a list of API clients from the Chef Infra Server. Returns an array of client names.
Usage
chef-dsm-cli store client list-clients [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-clients
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--querySearch query using Chef search syntax (default: '*:*' for all results). Supports wildcards, boolean operators (AND, OR, NOT), ranges, and fuzzy matching.
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client list-keys
List client keys
Synopsis
Retrieve a list of all keys associated with a specific Chef API client.
Usage
chef-dsm-cli store client list-keys [flags]Options
--clientNameThe name of the client
--formatto print response in format
Default value:
json-h--helphelp for list-keys
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store client update-client
Update an API client
Synopsis
Update an existing API client on the Chef Infra Server.
Can be used to rename a client or change its validator status. Note: The admin field is deprecated and ignored as of Chef Server 12.1.0.
Usage
chef-dsm-cli store client update-client [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--clientNameThe current name of the API client to update
--formatto print response in format
Default value:
json-h--helphelp for update-client
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store cookbook
Commands related to cookbook
Options
-h--helphelp for cookbook
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store cookbook get-cookbook
- chef-dsm-cli store cookbook get-version
- chef-dsm-cli store cookbook list-cookbooks
chef-dsm-cli store cookbook get-cookbook
Get cookbook versions
Synopsis
Retrieve all available versions for a specific Chef cookbook from the Chef Infra Server.
Usage
chef-dsm-cli store cookbook get-cookbook [flags]Options
--cookbookNameThe name of the cookbook
--formatto print response in format
Default value:
json-h--helphelp for get-cookbook
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store cookbook get-version
Get cookbook version details
Synopsis
Retrieve complete details for a specific version of a Chef cookbook from the Chef Infra Server. This includes metadata, files, recipes, attributes, and dependencies.
Usage
chef-dsm-cli store cookbook get-version [flags]Options
--cookbookNameThe name of the cookbook
--formatto print response in format
Default value:
json-h--helphelp for get-version
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false--versionThe version of the cookbook
See also
chef-dsm-cli store cookbook list-cookbooks
List cookbooks
Synopsis
Retrieve a list of cookbooks from the Chef Infra Server for the authenticated organization.
This endpoint returns cookbook information including available versions. The num_versions query parameter controls how many cookbook versions to include in the response.
The organization context is determined from the authenticated user’s credentials.
Usage
chef-dsm-cli store cookbook list-cookbooks [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-cookbooks
Default value:
false--num_versionsThe number of cookbook versions to include in the response. - Use a number (e.g., 3) to return that many latest versions in descending order (newest to oldest) - Use 'all' to return all cookbook versions - If not specified, returns a single cookbook version (the latest) - Using 0 returns an empty array for versions of each cookbook
--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag
Commands related to databag
Options
-h--helphelp for databag
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store databag create-databag
- chef-dsm-cli store databag create-databagitem
- chef-dsm-cli store databag delete-databag
- chef-dsm-cli store databag delete-databagitem
- chef-dsm-cli store databag get-databagitem
- chef-dsm-cli store databag list-databagitems
- chef-dsm-cli store databag list-databags
- chef-dsm-cli store databag update-databagitem
chef-dsm-cli store databag create-databag
Create a new data bag with multiple items
Synopsis
Create a new Chef data bag with multiple items on the Chef Infra Server.
Usage
chef-dsm-cli store databag create-databag [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-databag
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag create-databagitem
Create a new data bag item
Synopsis
Create a new item in a Chef data bag on the Chef Infra Server.
Usage
chef-dsm-cli store databag create-databagitem [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--dataBagNameThe unique name of the data bag (string identifier, not an ID)
--formatto print response in format
Default value:
json-h--helphelp for create-databagitem
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag delete-databag
Delete a data bag
Synopsis
Delete a Chef data bag and all its items from the Chef Infra Server.
Usage
chef-dsm-cli store databag delete-databag [flags]Options
--dataBagNameThe unique name of the data bag (string identifier, not an ID)
--formatto print response in format
Default value:
json-h--helphelp for delete-databag
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag delete-databagitem
Delete a data bag item
Synopsis
Delete a specific item from a Chef data bag on the Chef Infra Server.
Usage
chef-dsm-cli store databag delete-databagitem [flags]Options
--dataBagNameThe unique name of the data bag (string identifier, not an ID)
--formatto print response in format
Default value:
json-h--helphelp for delete-databagitem
Default value:
false--itemNameThe unique name of the data bag item (string identifier, not an ID)
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag get-databagitem
Get a data bag item
Synopsis
Retrieve a specific item from a Chef data bag on the Chef Infra Server.
Usage
chef-dsm-cli store databag get-databagitem [flags]Options
--dataBagNameThe unique name of the data bag (string identifier, not an ID)
--formatto print response in format
Default value:
json-h--helphelp for get-databagitem
Default value:
false--itemNameThe unique name of the data bag item (string identifier, not an ID)
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag list-databagitems
List data bag items
Synopsis
Retrieve a paginated list of items in a Chef data bag from the Chef Infra Server.
Usage
chef-dsm-cli store databag list-databagitems [flags]Options
--dataBagNameThe unique name of the data bag (string identifier, not an ID)
--formatto print response in format
Default value:
json-h--helphelp for list-databagitems
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag list-databags
List data bags
Synopsis
Retrieve a paginated list of Chef data bags from the Chef Infra Server.
Usage
chef-dsm-cli store databag list-databags [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-databags
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store databag update-databagitem
Update a data bag item
Synopsis
Update an existing item in a Chef data bag on the Chef Infra Server.
Usage
chef-dsm-cli store databag update-databagitem [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--dataBagNameThe unique name of the data bag (string identifier, not an ID)
--formatto print response in format
Default value:
json-h--helphelp for update-databagitem
Default value:
false--itemNameThe unique name of the data bag item (string identifier, not an ID)
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment
Commands related to environment
Options
-h--helphelp for environment
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store environment create-environment
- chef-dsm-cli store environment delete-environment
- chef-dsm-cli store environment get-environment
- chef-dsm-cli store environment list-cookbooks
- chef-dsm-cli store environment list-environments
- chef-dsm-cli store environment list-recipes
- chef-dsm-cli store environment update-environment
chef-dsm-cli store environment create-environment
Create a new environment
Synopsis
Create a new environment on the Chef Infra Server.
An environment provides a way to map organizational process to infrastructure. Every Chef Infra organization begins with a single environment called the _default environment, which cannot be modified or deleted.
Usage
chef-dsm-cli store environment create-environment [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-environment
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment delete-environment
Delete an environment
Synopsis
Delete a specific environment from the Chef Infra Server. Note: The _default environment cannot be deleted.
Usage
chef-dsm-cli store environment delete-environment [flags]Options
--environmentNameThe name of the environment to delete
--formatto print response in format
Default value:
json-h--helphelp for delete-environment
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment get-environment
Get environment details
Synopsis
Retrieve detailed information about a specific environment.
Usage
chef-dsm-cli store environment get-environment [flags]Options
--environmentNameThe name of the environment to retrieve
--formatto print response in format
Default value:
json-h--helphelp for get-environment
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment list-cookbooks
List cookbooks for an environment
Synopsis
Retrieve the list of cookbooks available to a specific environment with their version constraints.
Returns cookbook information filtered by the environment’s cookbook version constraints. The num_versions query parameter controls how many cookbook versions to include per cookbook.
This endpoint corresponds to the Chef Infra Server API: GET /environments/:name/cookbooks
Usage
chef-dsm-cli store environment list-cookbooks [flags]Options
--environmentNameThe name of the environment
--formatto print response in format
Default value:
json-h--helphelp for list-cookbooks
Default value:
false--num_versionsThe number of cookbook versions to include in the response for each cookbook. - Use a number (e.g., 3) to return that many latest versions in descending order (newest to oldest) - Use 'all' to return all cookbook versions - If not specified, returns a single cookbook version (the latest) for each cookbook
--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment list-environments
List environments
Synopsis
Retrieve a list of environments from the Chef Infra Server. Returns an array of environment names.
Usage
chef-dsm-cli store environment list-environments [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-environments
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--querySearch query using Chef search syntax (default: '*:*' for all results). Supports wildcards, boolean operators (AND, OR, NOT), ranges, and fuzzy matching.
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment list-recipes
List recipes for an environment
Synopsis
Retrieve the list of recipes available to a specific environment.
Returns an array of recipe names that are available within the environment based on the cookbooks that are available to the environment.
Recipe names are returned in the format “cookbook_name::recipe_name”.
This endpoint corresponds to the Chef Infra Server API: GET /environments/:name/recipes
Usage
chef-dsm-cli store environment list-recipes [flags]Options
--environmentNameThe name of the environment
--formatto print response in format
Default value:
json-h--helphelp for list-recipes
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store environment update-environment
Update an environment
Synopsis
Update an existing environment on the Chef Infra Server.
Used to modify environment attributes, description, or cookbook version constraints.
Usage
chef-dsm-cli store environment update-environment [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--environmentNameThe name of the environment to update
--formatto print response in format
Default value:
json-h--helphelp for update-environment
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node
Commands related to node
Options
-h--helphelp for node
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store node create-node
- chef-dsm-cli store node delete-node
- chef-dsm-cli store node get-node
- chef-dsm-cli store node get-runlists
- chef-dsm-cli store node head-node
- chef-dsm-cli store node list-nodes
- chef-dsm-cli store node update-node
chef-dsm-cli store node create-node
Create a new node
Synopsis
Create a new Chef node on the Chef Infra Server.
Usage
chef-dsm-cli store node create-node [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-node
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node delete-node
Delete a node
Synopsis
Delete a Chef node from the Chef Infra Server.
Usage
chef-dsm-cli store node delete-node [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for delete-node
Default value:
false--If-MatchIf-Match will compare the supplied etag to the resource requested. If the etag does not match the operation will be aborted.
--nodeNameThe name of the node
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node get-node
Get a node
Synopsis
Retrieve details for a specific Chef node from the Chef Infra Server.
Usage
chef-dsm-cli store node get-node [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-node
Default value:
false--nodeNameThe name of the node
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node get-runlists
Get node run list
Synopsis
Retrieve the run list for a specific Chef node.
This is a convenience endpoint that returns only the run list without the full node object. The run list defines the ordered list of recipes and roles that should be applied to the node.
Usage
chef-dsm-cli store node get-runlists [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-runlists
Default value:
false--nodeNameThe name of the node
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node head-node
Check if node exists
Synopsis
Check whether a Chef node exists on the Chef Infra Server without retrieving its full data.
Usage
chef-dsm-cli store node head-node [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for head-node
Default value:
false--nodeNameThe name of the node
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node list-nodes
List nodes
Synopsis
Retrieve a paginated list of Chef nodes from the Chef Infra Server.
Usage
chef-dsm-cli store node list-nodes [flags]Options
--expandSpecifies whether to return full resource details or just resource names/identifiers. - true: Returns full resource objects with all attributes - false: Returns only resource names/identifiers (default) This parameter is only applicable to list operations. When false, the API returns a simple array of strings (resource names). When true, the API returns an array of objects with full resource details.
Default value:
false--formatto print response in format
Default value:
json-h--helphelp for list-nodes
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--querySearch query using Chef search syntax (default: '*:*' for all results). Supports wildcards, boolean operators (AND, OR, NOT), ranges, and fuzzy matching.
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store node update-node
Update a node
Synopsis
Update an existing Chef node on the Chef Infra Server.
Usage
chef-dsm-cli store node update-node [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for update-node
Default value:
false--If-MatchIf-Match will compare the supplied etag to the resource requested. If the etag does not match the operation will be aborted.
--nodeNameThe name of the node
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store policyfile
Commands related to policyfile
Options
-h--helphelp for policyfile
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store policyfile delete-policy-file
- chef-dsm-cli store policyfile get-policy-file-revision
- chef-dsm-cli store policyfile list-policy-files
- chef-dsm-cli store policyfile list-policy-revisions
chef-dsm-cli store policyfile delete-policy-file
Delete a policyFile
Synopsis
Delete a Chef policyFile from the Chef Infra Server.
This endpoint removes all revisions of the specified policyFile from the server.
Use Cases
- Removing obsolete policyFiles that are no longer used
- Cleaning up test or development policies
- Decommissioning policies that have been replaced
Important Notes
- Deleting a policyFile removes all its revisions
- This action cannot be undone
- Ensure the policy is not currently applied to any policy groups before deletion
- Consider backing up the policyFile before deletion if needed for audit purposes
Errors
401 (Unauthorized)
Authentication required or invalid credentials
403 (Forbidden)
Insufficient permissions to delete policyFiles
404 (Not Found)
The specified policyFile does not exist
412 (Precondition Failed)
The If-Match header does not match the current resource version
500 (Internal Server Error)
An error occurred while deleting the policyFile
Usage
chef-dsm-cli store policyfile delete-policy-file [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for delete-policy-file
Default value:
false--If-MatchIf-Match will compare the supplied etag to the resource requested. If the etag does not match the operation will be aborted.
--policyFileNameThe name of the policyFile to delete
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store policyfile get-policy-file-revision
Get policyFile revision details
Synopsis
Retrieve detailed information for a specific policyFile revision from the Chef Infra Server.
This endpoint returns comprehensive details about a policyFile revision, including:
- Policy metadata (name, revision ID)
- Run list (ordered list of recipes and roles)
- Named run lists for different scenarios
- Included policy locks from other policies
- Cookbook locks with version information
- Solution dependencies with version constraints
- Attributes (default and override)
Use Cases
- Viewing complete details of a specific policy revision
- Understanding cookbook dependencies for a policy
- Auditing policy configuration and locked cookbook versions
- Preparing to deploy or promote a specific policy revision
Response Details
- The revisionId is a SHA256 hash uniquely identifying this policy version
- cookbookLocks contains all cookbooks with their locked versions and identifiers
- solutionDependencies shows the dependency tree with version constraints
- defaultAttributes and overrideAttributes are returned as flexible JSON objects (interface{})
- namedRunLists provides alternative run lists for different deployment scenarios
Errors
401 (Unauthorized)
Authentication required or invalid credentials
403 (Forbidden)
Insufficient permissions to access the policyFile revision
404 (Not Found)
The specified policyFile or revision does not exist
500 (Internal Server Error)
An error occurred while retrieving the policyFile revision details
Usage
chef-dsm-cli store policyfile get-policy-file-revision [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-policy-file-revision
Default value:
false--policyFileNameThe name of the policyFile
--profilename of the profile to be used for cmd
Default value:
default--revisionIdThe revision ID (SHA256 hash) of the policyFile
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store policyfile list-policy-files
List policyFiles
Synopsis
Retrieve a list of all policyFiles from the Chef Infra Server.
This endpoint returns policyFile information including the policy name and revision ID (SHA256 hash).
Response Details
- The response includes all policyFiles in the organization
- Each policyFile is uniquely identified by the combination of name and revisionId
- Revision IDs are SHA256 hashes representing the specific version of the policy
Errors
401 (Unauthorized)
Authentication required or invalid credentials
403 (Forbidden)
Insufficient permissions to access policyFiles
404 (Not Found)
The organization does not exist or has no policyFiles
500 (Internal Server Error)
An error occurred while retrieving policyFiles
Usage
chef-dsm-cli store policyfile list-policy-files [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-policy-files
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store policyfile list-policy-revisions
List policyFile revisions
Synopsis
Retrieve a list of all revisions for a specific policyFile from the Chef Infra Server.
This endpoint returns all available revision IDs (SHA256 hashes) for the specified policyFile. Each revision represents a specific version of the policyFile that has been uploaded to the server.
Response Details
- The response includes all revisions for the specified policyFile
- Revision IDs are SHA256 hashes representing unique versions of the policy
- Revisions are typically returned in chronological order (most recent first)
Use Cases
- Viewing the version history of a policyFile
- Selecting a specific policy revision for deployment
- Auditing policyFile changes over time
Errors
401 (Unauthorized)
Authentication required or invalid credentials
403 (Forbidden)
Insufficient permissions to access policyFile revisions
404 (Not Found)
The specified policyFile does not exist or has no revisions
500 (Internal Server Error)
An error occurred while retrieving policyFile revisions
Usage
chef-dsm-cli store policyfile list-policy-revisions [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-policy-revisions
Default value:
false--policyFileNameThe name of the policyFile
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store policygroup
Commands related to policygroup
Options
-h--helphelp for policygroup
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store policygroup get-policy-group
- chef-dsm-cli store policygroup list-policy-groups
chef-dsm-cli store policygroup get-policy-group
Get a policy group
Synopsis
Retrieve details for a specific policy group including all its policies from the Chef Infra Server.
Usage
chef-dsm-cli store policygroup get-policy-group [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-policy-group
Default value:
false--policyGroupNameThe name of the policy group
--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store policygroup list-policy-groups
List policy groups
Synopsis
Retrieve a list of policies across different policy groups from the Chef Infra Server.
Usage
chef-dsm-cli store policygroup list-policy-groups [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for list-policy-groups
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role
Commands related to role
Options
-h--helphelp for role
Default value:
false
See also
- chef-dsm-cli store
- chef-dsm-cli store role create-role
- chef-dsm-cli store role delete-role
- chef-dsm-cli store role get-environments
- chef-dsm-cli store role get-role
- chef-dsm-cli store role get-runlist
- chef-dsm-cli store role get-runlists
- chef-dsm-cli store role list-roles
- chef-dsm-cli store role update-role
chef-dsm-cli store role create-role
Create a new role
Synopsis
Create a new Chef role on the Chef Infra Server.
Usage
chef-dsm-cli store role create-role [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-role
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role delete-role
Delete a role
Synopsis
Delete a Chef role from the Chef Infra Server.
Usage
chef-dsm-cli store role delete-role [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for delete-role
Default value:
false--If-MatchIf-Match will compare the supplied etag to the resource requested. If the etag does not match the operation will be aborted.
--profilename of the profile to be used for cmd
Default value:
default--roleNameThe name of the role
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role get-environments
Get role environment-specific run lists
Synopsis
Retrieve environment-specific run lists configured for a Chef role.
Usage
chef-dsm-cli store role get-environments [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-environments
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--roleNameThe name of the role
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role get-role
Get a role
Synopsis
Retrieve details for a specific Chef role from the Chef Infra Server.
Usage
chef-dsm-cli store role get-role [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-role
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--roleNameThe name of the role
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role get-runlist
Get role run list for specific environment
Synopsis
Retrieve the run list for a Chef role in a specific environment.
Usage
chef-dsm-cli store role get-runlist [flags]Options
--environmentNameThe name of the environment
--formatto print response in format
Default value:
json-h--helphelp for get-runlist
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--roleNameThe name of the role
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role get-runlists
Get role run list
Synopsis
Retrieve the run list for a specific Chef role.
This is a convenience endpoint that returns only the run list without the full role object. The run list defines the ordered list of recipes and roles that should be applied.
Usage
chef-dsm-cli store role get-runlists [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for get-runlists
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--roleNameThe name of the role
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role list-roles
List roles
Synopsis
Retrieve a paginated list of Chef roles from the Chef Infra Server.
Usage
chef-dsm-cli store role list-roles [flags]Options
--expandSpecifies whether to return full resource details or just resource names/identifiers. - true: Returns full resource objects with all attributes - false: Returns only resource names/identifiers (default) This parameter is only applicable to list operations. When false, the API returns a simple array of strings (resource names). When true, the API returns an array of objects with full resource details.
Default value:
false--formatto print response in format
Default value:
json-h--helphelp for list-roles
Default value:
false--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--querySearch query using Chef search syntax (default: '*:*' for all results). Supports wildcards, boolean operators (AND, OR, NOT), ranges, and fuzzy matching.
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store role update-role
Update a role
Synopsis
Update an existing Chef role on the Chef Infra Server.
Usage
chef-dsm-cli store role update-role [flags]Options
--body--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for update-role
Default value:
false--If-MatchIf-Match will compare the supplied etag to the resource requested. If the etag does not match the operation will be aborted.
--profilename of the profile to be used for cmd
Default value:
default--roleNameThe name of the role
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store search
Commands related to search
Options
-h--helphelp for search
Default value:
false
See also
chef-dsm-cli store search search-index
Search an index
Synopsis
Perform a search query on a specific index on the Chef Infra Server.
Usage
chef-dsm-cli store search search-index [flags]Options
--formatto print response in format
Default value:
json-h--helphelp for search-index
Default value:
false--indexThe name of the index to search (e.g., node, role, client, environment)
--pagination.pagewhat page of the pagination
Default value:
1--pagination.sizeitems per page
Default value:
10--profilename of the profile to be used for cmd
Default value:
default--querySearch query using Chef search syntax (default: '*:*' for all results). Supports wildcards, boolean operators (AND, OR, NOT), ranges, and fuzzy matching.
--sortOrderField to sort by with optional direction (ASC or DESC)
--verboseto show debug logs
Default value:
false
See also
chef-dsm-cli store user
Commands related to user
Options
-h--helphelp for user
Default value:
false
See also
chef-dsm-cli store user create-key
Create DSM User Key
Synopsis
Summary:
Creates a new key for a DSM user with multitenancy support. This endpoint acts as a wrapper around the core DSM service to securely generate user key on behalf of the DSM user.
Key Features:
- DSM generates a new private key and returns it base64 encoded
- Automatic tenant ID suffixing for multitenancy
- Secure key management without exposing sensitive credentials to browsers
- Integration with DSM /user/{dsmUserName}/keys endpoint
Behavior:
- User identification is done via email with tenant ID suffixing for proper multitenancy
- Key names are auto-generated as chef360-platform-#{yyyymmdd-hhmmss}
Errors
400 (Bad Request)
Invalid request payload or missing required fields
401 (Unauthorized)
The credential used to access this resource is invalid/expired
403 (Forbidden)
User does not have permission to create keys for the specified DSM user
409 (Conflict)
Key with the same name already exists for the user
422 (Unprocessable Content)
Invalid public key format or validation errors
500 (Internal Server Error)
Unexpected error occurred while creating the key
Usage
chef-dsm-cli store user create-key [flags]Options
--bodyKey creation request payload
--body-filePath to file in the local system containing valid body parameter value
--body-formatFormat of the --body or --body-file, options: json, yaml, toml
Default value:
json-e--exampleto show example request body
Default value:
false-f--example-formatFormat of the --example, options: json, yaml, toml
Default value:
json--formatto print response in format
Default value:
json-h--helphelp for create-key
Default value:
false--profilename of the profile to be used for cmd
Default value:
default--verboseto show debug logs
Default value:
false
Examples
The following examples show request bodies that you can submit with this command.
- Default example
{ "publicKey": "" }
See also
chef-dsm-cli version
Chef DSM CLI
Usage
chef-dsm-cli version [flags]Options
-h--helphelp for version
Default value:
false