Skip to main content

migration_services

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

Overview

Namemigration_services
TypeResource
Idazure.data_migration.migration_services

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.
integrationRuntimeStatestringCurrent state of the Integration runtime.
locationstringThe geo-location where the resource lives. Required.
provisioningStatestringProvisioning state to track the async operation status. Known values are: "Provisioning", "Updating", "Succeeded", "Failed", and "Canceled". (Provisioning, Updating, Succeeded, Failed, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
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
getselectresource_group_name, migration_service_name, subscription_idRetrieve the Database Migration Service.
list_by_resource_groupselectresource_group_name, subscription_idRetrieve all migration services in the resource group.
list_by_subscriptionselectsubscription_idRetrieve all migration services in the subscriptions.
create_or_updateinsertresource_group_name, migration_service_name, subscription_id, locationCreate or Update Database Migration Service.
updateupdateresource_group_name, migration_service_name, subscription_idUpdate Database Migration Service.
create_or_updatereplaceresource_group_name, migration_service_name, subscription_id, locationCreate or Update Database Migration Service.
deletedeleteresource_group_name, migration_service_name, subscription_idDelete Database Migration Service.
list_migrationsexecresource_group_name, migration_service_name, subscription_idRetrieve the List of database migrations attached to the service.

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
migration_service_namestringName of the Migration Service. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Retrieve the Database Migration Service.

SELECT
id,
name,
integrationRuntimeState,
location,
provisioningState,
systemData,
tags,
type
FROM azure.data_migration.migration_services
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND migration_service_name = '{{ migration_service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or Update Database Migration Service.

INSERT INTO azure.data_migration.migration_services (
tags,
location,
properties,
resource_group_name,
migration_service_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ migration_service_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update Database Migration Service.

UPDATE azure.data_migration.migration_services
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND migration_service_name = '{{ migration_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

REPLACE examples

Create or Update Database Migration Service.

REPLACE azure.data_migration.migration_services
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND migration_service_name = '{{ migration_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete Database Migration Service.

DELETE FROM azure.data_migration.migration_services
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND migration_service_name = '{{ migration_service_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Retrieve the List of database migrations attached to the service.

EXEC azure.data_migration.migration_services.list_migrations 
@resource_group_name='{{ resource_group_name }}' --required,
@migration_service_name='{{ migration_service_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;