我需要以编程方式找到我当前角色运行的当前区域(例如“美国西部”或“美国东部”)。有没有API可以找到这个?
考虑使用获取云服务在服务管理 API 中。当您提供您的角色所属的服务时,您可以检索类似于以下内容的响应。请注意我已加星标的位置字段。
<?xml version="1.0" encoding="utf-8"?>
<HostedService xmlns="http://schemas.microsoft.com/windowsazure">
<Url>hosted-service-url</Url>
<ServiceName>hosted-service-name</ServiceName>
<HostedServiceProperties>
<Description>description</Description>
<AffinityGroup>name-of-affinity-group</AffinityGroup>
**<Location>location-of-service</Location >**
<Label>base-64-encoded-name-of-service</Label>
<Status>current-status-of-service</Status>
<DateCreated>creation-date-of-service</DateCreated>
<DateLastModified>last-modification-date-of-service</DateLastModified>
<ExtendedProperties>
<ExtendedProperty>
<Name>name-of-property</Name>
<Value>value-of-property</Value>
</ExtendedProperty>
</ExtendedProperties>
<GuestAgentType>type-of-guest-agent</GuestAgentType>
</HostedServiceProperties>
<DefaultWinRmCertificateThumbprint>thumbprint-of-winrm-certificate</DefaultWinRmCertificateThumbprint>
</HostedService>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)