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

com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveMetricDataQuery.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.applicationsignals.kotlin.outputs

import kotlin.Boolean
import kotlin.String
import kotlin.Suppress

/**
 * Use this structure to define a metric or metric math expression that you want to use as for a service level objective.
 * Each `MetricDataQuery` in the `MetricDataQueries` array specifies either a metric to retrieve, or a metric math expression to be performed on retrieved metrics. A single `MetricDataQueries` array can include as many as 20 `MetricDataQuery` structures in the array. The 20 structures can include as many as 10 structures that contain a `MetricStat` parameter to retrieve a metric, and as many as 10 structures that contain the `Expression` parameter to perform a math expression. Of those Expression structures, exactly one must have true as the value for `ReturnData`. The result of this expression used for the SLO.
 * @property accountId The ID of the account where the metrics are located, if this is a cross-account alarm.
 * @property expression The math expression to be performed on the returned data.
 * @property id A short name used to tie this object to the results in the response.
 * @property metricStat A metric to be used directly for the SLO, or to be used in the math expression that will be used for the SLO. Within one MetricDataQuery, you must specify either Expression or MetricStat but not both.
 * @property returnData This option indicates whether to return the timestamps and raw data values of this metric.
 */
public data class ServiceLevelObjectiveMetricDataQuery(
    public val accountId: String? = null,
    public val expression: String? = null,
    public val id: String,
    public val metricStat: ServiceLevelObjectiveMetricStat? = null,
    public val returnData: Boolean? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.applicationsignals.outputs.ServiceLevelObjectiveMetricDataQuery): ServiceLevelObjectiveMetricDataQuery = ServiceLevelObjectiveMetricDataQuery(
            accountId = javaType.accountId().map({ args0 -> args0 }).orElse(null),
            expression = javaType.expression().map({ args0 -> args0 }).orElse(null),
            id = javaType.id(),
            metricStat = javaType.metricStat().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveMetricStat.Companion.toKotlin(args0)
                })
            }).orElse(null),
            returnData = javaType.returnData().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy