com.pulumi.awsnative.logs.kotlin.LogAnomalyDetectorArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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