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

com.pulumi.azure.monitoring.kotlin.outputs.AutoscaleSettingProfileRuleMetricTrigger.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.monitoring.kotlin.outputs

import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 *
 * @property dimensions One or more `dimensions` block as defined below.
 * @property divideByInstanceCount Whether to enable metric divide by instance count.
 * @property metricName The name of the metric that defines what the rule monitors, such as `Percentage CPU` for `Virtual Machine Scale Sets` and `CpuPercentage` for `App Service Plan`.
 * > **NOTE:** The allowed value of `metric_name` highly depends on the targeting resource type, please visit [Supported metrics with Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/platform/metrics-supported) for more details.
 * @property metricNamespace The namespace of the metric that defines what the rule monitors, such as `microsoft.compute/virtualmachinescalesets` for `Virtual Machine Scale Sets`.
 * @property metricResourceId The ID of the Resource which the Rule monitors.
 * @property operator Specifies the operator used to compare the metric data and threshold. Possible values are: `Equals`, `NotEquals`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`.
 * @property statistic Specifies how the metrics from multiple instances are combined. Possible values are `Average`, `Max`, `Min` and `Sum`.
 * @property threshold Specifies the threshold of the metric that triggers the scale action.
 * @property timeAggregation Specifies how the data that's collected should be combined over time. Possible values include `Average`, `Count`, `Maximum`, `Minimum`, `Last` and `Total`.
 * @property timeGrain Specifies the granularity of metrics that the rule monitors, which must be one of the pre-defined values returned from the metric definitions for the metric. This value must be between 1 minute and 12 hours an be formatted as an ISO 8601 string.
 * @property timeWindow Specifies the time range for which data is collected, which must be greater than the delay in metric collection (which varies from resource to resource). This value must be between 5 minutes and 12 hours and be formatted as an ISO 8601 string.
 */
public data class AutoscaleSettingProfileRuleMetricTrigger(
    public val dimensions: List? = null,
    public val divideByInstanceCount: Boolean? = null,
    public val metricName: String,
    public val metricNamespace: String? = null,
    public val metricResourceId: String,
    public val `operator`: String,
    public val statistic: String,
    public val threshold: Double,
    public val timeAggregation: String,
    public val timeGrain: String,
    public val timeWindow: String,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.azure.monitoring.outputs.AutoscaleSettingProfileRuleMetricTrigger): AutoscaleSettingProfileRuleMetricTrigger = AutoscaleSettingProfileRuleMetricTrigger(
            dimensions = javaType.dimensions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.azure.monitoring.kotlin.outputs.AutoscaleSettingProfileRuleMetricTriggerDimension.Companion.toKotlin(args0)
                })
            }),
            divideByInstanceCount = javaType.divideByInstanceCount().map({ args0 -> args0 }).orElse(null),
            metricName = javaType.metricName(),
            metricNamespace = javaType.metricNamespace().map({ args0 -> args0 }).orElse(null),
            metricResourceId = javaType.metricResourceId(),
            `operator` = javaType.`operator`(),
            statistic = javaType.statistic(),
            threshold = javaType.threshold(),
            timeAggregation = javaType.timeAggregation(),
            timeGrain = javaType.timeGrain(),
            timeWindow = javaType.timeWindow(),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy