-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot list all VMs in ResourceGroup due to InvalidApiVersion in Compute #10589
Comments
More compact sample: from azure.common.client_factory import get_client_from_cli_profile
from azure.mgmt.monitor import MonitorManagementClient
from azure.mgmt.compute import ComputeManagementClient
from azure.mgmt.resource import ResourceManagementClient
def test():
monitoring_client = get_client_from_cli_profile(MonitorManagementClient)
compute_client = get_client_from_cli_profile(ComputeManagementClient)
resource_client = get_client_from_cli_profile(ResourceManagementClient)
for g in resource_client.resource_groups.list():
for v in compute_client.virtual_machines.list(resource_group_name=g.name):
print([g,v]) packages:
|
clarkbreyman-yammer
changed the title
Service reporting compute v2019_12_01 as invalid
Cannot list all VMs in ResourceGroup due to InvalidApiVersion in Compute
Apr 1, 2020
Not a bug - was using ResourceGroup and not name is resource_Group_name parameter. |
openapi-sdkautomation bot
pushed a commit
to AzureSDKAutomation/azure-sdk-for-python
that referenced
this issue
Nov 13, 2020
Add track2 config to cosmosdb (Azure#10589)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Using the default api version, I get a response back indicating the api version is not supported. See below for stack trace.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Return list of virtual machines
Screenshots
N/A
Additional context
Stack trace:
Traceback (most recent call last):
File "", line 2, in
File "", line 4, in each_group
File "", line 5, in
File "", line 4, in each_group_vm
File "/Users/cbreym/dev/scratch/capacity/venv/lib/python3.5/site-packages/msrest/paging.py", line 143, in next
self.advance_page()
File "/Users/cbreym/dev/scratch/capacity/venv/lib/python3.5/site-packages/msrest/paging.py", line 129, in advance_page
self._response = self._get_next(self.next_link)
File "/Users/cbreym/dev/scratch/capacity/venv/lib/python3.5/site-packages/azure/mgmt/compute/v2019_12_01/operations/_virtual_machines_operations.py", line 916, in internal_paging
raise exp
msrestazure.azure_exceptions.CloudError: Azure Error: InvalidApiVersionParameter
Message: The api-version '2019-12-01' is invalid. The supported versions are '2020-01-01,2019-11-01,2019-10-01,2019-09-01,2019-08-01,2019-07-01,2019-06-01,2019-05-10,2019-05-01,2019-03-01,2018-11-01,2018-09-01,2018-08-01,2018-07-01,2018-06-01,2018-05-01,2018-02-01,2018-01-01,2017-12-01,2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
The text was updated successfully, but these errors were encountered: