Skip to main content

tasks

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

Overview

Nametasks
TypeResource
Idazure.data_migration.tasks

Fields

The following fields are returned by SELECT queries:

A task resource

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringHTTP strong entity tag value. This is ignored if submitted.
propertiesobjectCustom task properties
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselect$expandThe tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The GET method retrieves information about a task.
listselectsubscriptionId, groupName, serviceName, projectNameapi-version, taskTypeThe 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_updateinsertThe 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.
updateupdateThe 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.
deletedeletedeleteRunningTasksThe 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.
cancelexecsubscriptionId, groupName, serviceName, projectName, taskNameapi-versionThe 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.
commandexecsubscriptionId, groupName, serviceName, projectName, taskName, commandTypeapi-versionThe 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.

NameDatatypeDescription
groupNamestringName of the resource group
projectNamestringName of the project
serviceNamestringName of the service
subscriptionIdstringSubscription ID that identifies an Azure subscription.
taskNamestringName of the Task
$expandstringExpand the response
api-versionstringVersion of the API
deleteRunningTasksbooleanDelete the resource even if it contains running tasks
taskTypestringFilter tasks by task type

SELECT examples

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 }}'
;

INSERT examples

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
;

UPDATE examples

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

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

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 }}'
;