GetService

Use this data source to access information about an existing Database Migration Service.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.DatabaseMigration.GetService.InvokeAsync(new Azure.DatabaseMigration.GetServiceArgs
        {
            Name = "example-dms",
            ResourceGroupName = "example-rg",
        }));
        this.AzurermDmsId = example.Apply(example => example.Id);
    }

    [Output("azurermDmsId")]
    public Output<string> AzurermDmsId { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/databasemigration"
    "github.com/pulumi/pulumi/sdk/v2/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
    })
}
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)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = pulumi.output(azure.databasemigration.getService({
    name: "example-dms",
    resourceGroupName: "example-rg",
}, { async: true }));

export const azurermDmsId = example.id;

Using GetService

function getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function  get_service(name=None, resource_group_name=None, opts=None)
func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)

Note: This function is named LookupService in the Go SDK.

public static class GetService {
    public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specify the name of the database migration service.

ResourceGroupName string

Specifies the Name of the Resource Group within which the database migration service exists

Name string

Specify the name of the database migration service.

ResourceGroupName string

Specifies the Name of the Resource Group within which the database migration service exists

name string

Specify the name of the database migration service.

resourceGroupName string

Specifies the Name of the Resource Group within which the database migration service exists

name str

Specify the name of the database migration service.

resource_group_name str

Specifies the Name of the Resource Group within which the database migration service exists

GetService Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Location string

Azure location where the resource exists.

Name string
ResourceGroupName string
SkuName string

The sku name of database migration service.

SubnetId string

The ID of the virtual subnet resource to which the database migration service exists.

Tags Dictionary<string, string>

A mapping of tags to assigned to the resource.

Id string

The provider-assigned unique ID for this managed resource.

Location string

Azure location where the resource exists.

Name string
ResourceGroupName string
SkuName string

The sku name of database migration service.

SubnetId string

The ID of the virtual subnet resource to which the database migration service exists.

Tags map[string]string

A mapping of tags to assigned to the resource.

id string

The provider-assigned unique ID for this managed resource.

location string

Azure location where the resource exists.

name string
resourceGroupName string
skuName string

The sku name of database migration service.

subnetId string

The ID of the virtual subnet resource to which the database migration service exists.

tags {[key: string]: string}

A mapping of tags to assigned to the resource.

id str

The provider-assigned unique ID for this managed resource.

location str

Azure location where the resource exists.

name str
resource_group_name str
sku_name str

The sku name of database migration service.

subnet_id str

The ID of the virtual subnet resource to which the database migration service exists.

tags Dict[str, str]

A mapping of tags to assigned to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.