get Service
Use this data source to access information about an existing Database Migration Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.databasemigration.getService({
name: "example-dms",
resourceGroupName: "example-rg",
});
export const azurermDmsId = example.then(example => example.id);
Content copied to clipboard
import pulumi
import pulumi_azure as azure
example = azure.databasemigration.get_service(name="example-dms",
resource_group_name="example-rg")
pulumi.export("azurermDmsId", example.id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.DatabaseMigration.GetService.Invoke(new()
{
Name = "example-dms",
ResourceGroupName = "example-rg",
});
return new Dictionary<string, object?>
{
["azurermDmsId"] = example.Apply(getServiceResult => getServiceResult.Id),
};
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/databasemigration"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := databasemigration.LookupService(ctx, &databasemigration.LookupServiceArgs{
Name: "example-dms",
ResourceGroupName: "example-rg",
}, nil)
if err != nil {
return err
}
ctx.Export("azurermDmsId", example.Id)
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.databasemigration.DatabasemigrationFunctions;
import com.pulumi.azure.databasemigration.inputs.GetServiceArgs;
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) {
final var example = DatabasemigrationFunctions.getService(GetServiceArgs.builder()
.name("example-dms")
.resourceGroupName("example-rg")
.build());
ctx.export("azurermDmsId", example.id());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
function: azure:databasemigration:getService
arguments:
name: example-dms
resourceGroupName: example-rg
outputs:
azurermDmsId: ${example.id}
Content copied to clipboard
API Providers
This data source uses the following Azure API Providers:
Microsoft.DataMigration
: 2021-06-30
Return
A collection of values returned by getService.
Parameters
argument
A collection of arguments for invoking getService.
Return
A collection of values returned by getService.
Parameters
name
Specify the name of the database migration service.
resource Group Name
Specifies the Name of the Resource Group within which the database migration service exists
See also
Return
A collection of values returned by getService.
Parameters
argument
Builder for com.pulumi.azure.databasemigration.kotlin.inputs.GetServicePlainArgs.