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

com.pulumi.awsnative.lambda.kotlin.inputs.FunctionLoggingConfigArgs.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.lambda.kotlin.inputs

import com.pulumi.awsnative.lambda.inputs.FunctionLoggingConfigArgs.builder
import com.pulumi.awsnative.lambda.kotlin.enums.FunctionLoggingConfigApplicationLogLevel
import com.pulumi.awsnative.lambda.kotlin.enums.FunctionLoggingConfigLogFormat
import com.pulumi.awsnative.lambda.kotlin.enums.FunctionLoggingConfigSystemLogLevel
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

/**
 * The function's Amazon CloudWatch Logs configuration settings.
 * @property applicationLogLevel Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where ``TRACE`` is the highest level and ``FATAL`` is the lowest.
 * @property logFormat The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
 * @property logGroup The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named ``/aws/lambda/``. To use a different log group, enter an existing log group or enter a new log group name.
 * @property systemLogLevel Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where ``DEBUG`` is the highest level and ``WARN`` is the lowest.
 */
public data class FunctionLoggingConfigArgs(
    public val applicationLogLevel: Output? = null,
    public val logFormat: Output? = null,
    public val logGroup: Output? = null,
    public val systemLogLevel: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lambda.inputs.FunctionLoggingConfigArgs =
        com.pulumi.awsnative.lambda.inputs.FunctionLoggingConfigArgs.builder()
            .applicationLogLevel(
                applicationLogLevel?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .logFormat(logFormat?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .logGroup(logGroup?.applyValue({ args0 -> args0 }))
            .systemLogLevel(
                systemLogLevel?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [FunctionLoggingConfigArgs].
 */
@PulumiTagMarker
public class FunctionLoggingConfigArgsBuilder internal constructor() {
    private var applicationLogLevel: Output? = null

    private var logFormat: Output? = null

    private var logGroup: Output? = null

    private var systemLogLevel: Output? = null

    /**
     * @param value Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where ``TRACE`` is the highest level and ``FATAL`` is the lowest.
     */
    @JvmName("pbkvtflmrllpugaj")
    public suspend fun applicationLogLevel(`value`: Output) {
        this.applicationLogLevel = value
    }

    /**
     * @param value The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
     */
    @JvmName("jxclsphyxaqstlmk")
    public suspend fun logFormat(`value`: Output) {
        this.logFormat = value
    }

    /**
     * @param value The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named ``/aws/lambda/``. To use a different log group, enter an existing log group or enter a new log group name.
     */
    @JvmName("lknsolribrrqrqeg")
    public suspend fun logGroup(`value`: Output) {
        this.logGroup = value
    }

    /**
     * @param value Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where ``DEBUG`` is the highest level and ``WARN`` is the lowest.
     */
    @JvmName("wuwxqkoilnbcwuap")
    public suspend fun systemLogLevel(`value`: Output) {
        this.systemLogLevel = value
    }

    /**
     * @param value Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where ``TRACE`` is the highest level and ``FATAL`` is the lowest.
     */
    @JvmName("dostsndjgbevybyh")
    public suspend fun applicationLogLevel(`value`: FunctionLoggingConfigApplicationLogLevel?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applicationLogLevel = mapped
    }

    /**
     * @param value The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.
     */
    @JvmName("dqhfkofsimiugtcl")
    public suspend fun logFormat(`value`: FunctionLoggingConfigLogFormat?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logFormat = mapped
    }

    /**
     * @param value The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named ``/aws/lambda/``. To use a different log group, enter an existing log group or enter a new log group name.
     */
    @JvmName("ykioiwijlhkrltih")
    public suspend fun logGroup(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logGroup = mapped
    }

    /**
     * @param value Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where ``DEBUG`` is the highest level and ``WARN`` is the lowest.
     */
    @JvmName("qyfsbhikqaxcwjwk")
    public suspend fun systemLogLevel(`value`: FunctionLoggingConfigSystemLogLevel?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.systemLogLevel = mapped
    }

    internal fun build(): FunctionLoggingConfigArgs = FunctionLoggingConfigArgs(
        applicationLogLevel = applicationLogLevel,
        logFormat = logFormat,
        logGroup = logGroup,
        systemLogLevel = systemLogLevel,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy