简体   繁体   English

Azure CLI是否使用Azure Rest API

[英]Does the Azure CLI use the Azure Rest API

Does the Azure CLI SDK use the Azure Rest API internally? Azure CLI SDK是否在内部使用Azure Rest API? And if so any further details on how these relate to each other internally would be great. 如果是这样的话,任何关于内部如何相互关联的进一步细节都会很棒。

Yes, you are right. 是的,你是对的。 Azure CLI uses Azure Rest APi. Azure CLI使用Azure Rest APi。

If you use --debug , you will find the API the command use. 如果使用--debug ,您将找到命令使用的API。 For example: 例如:

az vm list --debug

Yes, as Johan said, Azure Power Shell/CLI, SDK all call Azure Rest API. 是的,正如Johan所说,Azure Power Shell / CLI,SDK都称为Azure Rest API。 If you use debug mode, you could see the API. 如果使用调试模式,则可以看到API。 More information about Azure Rest API, you could check this link . 有关Azure Rest API的更多信息,您可以查看此链接

Each service in Azure exposes a set of APIs. Azure中的每项服务都公开了一组API。 For managing/creating/updating your resources (eg creating a Virtual Machine ), these are REST calls. 为了管理/创建/更新资源(例如创建虚拟机 ),这些是REST调用。 Note: Other services may use non-HTTP/REST APIs (eg AMQP for Azure Service Bus ). 注意:其他服务可能使用非HTTP / REST API(例如,用于Azure Service Bus的 AMQP)。

While you can use your favorite HTTP networking stack or utility (eg curl, postman etc.) to make HTTP/REST calls, Microsoft publishes a set of SDKs to make things easier to develop applicationsin various languages. 虽然您可以使用自己喜欢的HTTP网络堆栈或实用程序(例如curl,postman等)进行HTTP / REST调用,但Microsoft会发布一组SDK,以便更轻松地开发各种语言的应用程序。

The Azure CLI happens to be implemented in python , and thus makes use of the Azure Python SDKs to get its work done. Azure CLI恰好在python中实现,因此使用Azure Python SDK来完成其工作。

There is no separate Azure CLI SDK, however. 但是,没有单独的Azure CLI SDK。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM