service_tasks
Creates, updates, deletes, gets or lists a service_tasks resource.
Overview
| Name | service_tasks |
| Type | Resource |
| Id | azure.data_migration.service_tasks |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
clientData | object | Key value pairs of client data to attach meta data information to task. |
commands | array | Array of command properties. |
errors | array | Array of errors. This is ignored if submitted. |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
state | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
taskType | string | Task 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". |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
clientData | object | Key value pairs of client data to attach meta data information to task. |
commands | array | Array of command properties. |
errors | array | Array of errors. This is ignored if submitted. |
etag | string | HTTP strong entity tag value. This is ignored if submitted. |
state | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
taskType | string | Task 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". |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | group_name, service_name, task_name, subscription_id | $expand | 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. |
list | select | group_name, service_name, subscription_id | taskType | Get 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_update | insert | group_name, service_name, task_name, subscription_id | 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. | |
update | update | group_name, service_name, task_name, subscription_id | 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. | |
create_or_update | replace | group_name, service_name, task_name, subscription_id | 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. | |
delete | delete | group_name, service_name, task_name, subscription_id | deleteRunningTasks | 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. |
cancel | exec | group_name, service_name, task_name, subscription_id | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
group_name | string | Name of the resource group. Required. |
service_name | string | Name of the service. Required. |
subscription_id | string | |
task_name | string | Name of the Task. Required. |
$expand | string | Expand the response. Default value is None. |
deleteRunningTasks | boolean | Delete the resource even if it contains running tasks. Default value is None. |
taskType | string | Filter tasks by task type. Default value is None. |
SELECT examples
- get
- list
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 }}'
;
Get 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.
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 subscription_id = '{{ subscription_id }}' -- required
AND taskType = '{{ taskType }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_tasks
props:
- name: group_name
value: "{{ group_name }}"
description: Required parameter for the service_tasks resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the service_tasks resource.
- name: task_name
value: "{{ task_name }}"
description: Required parameter for the service_tasks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the service_tasks resource.
- name: properties
description: |
Custom task properties.
value:
taskType: "{{ taskType }}"
errors:
- code: "{{ code }}"
message: "{{ message }}"
details: "{{ details }}"
state: "{{ state }}"
commands:
- commandType: "{{ commandType }}"
errors: "{{ errors }}"
state: "{{ state }}"
clientData: "{{ clientData }}"
- name: etag
value: "{{ etag }}"
description: |
HTTP strong entity tag value. This is ignored if submitted.
UPDATE examples
- update
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
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
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
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
;