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

com.pulumi.awsnative.autoscaling.kotlin.inputs.AutoScalingGroupMetricsCollectionArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.autoscaling.kotlin.inputs

import com.pulumi.awsnative.autoscaling.inputs.AutoScalingGroupMetricsCollectionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ``MetricsCollection`` is a property of the [AWS::AutoScaling::AutoScalingGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html) resource that describes the group metrics that an Amazon EC2 Auto Scaling group sends to Amazon CloudWatch. These metrics describe the group rather than any of its instances.
 *  For more information, see [Monitor CloudWatch metrics for your Auto Scaling groups and instances](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html) in the *Amazon EC2 Auto Scaling User Guide*. You can find a sample template snippet in the [Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-autoscaling-autoscalinggroup.html#aws-resource-autoscaling-autoscalinggroup--examples) section of the ``AWS::AutoScaling::AutoScalingGroup`` resource.
 * @property granularity The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is ``1Minute``.
 * @property metrics Identifies the metrics to enable.
 *  You can specify one or more of the following metrics:
 *   +   ``GroupMinSize``
 *   +   ``GroupMaxSize``
 *   +   ``GroupDesiredCapacity``
 *   +   ``GroupInServiceInstances``
 *   +   ``GroupPendingInstances``
 *   +   ``GroupStandbyInstances``
 *   +   ``GroupTerminatingInstances``
 *   +   ``GroupTotalInstances``
 *   +   ``GroupInServiceCapacity``
 *   +   ``GroupPendingCapacity``
 *   +   ``GroupStandbyCapacity``
 *   +   ``GroupTerminatingCapacity``
 *   +   ``GroupTotalCapacity``
 *   +   ``WarmPoolDesiredCapacity``
 *   +   ``WarmPoolWarmedCapacity``
 *   +   ``WarmPoolPendingCapacity``
 *   +   ``WarmPoolTerminatingCapacity``
 *   +   ``WarmPoolTotalCapacity``
 *   +   ``GroupAndWarmPoolDesiredCapacity``
 *   +   ``GroupAndWarmPoolTotalCapacity``
 *  If you specify ``Granularity`` and don't specify any metrics, all metrics are enabled.
 *  For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
 */
public data class AutoScalingGroupMetricsCollectionArgs(
    public val granularity: Output,
    public val metrics: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.autoscaling.inputs.AutoScalingGroupMetricsCollectionArgs =
        com.pulumi.awsnative.autoscaling.inputs.AutoScalingGroupMetricsCollectionArgs.builder()
            .granularity(granularity.applyValue({ args0 -> args0 }))
            .metrics(metrics?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [AutoScalingGroupMetricsCollectionArgs].
 */
@PulumiTagMarker
public class AutoScalingGroupMetricsCollectionArgsBuilder internal constructor() {
    private var granularity: Output? = null

    private var metrics: Output>? = null

    /**
     * @param value The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is ``1Minute``.
     */
    @JvmName("rojhwwfgfrdcqjim")
    public suspend fun granularity(`value`: Output) {
        this.granularity = value
    }

    /**
     * @param value Identifies the metrics to enable.
     *  You can specify one or more of the following metrics:
     *   +   ``GroupMinSize``
     *   +   ``GroupMaxSize``
     *   +   ``GroupDesiredCapacity``
     *   +   ``GroupInServiceInstances``
     *   +   ``GroupPendingInstances``
     *   +   ``GroupStandbyInstances``
     *   +   ``GroupTerminatingInstances``
     *   +   ``GroupTotalInstances``
     *   +   ``GroupInServiceCapacity``
     *   +   ``GroupPendingCapacity``
     *   +   ``GroupStandbyCapacity``
     *   +   ``GroupTerminatingCapacity``
     *   +   ``GroupTotalCapacity``
     *   +   ``WarmPoolDesiredCapacity``
     *   +   ``WarmPoolWarmedCapacity``
     *   +   ``WarmPoolPendingCapacity``
     *   +   ``WarmPoolTerminatingCapacity``
     *   +   ``WarmPoolTotalCapacity``
     *   +   ``GroupAndWarmPoolDesiredCapacity``
     *   +   ``GroupAndWarmPoolTotalCapacity``
     *  If you specify ``Granularity`` and don't specify any metrics, all metrics are enabled.
     *  For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
     */
    @JvmName("yjhgwtesnbvwugvs")
    public suspend fun metrics(`value`: Output>) {
        this.metrics = value
    }

    @JvmName("icgsompmraltgnwd")
    public suspend fun metrics(vararg values: Output) {
        this.metrics = Output.all(values.asList())
    }

    /**
     * @param values Identifies the metrics to enable.
     *  You can specify one or more of the following metrics:
     *   +   ``GroupMinSize``
     *   +   ``GroupMaxSize``
     *   +   ``GroupDesiredCapacity``
     *   +   ``GroupInServiceInstances``
     *   +   ``GroupPendingInstances``
     *   +   ``GroupStandbyInstances``
     *   +   ``GroupTerminatingInstances``
     *   +   ``GroupTotalInstances``
     *   +   ``GroupInServiceCapacity``
     *   +   ``GroupPendingCapacity``
     *   +   ``GroupStandbyCapacity``
     *   +   ``GroupTerminatingCapacity``
     *   +   ``GroupTotalCapacity``
     *   +   ``WarmPoolDesiredCapacity``
     *   +   ``WarmPoolWarmedCapacity``
     *   +   ``WarmPoolPendingCapacity``
     *   +   ``WarmPoolTerminatingCapacity``
     *   +   ``WarmPoolTotalCapacity``
     *   +   ``GroupAndWarmPoolDesiredCapacity``
     *   +   ``GroupAndWarmPoolTotalCapacity``
     *  If you specify ``Granularity`` and don't specify any metrics, all metrics are enabled.
     *  For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
     */
    @JvmName("tyfjcsdfujxitaqk")
    public suspend fun metrics(values: List>) {
        this.metrics = Output.all(values)
    }

    /**
     * @param value The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is ``1Minute``.
     */
    @JvmName("fucwfkkymdybtnra")
    public suspend fun granularity(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.granularity = mapped
    }

    /**
     * @param value Identifies the metrics to enable.
     *  You can specify one or more of the following metrics:
     *   +   ``GroupMinSize``
     *   +   ``GroupMaxSize``
     *   +   ``GroupDesiredCapacity``
     *   +   ``GroupInServiceInstances``
     *   +   ``GroupPendingInstances``
     *   +   ``GroupStandbyInstances``
     *   +   ``GroupTerminatingInstances``
     *   +   ``GroupTotalInstances``
     *   +   ``GroupInServiceCapacity``
     *   +   ``GroupPendingCapacity``
     *   +   ``GroupStandbyCapacity``
     *   +   ``GroupTerminatingCapacity``
     *   +   ``GroupTotalCapacity``
     *   +   ``WarmPoolDesiredCapacity``
     *   +   ``WarmPoolWarmedCapacity``
     *   +   ``WarmPoolPendingCapacity``
     *   +   ``WarmPoolTerminatingCapacity``
     *   +   ``WarmPoolTotalCapacity``
     *   +   ``GroupAndWarmPoolDesiredCapacity``
     *   +   ``GroupAndWarmPoolTotalCapacity``
     *  If you specify ``Granularity`` and don't specify any metrics, all metrics are enabled.
     *  For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
     */
    @JvmName("hvswrgnnwfhomcvl")
    public suspend fun metrics(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metrics = mapped
    }

    /**
     * @param values Identifies the metrics to enable.
     *  You can specify one or more of the following metrics:
     *   +   ``GroupMinSize``
     *   +   ``GroupMaxSize``
     *   +   ``GroupDesiredCapacity``
     *   +   ``GroupInServiceInstances``
     *   +   ``GroupPendingInstances``
     *   +   ``GroupStandbyInstances``
     *   +   ``GroupTerminatingInstances``
     *   +   ``GroupTotalInstances``
     *   +   ``GroupInServiceCapacity``
     *   +   ``GroupPendingCapacity``
     *   +   ``GroupStandbyCapacity``
     *   +   ``GroupTerminatingCapacity``
     *   +   ``GroupTotalCapacity``
     *   +   ``WarmPoolDesiredCapacity``
     *   +   ``WarmPoolWarmedCapacity``
     *   +   ``WarmPoolPendingCapacity``
     *   +   ``WarmPoolTerminatingCapacity``
     *   +   ``WarmPoolTotalCapacity``
     *   +   ``GroupAndWarmPoolDesiredCapacity``
     *   +   ``GroupAndWarmPoolTotalCapacity``
     *  If you specify ``Granularity`` and don't specify any metrics, all metrics are enabled.
     *  For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
     */
    @JvmName("vdnsdthkmwoxuhgm")
    public suspend fun metrics(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metrics = mapped
    }

    internal fun build(): AutoScalingGroupMetricsCollectionArgs =
        AutoScalingGroupMetricsCollectionArgs(
            granularity = granularity ?: throw PulumiNullFieldException("granularity"),
            metrics = metrics,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy