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

com.pulumi.gcp.osconfig.kotlin.inputs.GuestPoliciesAssignmentArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.osconfig.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.osconfig.inputs.GuestPoliciesAssignmentArgs.builder
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

/**
 *
 * @property groupLabels Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
 * for example "env=prod or env=staging".
 * Structure is documented below.
 * @property instanceNamePrefixes Targets VM instances whose name starts with one of these prefixes.
 * Like labels, this is another way to group VM instances when targeting configs,
 * for example prefix="prod-".
 * Only supported for project-level policies.
 * @property instances Targets any of the instances specified. Instances are specified by their URI in the form
 * zones/[ZONE]/instances/[INSTANCE_NAME].
 * Instance targeting is uncommon and is supported to facilitate the management of changes
 * by the instance or to target specific VM instances for development and testing.
 * Only supported for project-level policies and must reference instances within this project.
 * @property osTypes Targets VM instances matching at least one of the following OS types.
 * VM instances must match all supplied criteria for a given OsType to be included.
 * Structure is documented below.
 * @property zones Targets instances in any of these zones. Leave empty to target instances in any zone.
 * Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.
 */
public data class GuestPoliciesAssignmentArgs(
    public val groupLabels: Output>? = null,
    public val instanceNamePrefixes: Output>? = null,
    public val instances: Output>? = null,
    public val osTypes: Output>? = null,
    public val zones: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.osconfig.inputs.GuestPoliciesAssignmentArgs =
        com.pulumi.gcp.osconfig.inputs.GuestPoliciesAssignmentArgs.builder()
            .groupLabels(
                groupLabels?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .instanceNamePrefixes(instanceNamePrefixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .instances(instances?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .osTypes(
                osTypes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .zones(zones?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [GuestPoliciesAssignmentArgs].
 */
@PulumiTagMarker
public class GuestPoliciesAssignmentArgsBuilder internal constructor() {
    private var groupLabels: Output>? = null

    private var instanceNamePrefixes: Output>? = null

    private var instances: Output>? = null

    private var osTypes: Output>? = null

    private var zones: Output>? = null

    /**
     * @param value Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("hgqjtoytdumnxukm")
    public suspend fun groupLabels(`value`: Output>) {
        this.groupLabels = value
    }

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

    /**
     * @param values Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("adcoxuifrdmlxtvw")
    public suspend fun groupLabels(values: List>) {
        this.groupLabels = Output.all(values)
    }

    /**
     * @param value Targets VM instances whose name starts with one of these prefixes.
     * Like labels, this is another way to group VM instances when targeting configs,
     * for example prefix="prod-".
     * Only supported for project-level policies.
     */
    @JvmName("foxhimwgqfaskbub")
    public suspend fun instanceNamePrefixes(`value`: Output>) {
        this.instanceNamePrefixes = value
    }

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

    /**
     * @param values Targets VM instances whose name starts with one of these prefixes.
     * Like labels, this is another way to group VM instances when targeting configs,
     * for example prefix="prod-".
     * Only supported for project-level policies.
     */
    @JvmName("qcmhphhnhcrudjcx")
    public suspend fun instanceNamePrefixes(values: List>) {
        this.instanceNamePrefixes = Output.all(values)
    }

    /**
     * @param value Targets any of the instances specified. Instances are specified by their URI in the form
     * zones/[ZONE]/instances/[INSTANCE_NAME].
     * Instance targeting is uncommon and is supported to facilitate the management of changes
     * by the instance or to target specific VM instances for development and testing.
     * Only supported for project-level policies and must reference instances within this project.
     */
    @JvmName("xqyamlnfoluhjbme")
    public suspend fun instances(`value`: Output>) {
        this.instances = value
    }

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

    /**
     * @param values Targets any of the instances specified. Instances are specified by their URI in the form
     * zones/[ZONE]/instances/[INSTANCE_NAME].
     * Instance targeting is uncommon and is supported to facilitate the management of changes
     * by the instance or to target specific VM instances for development and testing.
     * Only supported for project-level policies and must reference instances within this project.
     */
    @JvmName("agbtuttderxmyqen")
    public suspend fun instances(values: List>) {
        this.instances = Output.all(values)
    }

    /**
     * @param value Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("ndauggwqblgurkgp")
    public suspend fun osTypes(`value`: Output>) {
        this.osTypes = value
    }

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

    /**
     * @param values Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("kumhqhiwqodsyvuq")
    public suspend fun osTypes(values: List>) {
        this.osTypes = Output.all(values)
    }

    /**
     * @param value Targets instances in any of these zones. Leave empty to target instances in any zone.
     * Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.
     */
    @JvmName("wwiuuyxgegjamdtd")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

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

    /**
     * @param values Targets instances in any of these zones. Leave empty to target instances in any zone.
     * Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.
     */
    @JvmName("oanugbvauxmxmoph")
    public suspend fun zones(values: List>) {
        this.zones = Output.all(values)
    }

    /**
     * @param value Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("ecbcnxkoskcjrwrt")
    public suspend fun groupLabels(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupLabels = mapped
    }

    /**
     * @param argument Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("rlqaaurgcjbyqhll")
    public suspend fun groupLabels(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GuestPoliciesAssignmentGroupLabelArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.groupLabels = mapped
    }

    /**
     * @param argument Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("dqswnnlkthuguwtg")
    public suspend fun groupLabels(vararg argument: suspend GuestPoliciesAssignmentGroupLabelArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GuestPoliciesAssignmentGroupLabelArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.groupLabels = mapped
    }

    /**
     * @param argument Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("dexxtxctdgfqpdpr")
    public suspend fun groupLabels(argument: suspend GuestPoliciesAssignmentGroupLabelArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GuestPoliciesAssignmentGroupLabelArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.groupLabels = mapped
    }

    /**
     * @param values Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups,
     * for example "env=prod or env=staging".
     * Structure is documented below.
     */
    @JvmName("jaydjxfcvibcdden")
    public suspend fun groupLabels(vararg values: GuestPoliciesAssignmentGroupLabelArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.groupLabels = mapped
    }

    /**
     * @param value Targets VM instances whose name starts with one of these prefixes.
     * Like labels, this is another way to group VM instances when targeting configs,
     * for example prefix="prod-".
     * Only supported for project-level policies.
     */
    @JvmName("efxusojhlbybjrym")
    public suspend fun instanceNamePrefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceNamePrefixes = mapped
    }

    /**
     * @param values Targets VM instances whose name starts with one of these prefixes.
     * Like labels, this is another way to group VM instances when targeting configs,
     * for example prefix="prod-".
     * Only supported for project-level policies.
     */
    @JvmName("tcgtdbghqcoblmdh")
    public suspend fun instanceNamePrefixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instanceNamePrefixes = mapped
    }

    /**
     * @param value Targets any of the instances specified. Instances are specified by their URI in the form
     * zones/[ZONE]/instances/[INSTANCE_NAME].
     * Instance targeting is uncommon and is supported to facilitate the management of changes
     * by the instance or to target specific VM instances for development and testing.
     * Only supported for project-level policies and must reference instances within this project.
     */
    @JvmName("dyhiaicpdlpeuxlo")
    public suspend fun instances(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instances = mapped
    }

    /**
     * @param values Targets any of the instances specified. Instances are specified by their URI in the form
     * zones/[ZONE]/instances/[INSTANCE_NAME].
     * Instance targeting is uncommon and is supported to facilitate the management of changes
     * by the instance or to target specific VM instances for development and testing.
     * Only supported for project-level policies and must reference instances within this project.
     */
    @JvmName("udwcisgoejolqard")
    public suspend fun instances(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instances = mapped
    }

    /**
     * @param value Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("jgoneomxprpnwdkd")
    public suspend fun osTypes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osTypes = mapped
    }

    /**
     * @param argument Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("ncjwxhvcxsevoqht")
    public suspend fun osTypes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GuestPoliciesAssignmentOsTypeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.osTypes = mapped
    }

    /**
     * @param argument Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("nosfirjuefuxdltg")
    public suspend fun osTypes(vararg argument: suspend GuestPoliciesAssignmentOsTypeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GuestPoliciesAssignmentOsTypeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.osTypes = mapped
    }

    /**
     * @param argument Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("pyxfiyrclogobrqv")
    public suspend fun osTypes(argument: suspend GuestPoliciesAssignmentOsTypeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GuestPoliciesAssignmentOsTypeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.osTypes = mapped
    }

    /**
     * @param values Targets VM instances matching at least one of the following OS types.
     * VM instances must match all supplied criteria for a given OsType to be included.
     * Structure is documented below.
     */
    @JvmName("bhadlqglyhqskpse")
    public suspend fun osTypes(vararg values: GuestPoliciesAssignmentOsTypeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.osTypes = mapped
    }

    /**
     * @param value Targets instances in any of these zones. Leave empty to target instances in any zone.
     * Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.
     */
    @JvmName("emlkbpmsbptxstnp")
    public suspend fun zones(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    /**
     * @param values Targets instances in any of these zones. Leave empty to target instances in any zone.
     * Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.
     */
    @JvmName("cfbasoyhgnbaqabl")
    public suspend fun zones(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.zones = mapped
    }

    internal fun build(): GuestPoliciesAssignmentArgs = GuestPoliciesAssignmentArgs(
        groupLabels = groupLabels,
        instanceNamePrefixes = instanceNamePrefixes,
        instances = instances,
        osTypes = osTypes,
        zones = zones,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy