Microsoft.Storage storageAccounts/fileServices/shares 2021-09-01

Bicep resource definition

The storageAccounts/fileServices/shares resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Storage/storageAccounts/fileServices/shares resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Storage/storageAccounts/fileServices/shares@2021-09-01' = {
  parent: resourceSymbolicName
  name: 'string'
  properties: {
    accessTier: 'string'
    enabledProtocols: 'string'
    metadata: {
      {customized property}: 'string'
    }
    rootSquash: 'string'
    shareQuota: int
    signedIdentifiers: [
      {
        accessPolicy: {
          expiryTime: 'string'
          permission: 'string'
          startTime: 'string'
        }
        id: 'string'
      }
    ]
  }
}

Property values

AccessPolicy

Name Description Value
expiryTime Expiry time of the access policy string
permission List of abbreviated permissions. string
startTime Start time of the access policy string

FileShareProperties

Name Description Value
accessTier Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. 'Cool'
'Hot'
'Premium'
'TransactionOptimized'
enabledProtocols The authentication protocol that is used for the file share. Can only be specified when creating a share. 'NFS'
'SMB'
metadata A name-value pair to associate with the share as metadata. FileSharePropertiesMetadata
rootSquash The property is for NFS share only. The default is NoRootSquash. 'AllSquash'
'NoRootSquash'
'RootSquash'
shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. int

Constraints:
Min value = 1
Max value = 102400
signedIdentifiers List of stored access policies specified on the share. SignedIdentifier[]

FileSharePropertiesMetadata

Name Description Value

Microsoft.Storage/storageAccounts/fileServices/shares

Name Description Value
name The resource name string

Constraints:
Min length = 3
Max length = 3 (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: storageAccounts/fileServices
properties Properties of the file share. FileShareProperties

SignedIdentifier

Name Description Value
accessPolicy Access policy AccessPolicy
id An unique identifier of the stored access policy. string

Quickstart samples

The following quickstart samples deploy this resource type.

Bicep File Description
Create a storage account with file share This template creates an Azure storage account and file share.
Create a storage account with multiple file shares Creates an Azure storage account and multiple file shares.
Create Function App and private endpoint-secured Storage This template allows you to deploy an Azure Function App that communicates with Azure Storage over private endpoints.
Function App secured by Azure Frontdoor This template allows you to deploy an azure premium function protected and published by Azure Frontdoor premium. The conenction between Azure Frontdoor and Azure Functions is protected by Azure Private Link.
Private Function App and private endpoint-secured Storage This template provisions a function app on a Premium plan that has private endpoints and communicates with Azure Storage over private endpoints.

ARM template resource definition

The storageAccounts/fileServices/shares resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

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

{
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "apiVersion": "2021-09-01",
  "name": "string",
  "properties": {
    "accessTier": "string",
    "enabledProtocols": "string",
    "metadata": {
      "{customized property}": "string"
    },
    "rootSquash": "string",
    "shareQuota": "int",
    "signedIdentifiers": [
      {
        "accessPolicy": {
          "expiryTime": "string",
          "permission": "string",
          "startTime": "string"
        },
        "id": "string"
      }
    ]
  }
}

Property values

AccessPolicy

Name Description Value
expiryTime Expiry time of the access policy string
permission List of abbreviated permissions. string
startTime Start time of the access policy string

FileShareProperties

Name Description Value
accessTier Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. 'Cool'
'Hot'
'Premium'
'TransactionOptimized'
enabledProtocols The authentication protocol that is used for the file share. Can only be specified when creating a share. 'NFS'
'SMB'
metadata A name-value pair to associate with the share as metadata. FileSharePropertiesMetadata
rootSquash The property is for NFS share only. The default is NoRootSquash. 'AllSquash'
'NoRootSquash'
'RootSquash'
shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. int

Constraints:
Min value = 1
Max value = 102400
signedIdentifiers List of stored access policies specified on the share. SignedIdentifier[]

FileSharePropertiesMetadata

Name Description Value

Microsoft.Storage/storageAccounts/fileServices/shares

Name Description Value
apiVersion The api version '2021-09-01'
name The resource name string

Constraints:
Min length = 3
Max length = 3 (required)
properties Properties of the file share. FileShareProperties
type The resource type 'Microsoft.Storage/storageAccounts/fileServices/shares'

SignedIdentifier

Name Description Value
accessPolicy Access policy AccessPolicy
id An unique identifier of the stored access policy. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Azure Cloud Shell - VNet storage

Deploy to Azure
This template deploys Azure Cloud Shell storage into an Azure virtual network.
Connect to an Azure File Share via a Private Endpoint

Deploy to Azure
This sample shows how to use configure a virtual network and private DNS zone to access an Azure File Share via a private endpoint.
Create a storage account with file share

Deploy to Azure
This template creates an Azure storage account and file share.
Create a storage account with multiple file shares

Deploy to Azure
Creates an Azure storage account and multiple file shares.
Create Function App and private endpoint-secured Storage

Deploy to Azure
This template allows you to deploy an Azure Function App that communicates with Azure Storage over private endpoints.
Deploy Drupal with VM Scale Set, Azure Files and Mysql

Deploy to Azure
Deploy a VM Scale Set behind a load balancer/NAT & each VM running Drupal (Apache / PHP). All nodes share the created Azure file share storage and MySQL database
Function App secured by Azure Frontdoor

Deploy to Azure
This template allows you to deploy an azure premium function protected and published by Azure Frontdoor premium. The conenction between Azure Frontdoor and Azure Functions is protected by Azure Private Link.
Private Function App and private endpoint-secured Storage

Deploy to Azure
This template provisions a function app on a Premium plan that has private endpoints and communicates with Azure Storage over private endpoints.

Terraform (AzAPI provider) resource definition

The storageAccounts/fileServices/shares resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Storage/storageAccounts/fileServices/shares resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Storage/storageAccounts/fileServices/shares@2021-09-01"
  name = "string"
  body = jsonencode({
    properties = {
      accessTier = "string"
      enabledProtocols = "string"
      metadata = {
        {customized property} = "string"
      }
      rootSquash = "string"
      shareQuota = int
      signedIdentifiers = [
        {
          accessPolicy = {
            expiryTime = "string"
            permission = "string"
            startTime = "string"
          }
          id = "string"
        }
      ]
    }
  })
}

Property values

AccessPolicy

Name Description Value
expiryTime Expiry time of the access policy string
permission List of abbreviated permissions. string
startTime Start time of the access policy string

FileShareProperties

Name Description Value
accessTier Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. 'Cool'
'Hot'
'Premium'
'TransactionOptimized'
enabledProtocols The authentication protocol that is used for the file share. Can only be specified when creating a share. 'NFS'
'SMB'
metadata A name-value pair to associate with the share as metadata. FileSharePropertiesMetadata
rootSquash The property is for NFS share only. The default is NoRootSquash. 'AllSquash'
'NoRootSquash'
'RootSquash'
shareQuota The maximum size of the share, in gigabytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. int

Constraints:
Min value = 1
Max value = 102400
signedIdentifiers List of stored access policies specified on the share. SignedIdentifier[]

FileSharePropertiesMetadata

Name Description Value

Microsoft.Storage/storageAccounts/fileServices/shares

Name Description Value
name The resource name string

Constraints:
Min length = 3
Max length = 3 (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: storageAccounts/fileServices
properties Properties of the file share. FileShareProperties
type The resource type "Microsoft.Storage/storageAccounts/fileServices/shares@2021-09-01"

SignedIdentifier

Name Description Value
accessPolicy Access policy AccessPolicy
id An unique identifier of the stored access policy. string