1. Packages
  2. Azure Classic
  3. API Docs
  4. databasemigration
  5. getProject

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.databasemigration.getProject

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.databasemigration.getProject({
        name: "example-dbms-project",
        resourceGroupName: "example-rg",
        serviceName: "example-dbms",
    });
    export const name = example.then(example => example.name);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.databasemigration.get_project(name="example-dbms-project",
        resource_group_name="example-rg",
        service_name="example-dbms")
    pulumi.export("name", example.name)
    
    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.LookupProject(ctx, &databasemigration.LookupProjectArgs{
    			Name:              "example-dbms-project",
    			ResourceGroupName: "example-rg",
    			ServiceName:       "example-dbms",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("name", example.Name)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.DatabaseMigration.GetProject.Invoke(new()
        {
            Name = "example-dbms-project",
            ResourceGroupName = "example-rg",
            ServiceName = "example-dbms",
        });
    
        return new Dictionary<string, object?>
        {
            ["name"] = example.Apply(getProjectResult => getProjectResult.Name),
        };
    });
    
    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.GetProjectArgs;
    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.getProject(GetProjectArgs.builder()
                .name("example-dbms-project")
                .resourceGroupName("example-rg")
                .serviceName("example-dbms")
                .build());
    
            ctx.export("name", example.applyValue(getProjectResult -> getProjectResult.name()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:databasemigration:getProject
          Arguments:
            name: example-dbms-project
            resourceGroupName: example-rg
            serviceName: example-dbms
    outputs:
      name: ${example.name}
    

    Using getProject

    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 getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
    function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
    def get_project(name: Optional[str] = None,
                    resource_group_name: Optional[str] = None,
                    service_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetProjectResult
    def get_project_output(name: Optional[pulumi.Input[str]] = None,
                    resource_group_name: Optional[pulumi.Input[str]] = None,
                    service_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
    func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
    func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput

    > Note: This function is named LookupProject in the Go SDK.

    public static class GetProject 
    {
        public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:databasemigration/getProject:getProject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the database migration project.
    ResourceGroupName string
    Name of the resource group where resource belongs to.
    ServiceName string
    Name of the database migration service where resource belongs to.
    Name string
    Name of the database migration project.
    ResourceGroupName string
    Name of the resource group where resource belongs to.
    ServiceName string
    Name of the database migration service where resource belongs to.
    name String
    Name of the database migration project.
    resourceGroupName String
    Name of the resource group where resource belongs to.
    serviceName String
    Name of the database migration service where resource belongs to.
    name string
    Name of the database migration project.
    resourceGroupName string
    Name of the resource group where resource belongs to.
    serviceName string
    Name of the database migration service where resource belongs to.
    name str
    Name of the database migration project.
    resource_group_name str
    Name of the resource group where resource belongs to.
    service_name str
    Name of the database migration service where resource belongs to.
    name String
    Name of the database migration project.
    resourceGroupName String
    Name of the resource group where resource belongs to.
    serviceName String
    Name of the database migration service where resource belongs to.

    getProject 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
    ServiceName string
    SourcePlatform string
    The platform type of the migration source.
    Tags Dictionary<string, string>
    A mapping of tags to assigned to the resource.
    TargetPlatform string
    The platform type of the migration target.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Azure location where the resource exists.
    Name string
    ResourceGroupName string
    ServiceName string
    SourcePlatform string
    The platform type of the migration source.
    Tags map[string]string
    A mapping of tags to assigned to the resource.
    TargetPlatform string
    The platform type of the migration target.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    Azure location where the resource exists.
    name String
    resourceGroupName String
    serviceName String
    sourcePlatform String
    The platform type of the migration source.
    tags Map<String,String>
    A mapping of tags to assigned to the resource.
    targetPlatform String
    The platform type of the migration target.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    Azure location where the resource exists.
    name string
    resourceGroupName string
    serviceName string
    sourcePlatform string
    The platform type of the migration source.
    tags {[key: string]: string}
    A mapping of tags to assigned to the resource.
    targetPlatform string
    The platform type of the migration target.
    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
    service_name str
    source_platform str
    The platform type of the migration source.
    tags Mapping[str, str]
    A mapping of tags to assigned to the resource.
    target_platform str
    The platform type of the migration target.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    Azure location where the resource exists.
    name String
    resourceGroupName String
    serviceName String
    sourcePlatform String
    The platform type of the migration source.
    tags Map<String>
    A mapping of tags to assigned to the resource.
    targetPlatform String
    The platform type of the migration target.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi