tasks
Creates, updates, deletes, gets or lists a tasks
resource.
Overview
Name | tasks |
Type | Resource |
Id | azure.data_migration.tasks |
Fields
The following fields are returned by SELECT
queries:
- get
- list
A task resource
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
properties | object | Custom task properties |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Got tasks
Name | Datatype | Description |
---|---|---|
id | string (arm-id) | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name | string | The name of the resource |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
properties | object | Custom task properties |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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 | $expand | The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The GET method retrieves information about a task. | |
list | select | subscriptionId , groupName , serviceName , projectName | api-version , taskType | The services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task. |
create_or_update | insert | The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an existing one. | ||
update | update | The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The PATCH method updates an existing task, but since tasks have no mutable custom properties, there is little reason to do so. | ||
delete | delete | deleteRunningTasks | The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The DELETE method deletes a task, canceling it first if it's running. | |
cancel | exec | subscriptionId , groupName , serviceName , projectName , taskName | api-version | The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. This method cancels a task if it's currently queued or running. |
command | exec | subscriptionId , groupName , serviceName , projectName , taskName , commandType | api-version | The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. This method executes a command on a running task. |
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 |
---|---|---|
groupName | string | Name of the resource group |
projectName | string | Name of the project |
serviceName | string | Name of the service |
subscriptionId | string | Subscription ID that identifies an Azure subscription. |
taskName | string | Name of the Task |
$expand | string | Expand the response |
api-version | string | Version of the API |
deleteRunningTasks | boolean | Delete the resource even if it contains running tasks |
taskType | string | Filter tasks by task type |
SELECT
examples
- get
- list
The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The GET method retrieves information about a task.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.data_migration.tasks
WHERE $expand = '{{ $expand }}'
;
The services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of tasks owned by a service resource. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.data_migration.tasks
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND groupName = '{{ groupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND projectName = '{{ projectName }}' -- required
AND api-version = '{{ api-version }}'
AND taskType = '{{ taskType }}'
;
INSERT
examples
- create_or_update
- Manifest
The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The PUT method creates a new task or updates an existing one, although since tasks have no mutable custom properties, there is little reason to update an existing one.
INSERT INTO azure.data_migration.tasks (
data__etag,
data__properties
)
SELECT
'{{ etag }}',
'{{ properties }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: tasks
props:
- name: etag
value: string
description: |
HTTP strong entity tag value. This is ignored if submitted.
- name: properties
value: object
description: |
Custom task properties
UPDATE
examples
- update
The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The PATCH method updates an existing task, but since tasks have no mutable custom properties, there is little reason to do so.
UPDATE azure.data_migration.tasks
SET
data__etag = '{{ etag }}',
data__properties = '{{ properties }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type;
DELETE
examples
- delete
The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The DELETE method deletes a task, canceling it first if it's running.
DELETE FROM azure.data_migration.tasks
WHERE deleteRunningTasks = '{{ deleteRunningTasks }}'
;
Lifecycle Methods
- cancel
- command
The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. This method cancels a task if it's currently queued or running.
EXEC azure.data_migration.tasks.cancel
@subscriptionId='{{ subscriptionId }}' --required,
@groupName='{{ groupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@projectName='{{ projectName }}' --required,
@taskName='{{ taskName }}' --required,
@api-version='{{ api-version }}'
;
The tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. This method executes a command on a running task.
EXEC azure.data_migration.tasks.command
@subscriptionId='{{ subscriptionId }}' --required,
@groupName='{{ groupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@projectName='{{ projectName }}' --required,
@taskName='{{ taskName }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"commandType": "{{ commandType }}"
}'
;