Does the Azure CLI SDK use the Azure Rest API internally? And if so any further details on how these relate to each other internally would be great.
Azure CLI is a command-line tool to create and manage resources. You interact with Azure by running commands in a terminal or writing scripts to automate tasks. Azure CLI interacts with the Azure Resource Manager (ARM) service, which is the management layer to interact with resources in your account.
The Azure CLI is a cross-platform toolset written in Python that allows you to manage nearly all of your Azure resources from the command line.
The Azure CLI for Windows can also be used from a browser through the Azure Cloud Shell or run from inside a Docker container. For Windows, the Azure CLI is installed via a MSI, which gives you access to the CLI through the Windows Command Prompt (CMD) or PowerShell.
Yes, you are right. Azure CLI uses Azure Rest APi.
If you use --debug
, you will find the API the command use. For example:
az vm list --debug
Yes, as Johan said, Azure Power Shell/CLI, SDK all call Azure Rest API. If you use debug mode, you could see the API. More information about Azure Rest API, you could check this link.
Each service in Azure exposes a set of APIs. For managing/creating/updating your resources (e.g. creating a Virtual Machine), these are REST calls. Note: Other services may use non-HTTP/REST APIs (e.g. AMQP for Azure Service Bus).
While you can use your favorite HTTP networking stack or utility (e.g. curl, postman etc.) to make HTTP/REST calls, Microsoft publishes a set of SDKs to make things easier to develop applicationsin various languages.
The Azure CLI happens to be implemented in python, and thus makes use of the Azure Python SDKs to get its work done.
There is no separate Azure CLI SDK, however.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With