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.hybridcompute.kotlin.MachineArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.hybridcompute.kotlin
import com.pulumi.azurenative.hybridcompute.MachineArgs.builder
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.AgentUpgradeArgs
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.AgentUpgradeArgsBuilder
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.IdentityArgs
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.IdentityArgsBuilder
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.LocationDataArgs
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.LocationDataArgsBuilder
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.MachineExtensionInstanceViewArgs
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.MachineExtensionInstanceViewArgsBuilder
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.OSProfileArgs
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.OSProfileArgsBuilder
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.ServiceStatusesArgs
import com.pulumi.azurenative.hybridcompute.kotlin.inputs.ServiceStatusesArgsBuilder
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Describes a hybrid machine.
* Azure REST API version: 2022-12-27. Prior API version in Azure Native 1.x: 2020-08-02.
* Other available API versions: 2019-03-18-preview, 2019-08-02-preview, 2020-08-02, 2020-08-15-preview, 2022-05-10-preview, 2023-06-20-preview, 2023-10-03-preview, 2024-03-31-preview, 2024-05-20-preview, 2024-07-10.
* ## Example Usage
* ### Create or Update a Machine
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var machine = new AzureNative.HybridCompute.Machine("machine", new()
* {
* ClientPublicKey = "string",
* Identity = new AzureNative.HybridCompute.Inputs.IdentityArgs
* {
* Type = AzureNative.HybridCompute.ResourceIdentityType.SystemAssigned,
* },
* Location = "eastus2euap",
* LocationData = new AzureNative.HybridCompute.Inputs.LocationDataArgs
* {
* Name = "Redmond",
* },
* MachineName = "myMachine",
* ParentClusterResourceId = "{AzureStackHCIResourceId}",
* PrivateLinkScopeResourceId = "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName",
* ResourceGroupName = "myResourceGroup",
* VmId = "b7a098cc-b0b8-46e8-a205-62f301a62a8f",
* });
* });
* ```
* ```go
* package main
* import (
* hybridcompute "github.com/pulumi/pulumi-azure-native-sdk/hybridcompute/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := hybridcompute.NewMachine(ctx, "machine", &hybridcompute.MachineArgs{
* ClientPublicKey: pulumi.String("string"),
* Identity: &hybridcompute.IdentityArgs{
* Type: hybridcompute.ResourceIdentityTypeSystemAssigned,
* },
* Location: pulumi.String("eastus2euap"),
* LocationData: &hybridcompute.LocationDataArgs{
* Name: pulumi.String("Redmond"),
* },
* MachineName: pulumi.String("myMachine"),
* ParentClusterResourceId: pulumi.String("{AzureStackHCIResourceId}"),
* PrivateLinkScopeResourceId: pulumi.String("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* VmId: pulumi.String("b7a098cc-b0b8-46e8-a205-62f301a62a8f"),
* })
* 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.hybridcompute.Machine;
* import com.pulumi.azurenative.hybridcompute.MachineArgs;
* import com.pulumi.azurenative.hybridcompute.inputs.IdentityArgs;
* import com.pulumi.azurenative.hybridcompute.inputs.LocationDataArgs;
* 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 machine = new Machine("machine", MachineArgs.builder()
* .clientPublicKey("string")
* .identity(IdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .location("eastus2euap")
* .locationData(LocationDataArgs.builder()
* .name("Redmond")
* .build())
* .machineName("myMachine")
* .parentClusterResourceId("{AzureStackHCIResourceId}")
* .privateLinkScopeResourceId("/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName")
* .resourceGroupName("myResourceGroup")
* .vmId("b7a098cc-b0b8-46e8-a205-62f301a62a8f")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:hybridcompute:Machine myMachine /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}
* ```
* @property agentUpgrade The info of the machine w.r.t Agent Upgrade
* @property clientPublicKey Public Key that the client provides to be used during initial resource onboarding
* @property extensions Machine Extensions information (deprecated field)
* @property identity Identity for the resource.
* @property location The geo-location where the resource lives
* @property locationData Metadata pertaining to the geographic location of the resource.
* @property machineName The name of the hybrid machine.
* @property mssqlDiscovered Specifies whether any MS SQL instance is discovered on the machine.
* @property osProfile Specifies the operating system settings for the hybrid machine.
* @property osType The type of Operating System (windows/linux).
* @property parentClusterResourceId The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
* @property privateLinkScopeResourceId The resource id of the private link scope this machine is assigned to, if any.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property serviceStatuses Statuses of dependent services that are reported back to ARM.
* @property tags Resource tags.
* @property vmId Specifies the hybrid machine unique ID.
*/
public data class MachineArgs(
public val agentUpgrade: Output? = null,
public val clientPublicKey: Output? = null,
public val extensions: Output>? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val locationData: Output? = null,
public val machineName: Output? = null,
public val mssqlDiscovered: Output? = null,
public val osProfile: Output? = null,
public val osType: Output? = null,
public val parentClusterResourceId: Output? = null,
public val privateLinkScopeResourceId: Output? = null,
public val resourceGroupName: Output? = null,
public val serviceStatuses: Output? = null,
public val tags: Output>? = null,
public val vmId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.hybridcompute.MachineArgs =
com.pulumi.azurenative.hybridcompute.MachineArgs.builder()
.agentUpgrade(agentUpgrade?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.clientPublicKey(clientPublicKey?.applyValue({ args0 -> args0 }))
.extensions(
extensions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.locationData(locationData?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.machineName(machineName?.applyValue({ args0 -> args0 }))
.mssqlDiscovered(mssqlDiscovered?.applyValue({ args0 -> args0 }))
.osProfile(osProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.osType(osType?.applyValue({ args0 -> args0 }))
.parentClusterResourceId(parentClusterResourceId?.applyValue({ args0 -> args0 }))
.privateLinkScopeResourceId(privateLinkScopeResourceId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.serviceStatuses(serviceStatuses?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.vmId(vmId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [MachineArgs].
*/
@PulumiTagMarker
public class MachineArgsBuilder internal constructor() {
private var agentUpgrade: Output? = null
private var clientPublicKey: Output? = null
private var extensions: Output>? = null
private var identity: Output? = null
private var location: Output? = null
private var locationData: Output? = null
private var machineName: Output? = null
private var mssqlDiscovered: Output? = null
private var osProfile: Output? = null
private var osType: Output? = null
private var parentClusterResourceId: Output? = null
private var privateLinkScopeResourceId: Output? = null
private var resourceGroupName: Output? = null
private var serviceStatuses: Output? = null
private var tags: Output>? = null
private var vmId: Output? = null
/**
* @param value The info of the machine w.r.t Agent Upgrade
*/
@JvmName("sdfqydhisjcmckgr")
public suspend fun agentUpgrade(`value`: Output) {
this.agentUpgrade = value
}
/**
* @param value Public Key that the client provides to be used during initial resource onboarding
*/
@JvmName("fbcfxhpptqivumfd")
public suspend fun clientPublicKey(`value`: Output) {
this.clientPublicKey = value
}
/**
* @param value Machine Extensions information (deprecated field)
*/
@JvmName("vyhvkcrbtyntcnef")
public suspend fun extensions(`value`: Output>) {
this.extensions = value
}
@JvmName("hdrtpsirwnqhckqy")
public suspend fun extensions(vararg values: Output) {
this.extensions = Output.all(values.asList())
}
/**
* @param values Machine Extensions information (deprecated field)
*/
@JvmName("hkcwbwqtvarxeabu")
public suspend fun extensions(values: List>) {
this.extensions = Output.all(values)
}
/**
* @param value Identity for the resource.
*/
@JvmName("gifdmltnebuqrxpj")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("tbuthedghojekpuw")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Metadata pertaining to the geographic location of the resource.
*/
@JvmName("xhvxqwqnjiewsnud")
public suspend fun locationData(`value`: Output) {
this.locationData = value
}
/**
* @param value The name of the hybrid machine.
*/
@JvmName("xnrnkarvwqmxinla")
public suspend fun machineName(`value`: Output) {
this.machineName = value
}
/**
* @param value Specifies whether any MS SQL instance is discovered on the machine.
*/
@JvmName("sfsdahruabqufdnf")
public suspend fun mssqlDiscovered(`value`: Output) {
this.mssqlDiscovered = value
}
/**
* @param value Specifies the operating system settings for the hybrid machine.
*/
@JvmName("qmvswxpvbbvtftdq")
public suspend fun osProfile(`value`: Output) {
this.osProfile = value
}
/**
* @param value The type of Operating System (windows/linux).
*/
@JvmName("qnaxkyaoblwsbchi")
public suspend fun osType(`value`: Output) {
this.osType = value
}
/**
* @param value The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
*/
@JvmName("qnrvlsyvwoiymhun")
public suspend fun parentClusterResourceId(`value`: Output) {
this.parentClusterResourceId = value
}
/**
* @param value The resource id of the private link scope this machine is assigned to, if any.
*/
@JvmName("phbahviemdfhhmyp")
public suspend fun privateLinkScopeResourceId(`value`: Output) {
this.privateLinkScopeResourceId = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("mmugvdnkewdgxcxk")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Statuses of dependent services that are reported back to ARM.
*/
@JvmName("tspogoanavvfrnwe")
public suspend fun serviceStatuses(`value`: Output) {
this.serviceStatuses = value
}
/**
* @param value Resource tags.
*/
@JvmName("sykyoqmvkmegpehn")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Specifies the hybrid machine unique ID.
*/
@JvmName("jdeurwftvaqhlyos")
public suspend fun vmId(`value`: Output) {
this.vmId = value
}
/**
* @param value The info of the machine w.r.t Agent Upgrade
*/
@JvmName("skeqrvwojhathgmy")
public suspend fun agentUpgrade(`value`: AgentUpgradeArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.agentUpgrade = mapped
}
/**
* @param argument The info of the machine w.r.t Agent Upgrade
*/
@JvmName("lqcqqvclbqvphtro")
public suspend fun agentUpgrade(argument: suspend AgentUpgradeArgsBuilder.() -> Unit) {
val toBeMapped = AgentUpgradeArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.agentUpgrade = mapped
}
/**
* @param value Public Key that the client provides to be used during initial resource onboarding
*/
@JvmName("gjabyigvrjcycntc")
public suspend fun clientPublicKey(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.clientPublicKey = mapped
}
/**
* @param value Machine Extensions information (deprecated field)
*/
@JvmName("qrhjkniylkfvmphk")
public suspend fun extensions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.extensions = mapped
}
/**
* @param argument Machine Extensions information (deprecated field)
*/
@JvmName("hwogbqyvwyrduvqe")
public suspend fun extensions(argument: List Unit>) {
val toBeMapped = argument.toList().map {
MachineExtensionInstanceViewArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.extensions = mapped
}
/**
* @param argument Machine Extensions information (deprecated field)
*/
@JvmName("wwerowjsorovqrwr")
public suspend fun extensions(vararg argument: suspend MachineExtensionInstanceViewArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
MachineExtensionInstanceViewArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.extensions = mapped
}
/**
* @param argument Machine Extensions information (deprecated field)
*/
@JvmName("sgdmfaxnjrmedfhg")
public suspend fun extensions(argument: suspend MachineExtensionInstanceViewArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
MachineExtensionInstanceViewArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.extensions = mapped
}
/**
* @param values Machine Extensions information (deprecated field)
*/
@JvmName("ioexsdojkxqjfqry")
public suspend fun extensions(vararg values: MachineExtensionInstanceViewArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.extensions = mapped
}
/**
* @param value Identity for the resource.
*/
@JvmName("lndtrmlnpdprmmmt")
public suspend fun identity(`value`: IdentityArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument Identity for the resource.
*/
@JvmName("fhtsmyablaiyjdeb")
public suspend fun identity(argument: suspend IdentityArgsBuilder.() -> Unit) {
val toBeMapped = IdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The geo-location where the resource lives
*/
@JvmName("rlgyeahgxvqwrtfg")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Metadata pertaining to the geographic location of the resource.
*/
@JvmName("ueapguvtibnxavwo")
public suspend fun locationData(`value`: LocationDataArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.locationData = mapped
}
/**
* @param argument Metadata pertaining to the geographic location of the resource.
*/
@JvmName("igqktukhqefdxeom")
public suspend fun locationData(argument: suspend LocationDataArgsBuilder.() -> Unit) {
val toBeMapped = LocationDataArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.locationData = mapped
}
/**
* @param value The name of the hybrid machine.
*/
@JvmName("hdlysenbmjtlairq")
public suspend fun machineName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.machineName = mapped
}
/**
* @param value Specifies whether any MS SQL instance is discovered on the machine.
*/
@JvmName("mjenytvkejymlvho")
public suspend fun mssqlDiscovered(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mssqlDiscovered = mapped
}
/**
* @param value Specifies the operating system settings for the hybrid machine.
*/
@JvmName("pveninouxtufyvwb")
public suspend fun osProfile(`value`: OSProfileArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.osProfile = mapped
}
/**
* @param argument Specifies the operating system settings for the hybrid machine.
*/
@JvmName("xbartosrgcweatqj")
public suspend fun osProfile(argument: suspend OSProfileArgsBuilder.() -> Unit) {
val toBeMapped = OSProfileArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.osProfile = mapped
}
/**
* @param value The type of Operating System (windows/linux).
*/
@JvmName("mwdqrlwcqturixow")
public suspend fun osType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.osType = mapped
}
/**
* @param value The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.
*/
@JvmName("abovpnugwobnjqii")
public suspend fun parentClusterResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.parentClusterResourceId = mapped
}
/**
* @param value The resource id of the private link scope this machine is assigned to, if any.
*/
@JvmName("trtlugdxjdohflhc")
public suspend fun privateLinkScopeResourceId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateLinkScopeResourceId = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("myfgegvfmqytdfeb")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Statuses of dependent services that are reported back to ARM.
*/
@JvmName("jfouwwfdvxmurjce")
public suspend fun serviceStatuses(`value`: ServiceStatusesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceStatuses = mapped
}
/**
* @param argument Statuses of dependent services that are reported back to ARM.
*/
@JvmName("bkqfusixygtjcrqa")
public suspend fun serviceStatuses(argument: suspend ServiceStatusesArgsBuilder.() -> Unit) {
val toBeMapped = ServiceStatusesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.serviceStatuses = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("jrvdookslcfkubnp")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("epxhkuikvksruurl")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Specifies the hybrid machine unique ID.
*/
@JvmName("fqxygobehludqxwr")
public suspend fun vmId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vmId = mapped
}
internal fun build(): MachineArgs = MachineArgs(
agentUpgrade = agentUpgrade,
clientPublicKey = clientPublicKey,
extensions = extensions,
identity = identity,
location = location,
locationData = locationData,
machineName = machineName,
mssqlDiscovered = mssqlDiscovered,
osProfile = osProfile,
osType = osType,
parentClusterResourceId = parentClusterResourceId,
privateLinkScopeResourceId = privateLinkScopeResourceId,
resourceGroupName = resourceGroupName,
serviceStatuses = serviceStatuses,
tags = tags,
vmId = vmId,
)
}