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

com.pulumi.googlenative.compute.v1.kotlin.AutoscalerArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.compute.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.v1.AutoscalerArgs.builder
import com.pulumi.googlenative.compute.v1.kotlin.inputs.AutoscalingPolicyArgs
import com.pulumi.googlenative.compute.v1.kotlin.inputs.AutoscalingPolicyArgsBuilder
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.jvm.JvmName

/**
 * Creates an autoscaler in the specified project using the data included in the request.
 * @property autoscalingPolicy The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
 * @property description An optional description of this resource. Provide this property when you create the resource.
 * @property name Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
 * @property project
 * @property requestId An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
 * @property target URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
 * @property zone
 */
public data class AutoscalerArgs(
    public val autoscalingPolicy: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val project: Output? = null,
    public val requestId: Output? = null,
    public val target: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.v1.AutoscalerArgs =
        com.pulumi.googlenative.compute.v1.AutoscalerArgs.builder()
            .autoscalingPolicy(autoscalingPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .requestId(requestId?.applyValue({ args0 -> args0 }))
            .target(target?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AutoscalerArgs].
 */
@PulumiTagMarker
public class AutoscalerArgsBuilder internal constructor() {
    private var autoscalingPolicy: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var project: Output? = null

    private var requestId: Output? = null

    private var target: Output? = null

    private var zone: Output? = null

    /**
     * @param value The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
     */
    @JvmName("eumgrniqnceetxsl")
    public suspend fun autoscalingPolicy(`value`: Output) {
        this.autoscalingPolicy = value
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create the resource.
     */
    @JvmName("ootdyuamoxdfoxpi")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    @JvmName("ijdpcuvrlwlkctwn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     */
    @JvmName("vpchhberqtnvdscv")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
     */
    @JvmName("ejdbxnowhyeftqjv")
    public suspend fun requestId(`value`: Output) {
        this.requestId = value
    }

    /**
     * @param value URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
     */
    @JvmName("jrhiteyyvvmnnnaj")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value
     */
    @JvmName("cuqcsqvdtofaytkq")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
     */
    @JvmName("fuyjyqsctdpmirbj")
    public suspend fun autoscalingPolicy(`value`: AutoscalingPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoscalingPolicy = mapped
    }

    /**
     * @param argument The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
     */
    @JvmName("ferdwstklbnklmap")
    public suspend fun autoscalingPolicy(argument: suspend AutoscalingPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = AutoscalingPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoscalingPolicy = mapped
    }

    /**
     * @param value An optional description of this resource. Provide this property when you create the resource.
     */
    @JvmName("ruudvnoivsdbchjn")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
     */
    @JvmName("losaiisxxwvsvlmy")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     */
    @JvmName("gadlmugltqfjclvf")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
     */
    @JvmName("bimukdyxgaphljcc")
    public suspend fun requestId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestId = mapped
    }

    /**
     * @param value URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
     */
    @JvmName("nejjrenltfyddwte")
    public suspend fun target(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param value
     */
    @JvmName("jqnjdmklobcnlpex")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): AutoscalerArgs = AutoscalerArgs(
        autoscalingPolicy = autoscalingPolicy,
        description = description,
        name = name,
        project = project,
        requestId = requestId,
        target = target,
        zone = zone,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy