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

com.pulumi.googlenative.compute.alpha.kotlin.InstanceGroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.compute.alpha.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.alpha.InstanceGroupArgs.builder
import com.pulumi.googlenative.compute.alpha.kotlin.inputs.NamedPortArgs
import com.pulumi.googlenative.compute.alpha.kotlin.inputs.NamedPortArgsBuilder
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

/**
 * Creates an instance group in the specified project using the parameters that are included in the request.
 * @property description An optional description of this resource. Provide this property when you create the resource.
 * @property name The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
 * @property namedPorts  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
 * @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 zone
 */
public data class InstanceGroupArgs(
    public val description: Output? = null,
    public val name: Output? = null,
    public val namedPorts: Output>? = null,
    public val project: Output? = null,
    public val requestId: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.alpha.InstanceGroupArgs =
        com.pulumi.googlenative.compute.alpha.InstanceGroupArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .namedPorts(
                namedPorts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .project(project?.applyValue({ args0 -> args0 }))
            .requestId(requestId?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceGroupArgs].
 */
@PulumiTagMarker
public class InstanceGroupArgsBuilder internal constructor() {
    private var description: Output? = null

    private var name: Output? = null

    private var namedPorts: Output>? = null

    private var project: Output? = null

    private var requestId: Output? = null

    private var zone: Output? = null

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

    /**
     * @param value The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
     */
    @JvmName("ypgsqdwjjcpyoskt")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("rorohojcbrboptij")
    public suspend fun namedPorts(`value`: Output>) {
        this.namedPorts = value
    }

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

    /**
     * @param values  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("ildnskmojnjchull")
    public suspend fun namedPorts(values: List>) {
        this.namedPorts = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("vgmmjqmowkuctbpm")
    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("oikqqldqetgdspti")
    public suspend fun requestId(`value`: Output) {
        this.requestId = value
    }

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

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

    /**
     * @param value The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.
     */
    @JvmName("pijbilxcpkmplkeh")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("shljuemvkftsrubo")
    public suspend fun namedPorts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namedPorts = mapped
    }

    /**
     * @param argument  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("rnteihhstatqtxkc")
    public suspend fun namedPorts(argument: List Unit>) {
        val toBeMapped = argument.toList().map { NamedPortArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.namedPorts = mapped
    }

    /**
     * @param argument  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("rghttgyxakembcsk")
    public suspend fun namedPorts(vararg argument: suspend NamedPortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { NamedPortArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.namedPorts = mapped
    }

    /**
     * @param argument  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("lrqeakwnhunfrcux")
    public suspend fun namedPorts(argument: suspend NamedPortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(NamedPortArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.namedPorts = mapped
    }

    /**
     * @param values  Assigns a name to a port number. For example: {name: "http", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "app1", port: 8080}, {name: "app1", port: 8081}, {name: "app2", port: 8082}] Named ports apply to all instances in this instance group.
     */
    @JvmName("lguiyioqtelcxpsf")
    public suspend fun namedPorts(vararg values: NamedPortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.namedPorts = mapped
    }

    /**
     * @param value
     */
    @JvmName("cgyfuipgideruuxs")
    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("nutmbnwsodhgfhgf")
    public suspend fun requestId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestId = mapped
    }

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

    internal fun build(): InstanceGroupArgs = InstanceGroupArgs(
        description = description,
        name = name,
        namedPorts = namedPorts,
        project = project,
        requestId = requestId,
        zone = zone,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy