storage_tasks
Creates, updates, deletes, gets or lists a storage_tasks resource.
Overview
| Name | storage_tasks |
| Type | Resource |
| Id | azure.storage_actions.storage_tasks |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list_by_subscription
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
action | object | The storage task action that is executed. Required. |
creationTimeInUtc | string (date-time) | The creation date and time of the storage task in UTC. |
description | string | Text that describes the purpose of the storage task. Required. |
enabled | boolean | Storage Task is enabled when set to true and disabled when set to false. Required. |
identity | object | The managed service identity of the resource. Required. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Represents the provisioning state of the storage task. Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed". (ValidateSubscriptionQuotaBegin, ValidateSubscriptionQuotaEnd, Accepted, Creating, Succeeded, Deleting, Canceled, Failed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
taskVersion | integer | Storage task version. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
action | object | The storage task action that is executed. Required. |
creationTimeInUtc | string (date-time) | The creation date and time of the storage task in UTC. |
description | string | Text that describes the purpose of the storage task. Required. |
enabled | boolean | Storage Task is enabled when set to true and disabled when set to false. Required. |
identity | object | The managed service identity of the resource. Required. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Represents the provisioning state of the storage task. Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed". (ValidateSubscriptionQuotaBegin, ValidateSubscriptionQuotaEnd, Accepted, Creating, Succeeded, Deleting, Canceled, Failed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
taskVersion | integer | Storage task version. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
action | object | The storage task action that is executed. Required. |
creationTimeInUtc | string (date-time) | The creation date and time of the storage task in UTC. |
description | string | Text that describes the purpose of the storage task. Required. |
enabled | boolean | Storage Task is enabled when set to true and disabled when set to false. Required. |
identity | object | The managed service identity of the resource. Required. |
location | string | The geo-location where the resource lives. Required. |
provisioningState | string | Represents the provisioning state of the storage task. Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed". (ValidateSubscriptionQuotaBegin, ValidateSubscriptionQuotaEnd, Accepted, Creating, Succeeded, Deleting, Canceled, Failed) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
taskVersion | integer | Storage task version. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, storage_task_name, subscription_id | Get the storage task properties. | |
list_by_resource_group | select | resource_group_name, subscription_id | Lists all the storage tasks available under the given resource group. | |
list_by_subscription | select | subscription_id | Lists all the storage tasks available under the subscription. | |
create | insert | resource_group_name, storage_task_name, subscription_id, location, identity, properties | 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. | |
update | update | resource_group_name, storage_task_name, subscription_id | Update storage task properties. | |
delete | delete | resource_group_name, storage_task_name, subscription_id | Delete the storage task resource. | |
preview_actions | exec | location, subscription_id, properties | Runs 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.
| Name | Datatype | Description |
|---|---|---|
location | string | Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
storage_task_name | string | The 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. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list_by_subscription
Get the storage task properties.
SELECT
id,
name,
action,
creationTimeInUtc,
description,
enabled,
identity,
location,
provisioningState,
systemData,
tags,
taskVersion,
type
FROM azure.storage_actions.storage_tasks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND storage_task_name = '{{ storage_task_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the storage tasks available under the given resource group.
SELECT
id,
name,
action,
creationTimeInUtc,
description,
enabled,
identity,
location,
provisioningState,
systemData,
tags,
taskVersion,
type
FROM azure.storage_actions.storage_tasks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the storage tasks available under the subscription.
SELECT
id,
name,
action,
creationTimeInUtc,
description,
enabled,
identity,
location,
provisioningState,
systemData,
tags,
taskVersion,
type
FROM azure.storage_actions.storage_tasks
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
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.storage_actions.storage_tasks (
tags,
location,
identity,
properties,
resource_group_name,
storage_task_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ identity }}' /* required */,
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ storage_task_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: storage_tasks
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the storage_tasks resource.
- name: storage_task_name
value: "{{ storage_task_name }}"
description: Required parameter for the storage_tasks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the storage_tasks resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: identity
description: |
The managed service identity of the resource. Required.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: properties
description: |
Properties of the storage task. Required.
value:
taskVersion: {{ taskVersion }}
enabled: {{ enabled }}
description: "{{ description }}"
action:
if:
condition: "{{ condition }}"
operations:
- name: "{{ name }}"
parameters: "{{ parameters }}"
onSuccess: "{{ onSuccess }}"
onFailure: "{{ onFailure }}"
else:
operations:
- name: "{{ name }}"
parameters: "{{ parameters }}"
onSuccess: "{{ onSuccess }}"
onFailure: "{{ onFailure }}"
provisioningState: "{{ provisioningState }}"
creationTimeInUtc: "{{ creationTimeInUtc }}"
UPDATE examples
- update
Update storage task properties.
UPDATE azure.storage_actions.storage_tasks
SET
identity = '{{ identity }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND storage_task_name = '{{ storage_task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Delete the storage task resource.
DELETE FROM azure.storage_actions.storage_tasks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND storage_task_name = '{{ storage_task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- preview_actions
Runs the input conditions against input object metadata properties and designates matched objects in response.
EXEC azure.storage_actions.storage_tasks.preview_actions
@location='{{ location }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;