Share via


Microsoft.Storage storageAccounts/fileServices 2022-09-01

Bicep 資源定義

storageAccounts/fileServices 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Storage/storageAccounts/fileServices 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Storage/storageAccounts/fileServices@2022-09-01' = {
  name: 'default'
  parent: resourceSymbolicName
  properties: {
    cors: {
      corsRules: [
        {
          allowedHeaders: [
            'string'
          ]
          allowedMethods: [
            'string'
          ]
          allowedOrigins: [
            'string'
          ]
          exposedHeaders: [
            'string'
          ]
          maxAgeInSeconds: int
        }
      ]
    }
    protocolSettings: {
      smb: {
        authenticationMethods: 'string'
        channelEncryption: 'string'
        kerberosTicketEncryption: 'string'
        multichannel: {
          enabled: bool
        }
        versions: 'string'
      }
    }
    shareDeleteRetentionPolicy: {
      allowPermanentDelete: bool
      days: int
      enabled: bool
    }
  }
}

屬性值

storageAccounts/fileServices

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
'default'
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: storageAccounts
properties 記憶體帳戶中檔案服務的屬性。 FileServicePropertiesProperties

FileServicePropertiesProperties

名稱 描述
cors 指定檔案服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,而且會停用 File 服務的 CORS。 CorsRules
protocolSettings 檔案服務的通訊協議設定 ProtocolSettings
shareDeleteRetentionPolicy 共用虛刪除的檔案服務屬性。 DeleteRetentionPolicy

CorsRules

名稱 描述
corsRules CORS 規則的清單。 您可以在要求中包含最多五個 CorsRule 元素。 CorsRule[]

CorsRule

名稱 描述
allowedHeaders 如果 CorsRule 元素存在,則為必要專案。 允許成為跨原始來源要求一部分的標頭清單。 string[] (必要)
allowedMethods 如果 CorsRule 元素存在,則為必要專案。 來源允許執行的 HTTP 方法清單。 包含任何項目的字串數組:
'DELETE'
'GET'
'HEAD'
'MERGE'
'OPTIONS'
'PATCH'
'POST'
'PUT' (必要)
allowedOrigins 如果 CorsRule 元素存在,則為必要專案。 可透過 CORS 或 「*」 允許所有網域的原始網域清單 string[] (必要)
exposedHeaders 如果 CorsRule 元素存在,則為必要專案。 要公開給 CORS 用戶端的回應標頭清單。 string[] (必要)
maxAgeInSeconds 如果 CorsRule 元素存在,則為必要專案。 用戶端/瀏覽器應該快取預檢回應的秒數。 int (必要)

ProtocolSettings

名稱 描述
smb SMB 通訊協議的設定 SmbSetting

SmbSetting

名稱 描述
authenticationMethods 伺服器支援的SMB驗證方法。 有效值為 NTLMv2、Kerberos。 應該以具有分隔符 『;』 的字串傳遞。 字串
channelEncryption 伺服器支援的SMB通道加密。 有效值為 AES-128-CCM、AES-128-GCM、AES-256-GCM。 應該以具有分隔符 『;』 的字串傳遞。 字串
kerberosTicketEncryption 伺服器支援的 Kerberos 票證加密。 有效值為 RC4-HMAC、AES-256。 應該以具有分隔符 『;』 的字串傳遞 字串
多重通道 多重通道設定。 僅適用於進階 FileStorage。 多重通路
versions 伺服器支援的SMB通訊協定版本。 有效值為SMB2.1、SMB3.0、SMB3.1.1。 應該以具有分隔符 『;』 的字串傳遞。 字串

多重通路

名稱 描述
已啟用 指出是否啟用多重通道 bool

DeleteRetentionPolicy

名稱 描述
allowPermanentDelete 當設定為 true 時,這個屬性允許刪除虛刪除的 Blob 版本和快照集。 此屬性無法使用 Blob 還原原則。 此屬性僅適用於 Blob 服務,不適用於容器或檔案共用。 bool
days 指出應保留已刪除專案的天數。 指定的最小值可以是 1,最大值可以是 365。 int

約束:
最小值 = 1
最大值 = 365
已啟用 指出是否啟用DeleteRetentionPolicy。 bool

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
Azure Cloud Shell - VNet 記憶體

部署至 Azure
此範本會將 Azure Cloud Shell 記憶體部署至 Azure 虛擬網路。

ARM 範本資源定義

