com.pulumi.azurenative.insights.kotlin.inputs.MetricCriteriaArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.insights.kotlin.inputs
import com.pulumi.azurenative.insights.inputs.MetricCriteriaArgs.builder
import com.pulumi.azurenative.insights.kotlin.enums.AggregationTypeEnum
import com.pulumi.azurenative.insights.kotlin.enums.Operator
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Criterion to filter metrics.
* @property criterionType Specifies the type of threshold criteria
* Expected value is 'StaticThresholdCriterion'.
* @property dimensions List of dimension conditions.
* @property metricName Name of the metric.
* @property metricNamespace Namespace of the metric.
* @property name Name of the criteria.
* @property operator the criteria operator.
* @property skipMetricValidation Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
* @property threshold the criteria threshold value that activates the alert.
* @property timeAggregation the criteria time aggregation types.
*/
public data class MetricCriteriaArgs(
public val criterionType: Output,
public val dimensions: Output>? = null,
public val metricName: Output,
public val metricNamespace: Output? = null,
public val name: Output,
public val `operator`: Output>,
public val skipMetricValidation: Output? = null,
public val threshold: Output,
public val timeAggregation: Output>,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.insights.inputs.MetricCriteriaArgs =
com.pulumi.azurenative.insights.inputs.MetricCriteriaArgs.builder()
.criterionType(criterionType.applyValue({ args0 -> args0 }))
.dimensions(
dimensions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.metricName(metricName.applyValue({ args0 -> args0 }))
.metricNamespace(metricNamespace?.applyValue({ args0 -> args0 }))
.name(name.applyValue({ args0 -> args0 }))
.`operator`(
`operator`.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.skipMetricValidation(skipMetricValidation?.applyValue({ args0 -> args0 }))
.threshold(threshold.applyValue({ args0 -> args0 }))
.timeAggregation(
timeAggregation.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [MetricCriteriaArgs].
*/
@PulumiTagMarker
public class MetricCriteriaArgsBuilder internal constructor() {
private var criterionType: Output? = null
private var dimensions: Output>? = null
private var metricName: Output? = null
private var metricNamespace: Output? = null
private var name: Output? = null
private var `operator`: Output>? = null
private var skipMetricValidation: Output? = null
private var threshold: Output? = null
private var timeAggregation: Output>? = null
/**
* @param value Specifies the type of threshold criteria
* Expected value is 'StaticThresholdCriterion'.
*/
@JvmName("qeohphcdcyfftyyn")
public suspend fun criterionType(`value`: Output) {
this.criterionType = value
}
/**
* @param value List of dimension conditions.
*/
@JvmName("tlyxjrbuftirwvlf")
public suspend fun dimensions(`value`: Output>) {
this.dimensions = value
}
@JvmName("awhhamnucxhkpyxd")
public suspend fun dimensions(vararg values: Output) {
this.dimensions = Output.all(values.asList())
}
/**
* @param values List of dimension conditions.
*/
@JvmName("jrubljjxavakqkel")
public suspend fun dimensions(values: List