[英]How to get the virtual machine name that my app is running on in azure
I have a java application running on an azure virtual machine Is there an API to get details on this VM?我有一个 java 应用程序在 azure 虚拟机上运行 是否有 API 以获取有关此 VM 的详细信息? Specifically I need to get the VM name具体来说,我需要获取 VM 名称
Here is a REST API you can use that I found in Azure's docs: https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/get .这是一个 REST API 你可以使用我在 Azure 的文档中找到的: https://docs.microsoft.com/en-us/gettualmachine/compute
Usually from within the guest OS you cannot retrieve any sensitive information about the underlying VM without using external APIs because that will be a huge security vulnerability.通常在来宾操作系统中,如果不使用外部 API,您将无法检索有关底层 VM 的任何敏感信息,因为这将是一个巨大的安全漏洞。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.