[BUG] [Fix mentioned] [Easy fix] "ApplicationInsightsManagementClient.Workbooks" methods throw "InvalidApiVersionParameter"
See original GitHub issueLibrary name and version
Microsoft.Azure.Management.ApplicationInsights v0.3.0-preview
Describe the bug
All these “Workbooks” methods throw “InvalidApiVersionParameter”:
- ListByResourceGroup + Async
- Get + Async
How to fix: Correct the URI in “https://github.com/Azure/azure-sdk-for-net/blob/4162f6fa2445b2127468b9cfd080f01c9da88eba/sdk/applicationinsights/Microsoft.Azure.Management.ApplicationInsights/src/Generated/WorkbooksOperations.cs” Lines: 145, 367, 575, 780, 1023
Actual: subscriptions/{subscriptionId}/resourceGroup/… Should be: subscriptions/{subscriptionId}/resourceGroups/… (Plural)
Expected behavior
Should return each workbook’s metadata.
Actual behavior
{“error”:{“code”:“InvalidApiVersionParameter”,“message”:“The api-version ‘2015-05-01’ is invalid. The supported versions are ‘2022-03-01-preview,2022-01-01,2021-04-01,2021-01-01,2020-10-01,2020-09-01,2020-08-01,2020-07-01,2020-06-01,2020-05-01,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’.”}}
Reproduction Steps
DefaultAzureCredential defaultCreds = new DefaultAzureCredential(new DefaultAzureCredentialOptions()); var token = defaultCreds.GetToken(new TokenRequestContext(new string[] { "https://management.azure.com" })); TokenCredentials tokenCreds = new TokenCredentials(token.Token); ApplicationInsightsManagementClient client = new ApplicationInsightsManagementClient(tokenCreds); client.SubscriptionId = "removed"; var test = client.Workbooks.ListByResourceGroup("removed", "removed")
--> Throws “InvalidApiVersionParameter”
Environment
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @arpitadessai Thank you for the feedback. Since our .NET Track1 SDK will get retired soon, all issues besides security effected ones won’t be fixed any more. I suggest you could move to our new .NET Track2 SDK: Azure.ResourceManager.ApplicationInsights