storageAccounts/fileServices 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Storage/storageAccounts/fileServices 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Storage/storageAccounts/fileServices",
  "apiVersion": "2022-09-01",
  "name": "default",
  "properties": {
    "cors": {
      "corsRules": [
        {
          "allowedHeaders": [ "string" ],
          "allowedMethods": [ "string" ],
          "allowedOrigins": [ "string" ],
          "exposedHeaders": [ "string" ],
          "maxAgeInSeconds": "int"
        }
      ]
    },
    "protocolSettings": {
      "smb": {
        "authenticationMethods": "string",
        "channelEncryption": "string",
        "kerberosTicketEncryption": "string",
        "multichannel": {
          "enabled": "bool"
        },
        "versions": "string"
      }
    },
    "shareDeleteRetentionPolicy": {
      "allowPermanentDelete": "bool",
      "days": "int",
      "enabled": "bool"
    }
  }
}

屬性值

storageAccounts/fileServices

名稱 描述
類型 資源類型 'Microsoft.Storage/storageAccounts/fileServices'
apiVersion 資源 API 版本 '2022-09-01'
NAME 資源名稱

瞭解如何在 JSON ARM 範本中設定子資源的名稱和類型。
'default'
properties 記憶體帳戶中檔案服務的屬性。 FileServicePropertiesProperties

FileServicePropertiesProperties

名稱 描述
cors 指定檔案服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,並停用 File 服務的 CORS。 CorsRules
protocolSettings 檔案服務的通訊協議設定 ProtocolSettings
shareDeleteRetentionPolicy 共用虛刪除的檔案服務屬性。 DeleteRetentionPolicy

CorsRules

名稱 描述
corsRules CORS 規則的清單。 您可以在要求中包含最多五個 CorsRule 元素。 CorsRule[]

CorsRule

名稱 描述
allowedHeaders 如果 CorsRule 元素存在,則為必要專案。 允許成為跨原始來源要求一部分的標頭清單。 string[] (必要)
allowedMethods 如果 CorsRule 元素存在,則為必要專案。 來源允許執行的 HTTP 方法清單。 包含任何項目的字串數組:
'DELETE'
'GET'
'HEAD'
'MERGE'
'OPTIONS'
'PATCH'
'POST'
需要 『PUT』 ()
allowedOrigins 如果 CorsRule 元素存在,則為必要專案。 將透過 CORS 允許的原始網域清單,或 「*」 允許所有網域 string[] (必要)
exposedHeaders 如果 CorsRule 元素存在,則為必要專案。 要公開給 CORS 用戶端的回應標頭清單。 string[] (必要)
maxAgeInSeconds 如果 CorsRule 元素存在,則為必要專案。 用戶端/瀏覽器應該快取預檢回應的秒數。 需要 int ()

ProtocolSettings

名稱 描述
smb 設定SMB通訊協定 SmbSetting

SmbSetting

名稱 描述
authenticationMethods 伺服器支援的SMB驗證方法。 有效值為 NTLMv2、Kerberos。 應該以具有分隔符 『;』 的字串傳遞。 字串
channelEncryption 伺服器支援的SMB通道加密。 有效值為 AES-128-CCM、AES-128-GCM、AES-256-GCM。 應該以具有分隔符 『;』 的字串傳遞。 字串
kerberosTicketEncryption 伺服器支援的 Kerberos 票證加密。 有效值為 RC4-HMAC、AES-256。 應該以具有分隔符 『;』 的字串傳遞 字串
多重通道 多重通道設定。 僅適用於進階 FileStorage。 多重通路
versions 伺服器支援的SMB通訊協定版本。 有效值為SMB2.1、SMB3.0、SMB3.1.1。 應該以具有分隔符 『;』 的字串傳遞。 字串

多重通路

名稱 描述
已啟用 指出是否啟用多重通道 bool

DeleteRetentionPolicy

名稱 描述
allowPermanentDelete 當設定為 true 時,這個屬性允許刪除虛刪除的 Blob 版本和快照集。 此屬性無法使用 Blob 還原原則。 此屬性僅適用於 Blob 服務,不適用於容器或檔案共用。 bool
days 指出應保留已刪除專案的天數。 指定的最小值可以是 1,最大值可以是 365。 int

約束:
最小值 = 1
最大值 = 365
已啟用 指出是否啟用DeleteRetentionPolicy。 bool

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
Azure Cloud Shell - VNet 記憶體

部署至 Azure
此範本會將 Azure Cloud Shell 記憶體部署到 Azure 虛擬網路。

Terraform (AzAPI 提供者) 資源定義

