Cloud CLI Concepts
This topic describes common terms related to Cloud CLI.
- Command
Commands are operation instructions provided by Cloud CLI to configure the working environment or call open APIs of cloud services.
The format of an API calling command is as follows:
cloud [options] <service> <operation> [--param1=paramValue1 --param2=paramValue2 ...]
The format of a system command is as follows:
cloud [options] <systemCommand> <operation> [--param1=paramValue1 --param2=paramValue2 ...]
In the following command for querying Elastic Cloud Servers (ECSs), service is ECS, operation is NovaListServers, and the common information required for calling the API is obtained from the profile named default:
cloud ECS NovaListServers --cli-profile=default - Operation
A unique name for a cloud service API released on API Explorer. You can query the operation list of a cloud service by using API Explorer or by running the cloud <service> --help command.
- Profile
Profiles store common information required for calling cloud service APIs. They can be defined by running Cloud CLI commands. All profiles constitute a configuration file, which is stored on your local host. When calling a cloud service API, you can specify a profile rather than manually inputting the common information.
The common information that can be set in a profile includes the access key (AK/SK), region (cli-region), project ID (cli-project-id), and account ID (cli-domain-id).
- Default profile
The profile to be used by default if no profile is specified in a command. Cloud CLI takes the profile that is last added or modified as the default. If the default profile is deleted, the earliest added profile among the remaining ones is used as the new default. You can run the cloud configure set --cli-profile=${profileName} command to change the default profile.
- Parameter
Parameters are classified into API parameters and Cloud CLI system parameters. API parameters are defined in cloud service APIs. System parameters are built-in parameters of Cloud CLI. The system parameters are used in a fixed mode and have specific meanings. For details, see the system parameter list.
- Option
Options are Cloud CLI system parameters that can be directly added to commands for calling APIs. Not all system parameters can be used as options. For details, see the option list.
- Metadata
Details about cloud services and their APIs that are obtained by Cloud CLI during command execution to verify and parse parameters. Remotely obtained metadata is stored locally to reduce network I/O and improve command response. A file that stores metadata is called a metadata cache file. For details, see Managing Metadata.
When using the offline mode, Cloud CLI downloads existing metadata, which is called an "offline metadata package".