Storage Tasks - Preview Actions
Runs the input conditions against input object metadata properties and designates matched objects in response.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.StorageActions/locations/{location}/previewActions?api-version=2023-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
location
|
path | True |
string |
Represents an Azure geography region where supported resource providers live. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| properties.action | True |
Preview action to test |
|
| properties.blobs | True |
Properties of some sample blobs in the container to test for matches with the preview action. |
|
| properties.container | True |
Properties of a sample container to test for a match with the preview action. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
PerformStorageTaskActionsPreview
Sample request
POST https://management.azure.com/subscriptions/1f31ba14-ce16-4281-b9b4-3e78da6e1616/providers/Microsoft.StorageActions/locations/eastus/previewActions?api-version=2023-01-01
{
"properties": {
"action": {
"elseBlockExists": true,
"if": {
"condition": "[[equals(AccessTier, 'Hot')]]"
}
},
"blobs": [
{
"name": "folder1/file1.txt",
"metadata": [
{
"key": "mKey1",
"value": "mValue1"
}
],
"properties": [
{
"key": "Creation-Time",
"value": "Wed, 07 Jun 2023 05:23:29 GMT"
},
{
"key": "Last-Modified",
"value": "Wed, 07 Jun 2023 05:23:29 GMT"
},
{
"key": "Etag",
"value": "0x8DB67175454D36D"
},
{
"key": "Content-Length",
"value": "38619"
},
{
"key": "Content-Type",
"value": "text/xml"
},
{
"key": "Content-Encoding",
"value": ""
},
{
"key": "Content-Language",
"value": ""
},
{
"key": "Content-CRC64",
"value": ""
},
{
"key": "Content-MD5",
"value": "njr6iDrmU9+FC89WMK22EA=="
},
{
"key": "Cache-Control",
"value": ""
},
{
"key": "Content-Disposition",
"value": ""
},
{
"key": "BlobType",
"value": "BlockBlob"
},
{
"key": "AccessTier",
"value": "Hot"
},
{
"key": "AccessTierInferred",
"value": "true"
},
{
"key": "LeaseStatus",
"value": "unlocked"
},
{
"key": "LeaseState",
"value": "available"
},
{
"key": "ServerEncrypted",
"value": "true"
},
{
"key": "TagCount",
"value": "1"
}
],
"tags": [
{
"key": "tKey1",
"value": "tValue1"
}
]
},
{
"name": "folder2/file1.txt",
"metadata": [
{
"key": "mKey2",
"value": "mValue2"
}
],
"properties": [
{
"key": "Creation-Time",
"value": "Wed, 06 Jun 2023 05:23:29 GMT"
},
{
"key": "Last-Modified",
"value": "Wed, 06 Jun 2023 05:23:29 GMT"
},
{
"key": "Etag",
"value": "0x6FB67175454D36D"
}
],
"tags": [
{
"key": "tKey2",
"value": "tValue2"
}
]
}
],
"container": {
"name": "firstContainer",
"metadata": [
{
"key": "mContainerKey1",
"value": "mContainerValue1"
}
]
}
}
}
Sample response
{
"properties": {
"action": {
"elseBlockExists": true,
"if": {
"condition": "[[equals(AccessTier, 'Hot')]]"
}
},
"blobs": [
{
"name": "folder1/file1.txt",
"matchedBlock": "If",
"metadata": [
{
"key": "mKey1",
"value": "mValue1"
}
],
"properties": [
{
"key": "Creation-Time",
"value": "Wed, 07 Jun 2023 05:23:29 GMT"
},
{
"key": "Last-Modified",
"value": "Wed, 07 Jun 2023 05:23:29 GMT"
},
{
"key": "Etag",
"value": "0x8DB67175454D36D"
},
{
"key": "Content-Length",
"value": "38619"
},
{
"key": "Content-Type",
"value": "text/xml"
},
{
"key": "Content-Encoding",
"value": ""
},
{
"key": "Content-Language",
"value": ""
},
{
"key": "Content-CRC64",
"value": ""
},
{
"key": "Content-MD5",
"value": "njr6iDrmU9+FC89WMK22EA=="
},
{
"key": "Cache-Control",
"value": ""
},
{
"key": "Content-Disposition",
"value": ""
},
{
"key": "BlobType",
"value": "BlockBlob"
},
{
"key": "AccessTier",
"value": "Hot"
},
{
"key": "AccessTierInferred",
"value": "true"
},
{
"key": "LeaseStatus",
"value": "unlocked"
},
{
"key": "LeaseState",
"value": "available"
},
{
"key": "ServerEncrypted",
"value": "true"
},
{
"key": "TagCount",
"value": "1"
}
],
"tags": [
{
"key": "tKey1",
"value": "tValue1"
}
]
},
{
"name": "folder2/file1.txt",
"matchedBlock": "Else",
"metadata": [
{
"key": "mKey2",
"value": "mValue2"
}
],
"properties": [
{
"key": "Creation-Time",
"value": "Wed, 06 Jun 2023 05:23:29 GMT"
},
{
"key": "Last-Modified",
"value": "Wed, 06 Jun 2023 05:23:29 GMT"
},
{
"key": "Etag",
"value": "0x6FB67175454D36D"
}
],
"tags": [
{
"key": "tKey2",
"value": "tValue2"
}
]
}
],
"container": {
"name": "firstContainer",
"metadata": [
{
"key": "mContainerKey1",
"value": "mContainerValue1"
}
]
}
}
}
Definitions
| Name | Description |
|---|---|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Matched |
Represents the condition block name that matched blob properties. |
|
Storage |
Storage Task Preview Action. |
|
Storage |
Represents the storage task conditions to be tested for a match with container and blob properties. |
|
Storage |
Represents storage task preview action condition. |
|
Storage |
Storage task preview container properties |
|
Storage |
Storage task preview container properties |
|
Storage |
Storage task preview object key value pair properties. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
MatchedBlockName
Represents the condition block name that matched blob properties.
| Value | Description |
|---|---|
| If | |
| Else | |
| None |
StorageTaskPreviewAction
Storage Task Preview Action.
| Name | Type | Description |
|---|---|---|
| properties.action |
Preview action to test |
|
| properties.blobs |
Properties of some sample blobs in the container to test for matches with the preview action. |
|
| properties.container |
Properties of a sample container to test for a match with the preview action. |
StorageTaskPreviewActionCondition
Represents the storage task conditions to be tested for a match with container and blob properties.
| Name | Type | Description |
|---|---|---|
| elseBlockExists |
boolean |
Specify whether the else block is present in the condition. |
| if |
The condition to be tested for a match with container and blob properties. |
StorageTaskPreviewActionIfCondition
Represents storage task preview action condition.
| Name | Type | Description |
|---|---|---|
| condition |
string |
Storage task condition to bes tested for a match. |
StorageTaskPreviewBlobProperties
Storage task preview container properties
| Name | Type | Description |
|---|---|---|
| matchedBlock |
Represents the condition block name that matched blob properties. |
|
| metadata |
metadata key value pairs to be tested for a match against the provided condition. |
|
| name |
string |
Name of test blob |
| properties |
properties key value pairs to be tested for a match against the provided condition. |
|
| tags |
tags key value pairs to be tested for a match against the provided condition. |
StorageTaskPreviewContainerProperties
Storage task preview container properties
| Name | Type | Description |
|---|---|---|
| metadata |
metadata key value pairs to be tested for a match against the provided condition. |
|
| name |
string |
Name of test container |
StorageTaskPreviewKeyValueProperties
Storage task preview object key value pair properties.
| Name | Type | Description |
|---|---|---|
| key |
string |
Represents the key property of the pair. |
| value |
string |
Represents the value property of the pair. |