gpt4 book ai didi

Azure存储: find if account is premium or not

转载 作者:行者123 更新时间:2023-12-02 06:21:12 27 4
gpt4 key购买 nike

有没有办法使用 Azure 存储 Java API 或 Azure REST API 来确定帐户是否为高级帐户?

如果我有存储帐户名称和 key ,有没有办法确定存储帐户类型?

最佳答案

您可以从 REST API 检索 sku.tier 内的此信息:

请求

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}?api-version=2016-12-01

回应

{
"id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}",
"name": "accountName",
"location": "account geo region",
"tags": {
"key1": "value1",
"key2": "value2"
},
"type": "Microsoft.Storage/StorageAccount",
"properties": {
"provisioningState": "status",
"encryption": {
"services": {
"blob": {
"enabled": true,
"lastEnabledTime": dateTime}
}
"keySource": "Microsoft.Storage"
}
"primaryEndpoints": {
"blob": "blob endpoint",
"queue": "queue endpoint",
"table": "table endpoint",
"file": "file endpoint"
},
"primaryLocation": "primary geo region",
"statusOfPrimary": "available|unavailable",
"lastGeoFailoverTime": "dateTime",
"secondaryLocation": "secondary geo region",
"statusOfSecondary": "available|unavailable",
"secondaryEndpoints": {
"blob": "secondary blob endpoint",
"queue": "secondary queue endpoint",
"table": "secondary table endpoint",
},
"creationTime": "dateTime",
"customDomain": {
"name": "user domain”
},
"accessTier": "Cool|Hot"
},
"sku": {
"name": "Standard_LRS|Standard_ZRS|Standard_GRS|Standard_RAGRS|Premium_LRS"
"tier": "Standard|Premium"
}
"kind": "Storage|BlobStorage"
}

https://learn.microsoft.com/en-us/rest/api/storagerp/storageaccounts

https://learn.microsoft.com/en-us/rest/api/storagerp/srp_json_get_storage_account_properties

关于Azure存储: find if account is premium or not,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43057599/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com