华为云命令行工具服务 KooCLI-检查命令正确性

时间:2025-02-12 14:54:22

检查命令正确性

dryrun选项用于检查所传入命令的正确性。在命令中添加“--dryrun”选项,执行校验后打印请求报文,跳过实际运行,不调用目标API:

hcloud RDS CreateConfiguration --cli-region="cn-north-4" --project_id="0dd8cb****************19b5a84546" --datastore.type="MySQL" --datastore.version="5.7" --values.max_connections="10" --name="test-001" --description="test create configuration" --dryrun--------------------------------- dry-run模式跳过实际运行,当前请求为: ---------------------------------POST https://rds.cn-north-4.myhuaweicloud.com/v3/0dd8cb****************19b5a84546/configurationsContent-Type: application/jsonX-Project-Id: 0dd8cb****************19b5a84546X-Sdk-Date: 20220621T103331ZAuthorization: ****{  "datastore": {    "type": "MySQL",    "version": "5.7"  },  "description": "test create configuration",  "name": "test-001",  "values": {    "max_connections": "10"  }}
support.huaweicloud.com/usermanual-hcli/hcli_05_14.html