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

com.pulumi.cloudflare.kotlin.LoadBalancerPoolArgs.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.cloudflare.kotlin

import com.pulumi.cloudflare.LoadBalancerPoolArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.LoadBalancerPoolLoadSheddingArgs
import com.pulumi.cloudflare.kotlin.inputs.LoadBalancerPoolLoadSheddingArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.LoadBalancerPoolOriginArgs
import com.pulumi.cloudflare.kotlin.inputs.LoadBalancerPoolOriginArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.LoadBalancerPoolOriginSteeringArgs
import com.pulumi.cloudflare.kotlin.inputs.LoadBalancerPoolOriginSteeringArgsBuilder
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.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Load Balancer pool resource. This provides a
 * pool of origins that can be used by a Cloudflare Load Balancer.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.LoadBalancerPool("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "example-pool",
 *     origins: [
 *         {
 *             name: "example-1",
 *             address: "192.0.2.1",
 *             enabled: false,
 *             headers: [{
 *                 header: "Host",
 *                 values: ["example-1"],
 *             }],
 *         },
 *         {
 *             name: "example-2",
 *             address: "192.0.2.2",
 *             headers: [{
 *                 header: "Host",
 *                 values: ["example-2"],
 *             }],
 *         },
 *     ],
 *     latitude: 55,
 *     longitude: -12,
 *     description: "example load balancer pool",
 *     enabled: false,
 *     minimumOrigins: 1,
 *     notificationEmail: "[email protected]",
 *     loadSheddings: [{
 *         defaultPercent: 55,
 *         defaultPolicy: "random",
 *         sessionPercent: 12,
 *         sessionPolicy: "hash",
 *     }],
 *     originSteerings: [{
 *         policy: "random",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.LoadBalancerPool("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="example-pool",
 *     origins=[
 *         {
 *             "name": "example-1",
 *             "address": "192.0.2.1",
 *             "enabled": False,
 *             "headers": [{
 *                 "header": "Host",
 *                 "values": ["example-1"],
 *             }],
 *         },
 *         {
 *             "name": "example-2",
 *             "address": "192.0.2.2",
 *             "headers": [{
 *                 "header": "Host",
 *                 "values": ["example-2"],
 *             }],
 *         },
 *     ],
 *     latitude=55,
 *     longitude=-12,
 *     description="example load balancer pool",
 *     enabled=False,
 *     minimum_origins=1,
 *     notification_email="[email protected]",
 *     load_sheddings=[{
 *         "default_percent": 55,
 *         "default_policy": "random",
 *         "session_percent": 12,
 *         "session_policy": "hash",
 *     }],
 *     origin_steerings=[{
 *         "policy": "random",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.LoadBalancerPool("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "example-pool",
 *         Origins = new[]
 *         {
 *             new Cloudflare.Inputs.LoadBalancerPoolOriginArgs
 *             {
 *                 Name = "example-1",
 *                 Address = "192.0.2.1",
 *                 Enabled = false,
 *                 Headers = new[]
 *                 {
 *                     new Cloudflare.Inputs.LoadBalancerPoolOriginHeaderArgs
 *                     {
 *                         Header = "Host",
 *                         Values = new[]
 *                         {
 *                             "example-1",
 *                         },
 *                     },
 *                 },
 *             },
 *             new Cloudflare.Inputs.LoadBalancerPoolOriginArgs
 *             {
 *                 Name = "example-2",
 *                 Address = "192.0.2.2",
 *                 Headers = new[]
 *                 {
 *                     new Cloudflare.Inputs.LoadBalancerPoolOriginHeaderArgs
 *                     {
 *                         Header = "Host",
 *                         Values = new[]
 *                         {
 *                             "example-2",
 *                         },
 *                     },
 *                 },
 *             },
 *         },
 *         Latitude = 55,
 *         Longitude = -12,
 *         Description = "example load balancer pool",
 *         Enabled = false,
 *         MinimumOrigins = 1,
 *         NotificationEmail = "[email protected]",
 *         LoadSheddings = new[]
 *         {
 *             new Cloudflare.Inputs.LoadBalancerPoolLoadSheddingArgs
 *             {
 *                 DefaultPercent = 55,
 *                 DefaultPolicy = "random",
 *                 SessionPercent = 12,
 *                 SessionPolicy = "hash",
 *             },
 *         },
 *         OriginSteerings = new[]
 *         {
 *             new Cloudflare.Inputs.LoadBalancerPoolOriginSteeringArgs
 *             {
 *                 Policy = "random",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := cloudflare.NewLoadBalancerPool(ctx, "example", &cloudflare.LoadBalancerPoolArgs{
 * 			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:      pulumi.String("example-pool"),
 * 			Origins: cloudflare.LoadBalancerPoolOriginArray{
 * 				&cloudflare.LoadBalancerPoolOriginArgs{
 * 					Name:    pulumi.String("example-1"),
 * 					Address: pulumi.String("192.0.2.1"),
 * 					Enabled: pulumi.Bool(false),
 * 					Headers: cloudflare.LoadBalancerPoolOriginHeaderArray{
 * 						&cloudflare.LoadBalancerPoolOriginHeaderArgs{
 * 							Header: pulumi.String("Host"),
 * 							Values: pulumi.StringArray{
 * 								pulumi.String("example-1"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 				&cloudflare.LoadBalancerPoolOriginArgs{
 * 					Name:    pulumi.String("example-2"),
 * 					Address: pulumi.String("192.0.2.2"),
 * 					Headers: cloudflare.LoadBalancerPoolOriginHeaderArray{
 * 						&cloudflare.LoadBalancerPoolOriginHeaderArgs{
 * 							Header: pulumi.String("Host"),
 * 							Values: pulumi.StringArray{
 * 								pulumi.String("example-2"),
 * 							},
 * 						},
 * 					},
 * 				},
 * 			},
 * 			Latitude:          pulumi.Float64(55),
 * 			Longitude:         -12,
 * 			Description:       pulumi.String("example load balancer pool"),
 * 			Enabled:           pulumi.Bool(false),
 * 			MinimumOrigins:    pulumi.Int(1),
 * 			NotificationEmail: pulumi.String("[email protected]"),
 * 			LoadSheddings: cloudflare.LoadBalancerPoolLoadSheddingArray{
 * 				&cloudflare.LoadBalancerPoolLoadSheddingArgs{
 * 					DefaultPercent: pulumi.Float64(55),
 * 					DefaultPolicy:  pulumi.String("random"),
 * 					SessionPercent: pulumi.Float64(12),
 * 					SessionPolicy:  pulumi.String("hash"),
 * 				},
 * 			},
 * 			OriginSteerings: cloudflare.LoadBalancerPoolOriginSteeringArray{
 * 				&cloudflare.LoadBalancerPoolOriginSteeringArgs{
 * 					Policy: pulumi.String("random"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:LoadBalancerPool
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: example-pool
 *       origins:
 *         - name: example-1
 *           address: 192.0.2.1
 *           enabled: false
 *           headers:
 *             - header: Host
 *               values:
 *                 - example-1
 *         - name: example-2
 *           address: 192.0.2.2
 *           headers:
 *             - header: Host
 *               values:
 *                 - example-2
 *       latitude: 55
 *       longitude: -12
 *       description: example load balancer pool
 *       enabled: false
 *       minimumOrigins: 1
 *       notificationEmail: [email protected]
 *       loadSheddings:
 *         - defaultPercent: 55
 *           defaultPolicy: random
 *           sessionPercent: 12
 *           sessionPolicy: hash
 *       originSteerings:
 *         - policy: random
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/loadBalancerPool:LoadBalancerPool example /
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property checkRegions A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
 * @property description Free text description.
 * @property enabled Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
 * @property latitude The latitude this pool is physically located at; used for proximity steering.
 * @property loadSheddings Setting for controlling load shedding for this pool.
 * @property longitude The longitude this pool is physically located at; used for proximity steering.
 * @property minimumOrigins The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
 * @property monitor The ID of the Monitor to use for health checking origins within this pool.
 * @property name A short name (tag) for the pool.
 * @property notificationEmail The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
 * @property originSteerings Set an origin steering policy to control origin selection within a pool.
 * @property origins The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
 */
public data class LoadBalancerPoolArgs(
    public val accountId: Output? = null,
    public val checkRegions: Output>? = null,
    public val description: Output? = null,
    public val enabled: Output? = null,
    public val latitude: Output? = null,
    public val loadSheddings: Output>? = null,
    public val longitude: Output? = null,
    public val minimumOrigins: Output? = null,
    public val monitor: Output? = null,
    public val name: Output? = null,
    public val notificationEmail: Output? = null,
    public val originSteerings: Output>? = null,
    public val origins: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.LoadBalancerPoolArgs =
        com.pulumi.cloudflare.LoadBalancerPoolArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .checkRegions(checkRegions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .latitude(latitude?.applyValue({ args0 -> args0 }))
            .loadSheddings(
                loadSheddings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .longitude(longitude?.applyValue({ args0 -> args0 }))
            .minimumOrigins(minimumOrigins?.applyValue({ args0 -> args0 }))
            .monitor(monitor?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .notificationEmail(notificationEmail?.applyValue({ args0 -> args0 }))
            .originSteerings(
                originSteerings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .origins(
                origins?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [LoadBalancerPoolArgs].
 */
@PulumiTagMarker
public class LoadBalancerPoolArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var checkRegions: Output>? = null

    private var description: Output? = null

    private var enabled: Output? = null

    private var latitude: Output? = null

    private var loadSheddings: Output>? = null

    private var longitude: Output? = null

    private var minimumOrigins: Output? = null

    private var monitor: Output? = null

    private var name: Output? = null

    private var notificationEmail: Output? = null

    private var originSteerings: Output>? = null

    private var origins: Output>? = null

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("ikmcxqraxavekryc")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
     */
    @JvmName("uwyrfvwbqsrkmhkk")
    public suspend fun checkRegions(`value`: Output>) {
        this.checkRegions = value
    }

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

    /**
     * @param values A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
     */
    @JvmName("igyntymoojoflygu")
    public suspend fun checkRegions(values: List>) {
        this.checkRegions = Output.all(values)
    }

    /**
     * @param value Free text description.
     */
    @JvmName("iggugqugxkemxsoi")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
     */
    @JvmName("pentomaumwmluawu")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The latitude this pool is physically located at; used for proximity steering.
     */
    @JvmName("qaiyygegfrvciglf")
    public suspend fun latitude(`value`: Output) {
        this.latitude = value
    }

    /**
     * @param value Setting for controlling load shedding for this pool.
     */
    @JvmName("luiivvssnlgavceu")
    public suspend fun loadSheddings(`value`: Output>) {
        this.loadSheddings = value
    }

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

    /**
     * @param values Setting for controlling load shedding for this pool.
     */
    @JvmName("tmyacrdstbiifjwu")
    public suspend fun loadSheddings(values: List>) {
        this.loadSheddings = Output.all(values)
    }

    /**
     * @param value The longitude this pool is physically located at; used for proximity steering.
     */
    @JvmName("ndwdgydswcrqpnby")
    public suspend fun longitude(`value`: Output) {
        this.longitude = value
    }

    /**
     * @param value The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
     */
    @JvmName("rxjxkfymwbblqfss")
    public suspend fun minimumOrigins(`value`: Output) {
        this.minimumOrigins = value
    }

    /**
     * @param value The ID of the Monitor to use for health checking origins within this pool.
     */
    @JvmName("ysbhvhbgcsotkkvk")
    public suspend fun monitor(`value`: Output) {
        this.monitor = value
    }

    /**
     * @param value A short name (tag) for the pool.
     */
    @JvmName("gdpcfnahhrprxatp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
     */
    @JvmName("jremsfkubgguwutn")
    public suspend fun notificationEmail(`value`: Output) {
        this.notificationEmail = value
    }

    /**
     * @param value Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("phboqsngdbmgtarf")
    public suspend fun originSteerings(`value`: Output>) {
        this.originSteerings = value
    }

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

    /**
     * @param values Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("qjixioymsnhdgovg")
    public suspend fun originSteerings(values: List>) {
        this.originSteerings = Output.all(values)
    }

    /**
     * @param value The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("hyhsvgofdtkxvshi")
    public suspend fun origins(`value`: Output>) {
        this.origins = value
    }

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

    /**
     * @param values The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("gkeaucapmxcakmtj")
    public suspend fun origins(values: List>) {
        this.origins = Output.all(values)
    }

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("lndufcampwicnrpe")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
     */
    @JvmName("nxshuvrvysfaysjc")
    public suspend fun checkRegions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.checkRegions = mapped
    }

    /**
     * @param values A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found [here](https://developers.cloudflare.com/load-balancing/reference/region-mapping-api).
     */
    @JvmName("fvureaanpfrcalcq")
    public suspend fun checkRegions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.checkRegions = mapped
    }

    /**
     * @param value Free text description.
     */
    @JvmName("hdidxvtgxpeyuham")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Whether to enable (the default) this pool. Disabled pools will not receive traffic and are excluded from health checks. Disabling a pool will cause any load balancers using it to failover to the next pool (if any). Defaults to `true`.
     */
    @JvmName("bbkytlqvnlmqvsst")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The latitude this pool is physically located at; used for proximity steering.
     */
    @JvmName("xquiaclmowjveyxc")
    public suspend fun latitude(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.latitude = mapped
    }

    /**
     * @param value Setting for controlling load shedding for this pool.
     */
    @JvmName("erpgnnbadnfldfcj")
    public suspend fun loadSheddings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loadSheddings = mapped
    }

    /**
     * @param argument Setting for controlling load shedding for this pool.
     */
    @JvmName("kximtnxxwdmwatkh")
    public suspend fun loadSheddings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerPoolLoadSheddingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.loadSheddings = mapped
    }

    /**
     * @param argument Setting for controlling load shedding for this pool.
     */
    @JvmName("ktaoeawmbhxrrdoj")
    public suspend fun loadSheddings(vararg argument: suspend LoadBalancerPoolLoadSheddingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerPoolLoadSheddingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.loadSheddings = mapped
    }

    /**
     * @param argument Setting for controlling load shedding for this pool.
     */
    @JvmName("hhlkovdtmnjlfthv")
    public suspend fun loadSheddings(argument: suspend LoadBalancerPoolLoadSheddingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerPoolLoadSheddingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.loadSheddings = mapped
    }

    /**
     * @param values Setting for controlling load shedding for this pool.
     */
    @JvmName("neratjrcnuyaneca")
    public suspend fun loadSheddings(vararg values: LoadBalancerPoolLoadSheddingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.loadSheddings = mapped
    }

    /**
     * @param value The longitude this pool is physically located at; used for proximity steering.
     */
    @JvmName("japhjbdtunmkpqhs")
    public suspend fun longitude(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.longitude = mapped
    }

    /**
     * @param value The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Defaults to `1`.
     */
    @JvmName("igsimrfihxwbxxwd")
    public suspend fun minimumOrigins(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minimumOrigins = mapped
    }

    /**
     * @param value The ID of the Monitor to use for health checking origins within this pool.
     */
    @JvmName("wmgthpqbjeehpbsg")
    public suspend fun monitor(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitor = mapped
    }

    /**
     * @param value A short name (tag) for the pool.
     */
    @JvmName("wfhskdfwpygeylhl")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.
     */
    @JvmName("vcbfnbhwfoklymde")
    public suspend fun notificationEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notificationEmail = mapped
    }

    /**
     * @param value Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("rhpjavorqhbkraeb")
    public suspend fun originSteerings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.originSteerings = mapped
    }

    /**
     * @param argument Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("snggjhqdpdunclal")
    public suspend fun originSteerings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerPoolOriginSteeringArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.originSteerings = mapped
    }

    /**
     * @param argument Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("eyeeonnpkdrcpgtd")
    public suspend fun originSteerings(vararg argument: suspend LoadBalancerPoolOriginSteeringArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerPoolOriginSteeringArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.originSteerings = mapped
    }

    /**
     * @param argument Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("fohjkhbsbwwhlfer")
    public suspend fun originSteerings(argument: suspend LoadBalancerPoolOriginSteeringArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerPoolOriginSteeringArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.originSteerings = mapped
    }

    /**
     * @param values Set an origin steering policy to control origin selection within a pool.
     */
    @JvmName("uobyxphwstbehnri")
    public suspend fun originSteerings(vararg values: LoadBalancerPoolOriginSteeringArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.originSteerings = mapped
    }

    /**
     * @param value The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("lgpsofosqlgoatrp")
    public suspend fun origins(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.origins = mapped
    }

    /**
     * @param argument The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("vjaienjnrgfdlydd")
    public suspend fun origins(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerPoolOriginArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.origins = mapped
    }

    /**
     * @param argument The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("hrlfptaqjsjiwsja")
    public suspend fun origins(vararg argument: suspend LoadBalancerPoolOriginArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerPoolOriginArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.origins = mapped
    }

    /**
     * @param argument The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("ndoutcepagrnybut")
    public suspend fun origins(argument: suspend LoadBalancerPoolOriginArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(LoadBalancerPoolOriginArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.origins = mapped
    }

    /**
     * @param values The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy.
     */
    @JvmName("rhacsariaxohnscw")
    public suspend fun origins(vararg values: LoadBalancerPoolOriginArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.origins = mapped
    }

    internal fun build(): LoadBalancerPoolArgs = LoadBalancerPoolArgs(
        accountId = accountId,
        checkRegions = checkRegions,
        description = description,
        enabled = enabled,
        latitude = latitude,
        loadSheddings = loadSheddings,
        longitude = longitude,
        minimumOrigins = minimumOrigins,
        monitor = monitor,
        name = name,
        notificationEmail = notificationEmail,
        originSteerings = originSteerings,
        origins = origins,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy