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:

Successfully retrieved the Migration Service.

NameDatatypeDescription
idstring
namestring
locationstring
propertiesobjectThe Migration Service properties.
systemDataobject
tagsobject
typestring

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, migrationServiceName, subscriptionIdRetrieve the Database Migration Service
list_by_resource_groupselectresourceGroupName, subscriptionIdRetrieve all migration services in the resource group.
list_by_subscriptionselectsubscriptionIdRetrieve all migration services in the subscriptions.
create_or_updateinsertresourceGroupName, migrationServiceName, subscriptionIdCreate or Update Database Migration Service.
updateupdateresourceGroupName, migrationServiceName, subscriptionIdUpdate Database Migration Service.
deletedeleteresourceGroupName, migrationServiceName, subscriptionIdDelete Database Migration 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
migrationServiceNamestringName of the Migration Service.
resourceGroupNamestringName of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
subscriptionIdstringSubscription ID that identifies an Azure subscription.

SELECT examples

Retrieve the Database Migration Service

SELECT
id,
name,
location,
properties,
systemData,
tags,
type
FROM azure.data_migration.migration_services
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND migrationServiceName = '{{ migrationServiceName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Create or Update Database Migration Service.

INSERT INTO azure.data_migration.migration_services (
data__location,
data__tags,
data__properties,
resourceGroupName,
migrationServiceName,
subscriptionId
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ migrationServiceName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update Database Migration Service.

UPDATE azure.data_migration.migration_services
SET
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND migrationServiceName = '{{ migrationServiceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete Database Migration Service.

DELETE FROM azure.data_migration.migration_services
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND migrationServiceName = '{{ migrationServiceName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;