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

com.pulumi.awsnative.route53resolver.kotlin.ResolverQueryLoggingConfig.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.route53resolver.kotlin

import com.pulumi.awsnative.route53resolver.kotlin.enums.ResolverQueryLoggingConfigShareStatus
import com.pulumi.awsnative.route53resolver.kotlin.enums.ResolverQueryLoggingConfigStatus
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
import com.pulumi.awsnative.route53resolver.kotlin.enums.ResolverQueryLoggingConfigShareStatus.Companion.toKotlin as resolverQueryLoggingConfigShareStatusToKotlin
import com.pulumi.awsnative.route53resolver.kotlin.enums.ResolverQueryLoggingConfigStatus.Companion.toKotlin as resolverQueryLoggingConfigStatusToKotlin

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

    public var args: ResolverQueryLoggingConfigArgs = ResolverQueryLoggingConfigArgs()

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

/**
 * Resource schema for AWS::Route53Resolver::ResolverQueryLoggingConfig.
 */
public class ResolverQueryLoggingConfig internal constructor(
    override val javaResource: com.pulumi.awsnative.route53resolver.ResolverQueryLoggingConfig,
) : KotlinCustomResource(javaResource, ResolverQueryLoggingConfigMapper) {
    /**
     * Arn
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Count
     */
    public val associationCount: Output
        get() = javaResource.associationCount().applyValue({ args0 -> args0 })

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

    /**
     * Rfc3339TimeString
     */
    public val creationTime: Output
        get() = javaResource.creationTime().applyValue({ args0 -> args0 })

    /**
     * The id of the creator request.
     */
    public val creatorRequestId: Output
        get() = javaResource.creatorRequestId().applyValue({ args0 -> args0 })

    /**
     * destination arn
     */
    public val destinationArn: Output?
        get() = javaResource.destinationArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * ResolverQueryLogConfigName
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * AccountId
     */
    public val ownerId: Output
        get() = javaResource.ownerId().applyValue({ args0 -> args0 })

    /**
     * ShareStatus, possible values are NOT_SHARED, SHARED_WITH_ME, SHARED_BY_ME.
     */
    public val shareStatus: Output
        get() = javaResource.shareStatus().applyValue({ args0 ->
            args0.let({ args0 ->
                resolverQueryLoggingConfigShareStatusToKotlin(args0)
            })
        })

    /**
     * ResolverQueryLogConfigStatus, possible values are CREATING, CREATED, DELETED AND FAILED.
     */
    public val status: Output
        get() = javaResource.status().applyValue({ args0 ->
            args0.let({ args0 ->
                resolverQueryLoggingConfigStatusToKotlin(args0)
            })
        })
}

public object ResolverQueryLoggingConfigMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.route53resolver.ResolverQueryLoggingConfig::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy