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

com.pulumi.awsnative.cloudfront.kotlin.inputs.DistributionOriginGroupFailoverCriteriaArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudfront.kotlin.inputs

import com.pulumi.awsnative.cloudfront.inputs.DistributionOriginGroupFailoverCriteriaArgs.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.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * A complex data type that includes information about the failover criteria for an origin group, including the status codes for which CloudFront will failover from the primary origin to the second origin.
 * @property statusCodes The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin.
 */
public data class DistributionOriginGroupFailoverCriteriaArgs(
    public val statusCodes: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudfront.inputs.DistributionOriginGroupFailoverCriteriaArgs =
        com.pulumi.awsnative.cloudfront.inputs.DistributionOriginGroupFailoverCriteriaArgs.builder()
            .statusCodes(statusCodes.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [DistributionOriginGroupFailoverCriteriaArgs].
 */
@PulumiTagMarker
public class DistributionOriginGroupFailoverCriteriaArgsBuilder internal constructor() {
    private var statusCodes: Output? = null

    /**
     * @param value The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin.
     */
    @JvmName("figchibkynxspkeu")
    public suspend fun statusCodes(`value`: Output) {
        this.statusCodes = value
    }

    /**
     * @param value The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin.
     */
    @JvmName("lufyqpennansdgmf")
    public suspend fun statusCodes(`value`: DistributionStatusCodesArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statusCodes = mapped
    }

    /**
     * @param argument The status codes that, when returned from the primary origin, will trigger CloudFront to failover to the second origin.
     */
    @JvmName("wnojtxknrxdqming")
    public suspend fun statusCodes(argument: suspend DistributionStatusCodesArgsBuilder.() -> Unit) {
        val toBeMapped = DistributionStatusCodesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.statusCodes = mapped
    }

    internal fun build(): DistributionOriginGroupFailoverCriteriaArgs =
        DistributionOriginGroupFailoverCriteriaArgs(
            statusCodes = statusCodes ?: throw PulumiNullFieldException("statusCodes"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy