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

com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveSliMetric.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.applicationsignals.kotlin.outputs

import com.pulumi.awsnative.applicationsignals.kotlin.enums.ServiceLevelObjectiveSliMetricMetricType
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 * 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 ServiceLevelObjectiveSliMetric(
    public val keyAttributes: Map? = null,
    public val metricDataQueries: List? = null,
    public val metricType: ServiceLevelObjectiveSliMetricMetricType? = null,
    public val operationName: String? = null,
    public val periodSeconds: Int? = null,
    public val statistic: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.applicationsignals.outputs.ServiceLevelObjectiveSliMetric): ServiceLevelObjectiveSliMetric = ServiceLevelObjectiveSliMetric(
            keyAttributes = javaType.keyAttributes().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            metricDataQueries = javaType.metricDataQueries().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.applicationsignals.kotlin.outputs.ServiceLevelObjectiveMetricDataQuery.Companion.toKotlin(args0)
                })
            }),
            metricType = javaType.metricType().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.awsnative.applicationsignals.kotlin.enums.ServiceLevelObjectiveSliMetricMetricType.Companion.toKotlin(args0)
                })
            }).orElse(null),
            operationName = javaType.operationName().map({ args0 -> args0 }).orElse(null),
            periodSeconds = javaType.periodSeconds().map({ args0 -> args0 }).orElse(null),
            statistic = javaType.statistic().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy