We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.databasemigration.getService
Explore with Pulumi AI
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);
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)
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
})
}
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),
};
});
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.applyValue(getServiceResult -> getServiceResult.id()));
}
}
variables:
example:
fn::invoke:
Function: azure:databasemigration:getService
Arguments:
name: example-dms
resourceGroupName: example-rg
outputs:
azurermDmsId: ${example.id}
Using getService
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOptions): Output<GetServiceResult>
def get_service(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceResult
def get_service_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceResult]
func LookupService(ctx *Context, args *LookupServiceArgs, opts ...InvokeOption) (*LookupServiceResult, error)
func LookupServiceOutput(ctx *Context, args *LookupServiceOutputArgs, opts ...InvokeOption) LookupServiceResultOutput
> Note: This function is named LookupService
in the Go SDK.
public static class GetService
{
public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:databasemigration/getService:getService
arguments:
# arguments dictionary
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 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
- 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
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.
- 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.
- Mapping[str, str]
- 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>
- A mapping of tags to assigned to the resource.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.