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

com.pulumi.googlenative.compute.alpha.kotlin.inputs.BackendArgs.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.compute.alpha.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.alpha.inputs.BackendArgs.builder
import com.pulumi.googlenative.compute.alpha.kotlin.enums.BackendBalancingMode
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Message containing information of one individual backend.
 * @property balancingMode Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode. Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups. Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact and is ignored. Specifically, Backend.maxUtilization is ignored when Backend.balancingMode is RATE. In the future, this incompatible combination will be rejected.
 * @property capacityScaler A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs.
 * @property description An optional description of this resource. Provide this property when you create the resource.
 * @property failover This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
 * @property group The fully-qualified URL of an instance group or network endpoint group (NEG) resource. To determine what types of backends a load balancer supports, see the [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service#backends). You must use the *fully-qualified* URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
 * @property maxConnections Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
 * @property maxConnectionsPerEndpoint Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
 * @property maxConnectionsPerInstance Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
 * @property maxRate Defines a maximum number of HTTP requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
 * @property maxRatePerEndpoint Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
 * @property maxRatePerInstance Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
 * @property maxUtilization Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.
 */
public data class BackendArgs(
    public val balancingMode: Output? = null,
    public val capacityScaler: Output? = null,
    public val description: Output? = null,
    public val failover: Output? = null,
    public val group: Output? = null,
    public val maxConnections: Output? = null,
    public val maxConnectionsPerEndpoint: Output? = null,
    public val maxConnectionsPerInstance: Output? = null,
    public val maxRate: Output? = null,
    public val maxRatePerEndpoint: Output? = null,
    public val maxRatePerInstance: Output? = null,
    public val maxUtilization: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.alpha.inputs.BackendArgs =
        com.pulumi.googlenative.compute.alpha.inputs.BackendArgs.builder()
            .balancingMode(balancingMode?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .capacityScaler(capacityScaler?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .failover(failover?.applyValue({ args0 -> args0 }))
            .group(group?.applyValue({ args0 -> args0 }))
            .maxConnections(maxConnections?.applyValue({ args0 -> args0 }))
            .maxConnectionsPerEndpoint(maxConnectionsPerEndpoint?.applyValue({ args0 -> args0 }))
            .maxConnectionsPerInstance(maxConnectionsPerInstance?.applyValue({ args0 -> args0 }))
            .maxRate(maxRate?.applyValue({ args0 -> args0 }))
            .maxRatePerEndpoint(maxRatePerEndpoint?.applyValue({ args0 -> args0 }))
            .maxRatePerInstance(maxRatePerInstance?.applyValue({ args0 -> args0 }))
            .maxUtilization(maxUtilization?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BackendArgs].
 */
@PulumiTagMarker
public class BackendArgsBuilder internal constructor() {
    private var balancingMode: Output? = null

    private var capacityScaler: Output? = null

    private var description: Output? = null

    private var failover: Output? = null

    private var group: Output? = null

    private var maxConnections: Output? = null

    private var maxConnectionsPerEndpoint: Output? = null

    private var maxConnectionsPerInstance: Output? = null

    private var maxRate: Output? = null

    private var maxRatePerEndpoint: Output? = null

    private var maxRatePerInstance: Output? = null

    private var maxUtilization: Output? = null

    /**
     * @param value Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode. Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups. Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact and is ignored. Specifically, Backend.maxUtilization is ignored when Backend.balancingMode is RATE. In the future, this incompatible combination will be rejected.
     */
    @JvmName("csgyjlspatpyyvyf")
    public suspend fun balancingMode(`value`: Output) {
        this.balancingMode = value
    }

    /**
     * @param value A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs.
     */
    @JvmName("coqakqnrdejumgru")
    public suspend fun capacityScaler(`value`: Output) {
        this.capacityScaler = value
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create the resource.
     */
    @JvmName("xoujojhyymgicodn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
     */
    @JvmName("mhwrgcvojgeiedtp")
    public suspend fun failover(`value`: Output) {
        this.failover = value
    }

    /**
     * @param value The fully-qualified URL of an instance group or network endpoint group (NEG) resource. To determine what types of backends a load balancer supports, see the [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service#backends). You must use the *fully-qualified* URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
     */
    @JvmName("dkqbgpgoxwogvpwg")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
     */
    @JvmName("imvtticypinrlfwg")
    public suspend fun maxConnections(`value`: Output) {
        this.maxConnections = value
    }

    /**
     * @param value Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
     */
    @JvmName("twoxhkwyhahordyp")
    public suspend fun maxConnectionsPerEndpoint(`value`: Output) {
        this.maxConnectionsPerEndpoint = value
    }

    /**
     * @param value Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
     */
    @JvmName("aisjthseaywipyyk")
    public suspend fun maxConnectionsPerInstance(`value`: Output) {
        this.maxConnectionsPerInstance = value
    }

    /**
     * @param value Defines a maximum number of HTTP requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
     */
    @JvmName("dqnkqerrnhmliffl")
    public suspend fun maxRate(`value`: Output) {
        this.maxRate = value
    }

    /**
     * @param value Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
     */
    @JvmName("misunbvdryjfbkmj")
    public suspend fun maxRatePerEndpoint(`value`: Output) {
        this.maxRatePerEndpoint = value
    }

    /**
     * @param value Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
     */
    @JvmName("rjoitmastvxuxvup")
    public suspend fun maxRatePerInstance(`value`: Output) {
        this.maxRatePerInstance = value
    }

    /**
     * @param value Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.
     */
    @JvmName("xyywciydsqgsuorw")
    public suspend fun maxUtilization(`value`: Output) {
        this.maxUtilization = value
    }

    /**
     * @param value Specifies how to determine whether the backend of a load balancer can handle additional traffic or is fully loaded. For usage guidelines, see Connection balancing mode. Backends must use compatible balancing modes. For more information, see Supported balancing modes and target capacity settings and Restrictions and guidance for instance groups. Note: Currently, if you use the API to configure incompatible balancing modes, the configuration might be accepted even though it has no impact and is ignored. Specifically, Backend.maxUtilization is ignored when Backend.balancingMode is RATE. In the future, this incompatible combination will be rejected.
     */
    @JvmName("detrmdxlikvaoooj")
    public suspend fun balancingMode(`value`: BackendBalancingMode?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.balancingMode = mapped
    }

    /**
     * @param value A multiplier applied to the backend's target capacity of its balancing mode. The default value is 1, which means the group serves up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available capacity. The valid ranges are 0.0 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service. Not available with backends that don't support using a balancingMode. This includes backends such as global internet NEGs, regional serverless NEGs, and PSC NEGs.
     */
    @JvmName("ggulrhuldurjqyej")
    public suspend fun capacityScaler(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityScaler = mapped
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create the resource.
     */
    @JvmName("gdfstpxkqpadexgd")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
     */
    @JvmName("tbvlntowmfayqgvj")
    public suspend fun failover(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failover = mapped
    }

    /**
     * @param value The fully-qualified URL of an instance group or network endpoint group (NEG) resource. To determine what types of backends a load balancer supports, see the [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service#backends). You must use the *fully-qualified* URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
     */
    @JvmName("uxevoybrainwxeik")
    public suspend fun group(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param value Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
     */
    @JvmName("ltsymqeqrbepvkub")
    public suspend fun maxConnections(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxConnections = mapped
    }

    /**
     * @param value Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
     */
    @JvmName("bufmroqtcafkhnrs")
    public suspend fun maxConnectionsPerEndpoint(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxConnectionsPerEndpoint = mapped
    }

    /**
     * @param value Defines a target maximum number of simultaneous connections. For usage guidelines, see Connection balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is RATE.
     */
    @JvmName("uowoqusotghhswnu")
    public suspend fun maxConnectionsPerInstance(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxConnectionsPerInstance = mapped
    }

    /**
     * @param value Defines a maximum number of HTTP requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
     */
    @JvmName("luvpkgkyaevosogj")
    public suspend fun maxRate(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxRate = mapped
    }

    /**
     * @param value Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
     */
    @JvmName("kmabngpyrkqkmurm")
    public suspend fun maxRatePerEndpoint(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxRatePerEndpoint = mapped
    }

    /**
     * @param value Defines a maximum target for requests per second (RPS). For usage guidelines, see Rate balancing mode and Utilization balancing mode. Not available if the backend's balancingMode is CONNECTION.
     */
    @JvmName("ryjwomofhlmalrmv")
    public suspend fun maxRatePerInstance(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxRatePerInstance = mapped
    }

    /**
     * @param value Optional parameter to define a target capacity for the UTILIZATION balancing mode. The valid range is [0.0, 1.0]. For usage guidelines, see Utilization balancing mode.
     */
    @JvmName("eyfvytkisnxgnliw")
    public suspend fun maxUtilization(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxUtilization = mapped
    }

    internal fun build(): BackendArgs = BackendArgs(
        balancingMode = balancingMode,
        capacityScaler = capacityScaler,
        description = description,
        failover = failover,
        group = group,
        maxConnections = maxConnections,
        maxConnectionsPerEndpoint = maxConnectionsPerEndpoint,
        maxConnectionsPerInstance = maxConnectionsPerInstance,
        maxRate = maxRate,
        maxRatePerEndpoint = maxRatePerEndpoint,
        maxRatePerInstance = maxRatePerInstance,
        maxUtilization = maxUtilization,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy