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

com.pulumi.azure.containerapp.kotlin.inputs.AppTemplateContainerLivenessProbeArgs.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.AppTemplateContainerLivenessProbeArgs.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 probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
 * @property initialDelay The time in seconds to wait after the container has started before the probe is started.
 * @property intervalSeconds How often, in seconds, the probe should run. Possible values are in the range `1` - `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 AppTemplateContainerLivenessProbeArgs(
    public val failureCountThreshold: Output? = null,
    public val headers: Output>? = null,
    public val host: Output? = null,
    public val initialDelay: 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.AppTemplateContainerLivenessProbeArgs = com.pulumi.azure.containerapp.inputs.AppTemplateContainerLivenessProbeArgs.builder()
        .failureCountThreshold(failureCountThreshold?.applyValue({ args0 -> args0 }))
        .headers(
            headers?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .host(host?.applyValue({ args0 -> args0 }))
        .initialDelay(initialDelay?.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 [AppTemplateContainerLivenessProbeArgs].
 */
@PulumiTagMarker
public class AppTemplateContainerLivenessProbeArgsBuilder internal constructor() {
    private var failureCountThreshold: Output? = null

    private var headers: Output>? = null

    private var host: Output? = null

    private var initialDelay: 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("ouhsokcqlrkbletw")
    public suspend fun failureCountThreshold(`value`: Output) {
        this.failureCountThreshold = value
    }

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

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

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

    /**
     * @param value The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
     */
    @JvmName("mobhmtvwlugignvt")
    public suspend fun host(`value`: Output) {
        this.host = value
    }

    /**
     * @param value The time in seconds to wait after the container has started before the probe is started.
     */
    @JvmName("ekgberrybgtwgiov")
    public suspend fun initialDelay(`value`: Output) {
        this.initialDelay = value
    }

    /**
     * @param value How often, in seconds, the probe should run. Possible values are in the range `1` - `240`. Defaults to `10`.
     */
    @JvmName("kpxvajhjftjrfqqs")
    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("rcerjqewornnrflx")
    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("hccmvbcrkjiiwsax")
    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("rrfaqllxcdlyohim")
    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("oifrtosktcqxgdek")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value Type of probe. Possible values are `TCP`, `HTTP`, and `HTTPS`.
     */
    @JvmName("yrgphsxtnkrydkpq")
    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("mkoyaouwfiiawyxu")
    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("pnrefmelnybeaqel")
    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("oigvxadnnckuiosi")
    public suspend fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppTemplateContainerLivenessProbeHeaderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

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

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

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

    /**
     * @param value The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes.
     */
    @JvmName("reoewnxcmselouam")
    public suspend fun host(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.host = mapped
    }

    /**
     * @param value The time in seconds to wait after the container has started before the probe is started.
     */
    @JvmName("qxqcklcoiigfgpgu")
    public suspend fun initialDelay(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.initialDelay = mapped
    }

    /**
     * @param value How often, in seconds, the probe should run. Possible values are in the range `1` - `240`. Defaults to `10`.
     */
    @JvmName("vmeahtptcaicartw")
    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("vwunrkuduivuscqc")
    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("hdqabbihnugedujq")
    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("drvhywlahgoruide")
    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("xkrqkwrciwkaktjs")
    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("hcxuaxhwxqfqbxqg")
    public suspend fun transport(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    internal fun build(): AppTemplateContainerLivenessProbeArgs =
        AppTemplateContainerLivenessProbeArgs(
            failureCountThreshold = failureCountThreshold,
            headers = headers,
            host = host,
            initialDelay = initialDelay,
            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