Azure / azure-cli

Azure Command-Line Interface
MIT License
3.92k stars 2.89k forks source link

Problem with parameter --top using at "az apim api list" #29169

Open felipementel opened 1 month ago

felipementel commented 1 month ago

Describe the bug

Hello Team,

I´m working at a project with APIM and we need to filter using top 1 To this, we are using the command to list the fist API (this is to test and to verify witch parameter the command return)

the command is

az apim api list --resource-group rg-xxxx --service-name apim-yyy --top 1

And the return is not the first API, but full list

Can you verify it?

Related command

az apim api list --resource-group rg-xxxx --service-name apim-yyy --top 1

Errors

Not the top 1 item, but the full list

Issue script & Debug output

cli.knack.cli: Event: Cli.SuccessfulExecute [] cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x0000023C44B6E5C0>] az_command_data_logger: exit code: 0 cli.main: Command ran in 78.023 seconds (init: 0.864, invoke: 77.158) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 3690 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry__init__.pyc C:\Users\felipe.augusto.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

the top 1 of list of API´s at apim

Environment Summary

azure-cli 2.61.0

core 2.61.0 telemetry 1.1.0

Extensions: azure-devops 0.26.0

Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users\felipe.augusto.azure\cliextensions'

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

yonzhan commented 1 month ago

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

felipementel commented 3 weeks ago

@yonzhan, How are you? I know you have a lot of demands, but could you help with this item, please?