All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.connect.kotlin.UserHierarchyGroupArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.connect.kotlin

import com.pulumi.aws.connect.UserHierarchyGroupArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an Amazon Connect User Hierarchy Group resource. For more information see
 * [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
 * > **NOTE:** The User Hierarchy Structure must be created before creating a User Hierarchy Group.
 * ## Example Usage
 * ### Basic
 * 
 * ```typescript
 * 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",
 *     },
 * });
 * ```
 * ```python
 * 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",
 *     })
 * ```
 * ```csharp
 * 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" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/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
 * 	})
 * }
 * ```
 * ```java
 * 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.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) {
 *         var example = new UserHierarchyGroup("example", UserHierarchyGroupArgs.builder()
 *             .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
 *             .name("example")
 *             .tags(Map.of("Name", "Example User Hierarchy Group"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * 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
 * 
 * ```typescript
 * 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",
 *     },
 * });
 * ```
 * ```python
 * 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",
 *     })
 * ```
 * ```csharp
 * 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" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/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
 * 	})
 * }
 * ```
 * ```java
 * 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.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) {
 *         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());
 *     }
 * }
 * ```
 * ```yaml
 * 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 `instance_id` and `hierarchy_group_id` separated by a colon (`:`). For example:
 * ```sh
 * $ pulumi import aws:connect/userHierarchyGroup:UserHierarchyGroup example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
 * ```
 * @property instanceId Specifies the identifier of the hosting Amazon Connect Instance.
 * @property name The name of the user hierarchy group. Must not be more than 100 characters.
 * @property parentGroupId The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.
 * @property tags Tags to apply to the hierarchy group. If configured with a provider
 * `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class UserHierarchyGroupArgs(
    public val instanceId: Output? = null,
    public val name: Output? = null,
    public val parentGroupId: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.connect.UserHierarchyGroupArgs =
        com.pulumi.aws.connect.UserHierarchyGroupArgs.builder()
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parentGroupId(parentGroupId?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [UserHierarchyGroupArgs].
 */
@PulumiTagMarker
public class UserHierarchyGroupArgsBuilder internal constructor() {
    private var instanceId: Output? = null

    private var name: Output? = null

    private var parentGroupId: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Specifies the identifier of the hosting Amazon Connect Instance.
     */
    @JvmName("gnokqifsrsmkydbs")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value The name of the user hierarchy group. Must not be more than 100 characters.
     */
    @JvmName("wcesogovdoqydnjs")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.
     */
    @JvmName("lthiwsytbkwiprdc")
    public suspend fun parentGroupId(`value`: Output) {
        this.parentGroupId = value
    }

    /**
     * @param value Tags to apply to the hierarchy group. If configured with a provider
     * `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("lhjlwctnvvfwynab")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specifies the identifier of the hosting Amazon Connect Instance.
     */
    @JvmName("qmvuadgvkutsmjeh")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value The name of the user hierarchy group. Must not be more than 100 characters.
     */
    @JvmName("qfpubmdgnkaliydt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.
     */
    @JvmName("wuycramyhhwggdpy")
    public suspend fun parentGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentGroupId = mapped
    }

    /**
     * @param value Tags to apply to the hierarchy group. If configured with a provider
     * `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("ugrhfcxyhpgfgxit")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Tags to apply to the hierarchy group. If configured with a provider
     * `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("exprcrlgojwmwxfe")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): UserHierarchyGroupArgs = UserHierarchyGroupArgs(
        instanceId = instanceId,
        name = name,
        parentGroupId = parentGroupId,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy