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

com.pulumi.awsnative.cognito.kotlin.UserPoolGroup.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cognito.kotlin

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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [UserPoolGroup].
 */
@PulumiTagMarker
public class UserPoolGroupResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: UserPoolGroupArgs = UserPoolGroupArgs()

    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 UserPoolGroupArgsBuilder.() -> Unit) {
        val builder = UserPoolGroupArgsBuilder()
        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(): UserPoolGroup {
        val builtJavaResource = com.pulumi.awsnative.cognito.UserPoolGroup(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return UserPoolGroup(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::Cognito::UserPoolGroup
 */
public class UserPoolGroup internal constructor(
    override val javaResource: com.pulumi.awsnative.cognito.UserPoolGroup,
) : KotlinCustomResource(javaResource, UserPoolGroupMapper) {
    /**
     * A string containing the description of the group.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the group. Must be unique.
     */
    public val groupName: Output?
        get() = javaResource.groupName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower `Precedence` values take precedence over groups with higher or null `Precedence` values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for the `cognito:roles` and `cognito:preferred_role` claims.
     * Two groups can have the same `Precedence` value. If this happens, neither group takes precedence over the other. If two groups with the same `Precedence` have the same role ARN, that role is used in the `cognito:preferred_role` claim in tokens for users in each group. If the two groups have different role ARNs, the `cognito:preferred_role` claim isn't set in users' tokens.
     * The default `Precedence` value is null. The maximum `Precedence` value is `2^31-1` .
     */
    public val precedence: Output?
        get() = javaResource.precedence().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The role Amazon Resource Name (ARN) for the group.
     */
    public val roleArn: Output?
        get() = javaResource.roleArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The user pool ID for the user pool.
     */
    public val userPoolId: Output
        get() = javaResource.userPoolId().applyValue({ args0 -> args0 })
}

public object UserPoolGroupMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.cognito.UserPoolGroup::class == javaResource::class

    override fun map(javaResource: Resource): UserPoolGroup = UserPoolGroup(
        javaResource as
            com.pulumi.awsnative.cognito.UserPoolGroup,
    )
}

/**
 * @see [UserPoolGroup].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [UserPoolGroup].
 */
public suspend fun userPoolGroup(
    name: String,
    block: suspend UserPoolGroupResourceBuilder.() -> Unit,
): UserPoolGroup {
    val builder = UserPoolGroupResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [UserPoolGroup].
 * @param name The _unique_ name of the resulting resource.
 */
public fun userPoolGroup(name: String): UserPoolGroup {
    val builder = UserPoolGroupResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy