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

com.pulumi.aws.computeoptimizer.kotlin.RecommendationPreferencesArgs.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

import com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs.builder
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesExternalMetricsPreferenceArgs
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesExternalMetricsPreferenceArgsBuilder
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesPreferredResourceArgs
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesPreferredResourceArgsBuilder
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesScopeArgs
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesScopeArgsBuilder
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesUtilizationPreferenceArgs
import com.pulumi.aws.computeoptimizer.kotlin.inputs.RecommendationPreferencesUtilizationPreferenceArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages AWS Compute Optimizer recommendation preferences.
 * ## Example Usage
 * ### Lookback Period Preference
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.computeoptimizer.RecommendationPreferences("example", {
 *     resourceType: "Ec2Instance",
 *     scope: {
 *         name: "AccountId",
 *         value: "123456789012",
 *     },
 *     lookBackPeriod: "DAYS_32",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.computeoptimizer.RecommendationPreferences("example",
 *     resource_type="Ec2Instance",
 *     scope={
 *         "name": "AccountId",
 *         "value": "123456789012",
 *     },
 *     look_back_period="DAYS_32")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.ComputeOptimizer.RecommendationPreferences("example", new()
 *     {
 *         ResourceType = "Ec2Instance",
 *         Scope = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesScopeArgs
 *         {
 *             Name = "AccountId",
 *             Value = "123456789012",
 *         },
 *         LookBackPeriod = "DAYS_32",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/computeoptimizer"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := computeoptimizer.NewRecommendationPreferences(ctx, "example", &computeoptimizer.RecommendationPreferencesArgs{
 * 			ResourceType: pulumi.String("Ec2Instance"),
 * 			Scope: &computeoptimizer.RecommendationPreferencesScopeArgs{
 * 				Name:  pulumi.String("AccountId"),
 * 				Value: pulumi.String("123456789012"),
 * 			},
 * 			LookBackPeriod: pulumi.String("DAYS_32"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.computeoptimizer.RecommendationPreferences;
 * import com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs;
 * import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesScopeArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new RecommendationPreferences("example", RecommendationPreferencesArgs.builder()
 *             .resourceType("Ec2Instance")
 *             .scope(RecommendationPreferencesScopeArgs.builder()
 *                 .name("AccountId")
 *                 .value("123456789012")
 *                 .build())
 *             .lookBackPeriod("DAYS_32")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:computeoptimizer:RecommendationPreferences
 *     properties:
 *       resourceType: Ec2Instance
 *       scope:
 *         name: AccountId
 *         value: '123456789012'
 *       lookBackPeriod: DAYS_32
 * ```
 * 
 * ### Multiple Preferences
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.computeoptimizer.RecommendationPreferences("example", {
 *     resourceType: "Ec2Instance",
 *     scope: {
 *         name: "AccountId",
 *         value: "123456789012",
 *     },
 *     enhancedInfrastructureMetrics: "Active",
 *     externalMetricsPreference: {
 *         source: "Datadog",
 *     },
 *     preferredResources: [{
 *         includeLists: [
 *             "m5.xlarge",
 *             "r5",
 *         ],
 *         name: "Ec2InstanceTypes",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.computeoptimizer.RecommendationPreferences("example",
 *     resource_type="Ec2Instance",
 *     scope={
 *         "name": "AccountId",
 *         "value": "123456789012",
 *     },
 *     enhanced_infrastructure_metrics="Active",
 *     external_metrics_preference={
 *         "source": "Datadog",
 *     },
 *     preferred_resources=[{
 *         "include_lists": [
 *             "m5.xlarge",
 *             "r5",
 *         ],
 *         "name": "Ec2InstanceTypes",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.ComputeOptimizer.RecommendationPreferences("example", new()
 *     {
 *         ResourceType = "Ec2Instance",
 *         Scope = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesScopeArgs
 *         {
 *             Name = "AccountId",
 *             Value = "123456789012",
 *         },
 *         EnhancedInfrastructureMetrics = "Active",
 *         ExternalMetricsPreference = new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesExternalMetricsPreferenceArgs
 *         {
 *             Source = "Datadog",
 *         },
 *         PreferredResources = new[]
 *         {
 *             new Aws.ComputeOptimizer.Inputs.RecommendationPreferencesPreferredResourceArgs
 *             {
 *                 IncludeLists = new[]
 *                 {
 *                     "m5.xlarge",
 *                     "r5",
 *                 },
 *                 Name = "Ec2InstanceTypes",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/computeoptimizer"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := computeoptimizer.NewRecommendationPreferences(ctx, "example", &computeoptimizer.RecommendationPreferencesArgs{
 * 			ResourceType: pulumi.String("Ec2Instance"),
 * 			Scope: &computeoptimizer.RecommendationPreferencesScopeArgs{
 * 				Name:  pulumi.String("AccountId"),
 * 				Value: pulumi.String("123456789012"),
 * 			},
 * 			EnhancedInfrastructureMetrics: pulumi.String("Active"),
 * 			ExternalMetricsPreference: &computeoptimizer.RecommendationPreferencesExternalMetricsPreferenceArgs{
 * 				Source: pulumi.String("Datadog"),
 * 			},
 * 			PreferredResources: computeoptimizer.RecommendationPreferencesPreferredResourceArray{
 * 				&computeoptimizer.RecommendationPreferencesPreferredResourceArgs{
 * 					IncludeLists: pulumi.StringArray{
 * 						pulumi.String("m5.xlarge"),
 * 						pulumi.String("r5"),
 * 					},
 * 					Name: pulumi.String("Ec2InstanceTypes"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.computeoptimizer.RecommendationPreferences;
 * import com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs;
 * import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesScopeArgs;
 * import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesExternalMetricsPreferenceArgs;
 * import com.pulumi.aws.computeoptimizer.inputs.RecommendationPreferencesPreferredResourceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new RecommendationPreferences("example", RecommendationPreferencesArgs.builder()
 *             .resourceType("Ec2Instance")
 *             .scope(RecommendationPreferencesScopeArgs.builder()
 *                 .name("AccountId")
 *                 .value("123456789012")
 *                 .build())
 *             .enhancedInfrastructureMetrics("Active")
 *             .externalMetricsPreference(RecommendationPreferencesExternalMetricsPreferenceArgs.builder()
 *                 .source("Datadog")
 *                 .build())
 *             .preferredResources(RecommendationPreferencesPreferredResourceArgs.builder()
 *                 .includeLists(
 *                     "m5.xlarge",
 *                     "r5")
 *                 .name("Ec2InstanceTypes")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:computeoptimizer:RecommendationPreferences
 *     properties:
 *       resourceType: Ec2Instance
 *       scope:
 *         name: AccountId
 *         value: '123456789012'
 *       enhancedInfrastructureMetrics: Active
 *       externalMetricsPreference:
 *         source: Datadog
 *       preferredResources:
 *         - includeLists:
 *             - m5.xlarge
 *             - r5
 *           name: Ec2InstanceTypes
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import recommendation preferences using the resource type, scope name and scope value. For example:
 * ```sh
 * $ pulumi import aws:computeoptimizer/recommendationPreferences:RecommendationPreferences example Ec2Instance,AccountId,123456789012
 * ```
 * @property enhancedInfrastructureMetrics The status of the enhanced infrastructure metrics recommendation preference. Valid values: `Active`, `Inactive`.
 * @property externalMetricsPreference The provider of the external metrics recommendation preference. See External Metrics Preference below.
 * @property inferredWorkloadTypes The status of the inferred workload types recommendation preference. Valid values: `Active`, `Inactive`.
 * @property lookBackPeriod The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: `DAYS_14`, `DAYS_32`, `DAYS_93`.
 * @property preferredResources The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
 * @property resourceType The target resource type of the recommendation preferences. Valid values: `Ec2Instance`, `AutoScalingGroup`, `RdsDBInstance`.
 * @property savingsEstimationMode The status of the savings estimation mode preference. Valid values: `AfterDiscounts`, `BeforeDiscounts`.
 * @property scope The scope of the recommendation preferences. See Scope below.
 * @property utilizationPreferences The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
 */
public data class RecommendationPreferencesArgs(
    public val enhancedInfrastructureMetrics: Output? = null,
    public val externalMetricsPreference: Output? = null,
    public val inferredWorkloadTypes: Output? = null,
    public val lookBackPeriod: Output? = null,
    public val preferredResources: Output>? =
        null,
    public val resourceType: Output? = null,
    public val savingsEstimationMode: Output? = null,
    public val scope: Output? = null,
    public val utilizationPreferences: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs =
        com.pulumi.aws.computeoptimizer.RecommendationPreferencesArgs.builder()
            .enhancedInfrastructureMetrics(enhancedInfrastructureMetrics?.applyValue({ args0 -> args0 }))
            .externalMetricsPreference(
                externalMetricsPreference?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .inferredWorkloadTypes(inferredWorkloadTypes?.applyValue({ args0 -> args0 }))
            .lookBackPeriod(lookBackPeriod?.applyValue({ args0 -> args0 }))
            .preferredResources(
                preferredResources?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceType(resourceType?.applyValue({ args0 -> args0 }))
            .savingsEstimationMode(savingsEstimationMode?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .utilizationPreferences(
                utilizationPreferences?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [RecommendationPreferencesArgs].
 */
@PulumiTagMarker
public class RecommendationPreferencesArgsBuilder internal constructor() {
    private var enhancedInfrastructureMetrics: Output? = null

    private var externalMetricsPreference:
        Output? = null

    private var inferredWorkloadTypes: Output? = null

    private var lookBackPeriod: Output? = null

    private var preferredResources: Output>? =
        null

    private var resourceType: Output? = null

    private var savingsEstimationMode: Output? = null

    private var scope: Output? = null

    private var utilizationPreferences:
        Output>? = null

    /**
     * @param value The status of the enhanced infrastructure metrics recommendation preference. Valid values: `Active`, `Inactive`.
     */
    @JvmName("yufxwaofjxxdqimp")
    public suspend fun enhancedInfrastructureMetrics(`value`: Output) {
        this.enhancedInfrastructureMetrics = value
    }

    /**
     * @param value The provider of the external metrics recommendation preference. See External Metrics Preference below.
     */
    @JvmName("xbheieihvwwrbhab")
    public suspend fun externalMetricsPreference(`value`: Output) {
        this.externalMetricsPreference = value
    }

    /**
     * @param value The status of the inferred workload types recommendation preference. Valid values: `Active`, `Inactive`.
     */
    @JvmName("akubjcqygpkwvwhs")
    public suspend fun inferredWorkloadTypes(`value`: Output) {
        this.inferredWorkloadTypes = value
    }

    /**
     * @param value The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: `DAYS_14`, `DAYS_32`, `DAYS_93`.
     */
    @JvmName("pxlqjjwfbrtsucyd")
    public suspend fun lookBackPeriod(`value`: Output) {
        this.lookBackPeriod = value
    }

    /**
     * @param value The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("wwhsmrgfcvbiiaxx")
    public suspend fun preferredResources(`value`: Output>) {
        this.preferredResources = value
    }

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

    /**
     * @param values The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("qlbghdlqofgxfgqx")
    public suspend fun preferredResources(values: List>) {
        this.preferredResources = Output.all(values)
    }

    /**
     * @param value The target resource type of the recommendation preferences. Valid values: `Ec2Instance`, `AutoScalingGroup`, `RdsDBInstance`.
     */
    @JvmName("wqjmvgeitldterfq")
    public suspend fun resourceType(`value`: Output) {
        this.resourceType = value
    }

    /**
     * @param value The status of the savings estimation mode preference. Valid values: `AfterDiscounts`, `BeforeDiscounts`.
     */
    @JvmName("gebbqbiessyslhpq")
    public suspend fun savingsEstimationMode(`value`: Output) {
        this.savingsEstimationMode = value
    }

    /**
     * @param value The scope of the recommendation preferences. See Scope below.
     */
    @JvmName("kitksujcmcryvjhm")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("kalkiiidbevndeav")
    public suspend fun utilizationPreferences(`value`: Output>) {
        this.utilizationPreferences = value
    }

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

    /**
     * @param values The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("gumynraqoadyyqsf")
    public suspend fun utilizationPreferences(values: List>) {
        this.utilizationPreferences = Output.all(values)
    }

    /**
     * @param value The status of the enhanced infrastructure metrics recommendation preference. Valid values: `Active`, `Inactive`.
     */
    @JvmName("upjvqlculejxooox")
    public suspend fun enhancedInfrastructureMetrics(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enhancedInfrastructureMetrics = mapped
    }

    /**
     * @param value The provider of the external metrics recommendation preference. See External Metrics Preference below.
     */
    @JvmName("apkuwjimrhesgvjs")
    public suspend fun externalMetricsPreference(`value`: RecommendationPreferencesExternalMetricsPreferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalMetricsPreference = mapped
    }

    /**
     * @param argument The provider of the external metrics recommendation preference. See External Metrics Preference below.
     */
    @JvmName("pltphhlawmbmpcoo")
    public suspend fun externalMetricsPreference(argument: suspend RecommendationPreferencesExternalMetricsPreferenceArgsBuilder.() -> Unit) {
        val toBeMapped = RecommendationPreferencesExternalMetricsPreferenceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.externalMetricsPreference = mapped
    }

    /**
     * @param value The status of the inferred workload types recommendation preference. Valid values: `Active`, `Inactive`.
     */
    @JvmName("pghpgrwbghsugpku")
    public suspend fun inferredWorkloadTypes(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inferredWorkloadTypes = mapped
    }

    /**
     * @param value The preference to control the number of days the utilization metrics of the AWS resource are analyzed. Valid values: `DAYS_14`, `DAYS_32`, `DAYS_93`.
     */
    @JvmName("buiprcycyjwimvuw")
    public suspend fun lookBackPeriod(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lookBackPeriod = mapped
    }

    /**
     * @param value The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("dhoiplxiuyfspces")
    public suspend fun preferredResources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preferredResources = mapped
    }

    /**
     * @param argument The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("wesmasiiyfxeddxe")
    public suspend fun preferredResources(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RecommendationPreferencesPreferredResourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.preferredResources = mapped
    }

    /**
     * @param argument The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("mitykevxphxojjcu")
    public suspend fun preferredResources(vararg argument: suspend RecommendationPreferencesPreferredResourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RecommendationPreferencesPreferredResourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.preferredResources = mapped
    }

    /**
     * @param argument The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("uoyafbdkdhwxqtwh")
    public suspend fun preferredResources(argument: suspend RecommendationPreferencesPreferredResourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RecommendationPreferencesPreferredResourceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.preferredResources = mapped
    }

    /**
     * @param values The preference to control which resource type values are considered when generating rightsizing recommendations. See Preferred Resources below.
     */
    @JvmName("raxfevkeheedlvdy")
    public suspend fun preferredResources(vararg values: RecommendationPreferencesPreferredResourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.preferredResources = mapped
    }

    /**
     * @param value The target resource type of the recommendation preferences. Valid values: `Ec2Instance`, `AutoScalingGroup`, `RdsDBInstance`.
     */
    @JvmName("wucrnwkmivlagdom")
    public suspend fun resourceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceType = mapped
    }

    /**
     * @param value The status of the savings estimation mode preference. Valid values: `AfterDiscounts`, `BeforeDiscounts`.
     */
    @JvmName("fsldfbhewkcgnhtv")
    public suspend fun savingsEstimationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.savingsEstimationMode = mapped
    }

    /**
     * @param value The scope of the recommendation preferences. See Scope below.
     */
    @JvmName("dolawubpnrwtwmwa")
    public suspend fun scope(`value`: RecommendationPreferencesScopeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param argument The scope of the recommendation preferences. See Scope below.
     */
    @JvmName("yvcitbwpbwedtunw")
    public suspend fun scope(argument: suspend RecommendationPreferencesScopeArgsBuilder.() -> Unit) {
        val toBeMapped = RecommendationPreferencesScopeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scope = mapped
    }

    /**
     * @param value The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("xjthlyuiglnucitq")
    public suspend fun utilizationPreferences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.utilizationPreferences = mapped
    }

    /**
     * @param argument The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("ssodinbsymmsrslx")
    public suspend fun utilizationPreferences(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RecommendationPreferencesUtilizationPreferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.utilizationPreferences = mapped
    }

    /**
     * @param argument The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("raleebksrcgepcsu")
    public suspend fun utilizationPreferences(vararg argument: suspend RecommendationPreferencesUtilizationPreferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RecommendationPreferencesUtilizationPreferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.utilizationPreferences = mapped
    }

    /**
     * @param argument The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("imiddjokrviojhca")
    public suspend fun utilizationPreferences(argument: suspend RecommendationPreferencesUtilizationPreferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RecommendationPreferencesUtilizationPreferenceArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.utilizationPreferences = mapped
    }

    /**
     * @param values The preference to control the resource’s CPU utilization threshold, CPU utilization headroom, and memory utilization headroom. See Utilization Preferences below.
     */
    @JvmName("nsgosyhfwqnyktsb")
    public suspend fun utilizationPreferences(vararg values: RecommendationPreferencesUtilizationPreferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.utilizationPreferences = mapped
    }

    internal fun build(): RecommendationPreferencesArgs = RecommendationPreferencesArgs(
        enhancedInfrastructureMetrics = enhancedInfrastructureMetrics,
        externalMetricsPreference = externalMetricsPreference,
        inferredWorkloadTypes = inferredWorkloadTypes,
        lookBackPeriod = lookBackPeriod,
        preferredResources = preferredResources,
        resourceType = resourceType,
        savingsEstimationMode = savingsEstimationMode,
        scope = scope,
        utilizationPreferences = utilizationPreferences,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy