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

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: 8.10.0.0
Show newest version
@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("ncmlfjlsybgsbdow")
    public suspend fun groupLabels(`value`: Output>) {
        this.groupLabels = value
    }

    @JvmName("aqxtlxxpmcqgcahk")
    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("iywiqusqguhyniom")
    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("lefbrnpamnamtbqw")
    public suspend fun instanceNamePrefixes(`value`: Output>) {
        this.instanceNamePrefixes = value
    }

    @JvmName("gkbrsnfgvnapweea")
    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("mwlevslpjcklyfie")
    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("nqkplsublhestgsb")
    public suspend fun instances(`value`: Output>) {
        this.instances = value
    }

    @JvmName("owfpdndpmbcffwll")
    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("wlmicmmicdacdjpj")
    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("bccrwqlmdribbnhe")
    public suspend fun osTypes(`value`: Output>) {
        this.osTypes = value
    }

    @JvmName("wetpccnbcqhquypk")
    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("jqnkinffbmypdfod")
    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("ohikpjrngspllfhf")
    public suspend fun zones(`value`: Output>) {
        this.zones = value
    }

    @JvmName("hwjvuqbxidkauery")
    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("qhelfprlfcehisna")
    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("ubvrlwoqxusbqvwm")
    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("fspdpfsnymqmkwco")
    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("mxqgddtnftfufegb")
    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("elgkefbeuoduiymb")
    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("bvvqdfmwgfvxajxd")
    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("onpjcmagvttldafm")
    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("dapuhbpjtkyrqokd")
    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("flwjgqbfogtrlnko")
    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("txmexoufpdfyvvdd")
    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("ufkwbdukwgvxewfo")
    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("rakcykktdvldoqdn")
    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("vmdmrdndfrohtrvl")
    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("uflgwjvqaoxekqoa")
    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("eofengtyvcckwace")
    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("ywpqujxtllykrwuo")
    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("ecpvjmtlwgwpyjcr")
    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