List_metrics method's Filter needs Timgrain within
https://docs.microsoft.com/en-us/python/api/azure-mgmt-cosmosdb/azure.mgmt.cosmosdb.operations.databaseaccountsoperations?view=azure-python#list-metrics-resource-group-name--account-name--filter----kwargs-
When customer uses the Python Azure SDK to get the metrics associated with the Cosmos DB account/Database, the filter needs to have the Timegraing included. Otherwise, it throws HTTP 400 error. This requirement is not listed anywhere in our documentations and customer found this wasted their time and we had to engage the engineering team to help.
Example, the filter should be in the format as follow; filter="(name.value eq 'Available Storage' or name.value eq 'Data Size' or name.value eq 'Index Size') and timeGrain eq duration'PT5M'")
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 786e652b-4a1f-2c69-864a-d592e18339ac
- Version Independent ID: 52e33c99-36c2-8629-f890-e837f4c5c765
- Content: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations class
- Content Source: docs-ref-autogen/azure-mgmt-cosmosdb/azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations.yml
- GitHub Login: @lmazuel
- Microsoft Alias: lmazuel
Thanks for the feedback, we’ll investigate asap.
swagger example should also be updated and I create issue : https://github.com/Azure/azure-rest-api-specs/issues/15875
@msyyc @xiangyan99 Should this issue be closed? It appears to be resolved.
Hi @IrangaSubasingheMSFT. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.
Hi @IrangaSubasingheMSFT, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.