You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn about the elements of a storage task operation.
5
5
services: storage
6
6
author: normesta
7
-
8
7
ms.service: azure-storage-actions
9
8
ms.topic: conceptual
10
9
ms.date: 10/07/2024
@@ -14,35 +13,78 @@ ms.author: normesta
14
13
15
14
# Storage task operations
16
15
17
-
This article describes the operations that you can use in a storage task. To learn how to define conditions and operations, see [Define storage task conditions and operations](storage-task-conditions-operations-edit.md).
16
+
An operation is an action that a storage task performs on each object that meets the defined set of conditions. This article describes the format of a storage task operation and the list of operations, operation parameters, and allowable values. To learn more about conditions, see [Storage task conditions](storage-task-conditions.md).
18
17
19
18
> [!IMPORTANT]
20
19
> Azure Storage Actions is currently in PREVIEW and is available these [regions](../overview.md#supported-regions).
21
20
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
22
21
23
22
## Operation format
24
23
25
-
An operation is a blah in a JSON document. The following sample JSON shows a complete operation.
24
+
A storage task contains a set of conditions and operations in a JSON document. The following snippet shows how conditions and operations appear in that document.
25
+
26
+
```json
27
+
"action": {
28
+
"if": {
29
+
"condition": "<clause>",
30
+
"operations": [
31
+
{
32
+
"name": "<operation name>",
33
+
"parameters": {....},
34
+
"onSuccess": "continue",
35
+
"onFailure": "break"
36
+
}
37
+
]
38
+
}
39
+
}
40
+
```
41
+
42
+
Each clause contains a _property_, a _value_, and an _operator_. When the storage task runs, it uses the operator to compare a property with a value to determine whether a clause is met by the target object. In a clause, the **operator** always appears first followed by the **property**, and then the **value**. The following image shows how each element is positioned in the expression.
43
+
44
+
> [!div class="mx-imgBorder"]
45
+
> 
46
+
47
+
The following clause allows operations only on Microsoft Word documents. This clause targets all documents that end with the file extension `.docx`. Therefore, the operator is `endsWith`, the property is `Name`, the value is `.docx`.
26
48
27
49
```json
28
50
{
29
-
Put Json here
51
+
"condition": "[[[endsWith(Name, '.docx')]]"
30
52
}
31
53
```
54
+
If you define conditions by using the Azure portal, you can see this JSON structure by opening the **Code** tab of the visual designer.
32
55
33
-
An operation is a blah, as described in the following table:
56
+
> [!div class="mx-imgBorder"]
57
+
> 
34
58
35
-
| Parameter name | Parameter type | Notes |
36
-
|----------------|----------------|-------|
37
-
|`field name here`| Type description | Explanation here.|
59
+
### Multiple clauses in a condition
38
60
39
-
## Operation example
61
+
A condition can contain multiple clauses separated by a comma along with either the string `and` or `or`. The string `and` targets objects that meet the criteria in all clauses in the condition while `or` targets objects that meet the criterion in any of the clauses in the condition. The following image shows the position of the `and` and `or` string along with two clauses.
40
62
41
-
Here is an example.
63
+
> [!div class="mx-imgBorder"]
64
+
> 
65
+
66
+
The following JSON shows a condition that contains two clauses. Because the `and` string is used in this expression, both clauses must evaluate to `true` before an operation is performed on the object.
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` string for the first clause in the group applies to the whole group.
77
+
78
+
The following image shows two clauses grouped together.
79
+
80
+
> [!div class="mx-imgBorder"]
81
+
> 
82
+
83
+
The following condition allows operations only on Microsoft Word documents where the `readyForLegalHold` tag of the document is set to a value of `Yes`. Operations are also performed on objects that are greater than 100 bytes even if the other two conditions are not true.
0 commit comments