Esta página aún no está disponible en su idioma local. Estamos trabajando arduamente para agregar más versiones de idiomas. Gracias por tu apoyo.
- Function Overview
- What's New
- Service Overview
- Getting Started
-
User Guide
- Configuration Management
- HTTP Proxy
- Commonly Used Commands
-
Options
- Option Overview
- Printing Help Information
- Printing Debugging Information
- Checking Command
- Specifying Region
- Calling APIs with an Account in Non-configuration Mode
- Calling APIs with AK/SK in Non-configuration Mode
- Calling APIs with a Token in Non-configuration Mode
- Calling APIs Using an Agency in Non-configuration Mode
- Specifying Account ID
- Specifying Profile
- Specifying Authentication Mode
- Specifying Output Format
- Passing API Parameters with JSON File
- Specifying Request Timeouts
- Specifying Retry Count
- Skipping HTTPS Request Certificate Verification
- Specifying a Domain Name
- Obtaining CLI Examples on API Explorer
- Using KooCLI in Non-configuration Mode
- Obtaining Authentication Information
-
FAQs
- Overview
- Authentication
- Profiles
- Metadata Cache
- Logs
- Network Connections
- Cloud Services
- Cloud Service APIs
- Regions
-
Parameters
- What Are KooCLI System Parameters?
- Why Am I Seeing a Message Indicating an Invalid Parameter?
- Why Are Old and New KooCLI System Parameters (Such as region and cli-region) Available? Which Parameters Are Recommended?
- Why Am I Seeing a Message Indicating a Duplicate Parameter?
- How Do I Use cli-jsonInput?
- When Can I Use cli-jsonInput?
- Why Am I Seeing a Message Indicating an Unsupported Parameter Position or Type?
- How Do I Leave a Body Parameter Empty for Cloud Service APIs?
- Interactive Mode and Autocomplete
-
Output Formats
- What Output Formats Are Supported by KooCLI?
- How Do I Define a JMESPath Expression?
- Which KooCLI System Parameters Are Related to Data Output? Which Ones Are Recommended?
- How Do I Use cli-output, cli-query, and cli-output-num?
- How Do I Use cli-output-rows, cli-output-cols, and cli-output-num? What Are the Precautions?
- How Do I Use cli-json-filter? What Are the Precautions?
- Other
- Videos
Show all
Step 3: (Optional) Initialize Configurations
This section uses Windows as an example to describe how to use KooCLI. The methods for using the CLI in Linux and macOS are similar.
If you want to use KooCLI in non-configuration mode, skip this step. To configure parameters for another authentication mode in a profile, see Adding or Modifying Profiles.
The KooCLI initialization command is used to store the permanent AK/SK and region information you often use (see the following table) in the configuration file, eliminating the need for frequently entering the information during operations.
Parameter |
Description |
---|---|
Access Key ID |
(Required) Access key ID (AK) of the access key (permanent AK/SK). |
Secret Access Key |
(Required) Secret access key (SK) of the access key (permanent AK/SK). |
Region |
(Optional) Region, for example, eu-west-101. |
After typing in this command, press Enter to go to the interactive mode, and set the parameters as prompted.
hcloud configure init
hcloud configure init Starting initialization. 'Secret Access Key' is anonymized. To obtain the parameter, see 'https://support.huaweicloud.com/eu/usermanual-hcli/hcli_09.html'. Access Key ID [required]: H9NNF********SG65MXW Secret Access Key [required]: **** Secret Access Key (again): **** Region: eu-west-101 ******************************************************** ***** ***** ***** Initialization successful ***** ***** ***** ********************************************************
- During initialization, you need to enter an SK for Secret Access Key twice. The value you enter is anonymized to ensure account security. The entered characters are displayed as asterisks (*) after you press Enter. After the configuration is complete, KooCLI encrypts sensitive authentication information in the profiles and saves the information to a local directory.
- If you run the initialization command again, the existing configuration file is deleted and a new file is generated. The path for storing the new configuration file is as follows:
- Windows OS: C:\Users\{Your Windows username}\.hcloud\config.json
- Linux OS: /home/{Current username}/.hcloud/config.json
- macOS: /Users/{Current username}/.hcloud/config.json
After initialization, you can run the following command to query the configuration information. KooCLI anonymizes the sensitive information of query results.
hcloud configure show --cli-profile=default
hcloud configure show --cli-profile=default { "name": "default", "mode": "AKSK", "accessKeyId": "H9N****MXW", "secretAccessKey": "****", "securityToken": "", "xAuthToken": "", "expiresAt": "", "region": "eu-west-101", "projectId": "", "domainId": "", "skipSecureVerify": "false", "readTimeout": 10, "connectTimeout": 5, "retryCount": 0, "agencyDomainId": "", "agencyDomainName": "", "agencyName": "", "sourceProfile": "" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.