- 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
- Generating API Input Parameter Skeleton in JSON Format
- Checking Command
- Specifying Region
- Calling APIs with AK/SK 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
- Polling Results
- Obtaining CLI Examples on API Explorer
- Using KooCLI in Non-configuration Mode
- Online Experience
- 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
- General Reference
Show all
Copied.
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 add a profile in non-interactive mode, see Adding or Modifying a Profile.
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, ap-southeast-1. |
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/intl/en-us/usermanual-hcli/hcli_09.html'. Access Key ID [required]: ******** Secret Access Key [required]: **** Secret Access Key (again): **** Region: ap-southeast-1 ******************************************************** ***** ***** ***** 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 versions earlier than 1.2.7 display sensitive information of query results in ciphertext. KooCLI 1.2.7 and later versions anonymize the sensitive information.
hcloud configure show --cli-profile=default
hcloud configure show --cli-profile=default { "name": "default", "mode": "AKSK", "accessKeyId": "********", "secretAccessKey": "****", "securityToken": "", "region": "ap-southeast-1", "projectId": "", "domainId": "", "skipSecureVerify": "false", "readTimeout": 10, "connectTimeout": 5, "retryCount": 0 }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot