1. Packages
  2. Azure Classic
  3. API Docs
  4. blueprint
  5. getDefinition

We recommend using Azure Native.

Azure Classic v5.52.0 published on Monday, Oct 2, 2023 by Pulumi

azure.blueprint.getDefinition

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.52.0 published on Monday, Oct 2, 2023 by Pulumi

    Use this data source to access information about an existing Azure Blueprint Definition

    NOTE: Azure Blueprints are in Preview and potentially subject to breaking change without notice.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Azure.Core.GetClientConfig.Invoke();
    
        var root = Azure.Management.GetGroup.Invoke(new()
        {
            Name = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
        });
    
        var example = Azure.Blueprint.GetDefinition.Invoke(new()
        {
            Name = "exampleManagementGroupBP",
            ScopeId = root.Apply(getGroupResult => getGroupResult.Id),
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/blueprint"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := core.GetClientConfig(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		root, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
    			Name: pulumi.StringRef(current.TenantId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = blueprint.GetDefinition(ctx, &blueprint.GetDefinitionArgs{
    			Name:    "exampleManagementGroupBP",
    			ScopeId: root.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.management.ManagementFunctions;
    import com.pulumi.azure.management.inputs.GetGroupArgs;
    import com.pulumi.azure.blueprint.BlueprintFunctions;
    import com.pulumi.azure.blueprint.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 current = CoreFunctions.getClientConfig();
    
            final var root = ManagementFunctions.getGroup(GetGroupArgs.builder()
                .name(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                .build());
    
            final var example = BlueprintFunctions.getDefinition(GetDefinitionArgs.builder()
                .name("exampleManagementGroupBP")
                .scopeId(root.applyValue(getGroupResult -> getGroupResult.id()))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    current = azure.core.get_client_config()
    root = azure.management.get_group(name=current.tenant_id)
    example = azure.blueprint.get_definition(name="exampleManagementGroupBP",
        scope_id=root.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const current = azure.core.getClientConfig({});
    const root = current.then(current => azure.management.getGroup({
        name: current.tenantId,
    }));
    const example = root.then(root => azure.blueprint.getDefinition({
        name: "exampleManagementGroupBP",
        scopeId: root.id,
    }));
    
    variables:
      current:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
      root:
        fn::invoke:
          Function: azure:management:getGroup
          Arguments:
            name: ${current.tenantId}
      example:
        fn::invoke:
          Function: azure:blueprint:getDefinition
          Arguments:
            name: exampleManagementGroupBP
            scopeId: ${root.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,
                       scope_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDefinitionResult
    def get_definition_output(name: Optional[pulumi.Input[str]] = None,
                       scope_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDefinitionResult]
    func GetDefinition(ctx *Context, args *GetDefinitionArgs, opts ...InvokeOption) (*GetDefinitionResult, error)
    func GetDefinitionOutput(ctx *Context, args *GetDefinitionOutputArgs, opts ...InvokeOption) GetDefinitionResultOutput

    > Note: This function is named GetDefinition 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:blueprint/getDefinition:getDefinition
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string

    The name of the Blueprint.

    ScopeId string

    The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.

    Name string

    The name of the Blueprint.

    ScopeId string

    The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.

    name String

    The name of the Blueprint.

    scopeId String

    The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.

    name string

    The name of the Blueprint.

    scopeId string

    The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.

    name str

    The name of the Blueprint.

    scope_id str

    The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.

    name String

    The name of the Blueprint.

    scopeId String

    The ID of the Subscription or Management Group, as the scope at which the blueprint definition is stored.

    getDefinition Result

    The following output properties are available:

    Description string

    The description of the Blueprint Definition.

    DisplayName string

    The display name of the Blueprint Definition.

    Id string

    The provider-assigned unique ID for this managed resource.

    LastModified string

    The timestamp of when this last modification was saved to the Blueprint Definition.

    Name string
    ScopeId string
    TargetScope string

    The target scope.

    TimeCreated string

    The timestamp of when this Blueprint Definition was created.

    Versions List<string>

    A list of versions published for this Blueprint Definition.

    Description string

    The description of the Blueprint Definition.

    DisplayName string

    The display name of the Blueprint Definition.

    Id string

    The provider-assigned unique ID for this managed resource.

    LastModified string

    The timestamp of when this last modification was saved to the Blueprint Definition.

    Name string
    ScopeId string
    TargetScope string

    The target scope.

    TimeCreated string

    The timestamp of when this Blueprint Definition was created.

    Versions []string

    A list of versions published for this Blueprint Definition.

    description String

    The description of the Blueprint Definition.

    displayName String

    The display name of the Blueprint Definition.

    id String

    The provider-assigned unique ID for this managed resource.

    lastModified String

    The timestamp of when this last modification was saved to the Blueprint Definition.

    name String
    scopeId String
    targetScope String

    The target scope.

    timeCreated String

    The timestamp of when this Blueprint Definition was created.

    versions List<String>

    A list of versions published for this Blueprint Definition.

    description string

    The description of the Blueprint Definition.

    displayName string

    The display name of the Blueprint Definition.

    id string

    The provider-assigned unique ID for this managed resource.

    lastModified string

    The timestamp of when this last modification was saved to the Blueprint Definition.

    name string
    scopeId string
    targetScope string

    The target scope.

    timeCreated string

    The timestamp of when this Blueprint Definition was created.

    versions string[]

    A list of versions published for this Blueprint Definition.

    description str

    The description of the Blueprint Definition.

    display_name str

    The display name of the Blueprint Definition.

    id str

    The provider-assigned unique ID for this managed resource.

    last_modified str

    The timestamp of when this last modification was saved to the Blueprint Definition.

    name str
    scope_id str
    target_scope str

    The target scope.

    time_created str

    The timestamp of when this Blueprint Definition was created.

    versions Sequence[str]

    A list of versions published for this Blueprint Definition.

    description String

    The description of the Blueprint Definition.

    displayName String

    The display name of the Blueprint Definition.

    id String

    The provider-assigned unique ID for this managed resource.

    lastModified String

    The timestamp of when this last modification was saved to the Blueprint Definition.

    name String
    scopeId String
    targetScope String

    The target scope.

    timeCreated String

    The timestamp of when this Blueprint Definition was created.

    versions List<String>

    A list of versions published for this Blueprint Definition.

    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 Classic v5.52.0 published on Monday, Oct 2, 2023 by Pulumi