azure-sdk-for-python: azure-mgmt-resourcegraph 7.0.0 The resource type 'resources' could not be found in the namespace 'Microsoft.ResourceGraph' for api version '2020-04-01-preview'.
- Package Name:
- azure-mgmt-resourcegraph
- Package Version:
- 7.0.0
- Operating System:
- Windows 10
- Python Version:
3.7
Describe the bug
①Get resourcegraph_client as bellow
resourcegraph_client = ResourceGraphClient( credential=credential, base_url="https://management.chinacloudapi.cn/", credential_scopes = ["https://management.chinacloudapi.cn/.default"] )
②Build Query and send queryquery = QueryRequest( query='project id, tags, properties | limit 2', subscriptions=[SUBSCRIPTION_ID] ) query_response = resourcegraph_client.resources(query)
③ Call failed,error message like this azure.core.exceptions.ResourceNotFoundError: (InvalidResourceType) The resource type ‘resources’ could not be found in the namespace ‘Microsoft.ResourceGraph’ for api version ‘2020-04-01-preview’. The supported api-versions are ‘2018-09-01-preview,2019-04-01’.
④ changed the api version,but still call failed
resourcegraph_client._config.__setattr__("api_version","2019-04-01")
Please help troubleshoot and solve this issue
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (8 by maintainers)
For Mooncake, we don’t have the support for 2020-04-01-preview; we published latest api-version 2021-03-01 instead. Please use the 2021-03-01 api-version.