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

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

package com.pulumi.awsnative.cloudfront.kotlin

import com.pulumi.awsnative.cloudfront.FunctionArgs.builder
import com.pulumi.awsnative.cloudfront.kotlin.inputs.FunctionConfigArgs
import com.pulumi.awsnative.cloudfront.kotlin.inputs.FunctionConfigArgsBuilder
import com.pulumi.awsnative.cloudfront.kotlin.inputs.FunctionMetadataArgs
import com.pulumi.awsnative.cloudfront.kotlin.inputs.FunctionMetadataArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::CloudFront::Function
 * @property autoPublish A flag that determines whether to automatically publish the function to the `LIVE` stage when it’s created. To automatically publish to the `LIVE` stage, set this property to `true` .
 * @property functionCode The function code. For more information about writing a CloudFront function, see [Writing function code for CloudFront Functions](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html) in the *Amazon CloudFront Developer Guide* .
 * @property functionConfig Contains configuration information about a CloudFront function.
 * @property functionMetadata Contains metadata about a CloudFront function.
 * @property name A name to identify the function.
 */
public data class FunctionArgs(
    public val autoPublish: Output? = null,
    public val functionCode: Output? = null,
    public val functionConfig: Output? = null,
    public val functionMetadata: Output? = null,
    public val name: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudfront.FunctionArgs =
        com.pulumi.awsnative.cloudfront.FunctionArgs.builder()
            .autoPublish(autoPublish?.applyValue({ args0 -> args0 }))
            .functionCode(functionCode?.applyValue({ args0 -> args0 }))
            .functionConfig(functionConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .functionMetadata(functionMetadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FunctionArgs].
 */
@PulumiTagMarker
public class FunctionArgsBuilder internal constructor() {
    private var autoPublish: Output? = null

    private var functionCode: Output? = null

    private var functionConfig: Output? = null

    private var functionMetadata: Output? = null

    private var name: Output? = null

    /**
     * @param value A flag that determines whether to automatically publish the function to the `LIVE` stage when it’s created. To automatically publish to the `LIVE` stage, set this property to `true` .
     */
    @JvmName("ttbjpbfhtglnviqq")
    public suspend fun autoPublish(`value`: Output) {
        this.autoPublish = value
    }

    /**
     * @param value The function code. For more information about writing a CloudFront function, see [Writing function code for CloudFront Functions](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html) in the *Amazon CloudFront Developer Guide* .
     */
    @JvmName("yikijysevjixtdyl")
    public suspend fun functionCode(`value`: Output) {
        this.functionCode = value
    }

    /**
     * @param value Contains configuration information about a CloudFront function.
     */
    @JvmName("dmnambsfelrscrcs")
    public suspend fun functionConfig(`value`: Output) {
        this.functionConfig = value
    }

    /**
     * @param value Contains metadata about a CloudFront function.
     */
    @JvmName("gvixforjwpeacqkh")
    public suspend fun functionMetadata(`value`: Output) {
        this.functionMetadata = value
    }

    /**
     * @param value A name to identify the function.
     */
    @JvmName("pmlhyyjoqnwwubnl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A flag that determines whether to automatically publish the function to the `LIVE` stage when it’s created. To automatically publish to the `LIVE` stage, set this property to `true` .
     */
    @JvmName("qqreoselqbhtxyay")
    public suspend fun autoPublish(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoPublish = mapped
    }

    /**
     * @param value The function code. For more information about writing a CloudFront function, see [Writing function code for CloudFront Functions](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/writing-function-code.html) in the *Amazon CloudFront Developer Guide* .
     */
    @JvmName("xfhgevtdmrwejjjj")
    public suspend fun functionCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionCode = mapped
    }

    /**
     * @param value Contains configuration information about a CloudFront function.
     */
    @JvmName("fohxeiasryctulop")
    public suspend fun functionConfig(`value`: FunctionConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionConfig = mapped
    }

    /**
     * @param argument Contains configuration information about a CloudFront function.
     */
    @JvmName("pvkwxrppucgltilu")
    public suspend fun functionConfig(argument: suspend FunctionConfigArgsBuilder.() -> Unit) {
        val toBeMapped = FunctionConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.functionConfig = mapped
    }

    /**
     * @param value Contains metadata about a CloudFront function.
     */
    @JvmName("oqphiwhuxmlvokdk")
    public suspend fun functionMetadata(`value`: FunctionMetadataArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionMetadata = mapped
    }

    /**
     * @param argument Contains metadata about a CloudFront function.
     */
    @JvmName("hhmmidgtuqfgjjfx")
    public suspend fun functionMetadata(argument: suspend FunctionMetadataArgsBuilder.() -> Unit) {
        val toBeMapped = FunctionMetadataArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.functionMetadata = mapped
    }

    /**
     * @param value A name to identify the function.
     */
    @JvmName("xknfjogrgngcjflj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): FunctionArgs = FunctionArgs(
        autoPublish = autoPublish,
        functionCode = functionCode,
        functionConfig = functionConfig,
        functionMetadata = functionMetadata,
        name = name,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy