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

com.pulumi.azure.containerapp.kotlin.inputs.AppTemplateContainerStartupProbeArgs.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.containerapp.kotlin.inputs

import com.pulumi.azure.containerapp.inputs.AppTemplateContainerStartupProbeArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property failureCountThreshold The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.
 * @property headers A `header` block as detailed below.
 * @property host The value for the host header which should be sent with this probe. If unspecified, the IP Address of the Pod is used as the host header. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
 * @property intervalSeconds How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`
 * @property path The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.
 * @property port The port number on which to connect. Possible values are between `1` and `65535`.
 * @property terminationGracePeriodSeconds The time in seconds after the container is sent the termination signal before the process if forcibly killed.
 * @property timeout Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`.
 * @property transport Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.
 */
public data class AppTemplateContainerStartupProbeArgs(
    public val failureCountThreshold: Output? = null,
    public val headers: Output>? = null,
    public val host: Output? = null,
    public val intervalSeconds: Output? = null,
    public val path: Output? = null,
    public val port: Output,
    public val terminationGracePeriodSeconds: Output? = null,
    public val timeout: Output? = null,
    public val transport: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerapp.inputs.AppTemplateContainerStartupProbeArgs =
        com.pulumi.azure.containerapp.inputs.AppTemplateContainerStartupProbeArgs.builder()
            .failureCountThreshold(failureCountThreshold?.applyValue({ args0 -> args0 }))
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .host(host?.applyValue({ args0 -> args0 }))
            .intervalSeconds(intervalSeconds?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .port(port.applyValue({ args0 -> args0 }))
            .terminationGracePeriodSeconds(terminationGracePeriodSeconds?.applyValue({ args0 -> args0 }))
            .timeout(timeout?.applyValue({ args0 -> args0 }))
            .transport(transport.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AppTemplateContainerStartupProbeArgs].
 */
@PulumiTagMarker
public class AppTemplateContainerStartupProbeArgsBuilder internal constructor() {
    private var failureCountThreshold: Output? = null

    private var headers: Output>? = null

    private var host: Output? = null

    private var intervalSeconds: Output? = null

    private var path: Output? = null

    private var port: Output? = null

    private var terminationGracePeriodSeconds: Output? = null

    private var timeout: Output? = null

    private var transport: Output? = null

    /**
     * @param value The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.
     */
    @JvmName("ykcoadnrmtdosaer")
    public suspend fun failureCountThreshold(`value`: Output) {
        this.failureCountThreshold = value
    }

    /**
     * @param value A `header` block as detailed below.
     */
    @JvmName("horadliuhgqebrjc")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

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

    /**
     * @param values A `header` block as detailed below.
     */
    @JvmName("ihdgdwqoxcsrutcx")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value The value for the host header which should be sent with this probe. If unspecified, the IP Address of the Pod is used as the host header. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
     */
    @JvmName("wuktusdoewbuideo")
    public suspend fun host(`value`: Output) {
        this.host = value
    }

    /**
     * @param value How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`
     */
    @JvmName("qrqnwklpodncwlqe")
    public suspend fun intervalSeconds(`value`: Output) {
        this.intervalSeconds = value
    }

    /**
     * @param value The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.
     */
    @JvmName("qcxmepibahcelyvj")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value The port number on which to connect. Possible values are between `1` and `65535`.
     */
    @JvmName("cfvlthjtyujcqacb")
    public suspend fun port(`value`: Output) {
        this.port = value
    }

    /**
     * @param value The time in seconds after the container is sent the termination signal before the process if forcibly killed.
     */
    @JvmName("xgetsudbibwycdfk")
    public suspend fun terminationGracePeriodSeconds(`value`: Output) {
        this.terminationGracePeriodSeconds = value
    }

    /**
     * @param value Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`.
     */
    @JvmName("otgwnalwvwqlqrti")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.
     */
    @JvmName("iunwfxtsxhylqxrl")
    public suspend fun transport(`value`: Output) {
        this.transport = value
    }

    /**
     * @param value The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.
     */
    @JvmName("alpviowvjrlxyklp")
    public suspend fun failureCountThreshold(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failureCountThreshold = mapped
    }

    /**
     * @param value A `header` block as detailed below.
     */
    @JvmName("vhbvsclbidhtaegj")
    public suspend fun headers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param argument A `header` block as detailed below.
     */
    @JvmName("mlgoonmfccbnxvxs")
    public suspend
    fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppTemplateContainerStartupProbeHeaderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument A `header` block as detailed below.
     */
    @JvmName("grifcnuatpbwokwn")
    public suspend fun headers(
        vararg
        argument: suspend AppTemplateContainerStartupProbeHeaderArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AppTemplateContainerStartupProbeHeaderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument A `header` block as detailed below.
     */
    @JvmName("qwrujywbecgjsejd")
    public suspend
    fun headers(argument: suspend AppTemplateContainerStartupProbeHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppTemplateContainerStartupProbeHeaderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param values A `header` block as detailed below.
     */
    @JvmName("ywdxmdusavctrred")
    public suspend fun headers(vararg values: AppTemplateContainerStartupProbeHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value The value for the host header which should be sent with this probe. If unspecified, the IP Address of the Pod is used as the host header. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
     */
    @JvmName("vwsuehjhluphoxcx")
    public suspend fun host(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.host = mapped
    }

    /**
     * @param value How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10`
     */
    @JvmName("epwnfsixxgrqngum")
    public suspend fun intervalSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.intervalSeconds = mapped
    }

    /**
     * @param value The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.
     */
    @JvmName("hqncwwdkqnxgcccp")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value The port number on which to connect. Possible values are between `1` and `65535`.
     */
    @JvmName("iyebbjqweakiemrm")
    public suspend fun port(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.port = mapped
    }

    /**
     * @param value The time in seconds after the container is sent the termination signal before the process if forcibly killed.
     */
    @JvmName("kwjhvyrhtolycpeq")
    public suspend fun terminationGracePeriodSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.terminationGracePeriodSeconds = mapped
    }

    /**
     * @param value Time in seconds after which the probe times out. Possible values are in the range `1` - `240`. Defaults to `1`.
     */
    @JvmName("pqymexydvnfixfmc")
    public suspend fun timeout(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    /**
     * @param value Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.
     */
    @JvmName("vhwdjsevqpaerwoe")
    public suspend fun transport(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    internal fun build(): AppTemplateContainerStartupProbeArgs = AppTemplateContainerStartupProbeArgs(
        failureCountThreshold = failureCountThreshold,
        headers = headers,
        host = host,
        intervalSeconds = intervalSeconds,
        path = path,
        port = port ?: throw PulumiNullFieldException("port"),
        terminationGracePeriodSeconds = terminationGracePeriodSeconds,
        timeout = timeout,
        transport = transport ?: throw PulumiNullFieldException("transport"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy