Microsoft.Storage storageAccounts/blobServices 2019-04-01

The storageAccounts/blobServices resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Storage/storageAccounts/blobServices resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Storage/storageAccounts/blobServices@2019-04-01' = {
  name: 'default'
  properties: {
    automaticSnapshotPolicyEnabled: bool
    changeFeed: {
      enabled: bool
    }
    cors: {
      corsRules: [
        {
          allowedHeaders: [ 'string' ]
          allowedMethods: [ 'string' ]
          allowedOrigins: [ 'string' ]
          exposedHeaders: [ 'string' ]
          maxAgeInSeconds: int
        }
      ]
    }
    defaultServiceVersion: 'string'
    deleteRetentionPolicy: {
      days: int
      enabled: bool
    }
  }
}

Property values

storageAccounts/blobServices

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Storage/storageAccounts/blobServices'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2019-04-01'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
'default'
properties The properties of a storage account’s Blob service. BlobServicePropertiesProperties

BlobServicePropertiesProperties

Name Description Value
automaticSnapshotPolicyEnabled Automatic Snapshot is enabled if set to true. bool
changeFeed The blob service properties for change feed events. ChangeFeed
cors Sets the CORS rules. You can include up to five CorsRule elements in the request. CorsRules
defaultServiceVersion DefaultServiceVersion indicates the default version to use for requests to the Blob service if an incoming request’s version is not specified. Possible values include version 2008-10-27 and all more recent versions. string
deleteRetentionPolicy The blob service properties for soft delete. DeleteRetentionPolicy

ChangeFeed

Name Description Value
enabled Indicates whether change feed event logging is enabled for the Blob service. bool

CorsRules

Name Description Value
corsRules The List of CORS rules. You can include up to five CorsRule elements in the request. CorsRule[]

CorsRule

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

DeleteRetentionPolicy

Name Description Value
days Indicates the number of days that the deleted blob should be retained. The minimum specified value can be 1 and the maximum value can be 365. int
enabled Indicates whether DeleteRetentionPolicy is enabled for the Blob service. bool

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.
Storage Account with SSE and blob deletion retention policy

Deploy to Azure
This template creates a Storage Account with Storage Service Encryption and a blob deletion retention policy