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

com.pulumi.aws.appmesh.kotlin.inputs.RouteSpecHttp2RouteRetryPolicyArgs.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.appmesh.kotlin.inputs

import com.pulumi.aws.appmesh.inputs.RouteSpecHttp2RouteRetryPolicyArgs.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 httpRetryEvents List of HTTP retry events.
 * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
 * @property maxRetries Maximum number of retries.
 * @property perRetryTimeout Per-retry timeout.
 * @property tcpRetryEvents List of TCP retry events. The only valid value is `connection-error`.
 * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
 */
public data class RouteSpecHttp2RouteRetryPolicyArgs(
    public val httpRetryEvents: Output>? = null,
    public val maxRetries: Output,
    public val perRetryTimeout: Output,
    public val tcpRetryEvents: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.appmesh.inputs.RouteSpecHttp2RouteRetryPolicyArgs =
        com.pulumi.aws.appmesh.inputs.RouteSpecHttp2RouteRetryPolicyArgs.builder()
            .httpRetryEvents(httpRetryEvents?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .maxRetries(maxRetries.applyValue({ args0 -> args0 }))
            .perRetryTimeout(perRetryTimeout.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tcpRetryEvents(tcpRetryEvents?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [RouteSpecHttp2RouteRetryPolicyArgs].
 */
@PulumiTagMarker
public class RouteSpecHttp2RouteRetryPolicyArgsBuilder internal constructor() {
    private var httpRetryEvents: Output>? = null

    private var maxRetries: Output? = null

    private var perRetryTimeout: Output? = null

    private var tcpRetryEvents: Output>? = null

    /**
     * @param value List of HTTP retry events.
     * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
     */
    @JvmName("rytvnhwutoxkrgli")
    public suspend fun httpRetryEvents(`value`: Output>) {
        this.httpRetryEvents = value
    }

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

    /**
     * @param values List of HTTP retry events.
     * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
     */
    @JvmName("wangrygqflryicok")
    public suspend fun httpRetryEvents(values: List>) {
        this.httpRetryEvents = Output.all(values)
    }

    /**
     * @param value Maximum number of retries.
     */
    @JvmName("pvxtfbvuphuweslv")
    public suspend fun maxRetries(`value`: Output) {
        this.maxRetries = value
    }

    /**
     * @param value Per-retry timeout.
     */
    @JvmName("rujwsmkjlybetyey")
    public suspend fun perRetryTimeout(`value`: Output) {
        this.perRetryTimeout = value
    }

    /**
     * @param value List of TCP retry events. The only valid value is `connection-error`.
     * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
     */
    @JvmName("hneytoqxppuwuqsb")
    public suspend fun tcpRetryEvents(`value`: Output>) {
        this.tcpRetryEvents = value
    }

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

    /**
     * @param values List of TCP retry events. The only valid value is `connection-error`.
     * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
     */
    @JvmName("qamxmmpnfinrgjhd")
    public suspend fun tcpRetryEvents(values: List>) {
        this.tcpRetryEvents = Output.all(values)
    }

    /**
     * @param value List of HTTP retry events.
     * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
     */
    @JvmName("tklleysavlipyusd")
    public suspend fun httpRetryEvents(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpRetryEvents = mapped
    }

    /**
     * @param values List of HTTP retry events.
     * Valid values: `client-error` (HTTP status code 409), `gateway-error` (HTTP status codes 502, 503, and 504), `server-error` (HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511), `stream-error` (retry on refused stream).
     */
    @JvmName("hudqmiyygtlylrcs")
    public suspend fun httpRetryEvents(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.httpRetryEvents = mapped
    }

    /**
     * @param value Maximum number of retries.
     */
    @JvmName("dxgpwoewliemfsfd")
    public suspend fun maxRetries(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.maxRetries = mapped
    }

    /**
     * @param value Per-retry timeout.
     */
    @JvmName("ogqggnkjentakvgj")
    public suspend fun perRetryTimeout(`value`: RouteSpecHttp2RouteRetryPolicyPerRetryTimeoutArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.perRetryTimeout = mapped
    }

    /**
     * @param argument Per-retry timeout.
     */
    @JvmName("jkrlfjjqirrfuaak")
    public suspend fun perRetryTimeout(argument: suspend RouteSpecHttp2RouteRetryPolicyPerRetryTimeoutArgsBuilder.() -> Unit) {
        val toBeMapped = RouteSpecHttp2RouteRetryPolicyPerRetryTimeoutArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.perRetryTimeout = mapped
    }

    /**
     * @param value List of TCP retry events. The only valid value is `connection-error`.
     * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
     */
    @JvmName("gbmdeosnrdfbhsoy")
    public suspend fun tcpRetryEvents(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tcpRetryEvents = mapped
    }

    /**
     * @param values List of TCP retry events. The only valid value is `connection-error`.
     * You must specify at least one value for `http_retry_events`, or at least one value for `tcp_retry_events`.
     */
    @JvmName("nldswwpydtyoakbv")
    public suspend fun tcpRetryEvents(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tcpRetryEvents = mapped
    }

    internal fun build(): RouteSpecHttp2RouteRetryPolicyArgs = RouteSpecHttp2RouteRetryPolicyArgs(
        httpRetryEvents = httpRetryEvents,
        maxRetries = maxRetries ?: throw PulumiNullFieldException("maxRetries"),
        perRetryTimeout = perRetryTimeout ?: throw PulumiNullFieldException("perRetryTimeout"),
        tcpRetryEvents = tcpRetryEvents,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy