Querying System Parameters in the Profile List
KooCLI supports multiple profiles. Run the following command to query system parameters in the profile list. The query result can be output in a table or in JSON or TSV format. By default, the query result is output in JSON format.
hcloud configure list
hcloud configure list { "language": "cn", "offline": "true", "agreePrivacy": "true", "current": "test", "profiles": [ { "name": "default", "mode": "AKSK", "accessKeyId": "H9N****MXW", "secretAccessKey": "****", "securityToken": "", "xAuthToken": "", "expiresAt": "", "region": "eu-west-101", "projectId": "060576****************134588f135", "domainId": "", "skipSecureVerify": "false", "readTimeout": 10, "connectTimeout": 5, "retryCount": 0, "agencyDomainId": "", "agencyDomainName": "", "agencyName": "", "sourceProfile": "" }, { "name": "test", "mode": "AKSK", "accessKeyId": "8NV****IOV", "secretAccessKey": "****", "securityToken": "", "xAuthToken": "", "expiresAt": "", "region": "eu-west-101", "projectId": "", "domainId": "", "skipSecureVerify": "false", "readTimeout": 10, "connectTimeout": 5, "retryCount": 0, "agencyDomainId": "", "agencyDomainName": "", "agencyName": "", "sourceProfile": "" } ] }
The values of sensitive parameters are anonymized.
Use --cli-query to filter the query result, and use --cli-output to specify the output format. The default output format is JSON. For example, output the query result in JSON format and filter the AK/SK in each profile:
hcloud configure list --cli-output=json --cli-query="profiles[].{Name:name,AK:accessKeyId,SK:secretAccessKey}" [ { "AK": "H9N****MXW", "Name": "default", "SK": "****" }, { "AK": "8NV****IOV", "Name": "test", "SK": "****" } ]
To output the query result in a table, add --cli-output=table in the command.
hcloud configure list --cli-output=table --cli-query="profiles[].[name,accessKeyId,secretAccessKey,projectId]"
To output the query result in TSV format, add --cli-output=tsv in the command.
hcloud configure list --cli-output=tsv --cli-query="profiles[0].[name,accessKeyId,secretAccessKey,projectId]"
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.