Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.97k forks source link

Documentation confusion for Azure Spot Placement Recommender CLI #30038

Open krtaiyang opened 4 days ago

krtaiyang commented 4 days ago

Describe the bug

First of all, the codes of Commands and Examples are different. 'compute-diagnostic ' and 'compute diagnostic', I don't know which one is correct.

Refer: Azure CLI guide- compute-diagnostic

Related command

az compute-diagnostic spot-placement-recommender generate or az compute diagnostic spot-placement-recommender generate

Errors

Commands: compute-diagnostic Examples: compute diagnostic Both writing methods failed to call.

Issue script & Debug output

Commands: compute-diagnostic Error Code: Message: The HTTP resource that matches the request URI 'https://eastus2.diagnostic.compute.azure.com/subscriptions/xxxx-8c09-45ac-88da-xxxx/providers/Microsoft.Compute/locations/eastus2/diagnostics/spotPlacementRecommender/generate' does not support the API version '2021-06-01-preview'.

Examples: compute diagnostic Error Code: 'compute' is misspelled or not recognized by the system.

Expected behavior

Correct call, and return the correct spot vm placement score info.

Environment Summary

azure-cli 2.64.0 core 2.64.0 telemetry 1.1.0 Extensions: compute-diagnostic-rp 1.0.0b1 Dependencies: msal 1.30.0 azure-mgmt-resource 23.1.1 Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\MyPC.azure\cliextensions' Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 21:52:07) [MSC v.1937 32 bit (Intel)] Legal docs and information: aka.ms/AzureCliLegal Your CLI is up-to-date.

Additional context

No response

yonzhan commented 4 days ago

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