boto / botocore

The low-level, core functionality of boto3 and the AWS CLI.
Apache License 2.0
1.45k stars 1.06k forks source link

[WAF]aws waf list-* commands require limit argument #676

Closed quiver closed 8 years ago

quiver commented 8 years ago

When you run WAF's list commands(like $ aws waf list-web-acls), you end up with error: argument --limit is required error.

API doc : http://docs.aws.amazon.com/waf/latest/APIReference/API_ListWebACLs.html

This is inconsistent with other services' list-APIs that do not require --limit arguments.

Is this by design or just a bug?

IIRC, I reported a similar bug before, but I cloud't find it.

$ aws waf list-web-acls --debug
2015-10-07 14:25:09,503 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.8.10 Python/2.7.10 Linux/4.1.7-15.23.amzn1.x86_64, botocore version: 1.2.8
2015-10-07 14:25:09,504 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['waf', 'list-web-acls', '--debug']
2015-10-07 14:25:09,504 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_scalar_parsers at 0x7f0ab883f488>
2015-10-07 14:25:09,504 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider at 0x7f0ab8a735f0>
2015-10-07 14:25:09,521 - MainThread - botocore.hooks - DEBUG - Event service-data-loaded.waf: calling handler <function register_retries_for_service at 0x7f0ab92012a8>
2015-10-07 14:25:09,521 - MainThread - botocore.handlers - DEBUG - Registering retry handlers for service: waf
2015-10-07 14:25:09,523 - MainThread - botocore.hooks - DEBUG - Event building-command-table.waf: calling handler <function add_waiters at 0x7f0ab8a7b410>
2015-10-07 14:25:09,523 - MainThread - awscli.clidriver - DEBUG - OrderedDict([(u'next-marker', <awscli.arguments.CLIArgument object at 0x7f0ab819b3d0>), (u'limit', <awscli.arguments.CLIArgument object at 0x7f0ab819b410>)])
2015-10-07 14:25:09,524 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.waf.list-web-acls: calling handler <function add_streaming_output_arg at 0x7f0ab8bbe0c8>
2015-10-07 14:25:09,524 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.waf.list-web-acls: calling handler <function add_cli_input_json at 0x7f0ab8a6a938>
2015-10-07 14:25:09,524 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.waf.list-web-acls: calling handler <function unify_paging_params at 0x7f0ab8bc6140>
2015-10-07 14:25:09,524 - MainThread - botocore.hooks - DEBUG - Event building-argument-table.waf.list-web-acls: calling handler <function add_generate_skeleton at 0x7f0ab8a6ac80>
2015-10-07 14:25:09,524 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.waf.list-web-acls: calling handler <bound method CliInputJSONArgument.override_required_args of <awscli.customizations.cliinputjson.CliInputJSONArgument object at 0x7f0ab819b250>>
2015-10-07 14:25:09,525 - MainThread - botocore.hooks - DEBUG - Event before-building-argument-table-parser.waf.list-web-acls: calling handler <bound method GenerateCliSkeletonArgument.override_required_args of <awscli.customizations.generatecliskeleton.GenerateCliSkeletonArgument object at 0x7f0ab82218d0>>
usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument --limit is required
$ aws waf list-web-acls --limit 5
{
    "NextMarker": "ZZZ",
    "WebACLs": [
        {
            "WebACLId": "XXX",
            "Name": "waftest"
        },
        {
            "WebACLId": "YYY",
            "Name": "waf1demo"
        }
    ]
}
rayluo commented 8 years ago

Thanks for your quick comment! That required limit is currently a documented feature. But we are aware of this issue, and will reconsider this.

jamesls commented 8 years ago

Sorry for the confusion. This is not something we can fix on the CLI side. We'd need the service to relax the constraint of not making this a required field.

Closing issue as there's nothing actionable on the CLI side.

quiver commented 8 years ago

. This is not something we can fix on the CLI side. We'd need the service to relax the constraint of not making this a required field.

OK, I'll report this kind of issues to AWS Support Center directly.