Mastering the Shorthand Syntax in your daily workflow
Introduction
In this tech blog, we'll unravel the magic behind Azure CLI shorthand syntax and discover how it can elevate your command-line experience.
By unlocking the potential of Azure CLI Shorthand Syntax, we want to make your command-line experience as smooth as possible.
Quick walkthrough
- Full Value Format: JSON without the quotes, making complex objects a breeze.
- Partial Value Format: Simplifying commands with key-value simplicity.
- Combine Full Value and Partial Value for ultimate flexibility.
- ?? for Help: Use ?? to reveal helpful hints, making your life easier.
- Passing null Values: Effortlessly handle null values in both Full Value and Partial Value formats.
Pass null in Full Value:
Pass null in Partial Value:
Single Quotes String is used to pass a string value with special characters: `:`, `,`, `{`, `}`, `[`, `]`, `null`, `??` and space. Because those characters usually have other meanings when parsing shorthand syntax. So with single quotes, it tells parser to parse as a string only.
- Pass a String Value with Space and Special Characters
- Pass a "null" String Value
Need to pass a string with the value "null"? Single Quotes String to the rescue:
- Use '/ to Pass ': Handling the tricky single quote within a Single Quotes String? Use '/ to navigate smoothly:
Overall, our shorthand syntax is designed to streamline command creation, making it more concise and intuitive for day-to-day development around Azure CLI. By condensing commonly used parameters, it not only saves keystrokes but also enhances readability which will greatly beneficial to our codebase and CLI developer community.
Published on:
Learn moreRelated posts
Unlocking the Best of Azure with AzureRM and AzAPI Providers
With the recent release of AzAPI 2.0, Azure offers two powerful Terraform providers to meet your infrastructure needs: AzureRM and AzAPI. The ...
Announcing AzAPI 2.0
The AzAPI provider, designed to expedite the integration of new Azure services with HashiCorp Terraform, has now released 2.0. This updated ve...
Azure CLI docker container base Linux image is now Azure Linux
Starting from the version 2.64.0 of Azure CLI, the base Linux distribution of Azure CLI is now Azure Linux. Impact of the change ...
Azure Verified Modules - Monthly Update [June]
AVM Module Summary The AVM team are excited that our community have been busy building AVM Modules. As of June 17th, the AVM Footprint curren...
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...
Azure CLI and PowerShell Tools Build 2024 Announcement
Microsoft has announced several new capabilities for Azure CLI and Azure PowerShell at the Microsoft Build 2024. The priority remains to provi...
Terraform on Azure May 2024 Update
Welcome to our April 2024 update! These blogposts will be covering everything we've gotten up to recently with Terraform on Azu...
Azure Verified Modules - Monthly Update [April]
In the April edition of the Azure Verified Modules update, the AVM team announces their upcoming quarterly community call scheduled for 21st M...
Announcing AzAPI Dynamic Properties
It’s been almost two years since the announcement of AzAPI, and the provider has eclipsed 20M+ downloads thanks to all of you. We’re ex...
Demystifying Azure CLI pagnination
Introduction Pagination in the context of the command line refers to the process of displaying long lists of information or text i...