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

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

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

package com.pulumi.awsnative.cognito.kotlin

import com.pulumi.awsnative.cognito.kotlin.outputs.LogDeliveryConfigurationLogConfiguration
import com.pulumi.awsnative.cognito.kotlin.outputs.LogDeliveryConfigurationLogConfiguration.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
import kotlin.collections.List

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

    public var args: LogDeliveryConfigurationArgs = LogDeliveryConfigurationArgs()

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

/**
 * Resource Type definition for AWS::Cognito::LogDeliveryConfiguration
 */
public class LogDeliveryConfiguration internal constructor(
    override val javaResource: com.pulumi.awsnative.cognito.LogDeliveryConfiguration,
) : KotlinCustomResource(javaResource, LogDeliveryConfigurationMapper) {
    /**
     * A user pool ID, for example `us-east-1_EXAMPLE` .
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

    /**
     * A logging destination of a user pool. User pools can have multiple logging destinations for message-delivery and user-activity logs.
     */
    public val logConfigurations: Output>?
        get() = javaResource.logConfigurations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })
            }).orElse(null)
        })

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy