Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not clear which parameters are required #48

Closed
jongio opened this issue Oct 5, 2018 · 4 comments
Closed

Not clear which parameters are required #48

jongio opened this issue Oct 5, 2018 · 4 comments
Assignees

Comments

@jongio
Copy link
Member

jongio commented Oct 5, 2018

Entered
az iot device send-d2c-message

Got this
image

I would like some indication that tells me which parameters are required.

@digimaun
Copy link
Member

digimaun commented Oct 10, 2018

I'm using azure cli 2.0.46 and iot extension 0.6.0

When entering az iot device send-d2c-message there is a notification before the usage info:

az iot device send-d2c-message: error: the following arguments are required: --device-id/-d

To expand the parameters and see clear indicator for required, append -h or --help to the command i.e. az iot device send-d2c-message -h:

Command
az iot device send-d2c-message : Send an mqtt device-to-cloud message.
Supports application and system properties to send with message.

Arguments
--device-id -d [Required] : Target Device.
--da --data : Message body. Default: Ping from Az CLI IoT Extension.
...

Try testing the required param notification with commands that have multiple required params

Input:
az iot hub configuration create

Output:

az iot hub configuration create: error: the following arguments are required: --config-id/-c, --content/-k

@jongio
Copy link
Member Author

jongio commented Oct 11, 2018

If I provide -d, then it tells me I also need to provide a iot hub name or connection string.

image

Would be good for user to know that either one of those are required as well.

@jongio
Copy link
Member Author

jongio commented Jul 29, 2021

@digimaun can this be closed?

@digimaun
Copy link
Member

digimaun commented Jul 29, 2021

Yea -- we have an upcoming release including change #389 which improves visibility + description of --hub-name and --login in --help. Combined with improved Az CLI usage error output (which will output command examples) and an investigation activity for usage of argparse mutual exclusion #398.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants