Open ash-dey-sa opened 1 month ago
Hey, thanks for the issue. Seems like you are getting Python objects QueryColumn
which have the name
and type
properties when you expect the JSON/dict representation of it (i.e. the Python object deserialized) in the response?
@msyyc Is this expected?
@pvaneck, the primary problem due to the bug is the JSON output returned by the query is missing all the tags for the resource groups. Other information seems to be returned as expected i.e. resource group name, subscription name, costs etc. Expected out put should include an array of each resource group tags along with other values specified above.
@ChenxiJiang333 Please help on this issue
got it
Hi @ash-dey-sa, the issue occurs because the model QueryDataset
does not have the property include
, which caused serialization bug to build the correct request body. And since SDKs is auto generated by swagger definitions, I have opened issue https://github.com/Azure/azure-rest-api-specs/issues/29719 to request an update for the swagger. Once the swagger is updated, python would release a new version to fix the issue.
Look forward to the bug fix. Thank you for your help.
Hope we can have a quick response.
Describe the bug CostManagementClient does not return tags associated with resource groups
To Reproduce Steps to reproduce the behavior:
Run CostManagementClient with the following query.
The type column output I get
'columns': [<azure.mgmt.costmanagement.models._models_py3.QueryColumn object at 0x7f757ca238d0>, <azure.mgmt.costmanagement.models._models_py3.QueryColumn object at 0x7f757ca23950>, <azure.mgmt.costmanagement.models._models_py3.QueryColumn object at 0x7f757ca23990>, <azure.mgmt.costmanagement.models._models_py3.QueryColumn object at 0x7f757ca239d0>, <azure.mgmt.costmanagement.models._models_py3.QueryColumn object at 0x7f757ca23a10>]
Expected behavior The column output should be as per below (which can be validated from API play ground in Azure portal by running the same query with latest API version i.e. "2023-11-01"). the scope
/subscriptions/{subscription_id}/providers/Microsoft.CostManagement/query?api-version=2023-11-01
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Tried to run the cost management client by specifying the latest version of API, but still does not work.
cost_management_client = CostManagementClient(credential=cost_credential, api_version="2023-11-01")