Services - Create Or Update

Create or update DMS (classic) Instance
The services resource is the top-level resource that represents the Azure Database Migration Service (classic). The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", which refers to a VM-based service, although other kinds may be added in the future. This method can change the kind, SKU, and network of the service, but if tasks are currently running (i.e. the service is busy), this will fail with 400 Bad Request ("ServiceIsBusy"). The provider will reply when successful with 200 OK or 201 Created. Long-running operations use the provisioningState property.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}?api-version=2022-03-30-preview

URI Parameters

Name In Required Type Description
groupName
path True

string

Name of the resource group

serviceName
path True

string

Name of the service

subscriptionId
path True

string

Subscription ID that identifies an Azure subscription.

api-version
query True

string

Version of the API

Request Body

Name Type Description
etag

string

HTTP strong entity tag value. Ignored if submitted

kind

string

The resource kind. Only 'vm' (the default) is supported.

location

string

properties.autoStopDelay

string

The time delay before the service is auto-stopped when idle.

properties.deleteResourcesOnStop

boolean

Whether service resources should be deleted when stopped. (Turned on by default)

properties.publicKey

string

The public key of the service, used to encrypt secrets sent to the service

properties.virtualNicId

string

The ID of the Microsoft.Network/networkInterfaces resource which the service have

properties.virtualSubnetId

string

The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined

sku

ServiceSku

Service SKU

tags

object

Responses

Name Type Description
200 OK

DataMigrationService

Service updated

201 Created

DataMigrationService

Service created (use provisioningState)

202 Accepted

Update accepted

Other Status Codes

ApiError

Error

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Services_CreateOrUpdate

Sample Request

PUT https://management.azure.com/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService?api-version=2022-03-30-preview

{
  "properties": {
    "virtualSubnetId": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default"
  },
  "sku": {
    "name": "Basic_1vCore"
  },
  "location": "southcentralus"
}

Sample Response

{
  "properties": {
    "provisioningState": "Accepted",
    "virtualSubnetId": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default"
  },
  "etag": "9QuK/U0GvTJpjIrlOzITXVy68+bmmQ3bFkHudLxmkUw=",
  "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService",
  "location": "southcentralus",
  "name": "DmsSdkService",
  "sku": {
    "name": "Basic_1vCore",
    "size": "1 vCore",
    "tier": "Basic"
  },
  "type": "Microsoft.DataMigration/services"
}
{
  "properties": {
    "provisioningState": "Accepted",
    "virtualSubnetId": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default"
  },
  "etag": "9QuK/U0GvTJpjIrlOzITXVy68+bmmQ3bFkHudLxmkUw=",
  "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService",
  "location": "southcentralus",
  "name": "DmsSdkService",
  "sku": {
    "name": "Basic_1vCore",
    "size": "1 vCore",
    "tier": "Basic"
  },
  "type": "Microsoft.DataMigration/services"
}

Definitions

Name Description
ApiError

Error information.

createdByType
DataMigrationService

An Azure Database Migration Service (classic) resource

ODataError

Error information in OData format.

ServiceProvisioningState

The resource's provisioning state

ServiceSku

An Azure SKU instance

SystemData

ApiError

Error information.

Name Type Description
error

ODataError

Error information in OData format

systemData

SystemData

Metadata pertaining to creation and last modification of the resource.

createdByType

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DataMigrationService

An Azure Database Migration Service (classic) resource

Name Type Description
etag

string

HTTP strong entity tag value. Ignored if submitted

id

string

kind

string

The resource kind. Only 'vm' (the default) is supported.

location

string

name

string

properties.autoStopDelay

string

The time delay before the service is auto-stopped when idle.

properties.deleteResourcesOnStop

boolean

Whether service resources should be deleted when stopped. (Turned on by default)

properties.provisioningState

ServiceProvisioningState

The resource's provisioning state

properties.publicKey

string

The public key of the service, used to encrypt secrets sent to the service

properties.virtualNicId

string

The ID of the Microsoft.Network/networkInterfaces resource which the service have

properties.virtualSubnetId

string

The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined

sku

ServiceSku

Service SKU

systemData

SystemData

Metadata pertaining to creation and last modification of the resource.

tags

object

type

string

ODataError

Error information in OData format.

Name Type Description
code

string

The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError'

details

ODataError[]

Inner errors that caused this error

message

string

The human-readable description of the error

ServiceProvisioningState

The resource's provisioning state

Name Type Description
Accepted

string

Deleting

string

Deploying

string

Failed

string

FailedToStart

string

FailedToStop

string

Starting

string

Stopped

string

Stopping

string

Succeeded

string

ServiceSku

An Azure SKU instance

Name Type Description
capacity

integer

The capacity of the SKU, if it supports scaling

family

string

The SKU family, used when the service has multiple performance classes within a tier, such as 'A', 'D', etc. for virtual machines

name

string

The unique name of the SKU, such as 'P3'

size

string

The size of the SKU, used when the name alone does not denote a service size or when a SKU has multiple performance classes within a family, e.g. 'A1' for virtual machines

tier

string

The tier of the SKU, such as 'Basic', 'General Purpose', or 'Business Critical'

SystemData

Name Type Description
createdAt

string

createdBy

string

createdByType

createdByType

lastModifiedAt

string

lastModifiedBy

string

lastModifiedByType

createdByType