UserHierarchyGroup class
Provides an Amazon Connect User Hierarchy Group resource. For more information see Amazon Connect: Getting Started
> NOTE: The User Hierarchy Structure must be created before creating a User Hierarchy Group.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.connect.UserHierarchyGroup("example", {
instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
name: "example",
tags: {
Name: "Example User Hierarchy Group",
},
});
import pulumi
import pulumi_aws as aws
example = aws.connect.UserHierarchyGroup("example",
instance_id="aaaaaaaa-bbbb-cccc-dddd-111111111111",
name="example",
tags={
"Name": "Example User Hierarchy Group",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Connect.UserHierarchyGroup("example", new()
{
InstanceId = "aaaaaaaa-bbbb-cccc-dddd-111111111111",
Name = "example",
Tags =
{
{ "Name", "Example User Hierarchy Group" },
},
});
});
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.NewUserHierarchyGroup(ctx, "example", &connect.UserHierarchyGroupArgs{
InstanceId: pulumi.String("aaaaaaaa-bbbb-cccc-dddd-111111111111"),
Name: pulumi.String("example"),
Tags: pulumi.StringMap{
"Name": pulumi.String("Example User Hierarchy Group"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_connect_userhierarchygroup" "example" {
instance_id = "aaaaaaaa-bbbb-cccc-dddd-111111111111"
name = "example"
tags = {
"Name" = "Example User Hierarchy Group"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.UserHierarchyGroup;
import com.pulumi.aws.connect.UserHierarchyGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var example = new UserHierarchyGroup("example", UserHierarchyGroupArgs.builder()
.instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
.name("example")
.tags(Map.of("Name", "Example User Hierarchy Group"))
.build());
}
}
resources:
example:
type: aws:connect:UserHierarchyGroup
properties:
instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111
name: example
tags:
Name: Example User Hierarchy Group
With a parent group
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const parent = new aws.connect.UserHierarchyGroup("parent", {
instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
name: "parent",
tags: {
Name: "Example User Hierarchy Group Parent",
},
});
const child = new aws.connect.UserHierarchyGroup("child", {
instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
name: "child",
parentGroupId: parent.hierarchyGroupId,
tags: {
Name: "Example User Hierarchy Group Child",
},
});
import pulumi
import pulumi_aws as aws
parent = aws.connect.UserHierarchyGroup("parent",
instance_id="aaaaaaaa-bbbb-cccc-dddd-111111111111",
name="parent",
tags={
"Name": "Example User Hierarchy Group Parent",
})
child = aws.connect.UserHierarchyGroup("child",
instance_id="aaaaaaaa-bbbb-cccc-dddd-111111111111",
name="child",
parent_group_id=parent.hierarchy_group_id,
tags={
"Name": "Example User Hierarchy Group Child",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var parent = new Aws.Connect.UserHierarchyGroup("parent", new()
{
InstanceId = "aaaaaaaa-bbbb-cccc-dddd-111111111111",
Name = "parent",
Tags =
{
{ "Name", "Example User Hierarchy Group Parent" },
},
});
var child = new Aws.Connect.UserHierarchyGroup("child", new()
{
InstanceId = "aaaaaaaa-bbbb-cccc-dddd-111111111111",
Name = "child",
ParentGroupId = parent.HierarchyGroupId,
Tags =
{
{ "Name", "Example User Hierarchy Group Child" },
},
});
});
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 {
parent, err := connect.NewUserHierarchyGroup(ctx, "parent", &connect.UserHierarchyGroupArgs{
InstanceId: pulumi.String("aaaaaaaa-bbbb-cccc-dddd-111111111111"),
Name: pulumi.String("parent"),
Tags: pulumi.StringMap{
"Name": pulumi.String("Example User Hierarchy Group Parent"),
},
})
if err != nil {
return err
}
_, err = connect.NewUserHierarchyGroup(ctx, "child", &connect.UserHierarchyGroupArgs{
InstanceId: pulumi.String("aaaaaaaa-bbbb-cccc-dddd-111111111111"),
Name: pulumi.String("child"),
ParentGroupId: parent.HierarchyGroupId,
Tags: pulumi.StringMap{
"Name": pulumi.String("Example User Hierarchy Group Child"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_connect_userhierarchygroup" "parent" {
instance_id = "aaaaaaaa-bbbb-cccc-dddd-111111111111"
name = "parent"
tags = {
"Name" = "Example User Hierarchy Group Parent"
}
}
resource "aws_connect_userhierarchygroup" "child" {
instance_id = "aaaaaaaa-bbbb-cccc-dddd-111111111111"
name = "child"
parent_group_id = aws_connect_userhierarchygroup.parent.hierarchy_group_id
tags = {
"Name" = "Example User Hierarchy Group Child"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.UserHierarchyGroup;
import com.pulumi.aws.connect.UserHierarchyGroupArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var parent = new UserHierarchyGroup("parent", UserHierarchyGroupArgs.builder()
.instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
.name("parent")
.tags(Map.of("Name", "Example User Hierarchy Group Parent"))
.build());
var child = new UserHierarchyGroup("child", UserHierarchyGroupArgs.builder()
.instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
.name("child")
.parentGroupId(parent.hierarchyGroupId())
.tags(Map.of("Name", "Example User Hierarchy Group Child"))
.build());
}
}
resources:
parent:
type: aws:connect:UserHierarchyGroup
properties:
instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111
name: parent
tags:
Name: Example User Hierarchy Group Parent
child:
type: aws:connect:UserHierarchyGroup
properties:
instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111
name: child
parentGroupId: ${parent.hierarchyGroupId}
tags:
Name: Example User Hierarchy Group Child
Import
Using pulumi import, import Amazon Connect User Hierarchy Groups using the instanceId and hierarchyGroupId separated by a colon (:). For example:
$ pulumi import aws:connect/userHierarchyGroup:UserHierarchyGroup example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
Constructors
- UserHierarchyGroup(String name, {UserHierarchyGroupArgs? args, CustomResourceOptions? options})
-
Creates a new UserHierarchyGroup.
nameThe Pulumi resource name.argsArguments used to configure this UserHierarchyGroup. The set of arguments for UserHierarchyGroup.optionsResource options controlling this resource's behavior. - UserHierarchyGroup.reference(String urn)
- Creates a typed reference to an existing UserHierarchyGroup resource.
Properties
-
arn
↔ Output<
String> -
The ARN of the hierarchy group.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
hierarchyGroupId
↔ Output<
String> -
The identifier for the hierarchy group.
latefinal
-
hierarchyPaths
↔ Output<
List< UserHierarchyGroupHierarchyPath> > -
A block that contains information about the levels in the hierarchy group. The
hierarchyPathblock is documented below.latefinal -
id
↔ Output<
String> -
getter/setter pairinherited
-
instanceId
↔ Output<
String> -
Specifies the identifier of the hosting Amazon Connect Instance.
latefinal
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
levelId
↔ Output<
String> -
The identifier of the level in the hierarchy group.
latefinal
-
name
↔ Output<
String> -
The name of the user hierarchy group. Must not be more than 100 characters.
latefinal
-
parentGroupId
↔ Output<
String?> -
The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Tags to apply to the hierarchy group. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {UserHierarchyGroupState? state, CustomResourceOptions? options}) → UserHierarchyGroup -
Gets an existing UserHierarchyGroup resource's state with the given
nameandid.