ServiceArgs

data class ServiceArgs(val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val skuName: Output<String>? = null, val subnetId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<ServiceArgs>

Manages a Azure Database Migration Service.

NOTE: Destroying a Database Migration Service will leave any outstanding tasks untouched. This is to avoid unexpectedly deleting any tasks managed outside of this provide.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example-vnet",
addressSpaces: ["10&#46;0&#46;0&#46;0/16"],
location: example.location,
resourceGroupName: example.name,
});
const exampleSubnet = new azure.network.Subnet("example", {
name: "example-subnet",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10&#46;0&#46;1&#46;0/24"],
});
const exampleService = new azure.databasemigration.Service("example", {
name: "example-dms",
location: example.location,
resourceGroupName: example.name,
subnetId: exampleSubnet.id,
skuName: "Standard_1vCores",
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-rg",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example-vnet",
address_spaces=["10&#46;0&#46;0&#46;0/16"],
location=example.location,
resource_group_name=example.name)
example_subnet = azure.network.Subnet("example",
name="example-subnet",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10&#46;0&#46;1&#46;0/24"])
example_service = azure.databasemigration.Service("example",
name="example-dms",
location=example.location,
resource_group_name=example.name,
subnet_id=example_subnet.id,
sku_name="Standard_1vCores")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-rg",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example-vnet",
AddressSpaces = new[]
{
"10.0.0.0/16",
},
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleSubnet = new Azure.Network.Subnet("example", new()
{
Name = "example-subnet",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.1.0/24",
},
});
var exampleService = new Azure.DatabaseMigration.Service("example", new()
{
Name = "example-dms",
Location = example.Location,
ResourceGroupName = example.Name,
SubnetId = exampleSubnet.Id,
SkuName = "Standard_1vCores",
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databasemigration"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-rg"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example-vnet"),
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
Name: pulumi.String("example-subnet"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.1.0/24"),
},
})
if err != nil {
return err
}
_, err = databasemigration.NewService(ctx, "example", &databasemigration.ServiceArgs{
Name: pulumi.String("example-dms"),
Location: example.Location,
ResourceGroupName: example.Name,
SubnetId: exampleSubnet.ID(),
SkuName: pulumi.String("Standard_1vCores"),
})
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.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.databasemigration.Service;
import com.pulumi.azure.databasemigration.ServiceArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-rg")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-vnet")
.addressSpaces("10.0.0.0/16")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("example-subnet")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.1.0/24")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.name("example-dms")
.location(example.location())
.resourceGroupName(example.name())
.subnetId(exampleSubnet.id())
.skuName("Standard_1vCores")
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-rg
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example-vnet
addressSpaces:
- 10.0.0.0/16
location: ${example.location}
resourceGroupName: ${example.name}
exampleSubnet:
type: azure:network:Subnet
name: example
properties:
name: example-subnet
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.1.0/24
exampleService:
type: azure:databasemigration:Service
name: example
properties:
name: example-dms
location: ${example.location}
resourceGroupName: ${example.name}
subnetId: ${exampleSubnet.id}
skuName: Standard_1vCores

Import

Database Migration Services can be imported using the resource id, e.g.

$ pulumi import azure:databasemigration/service:Service example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-rg/providers/Microsoft.DataMigration/services/database_migration_service1

Constructors

Link copied to clipboard
constructor(location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, skuName: Output<String>? = null, subnetId: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val location: Output<String>? = null

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

Specify the name of the database migration service. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group in which to create the database migration service. Changing this forces a new resource to be created.

Link copied to clipboard
val skuName: Output<String>? = null

The SKU name of the database migration service. Possible values are Premium_4vCores, Standard_1vCores, Standard_2vCores and Standard_4vCores. Changing this forces a new resource to be created.

Link copied to clipboard
val subnetId: Output<String>? = null

The ID of the virtual subnet resource to which the database migration service should be joined. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assigned to the resource.

Functions

Link copied to clipboard
open override fun toJava(): ServiceArgs