com.pulumi.aws.connect.kotlin.UserHierarchyGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.connect.kotlin
import com.pulumi.aws.connect.kotlin.outputs.UserHierarchyGroupHierarchyPath
import com.pulumi.aws.connect.kotlin.outputs.UserHierarchyGroupHierarchyPath.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [UserHierarchyGroup].
*/
@PulumiTagMarker
public class UserHierarchyGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: UserHierarchyGroupArgs = UserHierarchyGroupArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend UserHierarchyGroupArgsBuilder.() -> Unit) {
val builder = UserHierarchyGroupArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): UserHierarchyGroup {
val builtJavaResource = com.pulumi.aws.connect.UserHierarchyGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return UserHierarchyGroup(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class UserHierarchyGroup internal constructor(
override val javaResource: com.pulumi.aws.connect.UserHierarchyGroup,
) : KotlinCustomResource(javaResource, UserHierarchyGroupMapper) {
/**
* The Amazon Resource Name (ARN) of the hierarchy group.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The identifier for the hierarchy group.
*/
public val hierarchyGroupId: Output
get() = javaResource.hierarchyGroupId().applyValue({ args0 -> args0 })
/**
* A block that contains information about the levels in the hierarchy group. The `hierarchy_path` block is documented below.
*/
public val hierarchyPaths: Output>
get() = javaResource.hierarchyPaths().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
})
/**
* Specifies the identifier of the hosting Amazon Connect Instance.
*/
public val instanceId: Output
get() = javaResource.instanceId().applyValue({ args0 -> args0 })
/**
* The identifier of the level in the hierarchy group.
*/
public val levelId: Output
get() = javaResource.levelId().applyValue({ args0 -> args0 })
/**
* The name of the user hierarchy group. Must not be more than 100 characters.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The identifier for the parent hierarchy group. The user hierarchy is created at level one if the parent group ID is null.
*/
public val parentGroupId: Output?
get() = javaResource.parentGroupId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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 val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy