Azure / Azure/azure-rest-api-specs
Unable to filter by multiple provisioningState on deployment list
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
- **Package Name**:
azure-mgmt-resource
- **Package Version**:
22.0.0
- **Operating System**:
Ubuntu
- **Python Version**:
3.10.8
**Describe the bug**
I am unable to retrieve deployments when filtering by provisioning state with OR operator. I tried the filter query with REST API and it works.
```
azure.core.exceptions.HttpResponseError: (InvalidProvisioningStateFilter) Invalid $filter 'provisioningState eq 'accepted' or provisioningState eq 'updating'' specified in the query string.
Code: InvalidProvisioningStateFilter
Message: Invalid $filter 'provisioningState eq 'accepted' or provisioningState eq 'updating'' specified in the query string.
```
**To Reproduce**
Steps to reproduce the behavior:
```
ResourceManagementClient(...).deployments.list_by_resource_group(
resource_group_name=,
filter="provisioningState eq 'accepted' or provisioningState eq 'updating'",
)
```
**Expected behavior**
I expect to retrieve the list of deployments with provisioning state accepted or running.
Contributor guide
Assessment
This issue has not been assessed yet.