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

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

package com.pulumi.awsnative.logs.kotlin

import com.pulumi.awsnative.logs.LogAnomalyDetectorArgs.builder
import com.pulumi.awsnative.logs.kotlin.enums.LogAnomalyDetectorEvaluationFrequency
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::Logs::LogAnomalyDetector resource specifies a CloudWatch Logs LogAnomalyDetector.
 * @property accountId Account ID for owner of detector
 * @property anomalyVisibilityTime The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in `AnomalyVisibilityTime` , it will be considered normal going forward and will not be detected as an anomaly.
 * @property detectorName Name of detector
 * @property evaluationFrequency How often log group is evaluated
 * @property filterPattern You can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) .
 * @property kmsKeyId The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
 * @property logGroupArnList List of Arns for the given log group
 */
public data class LogAnomalyDetectorArgs(
    public val accountId: Output? = null,
    public val anomalyVisibilityTime: Output? = null,
    public val detectorName: Output? = null,
    public val evaluationFrequency: Output? = null,
    public val filterPattern: Output? = null,
    public val kmsKeyId: Output? = null,
    public val logGroupArnList: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.logs.LogAnomalyDetectorArgs =
        com.pulumi.awsnative.logs.LogAnomalyDetectorArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .anomalyVisibilityTime(anomalyVisibilityTime?.applyValue({ args0 -> args0 }))
            .detectorName(detectorName?.applyValue({ args0 -> args0 }))
            .evaluationFrequency(
                evaluationFrequency?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .filterPattern(filterPattern?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .logGroupArnList(logGroupArnList?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [LogAnomalyDetectorArgs].
 */
@PulumiTagMarker
public class LogAnomalyDetectorArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var anomalyVisibilityTime: Output? = null

    private var detectorName: Output? = null

    private var evaluationFrequency: Output? = null

    private var filterPattern: Output? = null

    private var kmsKeyId: Output? = null

    private var logGroupArnList: Output>? = null

    /**
     * @param value Account ID for owner of detector
     */
    @JvmName("ellqrvllovtprhxg")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in `AnomalyVisibilityTime` , it will be considered normal going forward and will not be detected as an anomaly.
     */
    @JvmName("nubvdkftitoguwvf")
    public suspend fun anomalyVisibilityTime(`value`: Output) {
        this.anomalyVisibilityTime = value
    }

    /**
     * @param value Name of detector
     */
    @JvmName("sjfdpsorrjfxjfdc")
    public suspend fun detectorName(`value`: Output) {
        this.detectorName = value
    }

    /**
     * @param value How often log group is evaluated
     */
    @JvmName("dshqniaqwoaacjxt")
    public suspend fun evaluationFrequency(`value`: Output) {
        this.evaluationFrequency = value
    }

    /**
     * @param value You can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) .
     */
    @JvmName("nkpmjgbdguvwfjce")
    public suspend fun filterPattern(`value`: Output) {
        this.filterPattern = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
     */
    @JvmName("byrqeyfhuictwyxj")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value List of Arns for the given log group
     */
    @JvmName("tcsslcexhpndwcmt")
    public suspend fun logGroupArnList(`value`: Output>) {
        this.logGroupArnList = value
    }

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

    /**
     * @param values List of Arns for the given log group
     */
    @JvmName("pockebaqidrfdrun")
    public suspend fun logGroupArnList(values: List>) {
        this.logGroupArnList = Output.all(values)
    }

    /**
     * @param value Account ID for owner of detector
     */
    @JvmName("tkiflbkeogxewuth")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value The number of days to have visibility on an anomaly. After this time period has elapsed for an anomaly, it will be automatically baselined and the anomaly detector will treat new occurrences of a similar anomaly as normal. Therefore, if you do not correct the cause of an anomaly during the time period specified in `AnomalyVisibilityTime` , it will be considered normal going forward and will not be detected as an anomaly.
     */
    @JvmName("cuqdodifimksnali")
    public suspend fun anomalyVisibilityTime(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.anomalyVisibilityTime = mapped
    }

    /**
     * @param value Name of detector
     */
    @JvmName("lsouicqviebfsmbc")
    public suspend fun detectorName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.detectorName = mapped
    }

    /**
     * @param value How often log group is evaluated
     */
    @JvmName("ipawdxjapkhjorfe")
    public suspend fun evaluationFrequency(`value`: LogAnomalyDetectorEvaluationFrequency?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluationFrequency = mapped
    }

    /**
     * @param value You can use this parameter to limit the anomaly detection model to examine only log events that match the pattern you specify here. For more information, see [Filter and Pattern Syntax](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) .
     */
    @JvmName("rnkicmcwjnuiupvh")
    public suspend fun filterPattern(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filterPattern = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.
     */
    @JvmName("wwpmytfsghbjcsyw")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value List of Arns for the given log group
     */
    @JvmName("msdwbyjcuypypgnp")
    public suspend fun logGroupArnList(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.logGroupArnList = mapped
    }

    /**
     * @param values List of Arns for the given log group
     */
    @JvmName("jtqiterfgmnupsdt")
    public suspend fun logGroupArnList(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.logGroupArnList = mapped
    }

    internal fun build(): LogAnomalyDetectorArgs = LogAnomalyDetectorArgs(
        accountId = accountId,
        anomalyVisibilityTime = anomalyVisibilityTime,
        detectorName = detectorName,
        evaluationFrequency = evaluationFrequency,
        filterPattern = filterPattern,
        kmsKeyId = kmsKeyId,
        logGroupArnList = logGroupArnList,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy