Azure 中的每个资源都有一个资源提供者(例如,对于存储帐户,提供者是 Microsoft.Storage)。资源提供者 REST API 公开了可以在资源提供者中创建某种资源的位置列表。
您可以在此处阅读有关 API 的更多信息:https://docs.microsoft.com/en-us/rest/api/resources/providers/get(在此页面上查找 ProviderResourceType 部分)。
当我针对我的订阅和 Microsoft.Storage 资源提供程序运行上述 REST API 时,我收到了针对 storageAccounts 资源类型和位置的以下响应:
"resourceTypes": [
{
"resourceType": "storageAccounts",
"locations": [
"East US", "East US 2", "West US", "West Europe",
"East Asia", "Southeast Asia", "Japan East",
"Japan West", "North Central US", "South Central US",
"Central US", "North Europe", "Brazil South",
"Australia East", "Australia Southeast", "South India",
"Central India", "West India", "Canada East",
"Canada Central", "West US 2", "West Central US",
"UK South", "UK West", "Korea Central", "Korea South",
"France Central", "Australia Central", "South Africa North",
"UAE North", "Switzerland North", "Germany West Central",
"Norway East"
],
我不熟悉 Python SDK,但我相信与此等效的类是 ProviderResourceType 类。