我们如何获得使用c#创建Azure vm的域名..只是想知道是否有任何api...
试过了
ComputeManagementClient.Deployments.GetBySlot
但返回DeploymentGetResponse
没有域信息
Now that you have described in little more details what you are trying to achieve, you need the domain under which the VM is joined but not under which the VM is deployed. Because your AD certainly does not have control over *.cloudapp.net. And your mapped public domain may be different from your AD Domain.
Following this SO question, you can get the Domain to which the VM is joined executing the following code on the VM itself:
System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().DomainName;