File Services - Get Service Properties

取得記憶體帳戶中檔案服務的屬性,包括 CORS (跨原始來源資源分享) 規則。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default?api-version=2023-01-01

URI 參數

名稱 位於 必要 類型 Description
accountName
path True

string

指定資源群組內的記憶體帳戶名稱。 儲存體帳戶名稱必須介於 3 到 24 個字元的長度,而且只能使用數字和小寫字母。

Regex pattern: ^[a-z0-9]+$

FileServicesName
path True

FileServicesName

指定記憶體帳戶內 Service 檔案的名稱。 檔名必須是 “default”

resourceGroupName
path True

string

用戶訂用帳戶內的資源組名。 名稱不區分大小寫。

Regex pattern: ^[-\w\._\(\)]+$

subscriptionId
path True

string

目標訂用帳戶的標識碼。

api-version
query True

string

用於此作業的 API 版本。

回應

名稱 類型 Description
200 OK

FileServiceProperties

確定 -- 傳回記憶體帳戶檔案服務的屬性。

Other Status Codes

CloudError

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

GetFileServices

Sample Request

GET https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default?api-version=2023-01-01

Sample Response

{
  "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"
  }
}

定義

名稱 Description
AllowedMethods

如果 CorsRule 元素存在,則為必要專案。 來源允許執行的 HTTP 方法清單。

CloudError

記憶體服務的錯誤回應。

CloudErrorBody

記憶體服務的錯誤回應。

CorsRule

指定 Blob 服務的 CORS 規則。

CorsRules

設定 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。

DeleteRetentionPolicy

虛刪除的服務屬性。

FileServiceProperties

記憶體帳戶中檔案服務的屬性。

FileServicesName

指定記憶體帳戶內 Service 檔案的名稱。 檔名必須是 “default”

Multichannel

多重通道設定。 僅適用於進階 FileStorage。

ProtocolSettings

檔案服務的通訊協議設定

Sku

記憶體帳戶的 SKU。

SkuName

SKU 名稱。 建立帳戶時需要;選擇性更新。 請注意,在舊版中,SKU 名稱稱為 accountType。

SkuTier

SKU 層。 這是以 SKU 名稱為基礎。

SmbSetting

設定SMB通訊協定

AllowedMethods

如果 CorsRule 元素存在,則為必要專案。 來源允許執行的 HTTP 方法清單。

名稱 類型 Description
CONNECT

string

DELETE

string

GET

string

HEAD

string

MERGE

string

OPTIONS

string

PATCH

string

POST

string

PUT

string

TRACE

string

CloudError

記憶體服務的錯誤回應。

名稱 類型 Description
error

CloudErrorBody

記憶體服務的錯誤回應。

CloudErrorBody

記憶體服務的錯誤回應。

名稱 類型 Description
code

string

錯誤的識別碼。 程式碼不變,且要以程式設計方式使用。

details

CloudErrorBody[]

錯誤的其他詳細數據清單。

message

string

描述錯誤的訊息,適用於在使用者介面中顯示。

target

string

特定錯誤的目標。 例如,錯誤中的屬性名稱。

CorsRule

指定 Blob 服務的 CORS 規則。

名稱 類型 Description
allowedHeaders

string[]

如果 CorsRule 元素存在,則為必要專案。 允許成為跨原始來源要求一部分的標頭清單。

allowedMethods

AllowedMethods[]

如果 CorsRule 元素存在,則為必要專案。 來源允許執行的 HTTP 方法清單。

allowedOrigins

string[]

如果 CorsRule 元素存在,則為必要專案。 將透過 CORS 允許的原始網域清單,或 「*」 允許所有網域

exposedHeaders

string[]

如果 CorsRule 元素存在,則為必要專案。 要公開給 CORS 用戶端的回應標頭清單。

maxAgeInSeconds

integer

如果 CorsRule 元素存在,則為必要專案。 用戶端/瀏覽器應該快取預檢回應的秒數。

CorsRules

設定 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。

名稱 類型 Description
corsRules

CorsRule[]

CORS 規則的清單。 您可以在要求中包含最多五個 CorsRule 元素。

DeleteRetentionPolicy

虛刪除的服務屬性。

名稱 類型 Description
allowPermanentDelete

boolean

當設定為 true 時,這個屬性允許刪除虛刪除的 Blob 版本和快照集。 此屬性無法使用 Blob 還原原則。 此屬性僅適用於 Blob 服務,不適用於容器或檔案共用。

days

integer

指出應保留已刪除專案的天數。 指定的最小值可以是 1,最大值可以是 365。

enabled

boolean

指出是否啟用DeleteRetentionPolicy。

FileServiceProperties

記憶體帳戶中檔案服務的屬性。

名稱 類型 Description
id

string

資源的完整資源識別碼。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

資源的名稱

properties.cors

CorsRules

指定檔案服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,並停用 File 服務的 CORS。

properties.protocolSettings

ProtocolSettings

檔案服務的通訊協議設定

properties.shareDeleteRetentionPolicy

DeleteRetentionPolicy

共用虛刪除的檔案服務屬性。

sku

Sku

Sku 名稱和階層。

type

string

資源類型。 例如“Microsoft.Compute/virtualMachines” 或 “Microsoft.Storage/storageAccounts”

FileServicesName

指定記憶體帳戶內 Service 檔案的名稱。 檔名必須是 “default”

名稱 類型 Description
default

string

Multichannel

多重通道設定。 僅適用於進階 FileStorage。

名稱 類型 Description
enabled

boolean

指出是否啟用多重通道

ProtocolSettings

檔案服務的通訊協議設定

名稱 類型 Description
smb

SmbSetting

設定SMB通訊協定

Sku

記憶體帳戶的 SKU。

名稱 類型 Description
name

SkuName

SKU 名稱。 建立帳戶時需要;選擇性更新。 請注意,在舊版中,SKU 名稱稱為 accountType。

tier

SkuTier

SKU 層。 這是以 SKU 名稱為基礎。

SkuName

SKU 名稱。 建立帳戶時需要;選擇性更新。 請注意,在舊版中,SKU 名稱稱為 accountType。

名稱 類型 Description
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 名稱為基礎。

名稱 類型 Description
Premium

string

Standard

string

SmbSetting

設定SMB通訊協定

名稱 類型 Description
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

Multichannel

多重通道設定。 僅適用於進階 FileStorage。

versions

string

伺服器支援的SMB通訊協定版本。 有效值為SMB2.1、SMB3.0、SMB3.1.1。 應該以具有分隔符 『;』 的字串傳遞。