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

com.pulumi.aws.ecs.kotlin.inputs.ServiceLoadBalancerArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ecs.kotlin.inputs

import com.pulumi.aws.ecs.inputs.ServiceLoadBalancerArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property containerName Name of the container to associate with the load balancer (as it appears in a container definition).
 * @property containerPort Port on the container to associate with the load balancer.
 * > **Version note:** Multiple `load_balancer` configuration block support was added in version 2.22.0 of the provider. This allows configuration of [ECS service support for multiple target groups](https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecs-services-now-support-multiple-load-balancer-target-groups/).
 * @property elbName Name of the ELB (Classic) to associate with the service.
 * @property targetGroupArn ARN of the Load Balancer target group to associate with the service.
 */
public data class ServiceLoadBalancerArgs(
    public val containerName: Output,
    public val containerPort: Output,
    public val elbName: Output? = null,
    public val targetGroupArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ecs.inputs.ServiceLoadBalancerArgs =
        com.pulumi.aws.ecs.inputs.ServiceLoadBalancerArgs.builder()
            .containerName(containerName.applyValue({ args0 -> args0 }))
            .containerPort(containerPort.applyValue({ args0 -> args0 }))
            .elbName(elbName?.applyValue({ args0 -> args0 }))
            .targetGroupArn(targetGroupArn?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ServiceLoadBalancerArgs].
 */
@PulumiTagMarker
public class ServiceLoadBalancerArgsBuilder internal constructor() {
    private var containerName: Output? = null

    private var containerPort: Output? = null

    private var elbName: Output? = null

    private var targetGroupArn: Output? = null

    /**
     * @param value Name of the container to associate with the load balancer (as it appears in a container definition).
     */
    @JvmName("icdpxwhxtgurlykm")
    public suspend fun containerName(`value`: Output) {
        this.containerName = value
    }

    /**
     * @param value Port on the container to associate with the load balancer.
     * > **Version note:** Multiple `load_balancer` configuration block support was added in version 2.22.0 of the provider. This allows configuration of [ECS service support for multiple target groups](https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecs-services-now-support-multiple-load-balancer-target-groups/).
     */
    @JvmName("aicornqkyjysrbrg")
    public suspend fun containerPort(`value`: Output) {
        this.containerPort = value
    }

    /**
     * @param value Name of the ELB (Classic) to associate with the service.
     */
    @JvmName("uacusllswqcbypqm")
    public suspend fun elbName(`value`: Output) {
        this.elbName = value
    }

    /**
     * @param value ARN of the Load Balancer target group to associate with the service.
     */
    @JvmName("xqarvpegvlboosry")
    public suspend fun targetGroupArn(`value`: Output) {
        this.targetGroupArn = value
    }

    /**
     * @param value Name of the container to associate with the load balancer (as it appears in a container definition).
     */
    @JvmName("gytptnoqdawnkjpn")
    public suspend fun containerName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containerName = mapped
    }

    /**
     * @param value Port on the container to associate with the load balancer.
     * > **Version note:** Multiple `load_balancer` configuration block support was added in version 2.22.0 of the provider. This allows configuration of [ECS service support for multiple target groups](https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecs-services-now-support-multiple-load-balancer-target-groups/).
     */
    @JvmName("shkkdsvxyocsebpu")
    public suspend fun containerPort(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containerPort = mapped
    }

    /**
     * @param value Name of the ELB (Classic) to associate with the service.
     */
    @JvmName("hqjntygyydmpcgbq")
    public suspend fun elbName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.elbName = mapped
    }

    /**
     * @param value ARN of the Load Balancer target group to associate with the service.
     */
    @JvmName("mrabsorarxxrtntf")
    public suspend fun targetGroupArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetGroupArn = mapped
    }

    internal fun build(): ServiceLoadBalancerArgs = ServiceLoadBalancerArgs(
        containerName = containerName ?: throw PulumiNullFieldException("containerName"),
        containerPort = containerPort ?: throw PulumiNullFieldException("containerPort"),
        elbName = elbName,
        targetGroupArn = targetGroupArn,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy