DataMigrationServiceCollection.CreateOrUpdate Method

Definition

The services resource is the top-level resource that represents the Database Migration Service. 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.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}
  • Operation Id: Services_CreateOrUpdate
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DataMigration.DataMigrationServiceResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string serviceName, Azure.ResourceManager.DataMigration.DataMigrationServiceData data, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.DataMigration.DataMigrationServiceData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DataMigration.DataMigrationServiceResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.DataMigration.DataMigrationServiceData * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.DataMigration.DataMigrationServiceResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, serviceName As String, data As DataMigrationServiceData, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of DataMigrationServiceResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

serviceName
String

Name of the service.

data
DataMigrationServiceData

Information about the service.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

serviceName is an empty string, and was expected to be non-empty.

serviceName or data is null.

Applies to