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

com.pulumi.googlenative.sqladmin.v1beta4.kotlin.inputs.IpConfigurationArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.sqladmin.v1beta4.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.sqladmin.v1beta4.inputs.IpConfigurationArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * IP Management configuration.
 * @property allocatedIpRange The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
 * @property authorizedNetworks The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
 * @property enablePrivatePathForGoogleCloudServices Controls connectivity to private IP instances from Google services, such as BigQuery.
 * @property ipv4Enabled Whether the instance is assigned a public IP address or not.
 * @property privateNetwork The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.
 * @property requireSsl Whether SSL connections over IP are enforced or not.
 */
public data class IpConfigurationArgs(
    public val allocatedIpRange: Output? = null,
    public val authorizedNetworks: Output>? = null,
    public val enablePrivatePathForGoogleCloudServices: Output? = null,
    public val ipv4Enabled: Output? = null,
    public val privateNetwork: Output? = null,
    public val requireSsl: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.sqladmin.v1beta4.inputs.IpConfigurationArgs =
        com.pulumi.googlenative.sqladmin.v1beta4.inputs.IpConfigurationArgs.builder()
            .allocatedIpRange(allocatedIpRange?.applyValue({ args0 -> args0 }))
            .authorizedNetworks(
                authorizedNetworks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .enablePrivatePathForGoogleCloudServices(
                enablePrivatePathForGoogleCloudServices?.applyValue({ args0 ->
                    args0
                }),
            )
            .ipv4Enabled(ipv4Enabled?.applyValue({ args0 -> args0 }))
            .privateNetwork(privateNetwork?.applyValue({ args0 -> args0 }))
            .requireSsl(requireSsl?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IpConfigurationArgs].
 */
@PulumiTagMarker
public class IpConfigurationArgsBuilder internal constructor() {
    private var allocatedIpRange: Output? = null

    private var authorizedNetworks: Output>? = null

    private var enablePrivatePathForGoogleCloudServices: Output? = null

    private var ipv4Enabled: Output? = null

    private var privateNetwork: Output? = null

    private var requireSsl: Output? = null

    /**
     * @param value The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
     */
    @JvmName("evisxrtlavfbojkm")
    public suspend fun allocatedIpRange(`value`: Output) {
        this.allocatedIpRange = value
    }

    /**
     * @param value The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("tpmhlsjkbcxgncbm")
    public suspend fun authorizedNetworks(`value`: Output>) {
        this.authorizedNetworks = value
    }

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

    /**
     * @param values The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("tmfbvfqjmjuexjlw")
    public suspend fun authorizedNetworks(values: List>) {
        this.authorizedNetworks = Output.all(values)
    }

    /**
     * @param value Controls connectivity to private IP instances from Google services, such as BigQuery.
     */
    @JvmName("cgxnoenseqyyskkk")
    public suspend fun enablePrivatePathForGoogleCloudServices(`value`: Output) {
        this.enablePrivatePathForGoogleCloudServices = value
    }

    /**
     * @param value Whether the instance is assigned a public IP address or not.
     */
    @JvmName("blfdluoykdbfhvku")
    public suspend fun ipv4Enabled(`value`: Output) {
        this.ipv4Enabled = value
    }

    /**
     * @param value The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.
     */
    @JvmName("rqgxupwbwagabbow")
    public suspend fun privateNetwork(`value`: Output) {
        this.privateNetwork = value
    }

    /**
     * @param value Whether SSL connections over IP are enforced or not.
     */
    @JvmName("ylaejjidyctwogmu")
    public suspend fun requireSsl(`value`: Output) {
        this.requireSsl = value
    }

    /**
     * @param value The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`
     */
    @JvmName("nfshheukkpfvylhi")
    public suspend fun allocatedIpRange(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocatedIpRange = mapped
    }

    /**
     * @param value The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("nqtsogjfrarlhbpl")
    public suspend fun authorizedNetworks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizedNetworks = mapped
    }

    /**
     * @param argument The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("uqwgciesgugmdhdl")
    public suspend fun authorizedNetworks(argument: List Unit>) {
        val toBeMapped = argument.toList().map { AclEntryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.authorizedNetworks = mapped
    }

    /**
     * @param argument The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("uwyrcrgcjneqhqfu")
    public suspend fun authorizedNetworks(vararg argument: suspend AclEntryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { AclEntryArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.authorizedNetworks = mapped
    }

    /**
     * @param argument The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("kpdqttgvpogcehit")
    public suspend fun authorizedNetworks(argument: suspend AclEntryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AclEntryArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.authorizedNetworks = mapped
    }

    /**
     * @param values The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).
     */
    @JvmName("psubydklukfhoiex")
    public suspend fun authorizedNetworks(vararg values: AclEntryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authorizedNetworks = mapped
    }

    /**
     * @param value Controls connectivity to private IP instances from Google services, such as BigQuery.
     */
    @JvmName("piaqhngkqgagtjte")
    public suspend fun enablePrivatePathForGoogleCloudServices(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enablePrivatePathForGoogleCloudServices = mapped
    }

    /**
     * @param value Whether the instance is assigned a public IP address or not.
     */
    @JvmName("jertcmokirmorltv")
    public suspend fun ipv4Enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipv4Enabled = mapped
    }

    /**
     * @param value The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.
     */
    @JvmName("qiidgectdviwtmtf")
    public suspend fun privateNetwork(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateNetwork = mapped
    }

    /**
     * @param value Whether SSL connections over IP are enforced or not.
     */
    @JvmName("mpuwhgbmnyeahmhq")
    public suspend fun requireSsl(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireSsl = mapped
    }

    internal fun build(): IpConfigurationArgs = IpConfigurationArgs(
        allocatedIpRange = allocatedIpRange,
        authorizedNetworks = authorizedNetworks,
        enablePrivatePathForGoogleCloudServices = enablePrivatePathForGoogleCloudServices,
        ipv4Enabled = ipv4Enabled,
        privateNetwork = privateNetwork,
        requireSsl = requireSsl,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy