1. Packages
  2. Azure Classic
  3. API Docs
  4. managementgroups
  5. getManagementGroup

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.managementgroups.getManagementGroup

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi
    Deprecated: azure.managementgroups.getManagementGroup has been deprecated in favor of azure.management.getGroup

    Use this data source to access information about an existing Management Group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.management.getGroup({
        name: "00000000-0000-0000-0000-000000000000",
    });
    export const displayName = example.then(example => example.displayName);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.management.get_group(name="00000000-0000-0000-0000-000000000000")
    pulumi.export("displayName", example.display_name)
    
    package main
    
    import (
    	"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 {
    		example, err := management.LookupGroup(ctx, &management.LookupGroupArgs{
    			Name: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("displayName", example.DisplayName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Management.GetGroup.Invoke(new()
        {
            Name = "00000000-0000-0000-0000-000000000000",
        });
    
        return new Dictionary<string, object?>
        {
            ["displayName"] = example.Apply(getGroupResult => getGroupResult.DisplayName),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.management.ManagementFunctions;
    import com.pulumi.azure.management.inputs.GetGroupArgs;
    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 = ManagementFunctions.getGroup(GetGroupArgs.builder()
                .name("00000000-0000-0000-0000-000000000000")
                .build());
    
            ctx.export("displayName", example.applyValue(getGroupResult -> getGroupResult.displayName()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:management:getGroup
          Arguments:
            name: 00000000-0000-0000-0000-000000000000
    outputs:
      displayName: ${example.displayName}
    

    Using getManagementGroup

    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 getManagementGroup(args: GetManagementGroupArgs, opts?: InvokeOptions): Promise<GetManagementGroupResult>
    function getManagementGroupOutput(args: GetManagementGroupOutputArgs, opts?: InvokeOptions): Output<GetManagementGroupResult>
    def get_management_group(display_name: Optional[str] = None,
                             name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetManagementGroupResult
    def get_management_group_output(display_name: Optional[pulumi.Input[str]] = None,
                             name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetManagementGroupResult]
    func LookupManagementGroup(ctx *Context, args *LookupManagementGroupArgs, opts ...InvokeOption) (*LookupManagementGroupResult, error)
    func LookupManagementGroupOutput(ctx *Context, args *LookupManagementGroupOutputArgs, opts ...InvokeOption) LookupManagementGroupResultOutput

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

    public static class GetManagementGroup 
    {
        public static Task<GetManagementGroupResult> InvokeAsync(GetManagementGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetManagementGroupResult> Invoke(GetManagementGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetManagementGroupResult> getManagementGroup(GetManagementGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azure:managementgroups/getManagementGroup:getManagementGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DisplayName string

    Specifies the display name of this Management Group.

    NOTE Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.

    Name string
    Specifies the name or UUID of this Management Group.
    DisplayName string

    Specifies the display name of this Management Group.

    NOTE Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.

    Name string
    Specifies the name or UUID of this Management Group.
    displayName String

    Specifies the display name of this Management Group.

    NOTE Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.

    name String
    Specifies the name or UUID of this Management Group.
    displayName string

    Specifies the display name of this Management Group.

    NOTE Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.

    name string
    Specifies the name or UUID of this Management Group.
    display_name str

    Specifies the display name of this Management Group.

    NOTE Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.

    name str
    Specifies the name or UUID of this Management Group.
    displayName String

    Specifies the display name of this Management Group.

    NOTE Whilst multiple management groups may share the same display name, when filtering, the provider expects a single management group to be found with this name.

    name String
    Specifies the name or UUID of this Management Group.

    getManagementGroup Result

    The following output properties are available:

    AllManagementGroupIds List<string>
    A list of Management Group IDs which directly or indirectly belong to this Management Group.
    AllSubscriptionIds List<string>
    A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
    DisplayName string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagementGroupIds List<string>
    A list of Management Group IDs which directly belong to this Management Group.
    Name string
    ParentManagementGroupId string
    The ID of any Parent Management Group.
    SubscriptionIds List<string>
    A list of Subscription IDs which are directly assigned to this Management Group.
    TenantScopedId string
    The Management Group ID with the Tenant ID prefix.
    AllManagementGroupIds []string
    A list of Management Group IDs which directly or indirectly belong to this Management Group.
    AllSubscriptionIds []string
    A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
    DisplayName string
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagementGroupIds []string
    A list of Management Group IDs which directly belong to this Management Group.
    Name string
    ParentManagementGroupId string
    The ID of any Parent Management Group.
    SubscriptionIds []string
    A list of Subscription IDs which are directly assigned to this Management Group.
    TenantScopedId string
    The Management Group ID with the Tenant ID prefix.
    allManagementGroupIds List<String>
    A list of Management Group IDs which directly or indirectly belong to this Management Group.
    allSubscriptionIds List<String>
    A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
    displayName String
    id String
    The provider-assigned unique ID for this managed resource.
    managementGroupIds List<String>
    A list of Management Group IDs which directly belong to this Management Group.
    name String
    parentManagementGroupId String
    The ID of any Parent Management Group.
    subscriptionIds List<String>
    A list of Subscription IDs which are directly assigned to this Management Group.
    tenantScopedId String
    The Management Group ID with the Tenant ID prefix.
    allManagementGroupIds string[]
    A list of Management Group IDs which directly or indirectly belong to this Management Group.
    allSubscriptionIds string[]
    A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
    displayName string
    id string
    The provider-assigned unique ID for this managed resource.
    managementGroupIds string[]
    A list of Management Group IDs which directly belong to this Management Group.
    name string
    parentManagementGroupId string
    The ID of any Parent Management Group.
    subscriptionIds string[]
    A list of Subscription IDs which are directly assigned to this Management Group.
    tenantScopedId string
    The Management Group ID with the Tenant ID prefix.
    all_management_group_ids Sequence[str]
    A list of Management Group IDs which directly or indirectly belong to this Management Group.
    all_subscription_ids Sequence[str]
    A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
    display_name str
    id str
    The provider-assigned unique ID for this managed resource.
    management_group_ids Sequence[str]
    A list of Management Group IDs which directly belong to this Management Group.
    name str
    parent_management_group_id str
    The ID of any Parent Management Group.
    subscription_ids Sequence[str]
    A list of Subscription IDs which are directly assigned to this Management Group.
    tenant_scoped_id str
    The Management Group ID with the Tenant ID prefix.
    allManagementGroupIds List<String>
    A list of Management Group IDs which directly or indirectly belong to this Management Group.
    allSubscriptionIds List<String>
    A list of Subscription IDs which are assigned to this Management Group or its children Management Groups.
    displayName String
    id String
    The provider-assigned unique ID for this managed resource.
    managementGroupIds List<String>
    A list of Management Group IDs which directly belong to this Management Group.
    name String
    parentManagementGroupId String
    The ID of any Parent Management Group.
    subscriptionIds List<String>
    A list of Subscription IDs which are directly assigned to this Management Group.
    tenantScopedId String
    The Management Group ID with the Tenant ID prefix.

    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.81.0 published on Monday, Jun 24, 2024 by Pulumi