- 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.
Why Am I Seeing a Message Indicating a Duplicate Parameter?
Background
KooCLI checks the validity of parameters during command execution. If a command contains duplicate parameters, different error messages will be displayed accordingly. For example:
- [USE_ERROR] Duplicate parameter: *
- [USE_ERROR] Duplicate *. Change the key of the KooCLI system parameter to cli-*.
- [USE_ERROR] Duplicate *. Enter the API parameter using '--cli-jsonInput=xx'. For details, see...
Among the KooCLI system parameters, some have two forms, for example, --region and --cli-region. This happens because some parameters of cloud service APIs may have the same names as system parameters.
Solution
- If the first error message is displayed, duplicate non-system parameters may exist in the command. Check whether the parameters are entered correctly. This error may also occur when the system parses the command content. If the parameter value contains special characters, enclose the value with double quotation marks ("") to prevent parsing errors.
- If the second error message is displayed, a duplicate old system parameter exists in the command. Run the hcloud <service> <operation> --help command and compare the value of Params in the command output (that is, the parameter list of the current API) to check whether the parameter exists in the target API or whether a parameter with a custom name (that is, the parameter whose name is {*}) exists. If not, check whether the input is correct. If yes, use the two parameters with the same name for different purposes, one as a parameter of the target API, and the other as a system parameter. Replace the old system parameter in the command with the new one as prompted. If a command contains both the old and new forms of a system parameter, for example, --cli-region=${regionValue1} --region=${regionValue2}, KooCLI automatically identifies the usage of each parameter based on the parameter list of the current API.
- If the target API has the region parameter or a parameter with a custom name, KooCLI automatically identifies --cli-region as a system parameter and uses its value to obtain details about the target API. KooCLI identifies --region as a parameter of the target API and uses its value to call the API.
- If the target API does not have the region parameter or a parameter with a custom name, KooCLI automatically identifies --cli-region as a system parameter and uses its value to obtain details about the target API. KooCLI ignores --region passed to the command.
When you construct KooCLI commands, use the new system parameters to prevent errors or interactions caused by parameter conflicts.
- If the third error message is displayed, a duplicate new system parameter exists in the command. Run the hcloud <service> <operation> --help command and compare the value of Params in the command output (that is, the parameter list of the current API) to check whether the parameter exists in the target API or whether a parameter with a custom name (that is, the parameter whose name is {*}) exists. If not, check whether the input is correct. If yes (this conflict rarely occurs), write the API parameters in the command into the cli-jsonInput file and call the command using this JSON file.
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