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

com.pulumi.awsnative.route53resolver.kotlin.ResolverRuleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.route53resolver.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.route53resolver.ResolverRuleArgs.builder
import com.pulumi.awsnative.route53resolver.kotlin.enums.ResolverRuleRuleType
import com.pulumi.awsnative.route53resolver.kotlin.inputs.ResolverRuleTargetAddressArgs
import com.pulumi.awsnative.route53resolver.kotlin.inputs.ResolverRuleTargetAddressArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Route53Resolver::ResolverRule
 * @property delegationRecord The name server domain for queries to be delegated to if a query matches the delegation record.
 * @property domainName DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps
 * @property name The name for the Resolver rule
 * @property resolverEndpointId The ID of the endpoint that the rule is associated with.
 * @property ruleType When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD. When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM.
 * @property tags An array of key-value pairs to apply to this resource.
 * @property targetIps An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
 */
public data class ResolverRuleArgs(
    public val delegationRecord: Output? = null,
    public val domainName: Output? = null,
    public val name: Output? = null,
    public val resolverEndpointId: Output? = null,
    public val ruleType: Output? = null,
    public val tags: Output>? = null,
    public val targetIps: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.route53resolver.ResolverRuleArgs =
        com.pulumi.awsnative.route53resolver.ResolverRuleArgs.builder()
            .delegationRecord(delegationRecord?.applyValue({ args0 -> args0 }))
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resolverEndpointId(resolverEndpointId?.applyValue({ args0 -> args0 }))
            .ruleType(ruleType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .targetIps(
                targetIps?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ResolverRuleArgs].
 */
@PulumiTagMarker
public class ResolverRuleArgsBuilder internal constructor() {
    private var delegationRecord: Output? = null

    private var domainName: Output? = null

    private var name: Output? = null

    private var resolverEndpointId: Output? = null

    private var ruleType: Output? = null

    private var tags: Output>? = null

    private var targetIps: Output>? = null

    /**
     * @param value The name server domain for queries to be delegated to if a query matches the delegation record.
     */
    @JvmName("xttlgxijovyuusib")
    public suspend fun delegationRecord(`value`: Output) {
        this.delegationRecord = value
    }

    /**
     * @param value DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps
     */
    @JvmName("nqnlgyiixgpxlvip")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value The name for the Resolver rule
     */
    @JvmName("qknenywrxjtjdpka")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ID of the endpoint that the rule is associated with.
     */
    @JvmName("hlusrnrarpnetoej")
    public suspend fun resolverEndpointId(`value`: Output) {
        this.resolverEndpointId = value
    }

    /**
     * @param value When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD. When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM.
     */
    @JvmName("qlvaodelufkeacqo")
    public suspend fun ruleType(`value`: Output) {
        this.ruleType = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("mluofokuosijrxxt")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    @JvmName("uxoxaqevqefibeuo")
    public suspend fun tags(vararg values: Output) {
        this.tags = Output.all(values.asList())
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("ilmtpwfwxqbmthtd")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("qchrljhuwgqanfec")
    public suspend fun targetIps(`value`: Output>) {
        this.targetIps = value
    }

    @JvmName("wmvmboutqxotjrmt")
    public suspend fun targetIps(vararg values: Output) {
        this.targetIps = Output.all(values.asList())
    }

    /**
     * @param values An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("mtwtygqwufqmpaib")
    public suspend fun targetIps(values: List>) {
        this.targetIps = Output.all(values)
    }

    /**
     * @param value The name server domain for queries to be delegated to if a query matches the delegation record.
     */
    @JvmName("lbxvtmrftocufcce")
    public suspend fun delegationRecord(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.delegationRecord = mapped
    }

    /**
     * @param value DNS queries for this domain name are forwarded to the IP addresses that are specified in TargetIps
     */
    @JvmName("rkvqwwdierlnlrvl")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value The name for the Resolver rule
     */
    @JvmName("icqmnqvclfsuoiay")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ID of the endpoint that the rule is associated with.
     */
    @JvmName("vfvymmurhcsmctnv")
    public suspend fun resolverEndpointId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resolverEndpointId = mapped
    }

    /**
     * @param value When you want to forward DNS queries for specified domain name to resolvers on your network, specify FORWARD. When you have a forwarding rule to forward DNS queries for a domain to your network and you want Resolver to process queries for a subdomain of that domain, specify SYSTEM.
     */
    @JvmName("wlhtnylkujlyjpsb")
    public suspend fun ruleType(`value`: ResolverRuleRuleType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ruleType = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("rkcfnrcnfdanajfq")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("grmuhdxakgygjsdn")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("upamuocvteewaaiq")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("xqipncavnrnlrbjx")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("kpvwcyujcytbgvpp")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("vfgbnqrjvyxusloc")
    public suspend fun targetIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetIps = mapped
    }

    /**
     * @param argument An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("usogmsckwkupjpgb")
    public suspend fun targetIps(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResolverRuleTargetAddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.targetIps = mapped
    }

    /**
     * @param argument An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("lihiugrcicthuthh")
    public suspend fun targetIps(vararg argument: suspend ResolverRuleTargetAddressArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResolverRuleTargetAddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.targetIps = mapped
    }

    /**
     * @param argument An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("niaxvwegaenyfrak")
    public suspend fun targetIps(argument: suspend ResolverRuleTargetAddressArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ResolverRuleTargetAddressArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.targetIps = mapped
    }

    /**
     * @param values An array that contains the IP addresses and ports that an outbound endpoint forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers on your network. Specify IPv4 addresses. IPv6 is not supported.
     */
    @JvmName("pwnjinsilplnbnlx")
    public suspend fun targetIps(vararg values: ResolverRuleTargetAddressArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetIps = mapped
    }

    internal fun build(): ResolverRuleArgs = ResolverRuleArgs(
        delegationRecord = delegationRecord,
        domainName = domainName,
        name = name,
        resolverEndpointId = resolverEndpointId,
        ruleType = ruleType,
        tags = tags,
        targetIps = targetIps,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy