แก้ไข

Create a storage task

A storage task defines how the blobs in an Azure Storage account are processed. You create a storage task by specifying the conditions that each object must meet and the operations to perform on the object. You can then assign the task for execution on one or more Azure Storage accounts. See What are Azure Storage Actions?

In this article, you learn how to create a storage task.

Create a storage task

In the Azure portal, search for Storage Tasks. Then, under Services, select Storage tasks - Azure Storage Actions.

Screenshot of the search result of the string Storage Tasks.

On Azure Storage Actions | Storage Tasks, select Create.

Screenshot of the storage task create button.

Basics tab

On the Basics tab, enter the essential information for your storage task. The following table describes the fields on the Basics tab.

Section Field Required or optional Description
Project details Subscription Required Select the subscription for the new storage task.
Project details Resource group Required Create a new resource group for this storage task, or select an existing one. For more information, see Resource groups.
Instance details Storage task name Required Choose a unique name for your storage task. Storage task names must be between 3 and 18 characters in length and can contain only lowercase letters and numbers.
Instance details Region Required Select the appropriate region for your storage task. For more information, see Regions and Availability Zones in Azure.
Instance details User-assigned identity Optional A system-assigned managed identity is created for the storage task if you don't provide a user-assigned managed identity. To learn more, see Storage task assignment.
To select a user-assigned managed identity, choose Select an identity. On the Select user assigned managed identity page, filter for and then select the managed identity. Then, select Add. You can add select a user-assigned managed identity only as you create a storage task.

The following image shows an example of the Basics tab.

Screenshot of basics tab of the storage task create experience.

Conditions tab

On the Conditions tab, define the conditions that each object must meet, and the operations to perform on the object.

You must define at least one condition and one operation. To add a clause to a condition, select Add new clause. To add operations, select Add new operation.

The following table describes the fields on the Conditions tab.

Section Field Required or optional Description
If And/Or Required An operator that combines two or more predicates to form a logical-AND or logical-OR expression.
If Blob property Required The blob or container property that you want to use in the clause. See Supported blob properties.
If Operator Required The operator that defines how each property in the clause must relate to the corresponding value. See Supported operators.
If Property value Required The value that relates to the corresponding property.
Then Operations Required The action to perform when objects meet the conditions defined in this task. See Supported operations.
Then Parameter Required A value used by the operation.

The following image shows an example of the Conditions tab.

Screenshot of conditions tab of the storage task create experience.

Select Preview Conditions to view a list of blobs that meet the conditions you defined for the operations. To learn more, see Preview the effect of conditions.

Assignments tab

An assignment identifies a storage account and a subset of objects in that account to target during execution. An assignment also defines when the task runs and where execution reports are stored.

To add an assignment, select Add assignment. This step is optional. You don't have to add an assignment to create the task.

The following table describes the fields that appear in the Add assignment pane.

Select the role that you want to assign to the system-assigned managed identity of the storage task. To ensure a successful task assignment, use roles that have the Blob Data Owner permissions. To learn more, see Azure roles for storage tasks.

Section Field Required or optional Description
Select scope Subscription Required The subscription of the storage account that you want to add to this assignment.
Select scope Select a storage account Required The storage account that you want to add to this assignment.
Select scope Assignment name Required The name of the assignment. Assignment names must be between 2 and 62 characters in length and might contain only letters and numbers.
Role assignment Assignment name Required The role that you want to assign to the managed identity of the storage task. To learn more about which role to choose, see Permission for a task to perform operations.
Filter objects Filter by Required Option to either filter objects by using a prefix or to run the task against the entire storage account.
Filter objects Blob prefixes Optional The string prefix that is used to filter the blobs that the task evaluates.
Trigger details Run frequency Required Option to either run the task one time or multiple times.
Trigger details Start from Required The date and time to begin running the task.
Trigger details End by Required The date and time to stop running the task.
Trigger details Repeat every (in days) Required The interval in days between each run.
Trigger details Report export container Required The container where task execution reports are stored.

The following image shows an example of the Add assignment pane.

Screenshot of assignment tab of the storage task create experience.

Tags tab

On the Tags tab, specify Resource Manager tags to help organize your Azure resources. For more information, see Tag resources, resource groups, and subscriptions for logical organization.

The following image shows a standard configuration of the index tag properties for a new storage account.

Screenshot of tags tab of the storage task create experience.

Review + create tab

When you go to the Review + create tab, Azure runs validation on the storage task settings that you chose. If validation passes, you can create the storage task.

If validation fails, the portal indicates which settings need to be modified.

The following image shows the Review tab data prior to the creation of a new storage task.

Screenshot of review and create tab of the storage task create experience.

See also