Microsoft.Storage storageAccounts/fileServices template reference

Template format

To create a Microsoft.Storage/storageAccounts/fileServices resource, add the following JSON to the resources section of your template.

{
  "name": "default",
  "type": "Microsoft.Storage/storageAccounts/fileServices",
  "apiVersion": "2019-06-01",
  "properties": {
    "cors": {
      "corsRules": [
        {
          "allowedOrigins": [
            "string"
          ],
          "allowedMethods": [
            "string"
          ],
          "maxAgeInSeconds": "integer",
          "exposedHeaders": [
            "string"
          ],
          "allowedHeaders": [
            "string"
          ]
        }
      ]
    },
    "shareDeleteRetentionPolicy": {
      "enabled": "boolean",
      "days": "integer"
    }
  },
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Storage/storageAccounts/fileServices object

Name Type Required Value
name enum Yes The name of the file Service within the specified storage account. File Service Name must be "default" - default
type enum Yes fileServices
-or-
Microsoft.Storage/storageAccounts/fileServices

See Set name and type for child resources.
apiVersion enum Yes 2019-06-01
properties object Yes The properties of File services in storage account. - FileServicePropertiesProperties object
resources array No shares

FileServicePropertiesProperties object

Name Type Required Value
cors object No Specifies CORS rules for the File service. You can include up to five CorsRule elements in the request. If no CorsRule elements are included in the request body, all CORS rules will be deleted, and CORS will be disabled for the File service. - CorsRules object
shareDeleteRetentionPolicy object No The file service properties for share soft delete. - DeleteRetentionPolicy object

CorsRules object

Name Type Required Value
corsRules array No The List of CORS rules. You can include up to five CorsRule elements in the request. - CorsRule object

DeleteRetentionPolicy object

Name Type Required Value
enabled boolean No Indicates whether DeleteRetentionPolicy is enabled.
days integer No Indicates the number of days that the deleted item should be retained. The minimum specified value can be 1 and the maximum value can be 365.

CorsRule object

Name Type Required Value
allowedOrigins array Yes Required if CorsRule element is present. A list of origin domains that will be allowed via CORS, or "*" to allow all domains - string
allowedMethods array Yes Required if CorsRule element is present. A list of HTTP methods that are allowed to be executed by the origin. - DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT
maxAgeInSeconds integer Yes Required if CorsRule element is present. The number of seconds that the client/browser should cache a preflight response.
exposedHeaders array Yes Required if CorsRule element is present. A list of response headers to expose to CORS clients. - string
allowedHeaders array Yes Required if CorsRule element is present. A list of headers allowed to be part of the cross-origin request. - string