你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
File Services - List
列出存储帐户中的所有文件服务
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices?api-version=2023-01-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
account
|
path | True |
string |
指定资源组中的存储帐户的名称。 存储帐户名称长度必须为 3 到 24 个字符,并且只能使用数字和小写字母。 Regex pattern: |
resource
|
path | True |
string |
用户订阅中的资源组的名称。 此名称不区分大小写。 Regex pattern: |
subscription
|
path | True |
string |
目标订阅的 ID。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
确定 -- 列出文件服务操作已成功完成。 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
ListFileServices
Sample Request
GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices?api-version=2023-01-01
Sample Response
{
"value": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default",
"name": "default",
"type": "Microsoft.Storage/storageAccounts/fileServices",
"properties": {
"cors": {
"corsRules": [
{
"allowedOrigins": [
"http://www.contoso.com",
"http://www.fabrikam.com"
],
"allowedMethods": [
"GET",
"HEAD",
"POST",
"OPTIONS",
"MERGE",
"PUT"
],
"maxAgeInSeconds": 100,
"exposedHeaders": [
"x-ms-meta-*"
],
"allowedHeaders": [
"x-ms-meta-abc",
"x-ms-meta-data*",
"x-ms-meta-target*"
]
},
{
"allowedOrigins": [
"*"
],
"allowedMethods": [
"GET"
],
"maxAgeInSeconds": 2,
"exposedHeaders": [
"*"
],
"allowedHeaders": [
"*"
]
},
{
"allowedOrigins": [
"http://www.abc23.com",
"https://www.fabrikam.com/*"
],
"allowedMethods": [
"GET",
"PUT"
],
"maxAgeInSeconds": 2000,
"exposedHeaders": [
"x-ms-meta-abc",
"x-ms-meta-data*",
"x-ms-meta-target*"
],
"allowedHeaders": [
"x-ms-meta-12345675754564*"
]
}
]
}
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
}
}
]
}
定义
名称 | 说明 |
---|---|
Allowed |
如果存在 CorsRule 元素,则为必需项。 源允许执行的 HTTP 方法的列表。 |
Cloud |
存储服务的错误响应。 |
Cloud |
存储服务的错误响应。 |
Cors |
为 BLOB 服务指定 CORS 规则。 |
Cors |
设置 CORS 规则。 最多可以在请求中包含五个 CorsRule 元素。 |
Delete |
软删除的服务属性。 |
File |
|
File |
存储帐户中文件服务的属性。 |
Multichannel |
多通道设置。 仅适用于 Premium FileStorage。 |
Protocol |
文件服务的协议设置 |
Sku |
存储帐户的 SKU。 |
Sku |
SKU 名称。 创建帐户时需要;可选,用于更新。 请注意,在旧版本中,SKU 名称称为 accountType。 |
Sku |
SKU 层。 这基于 SKU 名称。 |
Smb |
SMB 协议的设置 |
AllowedMethods
如果存在 CorsRule 元素,则为必需项。 源允许执行的 HTTP 方法的列表。
名称 | 类型 | 说明 |
---|---|---|
CONNECT |
string |
|
DELETE |
string |
|
GET |
string |
|
HEAD |
string |
|
MERGE |
string |
|
OPTIONS |
string |
|
PATCH |
string |
|
POST |
string |
|
PUT |
string |
|
TRACE |
string |
CloudError
存储服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
存储服务的错误响应。 |
CloudErrorBody
存储服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
details |
有关错误的其他详细信息的列表。 |
|
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
target |
string |
特定错误的目标。 例如,属性的名称出错。 |
CorsRule
为 BLOB 服务指定 CORS 规则。
名称 | 类型 | 说明 |
---|---|---|
allowedHeaders |
string[] |
如果存在 CorsRule 元素,则为必需项。 允许作为跨域请求一部分的标头列表。 |
allowedMethods |
如果存在 CorsRule 元素,则为必需项。 源允许执行的 HTTP 方法的列表。 |
|
allowedOrigins |
string[] |
如果存在 CorsRule 元素,则为必需项。 将允许通过 CORS 或“*”允许所有域的源域列表 |
exposedHeaders |
string[] |
如果存在 CorsRule 元素,则为必需项。 要向 CORS 客户端公开的响应标头列表。 |
maxAgeInSeconds |
integer |
如果存在 CorsRule 元素,则为必需项。 客户端/浏览器应缓存预检响应的秒数。 |
CorsRules
设置 CORS 规则。 最多可以在请求中包含五个 CorsRule 元素。
名称 | 类型 | 说明 |
---|---|---|
corsRules |
Cors |
CORS 规则列表。 最多可以在请求中包含五个 CorsRule 元素。 |
DeleteRetentionPolicy
软删除的服务属性。
名称 | 类型 | 说明 |
---|---|---|
allowPermanentDelete |
boolean |
设置为 true 时,此属性允许删除软删除的 Blob 版本和快照。 此属性不能用于 Blob 还原策略。 此属性仅适用于 Blob 服务,不适用于容器或文件共享。 |
days |
integer |
指示已删除项应保留的天数。 指定的最小值可以为 1,最大值可以为 365。 |
enabled |
boolean |
指示是否启用 DeleteRetentionPolicy。 |
FileServiceItems
名称 | 类型 | 说明 |
---|---|---|
value |
返回的文件服务列表。 |
FileServiceProperties
存储帐户中文件服务的属性。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
资源的名称 |
properties.cors |
指定文件服务的 CORS 规则。 最多可以在请求中包含五个 CorsRule 元素。 如果请求正文中不包含 CorsRule 元素,则将删除所有 CORS 规则,并且将禁用文件服务的 CORS。 |
|
properties.protocolSettings |
文件服务的协议设置 |
|
properties.shareDeleteRetentionPolicy |
共享软删除的文件服务属性。 |
|
sku |
SKU 名称和层。 |
|
type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
Multichannel
多通道设置。 仅适用于 Premium FileStorage。
名称 | 类型 | 说明 |
---|---|---|
enabled |
boolean |
指示是否启用多通道 |
ProtocolSettings
文件服务的协议设置
名称 | 类型 | 说明 |
---|---|---|
smb |
SMB 协议的设置 |
Sku
存储帐户的 SKU。
名称 | 类型 | 说明 |
---|---|---|
name |
SKU 名称。 创建帐户时需要;可选,用于更新。 请注意,在旧版本中,SKU 名称称为 accountType。 |
|
tier |
SKU 层。 这基于 SKU 名称。 |
SkuName
SKU 名称。 创建帐户时需要;可选,用于更新。 请注意,在旧版本中,SKU 名称称为 accountType。
名称 | 类型 | 说明 |
---|---|---|
Premium_LRS |
string |
|
Premium_ZRS |
string |
|
Standard_GRS |
string |
|
Standard_GZRS |
string |
|
Standard_LRS |
string |
|
Standard_RAGRS |
string |
|
Standard_RAGZRS |
string |
|
Standard_ZRS |
string |
SkuTier
SKU 层。 这基于 SKU 名称。
名称 | 类型 | 说明 |
---|---|---|
Premium |
string |
|
Standard |
string |
SmbSetting
SMB 协议的设置
名称 | 类型 | 说明 |
---|---|---|
authenticationMethods |
string |
服务器支持的 SMB 身份验证方法。 有效值为 NTLMv2、Kerberos。 应作为带分隔符“;”的字符串传递。 |
channelEncryption |
string |
服务器支持的 SMB 通道加密。 有效值为 AES-128-CCM、AES-128-GCM、AES-256-GCM。 应作为带分隔符“;”的字符串传递。 |
kerberosTicketEncryption |
string |
服务器支持的 Kerberos 票证加密。 有效值为 RC4-HMAC、AES-256。 应作为带分隔符“;”的字符串传递 |
multichannel |
多通道设置。 仅适用于 Premium FileStorage。 |
|
versions |
string |
服务器支持的 SMB 协议版本。 有效值为 SMB2.1、SMB3.0、SMB3.1.1。 应作为带分隔符“;”的字符串传递。 |