Skip to main content

tasks

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

Overview

Nametasks
TypeResource
Idazure.data_migration.tasks

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
client_datatextfield from the properties object
commandstextfield from the properties object
errorstextfield from the properties object
etagtextHTTP strong entity tag value. This is ignored if submitted.
groupNametextfield from the properties object
projectNametextfield from the properties object
serviceNametextfield from the properties object
statetextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
taskNametextfield from the properties object
task_typetextfield from the properties object
typetextResource type.

Methods

NameAccessible byRequired ParamsDescription
getSELECTgroupName, projectName, serviceName, subscriptionId, taskNameThe tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The GET method retrieves information about a task.
listSELECTgroupName, projectName, serviceName, subscriptionIdThe 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_updateINSERTgroupName, projectName, serviceName, subscriptionId, taskNameThe 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.
deleteDELETEgroupName, projectName, serviceName, subscriptionId, taskNameThe 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.
updateUPDATEgroupName, projectName, serviceName, subscriptionId, taskNameThe 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.
cancelEXECgroupName, projectName, serviceName, subscriptionId, taskNameThe 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.
commandEXECgroupName, projectName, serviceName, subscriptionId, taskName, data__commandTypeThe 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.

SELECT examples

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,
client_data,
commands,
errors,
etag,
groupName,
projectName,
serviceName,
state,
subscriptionId,
system_data,
taskName,
task_type,
type
FROM azure.data_migration.vw_tasks
WHERE groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new tasks resource.

/*+ create */
INSERT INTO azure.data_migration.tasks (
groupName,
projectName,
serviceName,
subscriptionId,
taskName,
etag,
properties
)
SELECT
'{{ groupName }}',
'{{ projectName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ taskName }}',
'{{ etag }}',
'{{ properties }}'
;

UPDATE example

Updates a tasks resource.

/*+ update */
UPDATE azure.data_migration.tasks
SET
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND taskName = '{{ taskName }}';

DELETE example

Deletes the specified tasks resource.

/*+ delete */
DELETE FROM azure.data_migration.tasks
WHERE groupName = '{{ groupName }}'
AND projectName = '{{ projectName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND taskName = '{{ taskName }}';