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

com.pulumi.awsnative.applicationautoscaling.kotlin.inputs.ScalingPolicyTargetTrackingMetricDataQueryArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.applicationautoscaling.kotlin.inputs

import com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyTargetTrackingMetricDataQueryArgs.builder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * The metric data to return. Also defines whether this call is returning data for one metric only, or whether it is performing a math expression on the values of returned metric statistics to create a new time series. A time series is a series of data points, each of which is associated with a timestamp.
 *  You can call for a single metric or perform math expressions on multiple metrics. Any expressions used in a metric specification must eventually return a single time series.
 *  For more information and examples, see [Create a target tracking scaling policy for Application Auto Scaling using metric math](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking-metric-math.html) in the *Application Auto Scaling User Guide*.
 *   ``TargetTrackingMetricDataQuery`` is a property of the [AWS::ApplicationAutoScaling::ScalingPolicy CustomizedMetricSpecification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-customizedmetricspecification.html) property type.
 * @property expression The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the ``Id`` of the other metrics to refer to those metrics, and can also use the ``Id`` of other expressions to use the result of those expressions.
 *  Conditional: Within each ``TargetTrackingMetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
 * @property id A short name that identifies the object's results in the response. This name must be unique among all ``MetricDataQuery`` objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
 * @property label A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
 * @property metricStat Information about the metric data to return.
 *  Conditional: Within each ``MetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
 * @property returnData Indicates whether to return the timestamps and raw data values of this metric.
 *  If you use any math expressions, specify ``true`` for this value for only the final math expression that the metric specification is based on. You must specify ``false`` for ``ReturnData`` for all the other metrics and expressions used in the metric specification.
 *  If you are only retrieving metrics and not performing any math expressions, do not specify anything for ``ReturnData``. This sets it to its default (``true``).
 */
public data class ScalingPolicyTargetTrackingMetricDataQueryArgs(
    public val expression: Output? = null,
    public val id: Output? = null,
    public val label: Output? = null,
    public val metricStat: Output? = null,
    public val returnData: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyTargetTrackingMetricDataQueryArgs =
        com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyTargetTrackingMetricDataQueryArgs.builder()
            .expression(expression?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .label(label?.applyValue({ args0 -> args0 }))
            .metricStat(metricStat?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .returnData(returnData?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ScalingPolicyTargetTrackingMetricDataQueryArgs].
 */
@PulumiTagMarker
public class ScalingPolicyTargetTrackingMetricDataQueryArgsBuilder internal constructor() {
    private var expression: Output? = null

    private var id: Output? = null

    private var label: Output? = null

    private var metricStat: Output? = null

    private var returnData: Output? = null

    /**
     * @param value The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the ``Id`` of the other metrics to refer to those metrics, and can also use the ``Id`` of other expressions to use the result of those expressions.
     *  Conditional: Within each ``TargetTrackingMetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
     */
    @JvmName("mrxgfjoevccpofrr")
    public suspend fun expression(`value`: Output) {
        this.expression = value
    }

    /**
     * @param value A short name that identifies the object's results in the response. This name must be unique among all ``MetricDataQuery`` objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
     */
    @JvmName("qxxmgyfajjlvkexa")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
     */
    @JvmName("uirkmhswrwewiqmi")
    public suspend fun label(`value`: Output) {
        this.label = value
    }

    /**
     * @param value Information about the metric data to return.
     *  Conditional: Within each ``MetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
     */
    @JvmName("qobgomjocknerrcp")
    public suspend fun metricStat(`value`: Output) {
        this.metricStat = value
    }

    /**
     * @param value Indicates whether to return the timestamps and raw data values of this metric.
     *  If you use any math expressions, specify ``true`` for this value for only the final math expression that the metric specification is based on. You must specify ``false`` for ``ReturnData`` for all the other metrics and expressions used in the metric specification.
     *  If you are only retrieving metrics and not performing any math expressions, do not specify anything for ``ReturnData``. This sets it to its default (``true``).
     */
    @JvmName("qbhcuniadojvsncy")
    public suspend fun returnData(`value`: Output) {
        this.returnData = value
    }

    /**
     * @param value The math expression to perform on the returned data, if this object is performing a math expression. This expression can use the ``Id`` of the other metrics to refer to those metrics, and can also use the ``Id`` of other expressions to use the result of those expressions.
     *  Conditional: Within each ``TargetTrackingMetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
     */
    @JvmName("oexrvdobloigmwsj")
    public suspend fun expression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expression = mapped
    }

    /**
     * @param value A short name that identifies the object's results in the response. This name must be unique among all ``MetricDataQuery`` objects specified for a single scaling policy. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscores. The first character must be a lowercase letter.
     */
    @JvmName("qmyvgsqdtwhqijgm")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value A human-readable label for this metric or expression. This is especially useful if this is a math expression, so that you know what the value represents.
     */
    @JvmName("bxomlnbeevtukayu")
    public suspend fun label(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.label = mapped
    }

    /**
     * @param value Information about the metric data to return.
     *  Conditional: Within each ``MetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
     */
    @JvmName("kspmotfqyupctbwe")
    public suspend fun metricStat(`value`: ScalingPolicyTargetTrackingMetricStatArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricStat = mapped
    }

    /**
     * @param argument Information about the metric data to return.
     *  Conditional: Within each ``MetricDataQuery`` object, you must specify either ``Expression`` or ``MetricStat``, but not both.
     */
    @JvmName("mdhxtkfcvsaldtqx")
    public suspend fun metricStat(argument: suspend ScalingPolicyTargetTrackingMetricStatArgsBuilder.() -> Unit) {
        val toBeMapped = ScalingPolicyTargetTrackingMetricStatArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.metricStat = mapped
    }

    /**
     * @param value Indicates whether to return the timestamps and raw data values of this metric.
     *  If you use any math expressions, specify ``true`` for this value for only the final math expression that the metric specification is based on. You must specify ``false`` for ``ReturnData`` for all the other metrics and expressions used in the metric specification.
     *  If you are only retrieving metrics and not performing any math expressions, do not specify anything for ``ReturnData``. This sets it to its default (``true``).
     */
    @JvmName("lpgnrjhqghlljmda")
    public suspend fun returnData(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.returnData = mapped
    }

    internal fun build(): ScalingPolicyTargetTrackingMetricDataQueryArgs =
        ScalingPolicyTargetTrackingMetricDataQueryArgs(
            expression = expression,
            id = id,
            label = label,
            metricStat = metricStat,
            returnData = returnData,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy