Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.networkcloud.kotlin.ConsoleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.networkcloud.kotlin
import com.pulumi.azurenative.networkcloud.ConsoleArgs.builder
import com.pulumi.azurenative.networkcloud.kotlin.enums.ConsoleEnabled
import com.pulumi.azurenative.networkcloud.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.networkcloud.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.networkcloud.kotlin.inputs.SshPublicKeyArgs
import com.pulumi.azurenative.networkcloud.kotlin.inputs.SshPublicKeyArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* Azure REST API version: 2023-10-01-preview. Prior API version in Azure Native 1.x: 2022-12-12-preview.
* Other available API versions: 2023-07-01, 2024-06-01-preview.
* ## Example Usage
* ### Create or update virtual machine console
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var console = new AzureNative.NetworkCloud.Console("console", new()
* {
* ConsoleName = "default",
* Enabled = AzureNative.NetworkCloud.ConsoleEnabled.True,
* Expiration = "2022-06-01T01:27:03.008Z",
* ExtendedLocation = new AzureNative.NetworkCloud.Inputs.ExtendedLocationArgs
* {
* Name = "/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName",
* Type = "CustomLocation",
* },
* Location = "location",
* ResourceGroupName = "resourceGroupName",
* SshPublicKey = new AzureNative.NetworkCloud.Inputs.SshPublicKeyArgs
* {
* KeyData = "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm",
* },
* Tags =
* {
* { "key1", "myvalue1" },
* { "key2", "myvalue2" },
* },
* VirtualMachineName = "virtualMachineName",
* });
* });
* ```
* ```go
* package main
* import (
* networkcloud "github.com/pulumi/pulumi-azure-native-sdk/networkcloud/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := networkcloud.NewConsole(ctx, "console", &networkcloud.ConsoleArgs{
* ConsoleName: pulumi.String("default"),
* Enabled: pulumi.String(networkcloud.ConsoleEnabledTrue),
* Expiration: pulumi.String("2022-06-01T01:27:03.008Z"),
* ExtendedLocation: &networkcloud.ExtendedLocationArgs{
* Name: pulumi.String("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName"),
* Type: pulumi.String("CustomLocation"),
* },
* Location: pulumi.String("location"),
* ResourceGroupName: pulumi.String("resourceGroupName"),
* SshPublicKey: &networkcloud.SshPublicKeyArgs{
* KeyData: pulumi.String("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm"),
* },
* Tags: pulumi.StringMap{
* "key1": pulumi.String("myvalue1"),
* "key2": pulumi.String("myvalue2"),
* },
* VirtualMachineName: pulumi.String("virtualMachineName"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.networkcloud.Console;
* import com.pulumi.azurenative.networkcloud.ConsoleArgs;
* import com.pulumi.azurenative.networkcloud.inputs.ExtendedLocationArgs;
* import com.pulumi.azurenative.networkcloud.inputs.SshPublicKeyArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
* public static void stack(Context ctx) {
* var console = new Console("console", ConsoleArgs.builder()
* .consoleName("default")
* .enabled("True")
* .expiration("2022-06-01T01:27:03.008Z")
* .extendedLocation(ExtendedLocationArgs.builder()
* .name("/subscriptions/123e4567-e89b-12d3-a456-426655440000/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterManagerExtendedLocationName")
* .type("CustomLocation")
* .build())
* .location("location")
* .resourceGroupName("resourceGroupName")
* .sshPublicKey(SshPublicKeyArgs.builder()
* .keyData("ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT/ojNZfpB3af/YDzwQCZgTcTRyNNhL4o/blKUmug0daSsSXISTRnIDpcf5qytjs1Xo+yYyJMvzLL59mhAyb3p/cD+Y3/s3WhAx+l0XOKpzXnblrv9d3q4c2tWmm/SyFqthaqd0= admin@vm")
* .build())
* .tags(Map.ofEntries(
* Map.entry("key1", "myvalue1"),
* Map.entry("key2", "myvalue2")
* ))
* .virtualMachineName("virtualMachineName")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:networkcloud:Console default /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/virtualMachines/{virtualMachineName}/consoles/{consoleName}
* ```
* @property consoleName The name of the virtual machine console.
* @property enabled The indicator of whether the console access is enabled.
* @property expiration The date and time after which the key will be disallowed access.
* @property extendedLocation The extended location of the cluster manager associated with the cluster this virtual machine is created on.
* @property location The geo-location where the resource lives
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property sshPublicKey The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in.
* @property tags Resource tags.
* @property virtualMachineName The name of the virtual machine.
*/
public data class ConsoleArgs(
public val consoleName: Output? = null,
public val enabled: Output>? = null,
public val expiration: Output? = null,
public val extendedLocation: Output? = null,
public val location: Output? = null,
public val resourceGroupName: Output? = null,
public val sshPublicKey: Output? = null,
public val tags: Output>? = null,
public val virtualMachineName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.networkcloud.ConsoleArgs =
com.pulumi.azurenative.networkcloud.ConsoleArgs.builder()
.consoleName(consoleName?.applyValue({ args0 -> args0 }))
.enabled(
enabled?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.expiration(expiration?.applyValue({ args0 -> args0 }))
.extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sshPublicKey(sshPublicKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.virtualMachineName(virtualMachineName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ConsoleArgs].
*/
@PulumiTagMarker
public class ConsoleArgsBuilder internal constructor() {
private var consoleName: Output? = null
private var enabled: Output>? = null
private var expiration: Output? = null
private var extendedLocation: Output? = null
private var location: Output? = null
private var resourceGroupName: Output? = null
private var sshPublicKey: Output? = null
private var tags: Output>? = null
private var virtualMachineName: Output? = null
/**
* @param value The name of the virtual machine console.
*/
@JvmName("qerepjqkgbqtyttr")
public suspend fun consoleName(`value`: Output) {
this.consoleName = value
}
/**
* @param value The indicator of whether the console access is enabled.
*/
@JvmName("hbagriwapmuekpux")
public suspend fun enabled(`value`: Output>) {
this.enabled = value
}
/**
* @param value The date and time after which the key will be disallowed access.
*/
@JvmName("qifoltlonhkkodbt")
public suspend fun expiration(`value`: Output) {
this.expiration = value
}
/**
* @param value The extended location of the cluster manager associated with the cluster this virtual machine is created on.
*/
@JvmName("byweielroqutsnqr")
public suspend fun extendedLocation(`value`: Output) {
this.extendedLocation = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("otsjijweirompqik")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("ppwcvgesrfucpjur")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in.
*/
@JvmName("oousthhaiugxtwfu")
public suspend fun sshPublicKey(`value`: Output) {
this.sshPublicKey = value
}
/**
* @param value Resource tags.
*/
@JvmName("eevqoufpblotwubp")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the virtual machine.
*/
@JvmName("nljflbmwvyvtdlwv")
public suspend fun virtualMachineName(`value`: Output) {
this.virtualMachineName = value
}
/**
* @param value The name of the virtual machine console.
*/
@JvmName("vhvqcvnsiysfdxik")
public suspend fun consoleName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.consoleName = mapped
}
/**
* @param value The indicator of whether the console access is enabled.
*/
@JvmName("eibcfncmfpulbmic")
public suspend fun enabled(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value The indicator of whether the console access is enabled.
*/
@JvmName("vxwayehihxkeejhh")
public fun enabled(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value The indicator of whether the console access is enabled.
*/
@JvmName("uplcxlvkaqkvuull")
public fun enabled(`value`: ConsoleEnabled) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value The date and time after which the key will be disallowed access.
*/
@JvmName("begfgjwqiuynvfrf")
public suspend fun expiration(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.expiration = mapped
}
/**
* @param value The extended location of the cluster manager associated with the cluster this virtual machine is created on.
*/
@JvmName("xkucslayvtygnxxk")
public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.extendedLocation = mapped
}
/**
* @param argument The extended location of the cluster manager associated with the cluster this virtual machine is created on.
*/
@JvmName("difwsqlcskteqoem")
public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.extendedLocation = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("pntnovqdgeveflks")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("vgpnewulanmxujnn")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in.
*/
@JvmName("vjfwocabgeuqeisl")
public suspend fun sshPublicKey(`value`: SshPublicKeyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sshPublicKey = mapped
}
/**
* @param argument The SSH public key that will be provisioned for user access. The user is expected to have the corresponding SSH private key for logging in.
*/
@JvmName("xllckfqxreipjthf")
public suspend fun sshPublicKey(argument: suspend SshPublicKeyArgsBuilder.() -> Unit) {
val toBeMapped = SshPublicKeyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sshPublicKey = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("bxaclttbmlpbrpvy")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("jtiwasfnvylneqrq")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value The name of the virtual machine.
*/
@JvmName("ktgyrsbmmcjjnwfd")
public suspend fun virtualMachineName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.virtualMachineName = mapped
}
internal fun build(): ConsoleArgs = ConsoleArgs(
consoleName = consoleName,
enabled = enabled,
expiration = expiration,
extendedLocation = extendedLocation,
location = location,
resourceGroupName = resourceGroupName,
sshPublicKey = sshPublicKey,
tags = tags,
virtualMachineName = virtualMachineName,
)
}