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

com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesUtilizationPreferenceArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.computeoptimizer.kotlin.inputs

import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesUtilizationPreferenceArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property metricName The name of the resource utilization metric name to customize. Valid values: `CpuUtilization`, `MemoryUtilization`.
 * @property metricParameters The parameters to set when customizing the resource utilization thresholds.
 */
public data class RecommendationPreferencesUtilizationPreferenceArgs(
    public val metricName: Output,
    public val metricParameters: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesUtilizationPreferenceArgs =
        com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesUtilizationPreferenceArgs.builder()
            .metricName(metricName.applyValue({ args0 -> args0 }))
            .metricParameters(
                metricParameters?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [RecommendationPreferencesUtilizationPreferenceArgs].
 */
@PulumiTagMarker
public class RecommendationPreferencesUtilizationPreferenceArgsBuilder internal constructor() {
    private var metricName: Output? = null

    private var metricParameters:
        Output? = null

    /**
     * @param value The name of the resource utilization metric name to customize. Valid values: `CpuUtilization`, `MemoryUtilization`.
     */
    @JvmName("msattfadrsjnbyww")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value The parameters to set when customizing the resource utilization thresholds.
     */
    @JvmName("qqjfupwxpvacjcuj")
    public suspend fun metricParameters(`value`: Output) {
        this.metricParameters = value
    }

    /**
     * @param value The name of the resource utilization metric name to customize. Valid values: `CpuUtilization`, `MemoryUtilization`.
     */
    @JvmName("vctbvbihrptkntyb")
    public suspend fun metricName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metricName = mapped
    }

    /**
     * @param value The parameters to set when customizing the resource utilization thresholds.
     */
    @JvmName("vhstxbgtwbovuxhd")
    public suspend fun metricParameters(`value`: RecommendationPreferencesUtilizationPreferenceMetricParametersArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricParameters = mapped
    }

    /**
     * @param argument The parameters to set when customizing the resource utilization thresholds.
     */
    @JvmName("hjxycujtsqbftmpi")
    public suspend fun metricParameters(argument: suspend RecommendationPreferencesUtilizationPreferenceMetricParametersArgsBuilder.() -> Unit) {
        val toBeMapped =
            RecommendationPreferencesUtilizationPreferenceMetricParametersArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.metricParameters = mapped
    }

    internal fun build(): RecommendationPreferencesUtilizationPreferenceArgs =
        RecommendationPreferencesUtilizationPreferenceArgs(
            metricName = metricName ?: throw PulumiNullFieldException("metricName"),
            metricParameters = metricParameters,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy