Service
An Azure Database Migration Service (classic) resource Uses Azure REST API version 2023-07-15-preview. In version 2.x of the Azure Native provider, it used API version 2021-06-30. Other available API versions: 2021-06-30, 2021-10-30-preview, 2022-01-30-preview, 2022-03-30-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native datamigration [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Services_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var service = new AzureNative.DataMigration.Service("service", new()
{
GroupName = "DmsSdkRg",
Location = "southcentralus",
ServiceName = "DmsSdkService",
Sku = new AzureNative.DataMigration.Inputs.ServiceSkuArgs
{
Name = "Basic_1vCore",
},
VirtualSubnetId = "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default",
});
});
package main
import (
datamigration "github.com/pulumi/pulumi-azure-native-sdk/datamigration/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datamigration.NewService(ctx, "service", &datamigration.ServiceArgs{
GroupName: pulumi.String("DmsSdkRg"),
Location: pulumi.String("southcentralus"),
ServiceName: pulumi.String("DmsSdkService"),
Sku: &datamigration.ServiceSkuArgs{
Name: pulumi.String("Basic_1vCore"),
},
VirtualSubnetId: pulumi.String("/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.datamigration.Service;
import com.pulumi.azurenative.datamigration.ServiceArgs;
import com.pulumi.azurenative.datamigration.inputs.ServiceSkuArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var service = new Service("service", ServiceArgs.builder()
.groupName("DmsSdkRg")
.location("southcentralus")
.serviceName("DmsSdkService")
.sku(ServiceSkuArgs.builder()
.name("Basic_1vCore")
.build())
.virtualSubnetId("/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkTestNetwork/providers/Microsoft.Network/virtualNetworks/DmsSdkTestNetwork/subnets/default")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:datamigration:Service DmsSdkService /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}
Properties
The time delay before the service is auto-stopped when idle.
The Azure API version of the resource.
Whether service resources should be deleted when stopped. (Turned on by default)
The resource's provisioning state
Service SKU
The ID of the Microsoft.Network/networkInterfaces resource which the service have
The ID of the Microsoft.Network/virtualNetworks/subnets resource to which the service should be joined