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.
Option | Description | Default | Available in Interactive Mode |
---|---|---|---|
server | The vCenter Server system to which DCLI connects. | localhost | Yes |
vmc-server | The VMware Cloud on AWS server to which DCLI connects. | https://vmc.vmware.com | Yes |
nsx-server | The 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 | |
prompt | Prompt that the interactive shell uses. | dcli> | No |
skip-server-verification | Skips the server SSL verification process. | False | Yes |
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 | |
password | You
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 | |
logout | Use
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 | |
filter | Provides JMESPath expressions to filter command output. | Yes | |
formatter | Output formatter, which has one of the following possible values.
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 |
verbose | Prints verbose output. | False | Yes |
log-level | The
log level, which has one of the following possible values.
| info | Yes |
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_credstore | Yes |
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-list | Lists 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-manager | Use 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-file | Path to the configuration store file to use for options and profile-related internal commands. | $HOME/.dcli/.dcli_configuration | Yes |
more | Displays page-wise output. | Yes |