-i or --interactive parameter to your CLI command.
Creating resources interactively
When you run a resource creation command in the interactive mode, the CLI prompts for parameters in this order:- Metadata parameters.
- Required parameters.
- Optional parameters.
-
For
stringparameters, specify the string directly or use contents of a file if the string is too long. For example: -
For
oneof,enumandboolparameters, the CLI prompts you to select one of the supported values.
- Create a boot disk.
-
Run the VM creation command:
Example session:First, you set the metadata parameters, such as
parent-idandname. Then, you set the required parameters, such asresources-platformandresources-preset. Finally, you set the optional parameters, such asboot-disk-attach-modeandboot-disk-existing-disk-id. Although the boot disk parameters are marked as optional, they still require input for the command to succeed. After you fill in the parameters, the CLI shows the full resource and lets you apply it.
Listing resources interactively
When you run a command in interactive mode, the CLI displays the output in an alternate screen with pagination. In this mode, you can:- Use the keyboard to switch between pages.
- Use the keyboard or mouse to scroll through the current page.
--page-size parameter sets the number of items per page. If you do not specify this parameter, the default value is 100.
The --format parameter sets the output format. Supported values are yaml, json, jsonpath, table and text. In the given example, the --format parameter displays the output as a table and includes only the action, resource.metadata.type, status and time columns.
Example output: