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:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
clientDataobjectKey value pairs of client data to attach meta data information to task.
commandsarrayArray of command properties.
errorsarrayArray of errors. This is ignored if submitted.
etagstringHTTP strong entity tag value. This is ignored if submitted.
statestringThe state of the task. This is ignored if submitted. Known values are: "Unknown", "Queued", "Running", "Canceled", "Succeeded", "Failed", "FailedInputValidation", and "Faulted". (Unknown, Queued, Running, Canceled, Succeeded, Failed, FailedInputValidation, Faulted)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
taskTypestringTask type. Required. Known values are: "Connect.MongoDb", "ConnectToSource.SqlServer", "ConnectToSource.SqlServer.Sync", "ConnectToSource.PostgreSql.Sync", "ConnectToSource.MySql", "ConnectToSource.Oracle.Sync", "ConnectToTarget.SqlDb", "ConnectToTarget.SqlDb.Sync", "ConnectToTarget.AzureDbForPostgreSql.Sync", "ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync", "ConnectToTarget.AzureSqlDbMI", "ConnectToTarget.AzureSqlDbMI.Sync.LRS", "ConnectToTarget.AzureDbForMySql", "GetUserTables.Sql", "GetUserTables.AzureSqlDb.Sync", "GetUserTablesOracle", "GetUserTablesPostgreSql", "GetUserTablesMySql", "Migrate.MongoDb", "Migrate.SqlServer.AzureSqlDbMI", "Migrate.SqlServer.AzureSqlDbMI.Sync.LRS", "Migrate.SqlServer.SqlDb", "Migrate.SqlServer.AzureSqlDb.Sync", "Migrate.MySql.AzureDbForMySql.Sync", "Migrate.MySql.AzureDbForMySql", "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "Migrate.Oracle.AzureDbForPostgreSql.Sync", "ValidateMigrationInput.SqlServer.SqlDb.Sync", "ValidateMigrationInput.SqlServer.AzureSqlDbMI", "ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS", "Validate.MongoDb", "Validate.Oracle.AzureDbPostgreSql.Sync", "GetTDECertificates.Sql", "Migrate.Ssis", "Service.Check.OCI", "Service.Upload.OCI", "Service.Install.OCI", and "MigrateSchemaSqlServerSqlDb".
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
getselectgroup_name, service_name, task_name, subscription_id$expandGet service task information. 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.
listselectgroup_name, service_name, subscription_idtaskTypeGet service level tasks for a service. 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.
create_or_updateinsertgroup_name, service_name, task_name, subscription_idCreate or update service task. 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.
updateupdategroup_name, service_name, task_name, subscription_idCreate or update service task. 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.
create_or_updatereplacegroup_name, service_name, task_name, subscription_idCreate or update service task. 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.
deletedeletegroup_name, service_name, task_name, subscription_iddeleteRunningTasksDelete service task. 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.
cancelexecgroup_name, service_name, task_name, subscription_idCancel a service task. 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.

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
group_namestringName of the resource group. Required.
service_namestringName of the service. Required.
subscription_idstring
task_namestringName of the Task. Required.
$expandstringExpand the response. Default value is None.
deleteRunningTasksbooleanDelete the resource even if it contains running tasks. Default value is None.
taskTypestringFilter tasks by task type. Default value is None.

SELECT examples

Get service task information. 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,
clientData,
commands,
errors,
etag,
state,
systemData,
taskType,
type
FROM azure.data_migration.service_tasks
WHERE group_name = '{{ group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND task_name = '{{ task_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Create or update service task. 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 (
properties,
etag,
group_name,
service_name,
task_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ etag }}',
'{{ group_name }}',
'{{ service_name }}',
'{{ task_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;

UPDATE examples

Create or update service task. 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
properties = '{{ properties }}',
etag = '{{ etag }}'
WHERE
group_name = '{{ group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND task_name = '{{ task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
systemData,
type;

REPLACE examples

Create or update service task. 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.

REPLACE azure.data_migration.service_tasks
SET
properties = '{{ properties }}',
etag = '{{ etag }}'
WHERE
group_name = '{{ group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND task_name = '{{ task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
properties,
systemData,
type;

DELETE examples

Delete service task. 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 group_name = '{{ group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND task_name = '{{ task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND deleteRunningTasks = '{{ deleteRunningTasks }}'
;

Lifecycle Methods

Cancel a service task. 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 
@group_name='{{ group_name }}' --required,
@service_name='{{ service_name }}' --required,
@task_name='{{ task_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;