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

com.pulumi.azure.compute.kotlin.inputs.LinuxVirtualMachineScaleSetAdminSshKeyArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetAdminSshKeyArgs.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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property publicKey The Public Key which should be used for authentication, which needs to be at least 2048-bit and in `ssh-rsa` format.
 * @property username The Username for which this Public SSH Key should be configured.
 * > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be added/appended to the authorized keys file.
 */
public data class LinuxVirtualMachineScaleSetAdminSshKeyArgs(
    public val publicKey: Output,
    public val username: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetAdminSshKeyArgs =
        com.pulumi.azure.compute.inputs.LinuxVirtualMachineScaleSetAdminSshKeyArgs.builder()
            .publicKey(publicKey.applyValue({ args0 -> args0 }))
            .username(username.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LinuxVirtualMachineScaleSetAdminSshKeyArgs].
 */
@PulumiTagMarker
public class LinuxVirtualMachineScaleSetAdminSshKeyArgsBuilder internal constructor() {
    private var publicKey: Output? = null

    private var username: Output? = null

    /**
     * @param value The Public Key which should be used for authentication, which needs to be at least 2048-bit and in `ssh-rsa` format.
     */
    @JvmName("jcpwqigxchwkirxv")
    public suspend fun publicKey(`value`: Output) {
        this.publicKey = value
    }

    /**
     * @param value The Username for which this Public SSH Key should be configured.
     * > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be added/appended to the authorized keys file.
     */
    @JvmName("lfvohqtegdqhkpwu")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value The Public Key which should be used for authentication, which needs to be at least 2048-bit and in `ssh-rsa` format.
     */
    @JvmName("kxlvpoyicahgfxjt")
    public suspend fun publicKey(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.publicKey = mapped
    }

    /**
     * @param value The Username for which this Public SSH Key should be configured.
     * > **NOTE:** The Azure VM Agent only allows creating SSH Keys at the path `/home/{username}/.ssh/authorized_keys` - as such this public key will be added/appended to the authorized keys file.
     */
    @JvmName("sbvhydypjwlneeyj")
    public suspend fun username(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.username = mapped
    }

    internal fun build(): LinuxVirtualMachineScaleSetAdminSshKeyArgs =
        LinuxVirtualMachineScaleSetAdminSshKeyArgs(
            publicKey = publicKey ?: throw PulumiNullFieldException("publicKey"),
            username = username ?: throw PulumiNullFieldException("username"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy