【发布时间】:2017-01-24 01:46:05
【问题描述】:
存储帐户加密终于上线了 我尝试使用 REST 调用创建加密存储帐户 我收到一个错误 我的网址是
但我收到一个错误 - 据此,Azure 认为我正在发送旧请求
错误消息:代码:AccountTypeMissing 消息:请求中缺少 accountType 字段。
【问题讨论】:
-
您可以分享您发送的请求正文以创建存储帐户吗?
存储帐户加密终于上线了 我尝试使用 REST 调用创建加密存储帐户 我收到一个错误 我的网址是
但我收到一个错误 - 据此,Azure 认为我正在发送旧请求
错误消息:代码:AccountTypeMissing 消息:请求中缺少 accountType 字段。
【问题讨论】:
我已经在本地进行了测试。请根据我的回复仔细检查您的代码。结果如下:
Rest API 文档:https://msdn.microsoft.com/en-us/library/azure/mt163564.aspx
放置:
https://management.azure.com/subscriptions/{订阅 ID}/resourceGroups/jatestgroup/providers/Microsoft.Storage/storageAccounts/akingtt?api-version=2016-01-01
标题:
授权:承载 eyJ0eXAiOiJKV1QiLCJhb......
内容类型:application/json
主机:management.azure.com
内容长度:443
请求正文
{
"location": "East Asia",
"tags": {
},
"properties": {
"encryption": {
"services": {
"blob": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
},
"sku": {
"name": "Standard_RAGRS"
},
"kind": "Storage"
}
请注意:
1) 2016-01-01 及更高版本需要“种类”。
2) 当 kind = 'BlobStorage' 时需要“accessTier”。
当 kind = 'Storage' 时被禁止。
3) 在 2016-01-01 版本之前,'sku' 被称为 'accountType',在 'properties' 信封下被发现。
【讨论】:
我刚刚在 Azure 门户中创建了一个加密存储帐户。当我查看Azure Resource Explorer 时,URL 显示的 API 版本为 2015-05-01-preview。
【讨论】: