// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.CS
{
    [AliCloudResourceType("alicloud:cs/autoscalingConfig:AutoscalingConfig")]
    public partial class AutoscalingConfig : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The id of kubernetes cluster.
        /// </summary>
        [Output("clusterId")]
        public Output<string?> ClusterId { get; private set; } = null!;

        /// <summary>
        /// The cool down duration. Default is `10m`. If the delay (cooldown) value is set too long, there could be complaints that the Horizontal Pod Autoscaler is not responsive to workload changes. However, if the delay value is set too short, the scale of the replicas set may keep thrashing as usual.
        /// </summary>
        [Output("coolDownDuration")]
        public Output<string?> CoolDownDuration { get; private set; } = null!;

        /// <summary>
        /// The policy for selecting which node pool to scale. Valid values: `least-waste`, `random`, `priority`. For more information on these policies, see [Configure auto scaling](https://www.alibabacloud.com/help/en/container-service-for-kubernetes/latest/auto-scaling-of-nodes#section-3bg-2ko-inl)
        /// </summary>
        [Output("expander")]
        public Output<string?> Expander { get; private set; } = null!;

        /// <summary>
        /// The scale-in threshold for GPU instance. Default is `0.5`.
        /// </summary>
        [Output("gpuUtilizationThreshold")]
        public Output<string?> GpuUtilizationThreshold { get; private set; } = null!;

        /// <summary>
        /// Specify whether to allow the scale-in of nodes. Default is `true`.
        /// </summary>
        [Output("scaleDownEnabled")]
        public Output<bool?> ScaleDownEnabled { get; private set; } = null!;

        /// <summary>
        /// The interval at which the cluster is reevaluated for scaling. Default is `30s`.
        /// </summary>
        [Output("scanInterval")]
        public Output<string?> ScanInterval { get; private set; } = null!;

        /// <summary>
        /// The unneeded duration. Default is `10m`.
        /// </summary>
        [Output("unneededDuration")]
        public Output<string?> UnneededDuration { get; private set; } = null!;

        /// <summary>
        /// The scale-in threshold. Default is `0.5`.
        /// </summary>
        [Output("utilizationThreshold")]
        public Output<string?> UtilizationThreshold { get; private set; } = null!;


        /// <summary>
        /// Create a AutoscalingConfig resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public AutoscalingConfig(string name, AutoscalingConfigArgs? args = null, CustomResourceOptions? options = null)
            : base("alicloud:cs/autoscalingConfig:AutoscalingConfig", name, args ?? new AutoscalingConfigArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AutoscalingConfig(string name, Input<string> id, AutoscalingConfigState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cs/autoscalingConfig:AutoscalingConfig", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing AutoscalingConfig resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static AutoscalingConfig Get(string name, Input<string> id, AutoscalingConfigState? state = null, CustomResourceOptions? options = null)
        {
            return new AutoscalingConfig(name, id, state, options);
        }
    }

    public sealed class AutoscalingConfigArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The id of kubernetes cluster.
        /// </summary>
        [Input("clusterId")]
        public Input<string>? ClusterId { get; set; }

        /// <summary>
        /// The cool down duration. Default is `10m`. If the delay (cooldown) value is set too long, there could be complaints that the Horizontal Pod Autoscaler is not responsive to workload changes. However, if the delay value is set too short, the scale of the replicas set may keep thrashing as usual.
        /// </summary>
        [Input("coolDownDuration")]
        public Input<string>? CoolDownDuration { get; set; }

        /// <summary>
        /// The policy for selecting which node pool to scale. Valid values: `least-waste`, `random`, `priority`. For more information on these policies, see [Configure auto scaling](https://www.alibabacloud.com/help/en/container-service-for-kubernetes/latest/auto-scaling-of-nodes#section-3bg-2ko-inl)
        /// </summary>
        [Input("expander")]
        public Input<string>? Expander { get; set; }

        /// <summary>
        /// The scale-in threshold for GPU instance. Default is `0.5`.
        /// </summary>
        [Input("gpuUtilizationThreshold")]
        public Input<string>? GpuUtilizationThreshold { get; set; }

        /// <summary>
        /// Specify whether to allow the scale-in of nodes. Default is `true`.
        /// </summary>
        [Input("scaleDownEnabled")]
        public Input<bool>? ScaleDownEnabled { get; set; }

        /// <summary>
        /// The interval at which the cluster is reevaluated for scaling. Default is `30s`.
        /// </summary>
        [Input("scanInterval")]
        public Input<string>? ScanInterval { get; set; }

        /// <summary>
        /// The unneeded duration. Default is `10m`.
        /// </summary>
        [Input("unneededDuration")]
        public Input<string>? UnneededDuration { get; set; }

        /// <summary>
        /// The scale-in threshold. Default is `0.5`.
        /// </summary>
        [Input("utilizationThreshold")]
        public Input<string>? UtilizationThreshold { get; set; }

        public AutoscalingConfigArgs()
        {
        }
        public static new AutoscalingConfigArgs Empty => new AutoscalingConfigArgs();
    }

    public sealed class AutoscalingConfigState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The id of kubernetes cluster.
        /// </summary>
        [Input("clusterId")]
        public Input<string>? ClusterId { get; set; }

        /// <summary>
        /// The cool down duration. Default is `10m`. If the delay (cooldown) value is set too long, there could be complaints that the Horizontal Pod Autoscaler is not responsive to workload changes. However, if the delay value is set too short, the scale of the replicas set may keep thrashing as usual.
        /// </summary>
        [Input("coolDownDuration")]
        public Input<string>? CoolDownDuration { get; set; }

        /// <summary>
        /// The policy for selecting which node pool to scale. Valid values: `least-waste`, `random`, `priority`. For more information on these policies, see [Configure auto scaling](https://www.alibabacloud.com/help/en/container-service-for-kubernetes/latest/auto-scaling-of-nodes#section-3bg-2ko-inl)
        /// </summary>
        [Input("expander")]
        public Input<string>? Expander { get; set; }

        /// <summary>
        /// The scale-in threshold for GPU instance. Default is `0.5`.
        /// </summary>
        [Input("gpuUtilizationThreshold")]
        public Input<string>? GpuUtilizationThreshold { get; set; }

        /// <summary>
        /// Specify whether to allow the scale-in of nodes. Default is `true`.
        /// </summary>
        [Input("scaleDownEnabled")]
        public Input<bool>? ScaleDownEnabled { get; set; }

        /// <summary>
        /// The interval at which the cluster is reevaluated for scaling. Default is `30s`.
        /// </summary>
        [Input("scanInterval")]
        public Input<string>? ScanInterval { get; set; }

        /// <summary>
        /// The unneeded duration. Default is `10m`.
        /// </summary>
        [Input("unneededDuration")]
        public Input<string>? UnneededDuration { get; set; }

        /// <summary>
        /// The scale-in threshold. Default is `0.5`.
        /// </summary>
        [Input("utilizationThreshold")]
        public Input<string>? UtilizationThreshold { get; set; }

        public AutoscalingConfigState()
        {
        }
        public static new AutoscalingConfigState Empty => new AutoscalingConfigState();
    }
}
