Demystifying Azure CLI pagnination

Demystifying Azure CLI pagnination


Pagination in the context of the command line refers to the process of displaying long lists of information or text in a way that makes it more manageable for the user. When you execute a command that generates a large amount of output, such as a directory listing or the contents of a file, it may not all fit on the screen at once. Pagination allows you to view the information one screenful (or page) at a time. 


The main role of pagination is to retrieve data from a large table chunk by chunk so that the client does not need to make an API call that has a huge payload. Smaller payload results in less latency. 

 Once the data is on the client side, navigating between pages is generally faster because it doesn't require additional requests to the server. The client can quickly switch between pages without waiting for network communication. 




What’s the interface look like when applied pagination 


  • --max-items parameter 

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in `--next-token` argument of a subsequent command. 


  • --next-tokens parameter 

Token to specify where to start paginating. This is the token value from a previously truncated response. 



Future Improvements: 

  • Provide options for filtering and sorting the data, allowing users to customize the output to their needs. 
  • Users can navigate through the pages of data using the arrow keys or by typing in a page number. 
  • Provide a summary of the total number of items and the current page number. 



We love to hear your feedback, please do not hesitate share your thoughts with us via the direct comment here, or email us [email protected].

To report an issue, please create a GitHub issue: https://github.com/Azure/azure-cli/issues/new/choose

Published on:

Learn more
Azure Tools Blog articles
Azure Tools Blog articles

Azure Tools Blog articles

Share post:

Related posts

Azure Communication Services May 2024 Feature Updates

Data Retention with Chat threads   Developers can now create chat threads with a retention policy between 30 and 90 days.  This feat...

11 hours ago

Azure Verified Modules - Monthly Update [May]

Quarterly Community Call This month we held our first community call. Thank you to everyone that attended & contributed. It was amazing t...

17 hours ago

Public preview: Create multiple prefixes for a subnet in an Azure Virtual Network

Create multiple prefixes for a subnet enables customers to easily scale their virtual machines and Azure Virtual Machine Scale Sets without th...

1 day ago

Announcing enhanced multicloud integration enabled by Azure Arc

We are thrilled to announce a new set of capabilities for multicloud customers, making it easier than ever to manage cloud resources from a ce...

1 day ago

Simplifying Cloud Security with Azure Firewall Manager and Illumio

Introduction In today’s dynamic and ever-evolving cloud environment, ensuring strong security measures is essential. This involves not only im...

1 day ago

Announcing Zone Redundancy and Multi-Region Capabilities in Azure Landing Zones

In today's dynamic business environment, the resilience of cloud infrastructure is not just a preference but a necessity. We are thrilled to ...

1 day ago

Public Preview: Customer Managed Planned Failover for Azure Blob and Azure Data Lake Storage Gen2

Azure Blob is excited to announce customer managed Planned Failover for Azure Blob and Azure Data Lake Gen2 is now available in public preview...

2 days ago

Public Preview: Customer Managed Planned Failover for Azure Storage

Azure Storage is excited to announce customer managed Planned Failover for Azure Storage is now available in public preview.   Over the p...

2 days ago

General Availability of SQL FCI and AG Features SQL Server Enabled by Azure Arc

We have good news. Two business continuity features for SQL Server enabled by Azure Arc are now generally available: View Failover Cluster In...

5 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy