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.
Use the visual editor to define the conditions and operations of a storage task.
An operation is an action performed on each object that meets the conditions defined in the task. A condition is a logical predicate consisting of one or more clauses that filters the objects on which the operation is performed. Each clause compares a blob or container property to a value. To execute an operation defined in the storage task, each object must meet the condition defined.
Important
Saving changes to an existing storage task also updates the definition used by its associated task assignments. Review existing task assignments before making any changes and preview the updated conditions before saving. If you add an operation, verify that the task's managed identity has the required permissions on each target.
Define conditions
Define a condition by adding clauses. A clause defines the relationship between a property and a value. To execute an operation defined in the storage task, each object must meet the terms of that relationship.
For string operations, use the case-insensitive or case-sensitive variant depending on the data you want to target.
Navigate to the storage task in the Azure portal. Under Storage task management, select Conditions.

The Visual builder tab of the Conditions pane appears.
Add and remove clauses
Select Add new clause to add a clause. To remove a clause, select the delete icon(
).

Specify the terms of a clause
Define a clause by choosing a property, specifying a value for that property, and then choosing an operator that relates them together.
Choose a property
In the Blob property drop-down list, choose a property. See Supported blob properties.
The following example selects the Blob name property.

Choose a value and operator
In the Property value box, enter a value. In the Operator drop-down list, choose an operator. See Supported Operators.
The following example specifies a value of .log along with the Ends with operator. This condition allows the operation defined in this storage task to execute only on blobs that have a .log file extension.

Use a wildcard in string values
You can use the * and ? wildcard characters in the value of a string property. The * character represents zero or more characters while a ? character represents exactly one character.
For example, if you want your clause to evaluate to true only for blobs that are Word documents, use the string *.docx. However, if you want to target documents varying by a single character such as test_a.docx or test_b.docx, use the string test_?.docx.
You can use the * or ? anywhere in a string. You can escape these characters by adding a \ just before the character.
Reference a value from object metadata
Clauses that include a date and time property can reference a value from the metadata of a container or an index tag of a blob. These values are obtained dynamically at runtime when the task executes.
In your storage account, you can add a key to the metadata of a container or to the index tags of a blob. The value of that key must be a ISO 8601-formatted time interval. For example, you might add a key named retainfor along with a string value of PT5M which represents an interval of five minutes.
To reference a key, select the Edit link that appears in the Property value column. Then, in the Select a value dialog box, select Container metadata or Blob Index tags.
The following example adds the Creation time property, the Earlier than operator, and references a key named retainFor in the index tags of each blob that is evaluated.

This condition tests whether a blob was created earlier than a certain time duration relative to now (the current date and time). For example, if the value retrieved from the retainFor tag is five minutes, then this condition checks if the blob was created more than five minutes ago.
If the key isn't present for an evaluated object, the condition evaluates to false. If the key value is a string that doesn't conform to the ISO 8601 standard, an error is reported in the execution report.
Apply And / Or to a clause
Add And or Or to a clause. Specify And if you want to target objects that meet the criteria in both the current clause and the previous clause of the condition. Specify Or to target objects that meet the criterion in either the current clause or the previous clause.
The following example shows clauses that use And. In this example, the storage task targets objects that have a .log extension and that have a tag named Archive-Status set to Ready.

Change the order of clauses
Arrange clauses in an order that you believe improves the performance of a task run. For example, instead of first testing all blobs in an account against a name filter, elevate a clause that targets a specific container. This adjustment prevents the task from performing unnecessary evaluations.
The following example reverses the order of the clauses shown in the previous example. This condition evaluates the index tag clause first and then the blob name clause.
Select the clause. Then, select Move clause up or Move clause down to change its position in the list.

Group and ungroup clauses
Grouped clauses operate as a single unit separate from the rest of the clauses. Grouping clauses is similar to putting parentheses around a mathematical equation or logic expression. The And or Or operator for the first clause in the group applies to the whole group.
The following example shows two conditions grouped together. In this example, the operation executes if a blob has the .log extension and either a tag named Archive-Status is set to the value of Ready or the file wasn't accessed in 120 days.
Select the checkbox that appears next to each clause you want to group together. Then, select Group.

To ungroup clauses, select the ungroup icon (
) or select each clause in the group, and select Ungroup.
Preview the effect of conditions
You can view a list of blobs that the conditions you defined affect.
In the conditions editor, select Preview conditions.
In Preview Conditions, specify a target subscription, storage account, and container. Because a can only show up to 5,000 blobs, you can also specify a prefix to narrow the list.

Define operations
An operation is an action taken on each object that meets the conditions defined in the task.
Add and remove operations
To add an operation, select Add new operation. To remove an operation, select the delete icon(
). The delete icon appears next to the operation.

Choose an operation
In the Operation drop-down list, choose an operation. See Supported operations.
The following example selects the Set blob tags property.

Choose a parameter
Enter or select the parameters that are appropriate for the operation.
The following example sets the Archive-Status tag to the value Archived.

To learn more about the structure of operations and to find a complete list of operations, see Storage task operations.
Change the order of operations
You can arrange operations in any order.
In this example, the existing order makes sense. First, the blobs are archived and then the tags are set. It wouldn't make sense to set the tag before changing the tier because the attempt to change the tier of a blob might not succeed. If the set blob tag operation appears first in the list, consider moving that operation after the set blob tier operation.
To move an operation, select the checkbox that appears beside it. Then, select Move operation up or Move operation down to change its position in the list.