aws / aws/aws-cli

Documentation states --filters in AWS batch list-jobs supports multiple values but it does not

Open
#7,982 1 comment 0 reactions 0 assignees View on GitHub
batch bug documentation p3 shorthand syntax
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the issue

AWS batch job `list-jobs` [documentation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/batch/list-jobs.html) states that [Only one filter can be used at a time. ](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/batch/list-jobs.html#:~:text=Only%20one%20filter%20can%20be%20used%20at%20a%20time.)

As per [this](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/batch/list-jobs.html#:~:text=Shorthand%20Syntax%3A,%7D%0A%20%20...%0A%5D), multiple values can be specified in the `--filters`.

Shorthand Syntax:
`name=string,values=string,string ...
`
JSON Syntax:

```
[
{
"name": "string",
"values": ["string", ...]
}
...
]

```

But when I run `aws batch list-jobs --job-queue my-queue-name --filters "name=JOB_NAME,values=first-job-name,second-job-name"`, it gives error like `An error occurred (ClientException) when calling the ListJobs operation: Error executing request, Exception : Filter cannot take more than one value., RequestId: 3947ee8e-9891-4f2e-a02d-0cfe9ff86a35`

AWS CLI Version: `aws-cli/2.12.1 Python/3.11.3 Linux/5.19.0-43-generic exe/x86_64.ubuntu.22 prompt/off`

Am I missing something here in comprehending the documentation or documentation truly states otherwise than the supported feature?

### Links

https://awscli.amazonaws.com/v2/documentation/api/latest/reference/batch/list-jobs.html

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.