Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

API Version not valid #29913

Open mdaguete opened 2 months ago

mdaguete commented 2 months ago

Describe the bug

When reading an aks resource with "az resource show --ids" the following error is thrown:

(InvalidAPIVersion) API version '2024-08-01' is not valid Code: InvalidAPIVersion Message: API version '2024-08-01' is not valid

Related command

az resource show --ids /subscriptions/..../providers/Microsoft.ContainerService/managedClusters/xxxx

Errors

(InvalidAPIVersion) API version '2024-08-01' is not valid Code: InvalidAPIVersion Message: API version '2024-08-01' is not valid

Issue script & Debug output

az resource show --ids

Expected behavior

Return the correct AKS object.

Environment Summary

azure-cli 2.64.0

core 2.64.0 telemetry 1.1.0

Dependencies: msal 1.30.0 azure-mgmt-resource 23.1.1

Additional context

The same happends with Az powershell cmdllets.

yonzhan commented 2 months ago

Thank you for opening this issue, we will look into it.

skythet commented 2 months ago

I'm getting such error only West Europe kubernetes clusters, for North Europe clusters azcli works without problem

brechtvhb commented 2 months ago

Having the same problem when I try to update my cluster using devops (ARM).

zhoxing-ms commented 2 months ago

https://github.com/Azure/azure-cli/blob/9f506a39ebdf963001ab64b5db102f2e2c26a38d/src/azure-cli/azure/cli/command_modules/resource/custom.py#L4591-L4613

provider = rcf.providers.get(resource_provider_namespace)

Since the api-version used for command az resource show comes from the Resource Provider, it requires assistance from the ARM or ContainerService team to take a look

microsoft-github-policy-service[bot] commented 2 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @josephkwchan, @jennyhunter-msft.

DaveRuijter commented 2 months ago

What helped in our occasion was to specify the --api-version for now.. az resource show --api-version 2024-05-01

amit-shinde14 commented 2 months ago

Get-AzResourrce also throwing same Api version error since last 2-3 days. kindly prioritise the fix for this issue.

amit-shinde14 commented 2 months ago

@josephkwchan. , @jennyhunter-msft : any update?

jennyhunter-msft commented 1 month ago

We are still investigating from our side. Thank you for your patience.