1. Packages
  2. AWS
  3. API Docs
  4. connect
  5. getUserHierarchyGroup
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

aws.connect.getUserHierarchyGroup

Start a Neo task
Explain and create an aws.connect.getUserHierarchyGroup resource
aws logo
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

    Provides details about a specific Amazon Connect User Hierarchy Group.

    Example Usage

    By name

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.connect.getUserHierarchyGroup({
        instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
        name: "Example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.connect.get_user_hierarchy_group(instance_id="aaaaaaaa-bbbb-cccc-dddd-111111111111",
        name="Example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := connect.LookupUserHierarchyGroup(ctx, &connect.LookupUserHierarchyGroupArgs{
    			InstanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    			Name:       pulumi.StringRef("Example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Connect.GetUserHierarchyGroup.Invoke(new()
        {
            InstanceId = "aaaaaaaa-bbbb-cccc-dddd-111111111111",
            Name = "Example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.connect.ConnectFunctions;
    import com.pulumi.aws.connect.inputs.GetUserHierarchyGroupArgs;
    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 = ConnectFunctions.getUserHierarchyGroup(GetUserHierarchyGroupArgs.builder()
                .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
                .name("Example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:connect:getUserHierarchyGroup
          arguments:
            instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111
            name: Example
    

    By hierarchy_group_id

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.connect.getUserHierarchyGroup({
        instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
        hierarchyGroupId: "cccccccc-bbbb-cccc-dddd-111111111111",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.connect.get_user_hierarchy_group(instance_id="aaaaaaaa-bbbb-cccc-dddd-111111111111",
        hierarchy_group_id="cccccccc-bbbb-cccc-dddd-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/connect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := connect.LookupUserHierarchyGroup(ctx, &connect.LookupUserHierarchyGroupArgs{
    			InstanceId:       "aaaaaaaa-bbbb-cccc-dddd-111111111111",
    			HierarchyGroupId: pulumi.StringRef("cccccccc-bbbb-cccc-dddd-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Connect.GetUserHierarchyGroup.Invoke(new()
        {
            InstanceId = "aaaaaaaa-bbbb-cccc-dddd-111111111111",
            HierarchyGroupId = "cccccccc-bbbb-cccc-dddd-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.connect.ConnectFunctions;
    import com.pulumi.aws.connect.inputs.GetUserHierarchyGroupArgs;
    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 = ConnectFunctions.getUserHierarchyGroup(GetUserHierarchyGroupArgs.builder()
                .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
                .hierarchyGroupId("cccccccc-bbbb-cccc-dddd-111111111111")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: aws:connect:getUserHierarchyGroup
          arguments:
            instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111
            hierarchyGroupId: cccccccc-bbbb-cccc-dddd-111111111111
    

    Using getUserHierarchyGroup

    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 getUserHierarchyGroup(args: GetUserHierarchyGroupArgs, opts?: InvokeOptions): Promise<GetUserHierarchyGroupResult>
    function getUserHierarchyGroupOutput(args: GetUserHierarchyGroupOutputArgs, opts?: InvokeOptions): Output<GetUserHierarchyGroupResult>
    def get_user_hierarchy_group(hierarchy_group_id: Optional[str] = None,
                                 instance_id: Optional[str] = None,
                                 name: Optional[str] = None,
                                 region: Optional[str] = None,
                                 tags: Optional[Mapping[str, str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetUserHierarchyGroupResult
    def get_user_hierarchy_group_output(hierarchy_group_id: Optional[pulumi.Input[str]] = None,
                                 instance_id: Optional[pulumi.Input[str]] = None,
                                 name: Optional[pulumi.Input[str]] = None,
                                 region: Optional[pulumi.Input[str]] = None,
                                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetUserHierarchyGroupResult]
    func LookupUserHierarchyGroup(ctx *Context, args *LookupUserHierarchyGroupArgs, opts ...InvokeOption) (*LookupUserHierarchyGroupResult, error)
    func LookupUserHierarchyGroupOutput(ctx *Context, args *LookupUserHierarchyGroupOutputArgs, opts ...InvokeOption) LookupUserHierarchyGroupResultOutput

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

    public static class GetUserHierarchyGroup 
    {
        public static Task<GetUserHierarchyGroupResult> InvokeAsync(GetUserHierarchyGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetUserHierarchyGroupResult> Invoke(GetUserHierarchyGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetUserHierarchyGroupResult> getUserHierarchyGroup(GetUserHierarchyGroupArgs args, InvokeOptions options)
    public static Output<GetUserHierarchyGroupResult> getUserHierarchyGroup(GetUserHierarchyGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:connect/getUserHierarchyGroup:getUserHierarchyGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    Reference to the hosting Amazon Connect Instance
    HierarchyGroupId string
    Returns information on a specific hierarchy group by hierarchy group id
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags Dictionary<string, string>
    Map of tags to assign to the hierarchy group.
    InstanceId string
    Reference to the hosting Amazon Connect Instance
    HierarchyGroupId string
    Returns information on a specific hierarchy group by hierarchy group id
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Tags map[string]string
    Map of tags to assign to the hierarchy group.
    instanceId String
    Reference to the hosting Amazon Connect Instance
    hierarchyGroupId String
    Returns information on a specific hierarchy group by hierarchy group id
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String,String>
    Map of tags to assign to the hierarchy group.
    instanceId string
    Reference to the hosting Amazon Connect Instance
    hierarchyGroupId string
    Returns information on a specific hierarchy group by hierarchy group id
    name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags {[key: string]: string}
    Map of tags to assign to the hierarchy group.
    instance_id str
    Reference to the hosting Amazon Connect Instance
    hierarchy_group_id str
    Returns information on a specific hierarchy group by hierarchy group id
    name str

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Mapping[str, str]
    Map of tags to assign to the hierarchy group.
    instanceId String
    Reference to the hosting Amazon Connect Instance
    hierarchyGroupId String
    Returns information on a specific hierarchy group by hierarchy group id
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    tags Map<String>
    Map of tags to assign to the hierarchy group.

    getUserHierarchyGroup Result

    The following output properties are available:

    Arn string
    ARN of the hierarchy group.
    HierarchyGroupId string
    HierarchyPaths List<GetUserHierarchyGroupHierarchyPath>
    Block that contains information about the levels in the hierarchy group. The hierarchy_path block is documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    LevelId string
    Identifier of the level in the hierarchy group.
    Name string
    Name of the hierarchy group.
    Region string
    Tags Dictionary<string, string>
    Map of tags to assign to the hierarchy group.
    Arn string
    ARN of the hierarchy group.
    HierarchyGroupId string
    HierarchyPaths []GetUserHierarchyGroupHierarchyPath
    Block that contains information about the levels in the hierarchy group. The hierarchy_path block is documented below.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId string
    LevelId string
    Identifier of the level in the hierarchy group.
    Name string
    Name of the hierarchy group.
    Region string
    Tags map[string]string
    Map of tags to assign to the hierarchy group.
    arn String
    ARN of the hierarchy group.
    hierarchyGroupId String
    hierarchyPaths List<GetUserHierarchyGroupHierarchyPath>
    Block that contains information about the levels in the hierarchy group. The hierarchy_path block is documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    levelId String
    Identifier of the level in the hierarchy group.
    name String
    Name of the hierarchy group.
    region String
    tags Map<String,String>
    Map of tags to assign to the hierarchy group.
    arn string
    ARN of the hierarchy group.
    hierarchyGroupId string
    hierarchyPaths GetUserHierarchyGroupHierarchyPath[]
    Block that contains information about the levels in the hierarchy group. The hierarchy_path block is documented below.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId string
    levelId string
    Identifier of the level in the hierarchy group.
    name string
    Name of the hierarchy group.
    region string
    tags {[key: string]: string}
    Map of tags to assign to the hierarchy group.
    arn str
    ARN of the hierarchy group.
    hierarchy_group_id str
    hierarchy_paths Sequence[GetUserHierarchyGroupHierarchyPath]
    Block that contains information about the levels in the hierarchy group. The hierarchy_path block is documented below.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id str
    level_id str
    Identifier of the level in the hierarchy group.
    name str
    Name of the hierarchy group.
    region str
    tags Mapping[str, str]
    Map of tags to assign to the hierarchy group.
    arn String
    ARN of the hierarchy group.
    hierarchyGroupId String
    hierarchyPaths List<Property Map>
    Block that contains information about the levels in the hierarchy group. The hierarchy_path block is documented below.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId String
    levelId String
    Identifier of the level in the hierarchy group.
    name String
    Name of the hierarchy group.
    region String
    tags Map<String>
    Map of tags to assign to the hierarchy group.

    Supporting Types

    GetUserHierarchyGroupHierarchyPath

    levelFives List<Property Map>
    Details of level five. See below.
    levelFours List<Property Map>
    Details of level four. See below.
    levelOnes List<Property Map>
    Details of level one. See below.
    levelThrees List<Property Map>
    Details of level three. See below.
    levelTwos List<Property Map>
    Details of level two. See below.

    GetUserHierarchyGroupHierarchyPathLevelFife

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn string
    ARN of the hierarchy group.
    id string
    The identifier of the hierarchy group.
    name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn str
    ARN of the hierarchy group.
    id str
    The identifier of the hierarchy group.
    name str

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    GetUserHierarchyGroupHierarchyPathLevelFour

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn string
    ARN of the hierarchy group.
    id string
    The identifier of the hierarchy group.
    name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn str
    ARN of the hierarchy group.
    id str
    The identifier of the hierarchy group.
    name str

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    GetUserHierarchyGroupHierarchyPathLevelOne

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn string
    ARN of the hierarchy group.
    id string
    The identifier of the hierarchy group.
    name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn str
    ARN of the hierarchy group.
    id str
    The identifier of the hierarchy group.
    name str

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    GetUserHierarchyGroupHierarchyPathLevelThree

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn string
    ARN of the hierarchy group.
    id string
    The identifier of the hierarchy group.
    name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn str
    ARN of the hierarchy group.
    id str
    The identifier of the hierarchy group.
    name str

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    GetUserHierarchyGroupHierarchyPathLevelTwo

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Arn string
    ARN of the hierarchy group.
    Id string
    The identifier of the hierarchy group.
    Name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn string
    ARN of the hierarchy group.
    id string
    The identifier of the hierarchy group.
    name string

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn str
    ARN of the hierarchy group.
    id str
    The identifier of the hierarchy group.
    name str

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    arn String
    ARN of the hierarchy group.
    id String
    The identifier of the hierarchy group.
    name String

    Returns information on a specific hierarchy group by name

    NOTE: instance_id and one of either name or hierarchy_group_id is required.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate