Expose --delay and --max-attempts for wait commands (#1295)#10224
Expose --delay and --max-attempts for wait commands (#1295)#10224
Conversation
|
Added input validation for Since other CLI params don't check non-positive values at the CLI layer (they rely on botocore's But I found that
Added validation in $ aws ec2 wait instance-running --instance-ids i-123 --delay -1
aws: [ERROR]: --delay must be a non-negative integer, got -1
$ aws ec2 wait instance-running --instance-ids i-123 --max-attempts 0
aws: [ERROR]: --max-attempts must be a positive integer, got 0Added 7 unit tests covering rejection and acceptance boundaries. I'll also file a separate issue on botocore for adding the same validation in |
Issue #, if available:
Fixes #1295
Description of changes:
--delayand--max-attemptsarguments to waiter commands.WaiterConfigwhen invokingwaiter.wait().Description of tests:
python -m pytest tests/unit/customizations/test_waiters.py -q— all pass.Manual testing:
Verified the new flags appear in the generated help output:
I confirmed that
[--delay <value>]and[--max-attempts <value>]are listed in the synopsis and documented in the options section.Then I ran:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.