We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.databasemigration.getProject
Explore with Pulumi AI
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.
- Resource
Group stringName - Name of the resource group where resource belongs to.
- Service
Name string - Name of the database migration service where resource belongs to.
- Name string
- Name of the database migration project.
- Resource
Group stringName - Name of the resource group where resource belongs to.
- Service
Name string - Name of the database migration service where resource belongs to.
- name String
- Name of the database migration project.
- resource
Group StringName - Name of the resource group where resource belongs to.
- service
Name String - Name of the database migration service where resource belongs to.
- name string
- Name of the database migration project.
- resource
Group stringName - Name of the resource group where resource belongs to.
- service
Name string - Name of the database migration service where resource belongs to.
- name str
- Name of the database migration project.
- resource_
group_ strname - 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.
- resource
Group StringName - Name of the resource group where resource belongs to.
- service
Name 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
- Resource
Group stringName - Service
Name string - Source
Platform string - The platform type of the migration source.
- Dictionary<string, string>
- A mapping of tags to assigned to the resource.
- Target
Platform 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
- Resource
Group stringName - Service
Name string - Source
Platform string - The platform type of the migration source.
- map[string]string
- A mapping of tags to assigned to the resource.
- Target
Platform 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
- resource
Group StringName - service
Name String - source
Platform String - The platform type of the migration source.
- Map<String,String>
- A mapping of tags to assigned to the resource.
- target
Platform 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
- resource
Group stringName - service
Name string - source
Platform string - The platform type of the migration source.
- {[key: string]: string}
- A mapping of tags to assigned to the resource.
- target
Platform 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_ strname - service_
name str - source_
platform str - The platform type of the migration source.
- 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
- resource
Group StringName - service
Name String - source
Platform String - The platform type of the migration source.
- Map<String>
- A mapping of tags to assigned to the resource.
- target
Platform 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.