We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.managedapplication.getDefinition
Explore with Pulumi AI
Uses this data source to access information about an existing Managed Application Definition.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.managedapplication.getDefinition({
name: "examplemanagedappdef",
resourceGroupName: "exampleresources",
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.managedapplication.get_definition(name="examplemanagedappdef",
resource_group_name="exampleresources")
pulumi.export("id", example.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedapplication"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := managedapplication.LookupDefinition(ctx, &managedapplication.LookupDefinitionArgs{
Name: "examplemanagedappdef",
ResourceGroupName: "exampleresources",
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.ManagedApplication.GetDefinition.Invoke(new()
{
Name = "examplemanagedappdef",
ResourceGroupName = "exampleresources",
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getDefinitionResult => getDefinitionResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.managedapplication.ManagedapplicationFunctions;
import com.pulumi.azure.managedapplication.inputs.GetDefinitionArgs;
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 = ManagedapplicationFunctions.getDefinition(GetDefinitionArgs.builder()
.name("examplemanagedappdef")
.resourceGroupName("exampleresources")
.build());
ctx.export("id", example.applyValue(getDefinitionResult -> getDefinitionResult.id()));
}
}
variables:
example:
fn::invoke:
Function: azure:managedapplication:getDefinition
Arguments:
name: examplemanagedappdef
resourceGroupName: exampleresources
outputs:
id: ${example.id}
Using getDefinition
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 getDefinition(args: GetDefinitionArgs, opts?: InvokeOptions): Promise<GetDefinitionResult>
function getDefinitionOutput(args: GetDefinitionOutputArgs, opts?: InvokeOptions): Output<GetDefinitionResult>
def get_definition(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDefinitionResult
def get_definition_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDefinitionResult]
func LookupDefinition(ctx *Context, args *LookupDefinitionArgs, opts ...InvokeOption) (*LookupDefinitionResult, error)
func LookupDefinitionOutput(ctx *Context, args *LookupDefinitionOutputArgs, opts ...InvokeOption) LookupDefinitionResultOutput
> Note: This function is named LookupDefinition
in the Go SDK.
public static class GetDefinition
{
public static Task<GetDefinitionResult> InvokeAsync(GetDefinitionArgs args, InvokeOptions? opts = null)
public static Output<GetDefinitionResult> Invoke(GetDefinitionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDefinitionResult> getDefinition(GetDefinitionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:managedapplication/getDefinition:getDefinition
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Specifies the name of the Managed Application Definition.
- Resource
Group stringName - Specifies the name of the Resource Group where this Managed Application Definition exists.
- Name string
- Specifies the name of the Managed Application Definition.
- Resource
Group stringName - Specifies the name of the Resource Group where this Managed Application Definition exists.
- name String
- Specifies the name of the Managed Application Definition.
- resource
Group StringName - Specifies the name of the Resource Group where this Managed Application Definition exists.
- name string
- Specifies the name of the Managed Application Definition.
- resource
Group stringName - Specifies the name of the Resource Group where this Managed Application Definition exists.
- name str
- Specifies the name of the Managed Application Definition.
- resource_
group_ strname - Specifies the name of the Resource Group where this Managed Application Definition exists.
- name String
- Specifies the name of the Managed Application Definition.
- resource
Group StringName - Specifies the name of the Resource Group where this Managed Application Definition exists.
getDefinition Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Resource
Group stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- Name string
- Resource
Group stringName
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- resource
Group StringName
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- name string
- resource
Group stringName
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- name str
- resource_
group_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- name String
- resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.