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

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

package com.pulumi.awsnative.cognito.kotlin

import com.pulumi.awsnative.cognito.kotlin.outputs.IdentityPoolCognitoIdentityProvider
import com.pulumi.awsnative.cognito.kotlin.outputs.IdentityPoolCognitoStreams
import com.pulumi.awsnative.cognito.kotlin.outputs.IdentityPoolPushSync
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.cognito.kotlin.outputs.IdentityPoolCognitoIdentityProvider.Companion.toKotlin as identityPoolCognitoIdentityProviderToKotlin
import com.pulumi.awsnative.cognito.kotlin.outputs.IdentityPoolCognitoStreams.Companion.toKotlin as identityPoolCognitoStreamsToKotlin
import com.pulumi.awsnative.cognito.kotlin.outputs.IdentityPoolPushSync.Companion.toKotlin as identityPoolPushSyncToKotlin

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

    public var args: IdentityPoolArgs = IdentityPoolArgs()

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

/**
 * Resource Type definition for AWS::Cognito::IdentityPool
 */
public class IdentityPool internal constructor(
    override val javaResource: com.pulumi.awsnative.cognito.IdentityPool,
) : KotlinCustomResource(javaResource, IdentityPoolMapper) {
    /**
     * Enables the Basic (Classic) authentication flow.
     */
    public val allowClassicFlow: Output?
        get() = javaResource.allowClassicFlow().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies whether the identity pool supports unauthenticated logins.
     */
    public val allowUnauthenticatedIdentities: Output
        get() = javaResource.allowUnauthenticatedIdentities().applyValue({ args0 -> args0 })

    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The events to configure.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Cognito::IdentityPool` for more information about the expected schema for this property.
     */
    public val cognitoEvents: Output?
        get() = javaResource.cognitoEvents().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Amazon Cognito user pools and their client IDs.
     */
    public val cognitoIdentityProviders: Output>?
        get() = javaResource.cognitoIdentityProviders().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        identityPoolCognitoIdentityProviderToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Configuration options for configuring Amazon Cognito streams.
     */
    public val cognitoStreams: Output?
        get() = javaResource.cognitoStreams().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> identityPoolCognitoStreamsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The "domain" Amazon Cognito uses when referencing your users. This name acts as a placeholder that allows your backend and the Amazon Cognito service to communicate about the developer provider. For the `DeveloperProviderName` , you can use letters and periods (.), underscores (_), and dashes (-).
     * *Minimum length* : 1
     * *Maximum length* : 100
     */
    public val developerProviderName: Output?
        get() = javaResource.developerProviderName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of your Amazon Cognito identity pool.
     * *Minimum length* : 1
     * *Maximum length* : 128
     * *Pattern* : `[\w\s+=,.@-]+`
     */
    public val identityPoolName: Output?
        get() = javaResource.identityPoolName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the Amazon Cognito identity pool, returned as a string.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Names (ARNs) of the OpenID connect providers.
     */
    public val openIdConnectProviderArns: Output>?
        get() = javaResource.openIdConnectProviderArns().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The configuration options to be applied to the identity pool.
     */
    public val pushSync: Output?
        get() = javaResource.pushSync().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    identityPoolPushSyncToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Names (ARNs) of the Security Assertion Markup Language (SAML) providers.
     */
    public val samlProviderArns: Output>?
        get() = javaResource.samlProviderArns().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * Key-value pairs that map provider names to provider app IDs.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Cognito::IdentityPool` for more information about the expected schema for this property.
     */
    public val supportedLoginProviders: Output?
        get() = javaResource.supportedLoginProviders().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy