Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The storageTasks 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.StorageActions/storageTasks resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.StorageActions/storageTasks@2023-01-01' = {
scope: resourceSymbolicName or scope
identity: {
type: 'string'
userAssignedIdentities: {
{customized property}: {}
}
}
location: 'string'
name: 'string'
properties: {
action: {
else: {
operations: [
{
name: 'string'
onFailure: 'string'
onSuccess: 'string'
parameters: {
{customized property}: 'string'
}
}
]
}
if: {
condition: 'string'
operations: [
{
name: 'string'
onFailure: 'string'
onSuccess: 'string'
parameters: {
{customized property}: 'string'
}
}
]
}
}
description: 'string'
enabled: bool
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.StorageActions/storageTasks
| Name | Description | Value |
|---|---|---|
| identity | The managed service identity of the resource. | ManagedServiceIdentity (required) |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 18 Pattern = ^[a-z0-9]{3,18}$ (required) |
| properties | Properties of the storage task. | StorageTaskProperties (required) |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ElseCondition
| Name | Description | Value |
|---|---|---|
| operations | List of operations to execute in the else block | StorageTaskOperation[] (required) |
IfCondition
| Name | Description | Value |
|---|---|---|
| condition | Condition predicate to evaluate each object. See https://aka.ms/storagetaskconditions for valid properties and operators. | string (required) |
| operations | List of operations to execute when the condition predicate satisfies. | StorageTaskOperation[] (required) |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
| userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | UserAssignedIdentities |
StorageTaskAction
| Name | Description | Value |
|---|---|---|
| else | The else block of storage task operation | ElseCondition |
| if | The if block of storage task operation | IfCondition (required) |
StorageTaskOperation
| Name | Description | Value |
|---|---|---|
| name | The operation to be performed on the object. | 'DeleteBlob' 'SetBlobExpiry' 'SetBlobImmutabilityPolicy' 'SetBlobLegalHold' 'SetBlobTags' 'SetBlobTier' 'UndeleteBlob' (required) |
| onFailure | Action to be taken when the operation fails for a object. | 'break' |
| onSuccess | Action to be taken when the operation is successful for a object. | 'continue' |
| parameters | Key-value parameters for the operation. | StorageTaskOperationParameters |
StorageTaskOperationParameters
| Name | Description | Value |
|---|
StorageTaskProperties
| Name | Description | Value |
|---|---|---|
| action | The storage task action that is executed | StorageTaskAction (required) |
| description | Text that describes the purpose of the storage task | string (required) |
| enabled | Storage Task is enabled when set to true and disabled when set to false | bool (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Create a storage task | This sample shows how to define the conditions of a storage task. |
ARM template resource definition
The storageTasks 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.StorageActions/storageTasks resource, add the following JSON to your template.
{
"type": "Microsoft.StorageActions/storageTasks",
"apiVersion": "2023-01-01",
"name": "string",
"identity": {
"type": "string",
"userAssignedIdentities": {
"{customized property}": {
}
}
},
"location": "string",
"properties": {
"action": {
"else": {
"operations": [
{
"name": "string",
"onFailure": "string",
"onSuccess": "string",
"parameters": {
"{customized property}": "string"
}
}
]
},
"if": {
"condition": "string",
"operations": [
{
"name": "string",
"onFailure": "string",
"onSuccess": "string",
"parameters": {
"{customized property}": "string"
}
}
]
}
},
"description": "string",
"enabled": "bool"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.StorageActions/storageTasks
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2023-01-01' |
| identity | The managed service identity of the resource. | ManagedServiceIdentity (required) |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 18 Pattern = ^[a-z0-9]{3,18}$ (required) |
| properties | Properties of the storage task. | StorageTaskProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.StorageActions/storageTasks' |
ElseCondition
| Name | Description | Value |
|---|---|---|
| operations | List of operations to execute in the else block | StorageTaskOperation[] (required) |
IfCondition
| Name | Description | Value |
|---|---|---|
| condition | Condition predicate to evaluate each object. See https://aka.ms/storagetaskconditions for valid properties and operators. | string (required) |
| operations | List of operations to execute when the condition predicate satisfies. | StorageTaskOperation[] (required) |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
| userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | UserAssignedIdentities |
StorageTaskAction
| Name | Description | Value |
|---|---|---|
| else | The else block of storage task operation | ElseCondition |
| if | The if block of storage task operation | IfCondition (required) |
StorageTaskOperation
| Name | Description | Value |
|---|---|---|
| name | The operation to be performed on the object. | 'DeleteBlob' 'SetBlobExpiry' 'SetBlobImmutabilityPolicy' 'SetBlobLegalHold' 'SetBlobTags' 'SetBlobTier' 'UndeleteBlob' (required) |
| onFailure | Action to be taken when the operation fails for a object. | 'break' |
| onSuccess | Action to be taken when the operation is successful for a object. | 'continue' |
| parameters | Key-value parameters for the operation. | StorageTaskOperationParameters |
StorageTaskOperationParameters
| Name | Description | Value |
|---|
StorageTaskProperties
| Name | Description | Value |
|---|---|---|
| action | The storage task action that is executed | StorageTaskAction (required) |
| description | Text that describes the purpose of the storage task | string (required) |
| enabled | Storage Task is enabled when set to true and disabled when set to false | bool (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Create a storage task |
This sample shows how to define the conditions of a storage task. |
Terraform (AzAPI provider) resource definition
The storageTasks 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.StorageActions/storageTasks resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.StorageActions/storageTasks@2023-01-01"
name = "string"
parent_id = "string"
identity {
type = "string"
identity_ids = [
"string"
]
}
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
action = {
else = {
operations = [
{
name = "string"
onFailure = "string"
onSuccess = "string"
parameters = {
{customized property} = "string"
}
}
]
}
if = {
condition = "string"
operations = [
{
name = "string"
onFailure = "string"
onSuccess = "string"
parameters = {
{customized property} = "string"
}
}
]
}
}
description = "string"
enabled = bool
}
}
}
Property Values
Microsoft.StorageActions/storageTasks
| Name | Description | Value |
|---|---|---|
| identity | The managed service identity of the resource. | ManagedServiceIdentity (required) |
| location | The geo-location where the resource lives | string (required) |
| name | The resource name | string Constraints: Min length = 3 Max length = 18 Pattern = ^[a-z0-9]{3,18}$ (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | Properties of the storage task. | StorageTaskProperties (required) |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.StorageActions/storageTasks@2023-01-01" |
ElseCondition
| Name | Description | Value |
|---|---|---|
| operations | List of operations to execute in the else block | StorageTaskOperation[] (required) |
IfCondition
| Name | Description | Value |
|---|---|---|
| condition | Condition predicate to evaluate each object. See https://aka.ms/storagetaskconditions for valid properties and operators. | string (required) |
| operations | List of operations to execute when the condition predicate satisfies. | StorageTaskOperation[] (required) |
ManagedServiceIdentity
| Name | Description | Value |
|---|---|---|
| type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | 'None' 'SystemAssigned' 'SystemAssigned,UserAssigned' 'UserAssigned' (required) |
| userAssignedIdentities | The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. | UserAssignedIdentities |
StorageTaskAction
| Name | Description | Value |
|---|---|---|
| else | The else block of storage task operation | ElseCondition |
| if | The if block of storage task operation | IfCondition (required) |
StorageTaskOperation
| Name | Description | Value |
|---|---|---|
| name | The operation to be performed on the object. | 'DeleteBlob' 'SetBlobExpiry' 'SetBlobImmutabilityPolicy' 'SetBlobLegalHold' 'SetBlobTags' 'SetBlobTier' 'UndeleteBlob' (required) |
| onFailure | Action to be taken when the operation fails for a object. | 'break' |
| onSuccess | Action to be taken when the operation is successful for a object. | 'continue' |
| parameters | Key-value parameters for the operation. | StorageTaskOperationParameters |
StorageTaskOperationParameters
| Name | Description | Value |
|---|
StorageTaskProperties
| Name | Description | Value |
|---|---|---|
| action | The storage task action that is executed | StorageTaskAction (required) |
| description | Text that describes the purpose of the storage task | string (required) |
| enabled | Storage Task is enabled when set to true and disabled when set to false | bool (required) |
TrackedResourceTags
| Name | Description | Value |
|---|
UserAssignedIdentities
| Name | Description | Value |
|---|
UserAssignedIdentity
| Name | Description | Value |
|---|