ionosctllocally, you can use:
ionosctlto perform any operations, you will need to set your credentials for IONOS Cloud account. The authentication mechanism is first checking the environment variables and if these are not set, it is checking if a configuration file exists and if the user has the right permissions for it.
--api-urlglobal flag or via the following environment variable:
IONOS_API_URLwill overwrite the default value of
https://api.ionos.comfor subsequent requests.
ionosctlprovides completions for various shells, for both commands and flags. If you partially type a command or a flag and then press
TAB, the rest of the command will be automatically filled in.
ionosctl completion [shell], depending on the shell you are using.
ionosctluses the latest release of Cobra framework, which supports by default completion with descriptions for commands and flags. To disable it,
--no-descriptionsflag is available.
.bashrcfile and use:
TABkey in Bash is bound to
completereadline command. If you want to use
menu-completeappend the following line to
~/.zshrcfile, before you call the
~/.zshrcfile should contain the following two lines in the order given here:
Set-PSReadLineKeyHandler -Key Tab -Function <mode>
$PROFILEand verify it is created with
New-Item -Type File -Force $PROFILE.
. $PATH\ionosctl.ps1, where $PATH is absolute path to ionosctl.ps1 (for example . D:\ionoscloud\ionosctl.ps1)
Set-ExecutionPolicy RemoteSignedand restart the terminal. After you finish your work with ionosctl, you can run
Set-ExecutionPolicy Restrictedto disable running scripts.
-ooption. IonosCTL supports JSON format for all commands output by specifying
--output=json. By default, the output is set to
dev/null, except for error messages, you can use
--allflag to delete all the resources. The command iterates through all the resources and deletes them. If an error happens, it will be displayed after the entire iteration is done.
--colsoption with the list of desired fields.
TABin autocompletion, on
--colsoption on a specific resource, the available columns for that resource will be displayed.
--filters KEY1=VALUE1,KEY2=VALUE2. You can also use the