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

The following fields are returned by SELECT queries:

A service 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 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.
listselectsubscriptionId, groupName, serviceNameapi-version, taskTypeThe 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_updateinsertThe 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.
updateupdateThe 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.
deletedeletedeleteRunningTasksThe 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.
cancelexecsubscriptionId, groupName, serviceName, taskNameapi-versionThe 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.

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
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 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.

SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.data_migration.service_tasks
WHERE $expand = '{{ $expand }}'
;

INSERT examples

The 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.

INSERT INTO azure.data_migration.service_tasks (
data__etag,
data__properties
)
SELECT
'{{ etag }}',
'{{ properties }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;

UPDATE examples

The 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.

UPDATE azure.data_migration.service_tasks
SET
data__etag = '{{ etag }}',
data__properties = '{{ properties }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type;

DELETE examples

The 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.

DELETE FROM azure.data_migration.service_tasks
WHERE deleteRunningTasks = '{{ deleteRunningTasks }}'
;

Lifecycle Methods

The 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.

EXEC azure.data_migration.service_tasks.cancel 
@subscriptionId='{{ subscriptionId }}' --required,
@groupName='{{ groupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@taskName='{{ taskName }}' --required,
@api-version='{{ api-version }}'
;