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

com.pulumi.awsnative.cloudfront.kotlin.inputs.DistributionFunctionAssociationArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.awsnative.cloudfront.inputs.DistributionFunctionAssociationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * A CloudFront function that is associated with a cache behavior in a CloudFront distribution.
 * @property eventType The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function.
 * @property functionArn The Amazon Resource Name (ARN) of the function.
 */
public data class DistributionFunctionAssociationArgs(
    public val eventType: Output? = null,
    public val functionArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudfront.inputs.DistributionFunctionAssociationArgs = com.pulumi.awsnative.cloudfront.inputs.DistributionFunctionAssociationArgs.builder()
        .eventType(eventType?.applyValue({ args0 -> args0 }))
        .functionArn(functionArn?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DistributionFunctionAssociationArgs].
 */
@PulumiTagMarker
public class DistributionFunctionAssociationArgsBuilder internal constructor() {
    private var eventType: Output? = null

    private var functionArn: Output? = null

    /**
     * @param value The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function.
     */
    @JvmName("gjgsdwmktajwbmux")
    public suspend fun eventType(`value`: Output) {
        this.eventType = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the function.
     */
    @JvmName("coongfrkjajeruir")
    public suspend fun functionArn(`value`: Output) {
        this.functionArn = value
    }

    /**
     * @param value The event type of the function, either ``viewer-request`` or ``viewer-response``. You cannot use origin-facing event types (``origin-request`` and ``origin-response``) with a CloudFront function.
     */
    @JvmName("kcpswuokkogvijyf")
    public suspend fun eventType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventType = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the function.
     */
    @JvmName("ijqxkiiplokwprhv")
    public suspend fun functionArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionArn = mapped
    }

    internal fun build(): DistributionFunctionAssociationArgs = DistributionFunctionAssociationArgs(
        eventType = eventType,
        functionArn = functionArn,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy