Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.awsnative.applicationsignals.kotlin.inputs.ServiceLevelObjectiveSliMetricArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.applicationsignals.kotlin.inputs
import com.pulumi.awsnative.applicationsignals.inputs.ServiceLevelObjectiveSliMetricArgs.builder
import com.pulumi.awsnative.applicationsignals.kotlin.enums.ServiceLevelObjectiveSliMetricMetricType
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* A structure that contains information about the metric that the SLO monitors.
* @property keyAttributes If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to. To do so, you must specify at least the `Type` , `Name` , and `Environment` attributes.
* This is a string-to-string map. It can include the following fields.
* - `Type` designates the type of object this is.
* - `ResourceType` specifies the type of the resource. This field is used only when the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Name` specifies the name of the object. This is used only if the value of the `Type` field is `Service` , `RemoteService` , or `AWS::Service` .
* - `Identifier` identifies the resource objects of this resource. This is used only if the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Environment` specifies the location where this object is hosted, or what it belongs to.
* @property metricDataQueries If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
* @property metricType If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used.
* @property operationName If the SLO monitors a specific operation of the service, this field displays that operation name.
* @property periodSeconds The number of seconds to use as the period for SLO evaluation. Your application's performance is compared to the SLI during each period. For each period, the application is determined to have either achieved or not achieved the necessary performance.
* @property statistic The statistic to use for comparison to the threshold. It can be any CloudWatch statistic or extended statistic
*/
public data class ServiceLevelObjectiveSliMetricArgs(
public val keyAttributes: Output>? = null,
public val metricDataQueries: Output>? = null,
public val metricType: Output? = null,
public val operationName: Output? = null,
public val periodSeconds: Output? = null,
public val statistic: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.applicationsignals.inputs.ServiceLevelObjectiveSliMetricArgs =
com.pulumi.awsnative.applicationsignals.inputs.ServiceLevelObjectiveSliMetricArgs.builder()
.keyAttributes(
keyAttributes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.metricDataQueries(
metricDataQueries?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.metricType(metricType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.operationName(operationName?.applyValue({ args0 -> args0 }))
.periodSeconds(periodSeconds?.applyValue({ args0 -> args0 }))
.statistic(statistic?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ServiceLevelObjectiveSliMetricArgs].
*/
@PulumiTagMarker
public class ServiceLevelObjectiveSliMetricArgsBuilder internal constructor() {
private var keyAttributes: Output>? = null
private var metricDataQueries: Output>? = null
private var metricType: Output? = null
private var operationName: Output? = null
private var periodSeconds: Output? = null
private var statistic: Output? = null
/**
* @param value If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to. To do so, you must specify at least the `Type` , `Name` , and `Environment` attributes.
* This is a string-to-string map. It can include the following fields.
* - `Type` designates the type of object this is.
* - `ResourceType` specifies the type of the resource. This field is used only when the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Name` specifies the name of the object. This is used only if the value of the `Type` field is `Service` , `RemoteService` , or `AWS::Service` .
* - `Identifier` identifies the resource objects of this resource. This is used only if the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Environment` specifies the location where this object is hosted, or what it belongs to.
*/
@JvmName("ydlsvyppdddnkcbp")
public suspend fun keyAttributes(`value`: Output>) {
this.keyAttributes = value
}
/**
* @param value If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("svarugruimipjpix")
public suspend fun metricDataQueries(`value`: Output>) {
this.metricDataQueries = value
}
@JvmName("omvqmbnogalhpono")
public suspend fun metricDataQueries(vararg values: Output) {
this.metricDataQueries = Output.all(values.asList())
}
/**
* @param values If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("sibsohixaugxtnyq")
public suspend fun metricDataQueries(values: List>) {
this.metricDataQueries = Output.all(values)
}
/**
* @param value If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used.
*/
@JvmName("lxtwalqesqusnxcw")
public suspend fun metricType(`value`: Output) {
this.metricType = value
}
/**
* @param value If the SLO monitors a specific operation of the service, this field displays that operation name.
*/
@JvmName("qdmkaxdkbwflrrjf")
public suspend fun operationName(`value`: Output) {
this.operationName = value
}
/**
* @param value The number of seconds to use as the period for SLO evaluation. Your application's performance is compared to the SLI during each period. For each period, the application is determined to have either achieved or not achieved the necessary performance.
*/
@JvmName("qsaroknmsoecbypy")
public suspend fun periodSeconds(`value`: Output) {
this.periodSeconds = value
}
/**
* @param value The statistic to use for comparison to the threshold. It can be any CloudWatch statistic or extended statistic
*/
@JvmName("qoxbajgkpoqtxtlx")
public suspend fun statistic(`value`: Output) {
this.statistic = value
}
/**
* @param value If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to. To do so, you must specify at least the `Type` , `Name` , and `Environment` attributes.
* This is a string-to-string map. It can include the following fields.
* - `Type` designates the type of object this is.
* - `ResourceType` specifies the type of the resource. This field is used only when the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Name` specifies the name of the object. This is used only if the value of the `Type` field is `Service` , `RemoteService` , or `AWS::Service` .
* - `Identifier` identifies the resource objects of this resource. This is used only if the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Environment` specifies the location where this object is hosted, or what it belongs to.
*/
@JvmName("ahbwdhiydqctrbsl")
public suspend fun keyAttributes(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.keyAttributes = mapped
}
/**
* @param values If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to. To do so, you must specify at least the `Type` , `Name` , and `Environment` attributes.
* This is a string-to-string map. It can include the following fields.
* - `Type` designates the type of object this is.
* - `ResourceType` specifies the type of the resource. This field is used only when the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Name` specifies the name of the object. This is used only if the value of the `Type` field is `Service` , `RemoteService` , or `AWS::Service` .
* - `Identifier` identifies the resource objects of this resource. This is used only if the value of the `Type` field is `Resource` or `AWS::Resource` .
* - `Environment` specifies the location where this object is hosted, or what it belongs to.
*/
@JvmName("ggfbhialimujwofp")
public fun keyAttributes(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.keyAttributes = mapped
}
/**
* @param value If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("kbqqvhhlsewtwoql")
public suspend fun metricDataQueries(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metricDataQueries = mapped
}
/**
* @param argument If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("yhfhmebuwngntjba")
public suspend fun metricDataQueries(argument: List Unit>) {
val toBeMapped = argument.toList().map {
ServiceLevelObjectiveMetricDataQueryArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.metricDataQueries = mapped
}
/**
* @param argument If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("wohpbuuxwmfvalof")
public suspend fun metricDataQueries(vararg argument: suspend ServiceLevelObjectiveMetricDataQueryArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
ServiceLevelObjectiveMetricDataQueryArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.metricDataQueries = mapped
}
/**
* @param argument If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("ndkdhcxisolgfvqo")
public suspend fun metricDataQueries(argument: suspend ServiceLevelObjectiveMetricDataQueryArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
ServiceLevelObjectiveMetricDataQueryArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.metricDataQueries = mapped
}
/**
* @param values If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
*/
@JvmName("mbvgpvbfmunremuh")
public suspend fun metricDataQueries(vararg values: ServiceLevelObjectiveMetricDataQueryArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.metricDataQueries = mapped
}
/**
* @param value If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used.
*/
@JvmName("hmdggpqgwwjyuknm")
public suspend fun metricType(`value`: ServiceLevelObjectiveSliMetricMetricType?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metricType = mapped
}
/**
* @param value If the SLO monitors a specific operation of the service, this field displays that operation name.
*/
@JvmName("hstdpymdathshcjo")
public suspend fun operationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.operationName = mapped
}
/**
* @param value The number of seconds to use as the period for SLO evaluation. Your application's performance is compared to the SLI during each period. For each period, the application is determined to have either achieved or not achieved the necessary performance.
*/
@JvmName("lybiwcvmtbwujihs")
public suspend fun periodSeconds(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.periodSeconds = mapped
}
/**
* @param value The statistic to use for comparison to the threshold. It can be any CloudWatch statistic or extended statistic
*/
@JvmName("osjortbpkwyldoop")
public suspend fun statistic(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.statistic = mapped
}
internal fun build(): ServiceLevelObjectiveSliMetricArgs = ServiceLevelObjectiveSliMetricArgs(
keyAttributes = keyAttributes,
metricDataQueries = metricDataQueries,
metricType = metricType,
operationName = operationName,
periodSeconds = periodSeconds,
statistic = statistic,
)
}