Azure / azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
https://docs.microsoft.com/azure/developer/go/
MIT License
1.65k stars 847 forks source link

Not able to fetch VM software inventories using armsecurity package #23442

Open blesniewski opened 2 months ago

blesniewski commented 2 months ago

Bug Report

 // Created New client 
  svc, err := armsecurity.NewSoftwareInventoriesClient(cl.SubscriptionId, cl.Creds, cl.Options)
 // got the pager
  pager := svc.NewListByExtendedResourcePager(rgName, rNamespace, rType, rName, &armsecurity.SoftwareInventoriesClientListByExtendedResourceOptions{})
  // tried using the pager

I keep getting errors such as this:

"{
  "error":{
     "code":"NoRegisteredProviderFound",
     "message":"No registered resource provider found for location 'westeurope' and API version '2021-05-01-preview' for type 'virtualMachines'. The supported api-versions are '2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-04-30-preview, 2016-08-30, 2017-03-30, 2017-12-01, 2018-04-01, 2018-06-01, 2018-10-01, 2019-03-01, 2019-07-01, 2019-12-01, 2020-06-01, 2020-12-01, 2021-03-01, 2021-04-01, 2021-07-01, 2021-11-01, 2022-03-01, 2022-08-01, 2022-11-01, 2023-03-01, 202...+631 more"

The output is truncated but I think the core of the problem is visible, when I look into the actual package on github I can see this line which sets the API version https://github.com/Azure/azure-sdk-for-go/blob/500650cf709907ff0dc0a11180547467407f1a06/sdk/resourcemanager/security/armsecurity/softwareinventories_client.go#L185

Thanks

github-actions[bot] commented 2 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @chlahav.