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
Copy file name to clipboardExpand all lines: articles/storage-actions/storage-tasks/storage-task-conditions.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,17 +14,12 @@ ms.author: normesta
14
14
15
15
# Storage task conditions
16
16
17
-
This article describes the format of a storage task condition and the properties and operators that you can use to compose the clauses of a condition.
17
+
A storage task contains a set of conditions and operations. This article describes the JSON format of a storage task condition. Understanding that format is important if you plan to create a storage task by using a tool other than the Azure portal (For example: Azure PowerShell, or Azure CLI). This article also lists the properties and operators that you can use to compose the clauses of a condition.
18
18
19
19
> [!IMPORTANT]
20
20
> Azure Storage Actions is currently in PREVIEW and is available these [regions](../overview.md#supported-regions).
21
21
> 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
22
23
-
A storage task contains a set of conditions and operations in a JSON document. The following image shows how a single condition and operation appear in a the document.
24
-
25
-
> [!div class="mx-imgBorder"]
26
-
> 
27
-
28
23
## Condition format
29
24
30
25
A condition a collection of one or more _clauses_. 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.
@@ -39,10 +34,6 @@ The following clause allows operations only on Microsoft Word documents. This cl
39
34
"condition": "[[[endsWith(Name, '.docx')]]"
40
35
}
41
36
```
42
-
If you define conditions by using the Azure portal, you can see this JSON structure by opening the **Code** tab of the visual designer.
43
-
44
-
> [!div class="mx-imgBorder"]
45
-
> 
46
37
47
38
### Multiple clauses in a condition
48
39
@@ -76,6 +67,15 @@ The following condition allows operations only on Microsoft Word documents where
76
67
}
77
68
```
78
69
70
+
## Code view in the Azure portal
71
+
72
+
The visual editor available in the Azure portal, can generate the JSON of a condition for you. You can define your conditions by using the editor, and then obtain the JSON expression by opening **Code** tab. The following image shows the **Code** tab in the visual editor.
73
+
74
+
> [!div class="mx-imgBorder"]
75
+
> 
76
+
77
+
To learn more about the visual editor, see [Define storage task conditions and operations](storage-task-conditions-operations-edit.md).
78
+
79
79
## Supported properties
80
80
81
81
The following table shows the properties that you can use to compose each clause of a condition. A clause can contain string, boolean, numeric, as well as date and time properties.
Copy file name to clipboardExpand all lines: articles/storage-actions/storage-tasks/storage-task-operations.md
+18-19Lines changed: 18 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,32 +13,31 @@ ms.author: normesta
13
13
14
14
# Storage task operations
15
15
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).
16
+
A storage task contains a set of conditions and operations. An operation is an action that a storage task performs on each object that meets the requirements of each condition. This article describes the JSON format of a storage task operation. Understanding that format is important if you plan to create a storage task by using a tool other than the Azure portal (For example: Azure PowerShell, or Azure CLI). This article also lists the operations, operation parameters, and the allowable values of each parameter.
17
+
18
+
To learn more about conditions, see [Storage task conditions](storage-task-conditions.md).
17
19
18
20
> [!IMPORTANT]
19
21
> Azure Storage Actions is currently in PREVIEW and is available these [regions](../overview.md#supported-regions).
20
22
> 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.
21
23
22
-
A storage task contains a set of conditions and operations in a JSON document. The following image shows how a single condition and operation appear in a the document.
24
+
## Operation format
23
25
24
-
> [!div class="mx-imgBorder"]
25
-
> 
26
+
An operation has a name along with zero, one, or multiple parameters. The following image shows how these elements appear for an operation in the JSON template of a storage task.
26
27
27
-
## Operation format
28
+
> [!div class="mx-imgBorder"]
29
+
> 
28
30
29
-
An operation has a name along with zero, one, or multiple parameters. The following table describes each element that makes up the operation definition.
31
+
The following table describes each element.
30
32
31
33
| Element | Description |
32
34
|---|--|
33
-
|`name`| The name of the operation. For a full list of names, see the [Supported operations](#supported-operations) section of this article.|
34
-
|`parameters`| A collection of one or more parameters. Each parameter has parameter name and a parameter value. For a list of parameters and parameter values, see the [Supported operations](#supported-operations) section of this article.|
35
+
|`name`| The name of the operation.<sup>1</sup>|
36
+
|`parameters`| A collection of one or more parameters. Each parameter has parameter name and a parameter value.<sup>1</sup>|
35
37
|`onSuccess`| The action to take when the operation is successful for an object. `continue` is the only allowable value during the preview. |
36
38
|`onFailure`| The action to take when the operation fails for a object. `break` is the only allowable value during the preview. |
37
39
38
-
The following image shows where each element appears in the definition.
39
-
40
-
> [!div class="mx-imgBorder"]
41
-
> 
40
+
<sup>1</sup> For a complete list of operation names, operation parameters and parameter values, see the [Supported operations](#supported-operations) section of this article.
42
41
43
42
The following operations applies applies a time-based immutability policy to the object.
44
43
@@ -95,13 +94,13 @@ The following table shows the supported operations, parameters, and parameter va
0 commit comments