DCLI Options

You can run each DCLI command with connection or formatting options preceded by a + sign.

For many of the options, you can instead use variables. See Using DCLI with Variables.

dcli   [+server SERVER_IP]
       [+vmc-server]
       [+nsx-server [NSX_T_SERVER_ADDRESS]]
       [+org-id NSX_ORG_ID]
       [+sddc-id NSX_SDDC_ID]
       [+interactive]
       [+prompt PROMPT]
       [+skip-server-verification]
       [+cacert-file CACERT_FILE]
       [+username USERNAME]
       [+password PASSWORD]
       [+logout]
       [+filter FILTER]
       [+formatter {yaml, json, table, csv, html, xml, yamlc, jsonc, htmlc, xmlc}]
       [+verbose]
       [+log-level {debug, info, warning, error}]
       [+log-file LOG_FILE]
       [+generate-json-input]
       [+generate-required-json-input]
       [+json-input JSON_INPUT]
       [+credstore-file CREDSTORE_FILE]
       [+credstore-add | +credstore-list | +credstore-remove]
       [+session-manager SESSION_MANAGER]
       [+configuration-file CONFIGURATION_FILE]
       [+more]
       [args [args …]]

With these options, you can provide the following information. If you are entering options in DCLI interactive mode, tab completion is supported on Linux, Windows, and Mac OS systems. In all cases, you can specify a partial option if the option is not ambiguous. For example, +i indicates interactive, but you have to specify, at least, +credstore-a to disambiguate option +credstore-add.

The following table describes the DCLI options.

OptionDescriptionDefaultAvailable in Interactive Mode
serverThe vCenter Server system to which DCLI connects.localhostYes
vmc-serverThe VMware Cloud on AWS server to which DCLI connects.https://vmc.vmware.comYes
nsx-serverThe NSX-T server to which DCLI connects. If not specified, +org-id and +sddc-id must be specified.Yes
org-id Use this option along with +nsx, specified as a flag, and +sddc-id. Specifies the organization ID of the NSX-T server you want to connect to on the VMware Cloud on AWS service. Yes
sddc-id Use this option along with +nsx, specified as a flag, and +org-id. Specifies the organization SDDC of the NSX-T server you want to connect to on the VMware Cloud on AWS service. Yes
interactive

Runs DCLI in interactive shell mode, which supports tab completion of commands, options, and some option values. It also supports saving the command history across DCLI sessions.

Interactive mode is faster because DCLI caches the list of commands available on a vCenter Server system.

No
promptPrompt that the interactive shell uses.dcli>No
skip-server-verification Skips the server SSL verification process.FalseYes
cacert-file Specifies the certificate authority certificates for validating SSL connections.Yes
username

If you run from the local shell, most DCLI commands do not require the user name. If you are running vCLI commands, the user you specify must be able to authenticate to the vCenter Server system.

The user you specify must have the privileges to perform the task, as specified through vCenter Server roles.

You are prompted for the password. The password is not echoed to screen.

Note: Only available when DCLI connects to a vCenter Server system.
Yes
passwordYou can use this option to provide your password explicitly instead of waiting for the DCLI password prompt.
Important: Providing the value explicitly presents a security risk.
Note: Only available when DCLI connects to a vCenter Server system.
Yes
logoutUse this option to request logout from vCenter Server and remove the session ID and authentication tokens from the credential store.
Note: It is a good practice to use this option at the end of your script to destroy the used session and prevent overflowing the server with session objects.
No
filterProvides JMESPath expressions to filter command output.Yes
formatterOutput formatter, which has one of the following possible values.
  • yaml
  • json
  • table
  • csv
  • html
  • xml
  • yamlc
  • jsonc
  • htmlc
  • xmlc
The yamlc, jsonc, htmlc, and xmlc formatters are colorized versions of the yaml, json, html, and xml formatters.
Default is table for lists of structures and yaml for all other output including json.Yes
verbosePrints verbose output.FalseYes
log-levelThe log level, which has one of the following possible values.
  • debug
  • info
  • warning
  • error
infoYes
log-file Specifies the log file to be used for detailed DCLI execution information. $HOME/.dcli/.dcli_log Yes
generate-json-input When provided and used along with a command, DCLI outputs empty JSON input for the command, which you can populate and provide back as an input by using the +json-input option. False Yes
generate-required-json-input When provided and used along with a command, DCLI outputs empty JSON input for the required fields of the command, which you can populate and provide back as an input by using the +json-input option. False Yes
json-input Specifies a JSON string value or a .json file that you can use as command input. Yes
credstore-file

Path to the credential store file to use for credential store operations or for reading login credentials.

Use this option only if the default credential store filename does not work in your environment.

By default, the credential store file is in the .dcli/.dcli_credstore directory inside the home directory.

$HOME/.dcli/.dcli_credstoreYes
credstore-add

Adds login credentials entered for a command to the DCLI credential store file.

If the provided credentials are valid, this option stores the server IP address, session manager, user name, and password for the command being run. If an entry exists, the command updates the entry.

Yes
credstore-listLists all entries stored in the DCLI credential store file. Each entry includes the server IP address, session manager, and user name.Yes
credstore-remove

Removes an entry from the DCLI credential store file.

This option removes the entry for a specified server IP address and user name if only one session manager is present for a target server and user.

In rare cases, information about multiple session manager entries is present. You must provide the session manager with the session-manager option.

Yes
session-managerUse this option if you use the credstore-remove option the same user name and password are stored through multiple session managers. Not usually required.Yes
configuration-filePath to the configuration store file to use for options and profile-related internal commands. $HOME/.dcli/.dcli_configurationYes
moreDisplays page-wise output.Yes