Skip to main content

service_tasks

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

Overview

Nameservice_tasks
TypeResource
Idazure.data_migration.service_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
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, serviceName, subscriptionId, taskNameThe service tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The GET method retrieves information about a service task.
listSELECTgroupName, serviceName, subscriptionIdThe services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of service level 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, serviceName, subscriptionId, taskNameThe service tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The PUT method creates a new service task or updates an existing one, although since service tasks have no mutable custom properties, there is little reason to update an existing one.
deleteDELETEgroupName, serviceName, subscriptionId, taskNameThe service tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The DELETE method deletes a service task, canceling it first if it's running.
updateUPDATEgroupName, serviceName, subscriptionId, taskNameThe service tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. The PATCH method updates an existing service task, but since service tasks have no mutable custom properties, there is little reason to do so.
cancelEXECgroupName, serviceName, subscriptionId, taskNameThe service tasks resource is a nested, proxy-only resource representing work performed by a DMS (classic) instance. This method cancels a service task if it's currently queued or running.

SELECT examples

The services resource is the top-level resource that represents the Azure Database Migration Service (classic). This method returns a list of service level 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,
serviceName,
state,
subscriptionId,
system_data,
taskName,
task_type,
type
FROM azure.data_migration.vw_service_tasks
WHERE groupName = '{{ groupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a service_tasks resource.

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

DELETE example

Deletes the specified service_tasks resource.

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