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

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

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

import com.pulumi.azure.compute.inputs.LinuxVirtualMachineAdminSshKeyArgs.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. Changing this forces a new resource to be created.
 * @property username The Username for which this Public SSH Key should be configured. Changing this forces a new resource to be created.
 * > **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 written to the authorized keys file.
 */
public data class LinuxVirtualMachineAdminSshKeyArgs(
    public val publicKey: Output,
    public val username: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.compute.inputs.LinuxVirtualMachineAdminSshKeyArgs =
        com.pulumi.azure.compute.inputs.LinuxVirtualMachineAdminSshKeyArgs.builder()
            .publicKey(publicKey.applyValue({ args0 -> args0 }))
            .username(username.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LinuxVirtualMachineAdminSshKeyArgs].
 */
@PulumiTagMarker
public class LinuxVirtualMachineAdminSshKeyArgsBuilder 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. Changing this forces a new resource to be created.
     */
    @JvmName("moxetrfqkucjdbjr")
    public suspend fun publicKey(`value`: Output) {
        this.publicKey = value
    }

    /**
     * @param value The Username for which this Public SSH Key should be configured. Changing this forces a new resource to be created.
     * > **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 written to the authorized keys file.
     */
    @JvmName("mmsgugkvkeskmavn")
    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. Changing this forces a new resource to be created.
     */
    @JvmName("nogwkmwqgcgvhccd")
    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. Changing this forces a new resource to be created.
     * > **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 written to the authorized keys file.
     */
    @JvmName("rrohvwhcxoaekmbf")
    public suspend fun username(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.username = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy