你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Web Apps - Update Azure Storage Accounts
有关汇报应用的 Azure 存储帐户配置的说明。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts?api-version=2023-12-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
name
|
path | True |
string |
应用的名称。 |
resource
|
path | True |
string |
资源所属的资源组的名称。 Regex pattern: |
subscription
|
path | True |
string |
Azure 订阅 ID。 这是一个 GUID 格式的字符串, (例如 00000000-0000-0000-0000-0000000000000) 。 |
api-version
|
query | True |
string |
API 版本 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
kind |
string |
资源类型。 |
properties. |
字典存储Azure 文件存储或 Blob 存储访问信息值。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
确定 |
|
Other Status Codes |
App 服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
Update Azure Storage Accounts
Sample Request
PUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/azurestorageaccounts?api-version=2023-12-01
{
"properties": {
"account1": {
"type": "AzureFiles",
"accountName": "testsa",
"shareName": "web",
"accessKey": "26515^%@#*",
"mountPath": "/mounts/a/files"
}
}
}
Sample Response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/config/web",
"name": "web",
"type": "Microsoft.Web/sites/config",
"kind": "app",
"properties": {
"account1": {
"type": "AzureFiles",
"accountName": "testsa",
"shareName": "web",
"mountPath": "/mounts/a/files",
"state": "Ok"
}
}
}
定义
名称 | 说明 |
---|---|
Azure |
字典存储Azure 文件存储或 Blob 存储访问信息值。 |
Azure |
AzureStorageInfo 字典资源。 |
Azure |
要用于存储帐户的装载协议。 |
Azure |
存储帐户的状态。 |
Azure |
存储类型。 |
Default |
App 服务错误响应。 |
Details | |
Error |
错误模型。 |
AzureStorageInfoValue
字典存储Azure 文件存储或 Blob 存储访问信息值。
名称 | 类型 | 说明 |
---|---|---|
accessKey |
string |
存储帐户的访问密钥。 |
accountName |
string |
存储帐户的名称。 |
mountPath |
string |
用于在站点的运行时环境中装载存储的路径。 |
protocol |
要用于存储帐户的装载协议。 |
|
shareName |
string |
Blob 存储) 的文件共享名称 (容器名称。 |
state |
存储帐户的状态。 |
|
type |
存储类型。 |
AzureStoragePropertyDictionaryResource
AzureStorageInfo 字典资源。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
kind |
string |
资源类型。 |
name |
string |
资源名称。 |
properties. |
字典存储Azure 文件存储或 Blob 存储访问信息值。 |
|
type |
string |
资源类型。 |
AzureStorageProtocol
要用于存储帐户的装载协议。
名称 | 类型 | 说明 |
---|---|---|
Http |
string |
|
Nfs |
string |
|
Smb |
string |
AzureStorageState
存储帐户的状态。
名称 | 类型 | 说明 |
---|---|---|
InvalidCredentials |
string |
|
InvalidShare |
string |
|
NotValidated |
string |
|
Ok |
string |
AzureStorageType
存储类型。
名称 | 类型 | 说明 |
---|---|---|
AzureBlob |
string |
|
AzureFiles |
string |
DefaultErrorResponse
App 服务错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误模型。 |
Details
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,用于以编程方式标识错误。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |
Error
错误模型。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
标准化字符串,用于以编程方式标识错误。 |
details |
Details[] |
详细错误。 |
innererror |
string |
调试错误的详细信息。 |
message |
string |
详细的错误说明和调试信息。 |
target |
string |
详细的错误说明和调试信息。 |