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

com.pulumi.awsnative.cognito.kotlin.UserPoolDomain.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.UserPoolDomainCustomDomainConfigType
import com.pulumi.awsnative.cognito.kotlin.outputs.UserPoolDomainCustomDomainConfigType.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.String
import kotlin.Suppress
import kotlin.Unit

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

    public var args: UserPoolDomainArgs = UserPoolDomainArgs()

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

/**
 * Resource Type definition for AWS::Cognito::UserPoolDomain
 */
public class UserPoolDomain internal constructor(
    override val javaResource: com.pulumi.awsnative.cognito.UserPoolDomain,
) : KotlinCustomResource(javaResource, UserPoolDomainMapper) {
    /**
     * The resource ID.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.
     */
    public val cloudFrontDistribution: Output
        get() = javaResource.cloudFrontDistribution().applyValue({ args0 -> args0 })

    /**
     * The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.
     */
    public val customDomainConfig: Output?
        get() = javaResource.customDomainConfig().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> toKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The domain name for the domain that hosts the sign-up and sign-in pages for your application. For example: `auth.example.com` . If you're using a prefix domain, this field denotes the first part of the domain before `.auth.[region].amazoncognito.com` .
     * This string can include only lowercase letters, numbers, and hyphens. Don't use a hyphen for the first or last character. Use periods to separate subdomain names.
     */
    public val domain: Output
        get() = javaResource.domain().applyValue({ args0 -> args0 })

    /**
     * The user pool ID for the user pool where you want to associate a user pool domain.
     */
    public val userPoolId: Output
        get() = javaResource.userPoolId().applyValue({ args0 -> args0 })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy