storage_task_assignments
Creates, updates, deletes, gets or lists a storage_task_assignments resource.
Overview
| Name | storage_task_assignments |
| Type | Resource |
| Id | azure.storage.storage_task_assignments |
Fields
The following fields are returned by SELECT queries:
- get
- list
| 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. |
description | string | Text that describes the purpose of the storage task assignment. Required. |
enabled | boolean | Whether the storage task assignment is enabled or not. Required. |
executionContext | object | The storage task assignment execution context. Required. |
provisioningState | string | Represents the provisioning state of the storage task assignment. Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed". (ValidateSubscriptionQuotaBegin, ValidateSubscriptionQuotaEnd, Accepted, Creating, Succeeded, Deleting, Canceled, Failed) |
report | object | The storage task assignment report. Required. |
runStatus | object | Run status of storage task assignment. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
taskId | string | Id of the corresponding storage task. Required. |
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. |
description | string | Text that describes the purpose of the storage task assignment. Required. |
enabled | boolean | Whether the storage task assignment is enabled or not. Required. |
executionContext | object | The storage task assignment execution context. Required. |
provisioningState | string | Represents the provisioning state of the storage task assignment. Known values are: "ValidateSubscriptionQuotaBegin", "ValidateSubscriptionQuotaEnd", "Accepted", "Creating", "Succeeded", "Deleting", "Canceled", and "Failed". (ValidateSubscriptionQuotaBegin, ValidateSubscriptionQuotaEnd, Accepted, Creating, Succeeded, Deleting, Canceled, Failed) |
report | object | The storage task assignment report. Required. |
runStatus | object | Run status of storage task assignment. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
taskId | string | Id of the corresponding storage task. Required. |
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, account_name, storage_task_assignment_name, subscription_id | Get the storage task assignment properties. | |
list | select | resource_group_name, account_name, subscription_id | $top | List all the storage task assignments in an account. |
create | insert | resource_group_name, account_name, storage_task_assignment_name, subscription_id | Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment 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, account_name, storage_task_assignment_name, subscription_id | Update storage task assignment properties. | |
delete | delete | resource_group_name, account_name, storage_task_assignment_name, subscription_id | Delete the storage task assignment sub-resource. | |
stop_assignment | exec | resource_group_name, account_name, storage_task_assignment_name, subscription_id | Stops any active running storage action for the storage task assignment. |
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 |
|---|---|---|
account_name | string | The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
storage_task_assignment_name | string | The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 characters in length and use numbers and lower-case letters only. Required. |
subscription_id | string | |
$top | integer | Optional, specifies the maximum number of storage task assignment Ids to be included in the list response. Default value is None. |
SELECT examples
- get
- list
Get the storage task assignment properties.
SELECT
id,
name,
description,
enabled,
executionContext,
provisioningState,
report,
runStatus,
systemData,
taskId,
type
FROM azure.storage.storage_task_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND storage_task_assignment_name = '{{ storage_task_assignment_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
List all the storage task assignments in an account.
SELECT
id,
name,
description,
enabled,
executionContext,
provisioningState,
report,
runStatus,
systemData,
taskId,
type
FROM azure.storage.storage_task_assignments
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
;
INSERT examples
- create
- Manifest
Asynchronously creates a new storage task assignment sub-resource with the specified parameters. If a storage task assignment is already created and a subsequent create request is issued with different properties, the storage task assignment properties will be updated. If a storage task assignment 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.storage_task_assignments (
properties,
resource_group_name,
account_name,
storage_task_assignment_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ storage_task_assignment_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: storage_task_assignments
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the storage_task_assignments resource.
- name: account_name
value: "{{ account_name }}"
description: Required parameter for the storage_task_assignments resource.
- name: storage_task_assignment_name
value: "{{ storage_task_assignment_name }}"
description: Required parameter for the storage_task_assignments resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the storage_task_assignments resource.
- name: properties
description: |
Properties of the storage task assignment.
value:
taskId: "{{ taskId }}"
enabled: {{ enabled }}
description: "{{ description }}"
executionContext:
target:
prefix:
- "{{ prefix }}"
excludePrefix:
- "{{ excludePrefix }}"
trigger:
type: "{{ type }}"
parameters:
startFrom: "{{ startFrom }}"
interval: {{ interval }}
intervalUnit: "{{ intervalUnit }}"
endBy: "{{ endBy }}"
startOn: "{{ startOn }}"
report:
prefix: "{{ prefix }}"
provisioningState: "{{ provisioningState }}"
runStatus:
taskAssignmentId: "{{ taskAssignmentId }}"
storageAccountId: "{{ storageAccountId }}"
startTime: "{{ startTime }}"
finishTime: "{{ finishTime }}"
objectsTargetedCount: "{{ objectsTargetedCount }}"
objectsOperatedOnCount: "{{ objectsOperatedOnCount }}"
objectFailedCount: "{{ objectFailedCount }}"
objectsSucceededCount: "{{ objectsSucceededCount }}"
runStatusError: "{{ runStatusError }}"
runStatusEnum: "{{ runStatusEnum }}"
summaryReportPath: "{{ summaryReportPath }}"
taskId: "{{ taskId }}"
taskVersion: "{{ taskVersion }}"
runResult: "{{ runResult }}"
UPDATE examples
- update
Update storage task assignment properties.
UPDATE azure.storage.storage_task_assignments
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND storage_task_assignment_name = '{{ storage_task_assignment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Delete the storage task assignment sub-resource.
DELETE FROM azure.storage.storage_task_assignments
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND storage_task_assignment_name = '{{ storage_task_assignment_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- stop_assignment
Stops any active running storage action for the storage task assignment.
EXEC azure.storage.storage_task_assignments.stop_assignment
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@storage_task_assignment_name='{{ storage_task_assignment_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;