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

com.pulumi.azurenative.servicelinker.kotlin.inputs.FirewallRulesArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.servicelinker.kotlin.inputs

import com.pulumi.azurenative.servicelinker.inputs.FirewallRulesArgs.builder
import com.pulumi.azurenative.servicelinker.kotlin.enums.AllowType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Target service's firewall rules. to allow connections from source service.
 * @property azureServices Allow Azure services to access the target service if true.
 * @property callerClientIP Allow caller client IP to access the target service if true. the property is used when connecting local application to target service.
 * @property ipRanges This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account.
 */
public data class FirewallRulesArgs(
    public val azureServices: Output>? = null,
    public val callerClientIP: Output>? = null,
    public val ipRanges: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.servicelinker.inputs.FirewallRulesArgs =
        com.pulumi.azurenative.servicelinker.inputs.FirewallRulesArgs.builder()
            .azureServices(
                azureServices?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .callerClientIP(
                callerClientIP?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .ipRanges(ipRanges?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [FirewallRulesArgs].
 */
@PulumiTagMarker
public class FirewallRulesArgsBuilder internal constructor() {
    private var azureServices: Output>? = null

    private var callerClientIP: Output>? = null

    private var ipRanges: Output>? = null

    /**
     * @param value Allow Azure services to access the target service if true.
     */
    @JvmName("tyidubvokthejujw")
    public suspend fun azureServices(`value`: Output>) {
        this.azureServices = value
    }

    /**
     * @param value Allow caller client IP to access the target service if true. the property is used when connecting local application to target service.
     */
    @JvmName("hracwvujncpqgbaj")
    public suspend fun callerClientIP(`value`: Output>) {
        this.callerClientIP = value
    }

    /**
     * @param value This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account.
     */
    @JvmName("pinyxugnaiqgboij")
    public suspend fun ipRanges(`value`: Output>) {
        this.ipRanges = value
    }

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

    /**
     * @param values This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account.
     */
    @JvmName("ykidjxudftyloumf")
    public suspend fun ipRanges(values: List>) {
        this.ipRanges = Output.all(values)
    }

    /**
     * @param value Allow Azure services to access the target service if true.
     */
    @JvmName("dgldjuvvvdrbnrkj")
    public suspend fun azureServices(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.azureServices = mapped
    }

    /**
     * @param value Allow Azure services to access the target service if true.
     */
    @JvmName("wnbjkmfkejcwesbc")
    public fun azureServices(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.azureServices = mapped
    }

    /**
     * @param value Allow Azure services to access the target service if true.
     */
    @JvmName("yejxevqalyvidefj")
    public fun azureServices(`value`: AllowType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.azureServices = mapped
    }

    /**
     * @param value Allow caller client IP to access the target service if true. the property is used when connecting local application to target service.
     */
    @JvmName("pkfrruncxdfuppog")
    public suspend fun callerClientIP(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.callerClientIP = mapped
    }

    /**
     * @param value Allow caller client IP to access the target service if true. the property is used when connecting local application to target service.
     */
    @JvmName("sfavaqngwaudcxyl")
    public fun callerClientIP(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.callerClientIP = mapped
    }

    /**
     * @param value Allow caller client IP to access the target service if true. the property is used when connecting local application to target service.
     */
    @JvmName("xwilsnofubtpipkh")
    public fun callerClientIP(`value`: AllowType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.callerClientIP = mapped
    }

    /**
     * @param value This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account.
     */
    @JvmName("vixbfkngwmhkyqab")
    public suspend fun ipRanges(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipRanges = mapped
    }

    /**
     * @param values This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account.
     */
    @JvmName("ouaofriipkcwurxd")
    public suspend fun ipRanges(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRanges = mapped
    }

    internal fun build(): FirewallRulesArgs = FirewallRulesArgs(
        azureServices = azureServices,
        callerClientIP = callerClientIP,
        ipRanges = ipRanges,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy