Open wiwski opened 1 year ago
Thank you for your feedback. This has been routed to the support team for assistance.
Hi @wiwski
Please try the following:
ResourceManagementClient(...).deployments.list_by_resource_group(
resource_group_name=<resource_group_name>,
filter="provisioningState eq '{accepted}' or provisioningState eq '{updating}'",
)
Hi @Wzb123456789,
Thanks for the support. I am getting the same error with your suggestion.
ongoing_deployments = self._resource_mgmt_client.deployments.list_by_resource_group(
resource_group_name=self.resource_group_name,
filter="provisioningState eq '{accepted}' or provisioningState eq '{updating}'",
)
Code: InvalidProvisioningStateFilter
Message: Invalid $filter 'provisioningState eq '{accepted}' or provisioningState eq '{updating}'' specified in the query string.
Is it working on your side ?
Hi, any update on this ? Is this something that is not just posible at the REST API level ?
@wiwski sorry for the delay on this one. I am able to reproduce this and as per my understanding it looks like a limitations at services end as the Deployments REST API is also not able to handle filters with multiple conditions. Please check the below response -
@Wzb123456789 Can you please look into this.
Hello,
Any update on this issue ?
I just noticed ne
(for not equal) filter is not available as well. It would be great at least to have this (to filter out Succeeded
deployment).
Thanks !
Please help on this issue @ChenxiJiang333
got it
Hi @wiwski, provisioningState eq 'accepted' or provisioningState eq 'updating
should be a correct odata syntax, yet I don't know somehow the api does not accept it, since it's a service issue, python sdk can not make any change on it. So I would transfer this issue to seek help from service team.
Just following up on this, I'm trying to filter resource groups that are not provisioning, but this filter is not working
provisioningState ne 'deleting'
I receive
{
"error": {
"code": "InvalidFilterInQueryString",
"message": "Invalid $filter 'provisioningState ne 'deleting'' specified in the query string."
}
}
It seems you can't filter on provisioningState
at all?
A filter of provisioningState eq 'succeeded'
gives the same error
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.
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect to retrieve the list of deployments with provisioning state accepted or running.