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

com.pulumi.azure.compute.kotlin.inputs.VirtualMachineOsProfileLinuxConfigArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.compute.kotlin.inputs

import com.pulumi.azure.compute.inputs.VirtualMachineOsProfileLinuxConfigArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property disablePasswordAuthentication Specifies whether password authentication should be disabled. If set to `false`, an `admin_password` must be specified.
 * @property sshKeys One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
 */
public data class VirtualMachineOsProfileLinuxConfigArgs(
    public val disablePasswordAuthentication: Output,
    public val sshKeys: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.inputs.VirtualMachineOsProfileLinuxConfigArgs =
        com.pulumi.azure.compute.inputs.VirtualMachineOsProfileLinuxConfigArgs.builder()
            .disablePasswordAuthentication(disablePasswordAuthentication.applyValue({ args0 -> args0 }))
            .sshKeys(
                sshKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [VirtualMachineOsProfileLinuxConfigArgs].
 */
@PulumiTagMarker
public class VirtualMachineOsProfileLinuxConfigArgsBuilder internal constructor() {
    private var disablePasswordAuthentication: Output? = null

    private var sshKeys: Output>? = null

    /**
     * @param value Specifies whether password authentication should be disabled. If set to `false`, an `admin_password` must be specified.
     */
    @JvmName("flpobwcxlmikxmng")
    public suspend fun disablePasswordAuthentication(`value`: Output) {
        this.disablePasswordAuthentication = value
    }

    /**
     * @param value One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("qyvmturfrujyhewc")
    public suspend fun sshKeys(`value`: Output>) {
        this.sshKeys = value
    }

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

    /**
     * @param values One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("cpgyjyfcmhrbgekw")
    public suspend fun sshKeys(values: List>) {
        this.sshKeys = Output.all(values)
    }

    /**
     * @param value Specifies whether password authentication should be disabled. If set to `false`, an `admin_password` must be specified.
     */
    @JvmName("gwhdwpmhplnirlvb")
    public suspend fun disablePasswordAuthentication(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disablePasswordAuthentication = mapped
    }

    /**
     * @param value One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("qwypckvwseoxcopk")
    public suspend fun sshKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sshKeys = mapped
    }

    /**
     * @param argument One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("ukqnwtfxprpbwami")
    public suspend
    fun sshKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VirtualMachineOsProfileLinuxConfigSshKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sshKeys = mapped
    }

    /**
     * @param argument One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("pykqbwiiseqebycc")
    public suspend fun sshKeys(
        vararg
        argument: suspend VirtualMachineOsProfileLinuxConfigSshKeyArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            VirtualMachineOsProfileLinuxConfigSshKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.sshKeys = mapped
    }

    /**
     * @param argument One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("rgnmvpjsimgrwmrh")
    public suspend
    fun sshKeys(argument: suspend VirtualMachineOsProfileLinuxConfigSshKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VirtualMachineOsProfileLinuxConfigSshKeyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.sshKeys = mapped
    }

    /**
     * @param values One or more `ssh_keys` blocks as defined below. This field is required if `disable_password_authentication` is set to `true`.
     */
    @JvmName("tbjtbgrahubjiddo")
    public suspend fun sshKeys(vararg values: VirtualMachineOsProfileLinuxConfigSshKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sshKeys = mapped
    }

    internal fun build(): VirtualMachineOsProfileLinuxConfigArgs =
        VirtualMachineOsProfileLinuxConfigArgs(
            disablePasswordAuthentication = disablePasswordAuthentication ?: throw
                PulumiNullFieldException("disablePasswordAuthentication"),
            sshKeys = sshKeys,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy