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
LookupServicein 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.
- Resource
Group stringName Specifies the Name of the Resource Group within which the database migration service exists
- Name string
Specify the name of the database migration service.
- Resource
Group stringName Specifies the Name of the Resource Group within which the database migration service exists
- name string
Specify the name of the database migration service.
- resource
Group stringName 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_ strname 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
- Resource
Group stringName - Sku
Name string The sku name of database migration service.
- Subnet
Id string The ID of the virtual subnet resource to which the database migration service exists.
- 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
- Resource
Group stringName - Sku
Name string The sku name of database migration service.
- Subnet
Id string The ID of the virtual subnet resource to which the database migration service exists.
- 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
- resource
Group stringName - sku
Name string The sku name of database migration service.
- subnet
Id string The ID of the virtual subnet resource to which the database migration service exists.
- {[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_ strname - 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.
- 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
azurermTerraform Provider.