Skip to main content

storage_tasks

Creates, updates, deletes, gets or lists a storage_tasks resource.

Overview

Namestorage_tasks
TypeResource
Idazure.storageactions.storage_tasks

Fields

The following fields are returned by SELECT queries:

OK -- properties retrieved successfully for the storage task.

NameDatatypeDescription
identityobjectThe managed service identity of the resource.
locationstringThe geo-location where the resource lives
propertiesobjectProperties of the storage task.
tagsobjectResource tags.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, storageTaskName, subscriptionIdGet the storage task properties
list_by_resource_groupselectresourceGroupName, subscriptionIdLists all the storage tasks available under the given resource group.
list_by_subscriptionselectsubscriptionIdLists all the storage tasks available under the subscription.
createinsertresourceGroupName, storageTaskName, subscriptionId, data__identity, data__propertiesAsynchronously creates a new storage task resource with the specified parameters. If a storage task is already created and a subsequent create request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
updateupdateresourceGroupName, storageTaskName, subscriptionIdUpdate storage task properties
deletedeleteresourceGroupName, storageTaskName, subscriptionIdDelete the storage task resource.
preview_actionsexecsubscriptionId, location, propertiesRuns the input conditions against input object metadata properties and designates matched objects in response.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationstringThe location to perform preview of the actions.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
storageTaskNamestringThe name of the storage task within the specified resource group. Storage task names must be between 3 and 18 characters in length and use numbers and lower-case letters only.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

Get the storage task properties

SELECT
identity,
location,
properties,
tags
FROM azure.storageactions.storage_tasks
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND storageTaskName = '{{ storageTaskName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Asynchronously creates a new storage task resource with the specified parameters. If a storage task is already created and a subsequent create request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.

INSERT INTO azure.storageactions.storage_tasks (
data__identity,
data__properties,
data__tags,
data__location,
resourceGroupName,
storageTaskName,
subscriptionId
)
SELECT
'{{ identity }}' /* required */,
'{{ properties }}' /* required */,
'{{ tags }}',
'{{ location }}',
'{{ resourceGroupName }}',
'{{ storageTaskName }}',
'{{ subscriptionId }}'
RETURNING
identity,
location,
properties,
tags
;

UPDATE examples

Update storage task properties

UPDATE azure.storageactions.storage_tasks
SET
data__identity = '{{ identity }}',
data__tags = '{{ tags }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND storageTaskName = '{{ storageTaskName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
identity,
location,
properties,
tags;

DELETE examples

Delete the storage task resource.

DELETE FROM azure.storageactions.storage_tasks
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND storageTaskName = '{{ storageTaskName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Runs the input conditions against input object metadata properties and designates matched objects in response.

EXEC azure.storageactions.storage_tasks.preview_actions 
@subscriptionId='{{ subscriptionId }}' --required,
@location='{{ location }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;