storageAccounts/fileServices 資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Storage/storageAccounts/fileServices 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Storage/storageAccounts/fileServices@2022-09-01"
  name = "default"
  parent_id = "string"
  body = jsonencode({
    properties = {
      cors = {
        corsRules = [
          {
            allowedHeaders = [
              "string"
            ]
            allowedMethods = [
              "string"
            ]
            allowedOrigins = [
              "string"
            ]
            exposedHeaders = [
              "string"
            ]
            maxAgeInSeconds = int
          }
        ]
      }
      protocolSettings = {
        smb = {
          authenticationMethods = "string"
          channelEncryption = "string"
          kerberosTicketEncryption = "string"
          multichannel = {
            enabled = bool
          }
          versions = "string"
        }
      }
      shareDeleteRetentionPolicy = {
        allowPermanentDelete = bool
        days = int
        enabled = bool
      }
    }
  })
}

屬性值

storageAccounts/fileServices

名稱 描述
類型 資源類型 “Microsoft.Storage/storageAccounts/fileServices@2022-09-01”
NAME 資源名稱 "default"
parent_id 此資源父系之資源的標識碼。 類型資源的標識碼: storageAccounts
properties 記憶體帳戶中檔案服務的屬性。 FileServicePropertiesProperties

FileServicePropertiesProperties

名稱 描述
cors 指定檔案服務的 CORS 規則。 您可以在要求中包含最多五個 CorsRule 元素。 如果要求本文中未包含 CorsRule 元素,則會刪除所有 CORS 規則,並停用 File 服務的 CORS。 CorsRules
protocolSettings 檔案服務的通訊協議設定 ProtocolSettings
shareDeleteRetentionPolicy 共用虛刪除的檔案服務屬性。 DeleteRetentionPolicy

CorsRules

名稱 描述
corsRules CORS 規則的清單。 您可以在要求中包含最多五個 CorsRule 元素。 CorsRule[]

CorsRule

名稱 描述
allowedHeaders 如果 CorsRule 元素存在,則為必要專案。 允許成為跨原始來源要求一部分的標頭清單。 string[] (必要)
allowedMethods 如果 CorsRule 元素存在,則為必要專案。 來源允許執行的 HTTP 方法清單。 包含任何項目的字串數組:
“DELETE”
“GET”
“HEAD”
“MERGE”
“OPTIONS”
“PATCH”
「POST」
“PUT” (必要)
allowedOrigins 如果 CorsRule 元素存在,則為必要專案。 將透過 CORS 允許的原始網域清單,或 「*」 允許所有網域 string[] (必要)
exposedHeaders 如果 CorsRule 元素存在,則為必要專案。 要公開給 CORS 用戶端的回應標頭清單。 string[] (必要)
maxAgeInSeconds 如果 CorsRule 元素存在,則為必要專案。 用戶端/瀏覽器應該快取預檢回應的秒數。 需要 int ()

ProtocolSettings

名稱 描述
smb 設定SMB通訊協定 SmbSetting

SmbSetting

名稱 描述
authenticationMethods 伺服器支援的SMB驗證方法。 有效值為 NTLMv2、Kerberos。 應該以具有分隔符 『;』 的字串傳遞。 字串
channelEncryption 伺服器支援的SMB通道加密。 有效值為 AES-128-CCM、AES-128-GCM、AES-256-GCM。 應該以具有分隔符 『;』 的字串傳遞。 字串
kerberosTicketEncryption 伺服器支援的 Kerberos 票證加密。 有效值為 RC4-HMAC、AES-256。 應該以具有分隔符 『;』 的字串傳遞 字串
多重通道 多重通道設定。 僅適用於進階 FileStorage。 多重通路
versions 伺服器支援的SMB通訊協定版本。 有效值為SMB2.1、SMB3.0、SMB3.1.1。 應該以具有分隔符 『;』 的字串傳遞。 字串

多重通路

名稱 描述
已啟用 指出是否啟用多重通道 bool

DeleteRetentionPolicy

名稱 描述
allowPermanentDelete 當設定為 true 時,這個屬性允許刪除虛刪除的 Blob 版本和快照集。 此屬性無法使用 Blob 還原原則。 此屬性僅適用於 Blob 服務,不適用於容器或檔案共用。 bool
days 指出應保留已刪除專案的天數。 指定的最小值可以是 1,最大值可以是 365。 int

約束:
最小值 = 1
最大值 = 365
已啟用 指出是否啟用DeleteRetentionPolicy。 bool