[QUERY] Unable to access usages api via the Azure.ResourceManager.Quota SDK
See original GitHub issueLibrary name and version
Azure.ResourceManager.Quota 1.0.0-beta.3
Query/Question
Hello,
when I try to access the usages api as described here: Usages- Get I get errors like this:
Message:
Azure.RequestFailedException : The resource type 'usages' could not be found in the namespace 'Microsoft.Quota' for api version '2023-02-01'. The supported api-versions are '2021-03-15-preview'.
Status: 404 (Not Found)
ErrorCode: InvalidResourceType
Content:
{"error":{"code":"InvalidResourceType","message":"The resource type 'usages' could not be found in the namespace 'Microsoft.Quota' for api version '2023-02-01'. The supported api-versions are '2021-03-15-preview'."}}
How can I set an api version since it is automatically defaulting to a newer one?
Is the usages api deprecrated? I am not able to find this information anywhere.
I am using the code snippet thats provided in the sample:
string scope = $"/subscriptions/{SubscriptionId}/providers/Microsoft.Compute/locations/{Region}";
ResourceIdentifier currentUsagesBaseResourceId = CurrentUsagesBaseResource.CreateResourceIdentifier(scope, resourceName);
CurrentUsagesBaseResource currentUsagesBase = ArmClient.GetCurrentUsagesBaseResource(currentUsagesBaseResourceId);
// invoke the operation
CurrentUsagesBaseResource result = await currentUsagesBase.GetAsync();
Environment
.NET SDK: Version: 7.0.203 Commit: 5b005c19f5
Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.203\
Host: Version: 7.0.5 Architecture: x64 Commit: 8042d61b17
.NET SDKs installed: 3.0.103 [C:\Program Files\dotnet\sdk] 6.0.408 [C:\Program Files\dotnet\sdk] 7.0.203 [C:\Program Files\dotnet\sdk] 7.0.300-preview.23122.5 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables: Not set
Issue Analytics
- State:
- Created 4 months ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hi, @aditigaur4 , Thank you for using Azure SDK for .NET. This issue is a service issue, looks like the API version is not ready for public ARM. We could provide you a work around, you could manually set the api version until service team fix this issue:
Hi @aditigaur4, since you haven’t asked that we
/unresolve
the issue, we’ll close this out. If you believe further discussion is needed, please add a comment/unresolve
to reopen the issue.