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

com.pulumi.awsnative.cognito.kotlin.IdentityPoolRoleAttachmentArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cognito.kotlin

import com.pulumi.awsnative.cognito.IdentityPoolRoleAttachmentArgs.builder
import com.pulumi.awsnative.cognito.kotlin.inputs.IdentityPoolRoleAttachmentRoleMappingArgs
import com.pulumi.awsnative.cognito.kotlin.inputs.IdentityPoolRoleAttachmentRoleMappingArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Cognito::IdentityPoolRoleAttachment
 * @property identityPoolId An identity pool ID in the format `REGION:GUID` .
 * @property roleMappings How users for a specific identity provider are mapped to roles. This is a string to the `RoleMapping` object map. The string identifies the identity provider. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id` .
 * If the `IdentityProvider` field isn't provided in this object, the string is used as the identity provider name.
 * For more information, see the [RoleMapping property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) .
 * @property roles The map of the roles associated with this pool. For a given role, the key is either "authenticated" or "unauthenticated". The value is the role ARN.
 */
public data class IdentityPoolRoleAttachmentArgs(
    public val identityPoolId: Output? = null,
    public val roleMappings: Output>? = null,
    public val roles: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cognito.IdentityPoolRoleAttachmentArgs =
        com.pulumi.awsnative.cognito.IdentityPoolRoleAttachmentArgs.builder()
            .identityPoolId(identityPoolId?.applyValue({ args0 -> args0 }))
            .roleMappings(
                roleMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .roles(
                roles?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [IdentityPoolRoleAttachmentArgs].
 */
@PulumiTagMarker
public class IdentityPoolRoleAttachmentArgsBuilder internal constructor() {
    private var identityPoolId: Output? = null

    private var roleMappings: Output>? = null

    private var roles: Output>? = null

    /**
     * @param value An identity pool ID in the format `REGION:GUID` .
     */
    @JvmName("puouodlgacejkvmt")
    public suspend fun identityPoolId(`value`: Output) {
        this.identityPoolId = value
    }

    /**
     * @param value How users for a specific identity provider are mapped to roles. This is a string to the `RoleMapping` object map. The string identifies the identity provider. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id` .
     * If the `IdentityProvider` field isn't provided in this object, the string is used as the identity provider name.
     * For more information, see the [RoleMapping property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) .
     */
    @JvmName("faghxpnyjaujqogv")
    public suspend fun roleMappings(`value`: Output>) {
        this.roleMappings = value
    }

    /**
     * @param value The map of the roles associated with this pool. For a given role, the key is either "authenticated" or "unauthenticated". The value is the role ARN.
     */
    @JvmName("oegvjbmnbragqawy")
    public suspend fun roles(`value`: Output>) {
        this.roles = value
    }

    /**
     * @param value An identity pool ID in the format `REGION:GUID` .
     */
    @JvmName("jmduvnaffpwejsek")
    public suspend fun identityPoolId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identityPoolId = mapped
    }

    /**
     * @param value How users for a specific identity provider are mapped to roles. This is a string to the `RoleMapping` object map. The string identifies the identity provider. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id` .
     * If the `IdentityProvider` field isn't provided in this object, the string is used as the identity provider name.
     * For more information, see the [RoleMapping property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) .
     */
    @JvmName("pswxdvtosjivlhst")
    public suspend fun roleMappings(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roleMappings = mapped
    }

    /**
     * @param argument How users for a specific identity provider are mapped to roles. This is a string to the `RoleMapping` object map. The string identifies the identity provider. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id` .
     * If the `IdentityProvider` field isn't provided in this object, the string is used as the identity provider name.
     * For more information, see the [RoleMapping property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) .
     */
    @JvmName("xaosdfxfhxadqeof")
    public suspend fun roleMappings(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                IdentityPoolRoleAttachmentRoleMappingArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.roleMappings = mapped
    }

    /**
     * @param values How users for a specific identity provider are mapped to roles. This is a string to the `RoleMapping` object map. The string identifies the identity provider. For example: `graph.facebook.com` or `cognito-idp.us-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id` .
     * If the `IdentityProvider` field isn't provided in this object, the string is used as the identity provider name.
     * For more information, see the [RoleMapping property](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypoolroleattachment-rolemapping.html) .
     */
    @JvmName("mpkxsflxersvyvnv")
    public fun roleMappings(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roleMappings = mapped
    }

    /**
     * @param value The map of the roles associated with this pool. For a given role, the key is either "authenticated" or "unauthenticated". The value is the role ARN.
     */
    @JvmName("ljdujbtogjjlogod")
    public suspend fun roles(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roles = mapped
    }

    /**
     * @param values The map of the roles associated with this pool. For a given role, the key is either "authenticated" or "unauthenticated". The value is the role ARN.
     */
    @JvmName("iunmcqdvitckauce")
    public fun roles(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roles = mapped
    }

    internal fun build(): IdentityPoolRoleAttachmentArgs = IdentityPoolRoleAttachmentArgs(
        identityPoolId = identityPoolId,
        roleMappings = roleMappings,
        roles = roles,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy