Input and output types
While all CLI interactions (command calls and output) are performed through a text interface, all input arguments and output results are defined to be of a certain type and are converted internally to these types. Each command accepts certain kinds of input and generates certain kinds of output. See the BLCLI help for complete documentation on all CLI commands.
The most common types of arguments accepted as input are the following:
- String — Commonly used to name objects or provide a description for an object.
When providing a string as an argument, you must enclose it in quotes if the string contains spaces. For example:
blcli ResourceProfile createResourceProfile "All Servers"
Quotes might be also be needed (and are recommended) for other special characters. For example, a property name that ends with an asterisk, as in the following command:
blcli Job removePropertyValue $JOB_KEY "IS_ATTEMPTED*"When the CLI returns a string as a result, it does not put quotes around the string. - Integer — A whole number.
- Boolean — Used for true or false values. Valid values for a Boolean are the strings true and false. The CLI considers any other value to be incorrect.
- Null, Void
- As output — Used for a command that has no return value. In these cases the void return value is returned. The CLI prints the string void.
- As input — Some commands accept a null input argument, indicated by two double quotes "" or two single quotes ''.
DBKey — Used as a handle when referencing various BMC Server Automation objects. Some commands — usually creation and update commands — return a DBKey in the form of a string that you can use as input for other commands. For example, the Property createPropertycommand returns a DBKey to the newly created property. By storing this return value in an environment variable, you can reference the property when setting its value for a specific server, as shown in the following example:
PropertyKey = 'blcli Property createProperty my_property'
blcli Server addPropertyValue win_test1 $PropertyKey my_value