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

com.pulumi.azurenative.compute.kotlin.VirtualMachineScaleSetVMRunCommandArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.compute.kotlin

import com.pulumi.azurenative.compute.VirtualMachineScaleSetVMRunCommandArgs.builder
import com.pulumi.azurenative.compute.kotlin.inputs.RunCommandInputParameterArgs
import com.pulumi.azurenative.compute.kotlin.inputs.RunCommandInputParameterArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.RunCommandManagedIdentityArgs
import com.pulumi.azurenative.compute.kotlin.inputs.RunCommandManagedIdentityArgsBuilder
import com.pulumi.azurenative.compute.kotlin.inputs.VirtualMachineRunCommandScriptSourceArgs
import com.pulumi.azurenative.compute.kotlin.inputs.VirtualMachineRunCommandScriptSourceArgsBuilder
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.Boolean
import kotlin.Int
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 Virtual Machine run command.
 * Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2021-03-01.
 * Other available API versions: 2023-07-01, 2023-09-01, 2024-03-01, 2024-07-01.
 * ## Example Usage
 * ### Create VirtualMachineScaleSet VM run command.
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachineScaleSetVMRunCommand = new AzureNative.Compute.VirtualMachineScaleSetVMRunCommand("virtualMachineScaleSetVMRunCommand", new()
 *     {
 *         AsyncExecution = false,
 *         ErrorBlobManagedIdentity = null,
 *         ErrorBlobUri = "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt",
 *         InstanceId = "0",
 *         Location = "West US",
 *         OutputBlobManagedIdentity = new AzureNative.Compute.Inputs.RunCommandManagedIdentityArgs
 *         {
 *             ClientId = "22d35efb-0c99-4041-8c5b-6d24db33a69a",
 *         },
 *         OutputBlobUri = "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt",
 *         Parameters = new[]
 *         {
 *             new AzureNative.Compute.Inputs.RunCommandInputParameterArgs
 *             {
 *                 Name = "param1",
 *                 Value = "value1",
 *             },
 *             new AzureNative.Compute.Inputs.RunCommandInputParameterArgs
 *             {
 *                 Name = "param2",
 *                 Value = "value2",
 *             },
 *         },
 *         ResourceGroupName = "myResourceGroup",
 *         RunAsPassword = "",
 *         RunAsUser = "user1",
 *         RunCommandName = "myRunCommand",
 *         Source = new AzureNative.Compute.Inputs.VirtualMachineRunCommandScriptSourceArgs
 *         {
 *             ScriptUri = "https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1",
 *             ScriptUriManagedIdentity = new AzureNative.Compute.Inputs.RunCommandManagedIdentityArgs
 *             {
 *                 ObjectId = "4231e4d2-33e4-4e23-96b2-17888afa6072",
 *             },
 *         },
 *         TimeoutInSeconds = 3600,
 *         TreatFailureAsDeploymentFailure = true,
 *         VmScaleSetName = "myvmScaleSet",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	compute "github.com/pulumi/pulumi-azure-native-sdk/compute/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := compute.NewVirtualMachineScaleSetVMRunCommand(ctx, "virtualMachineScaleSetVMRunCommand", &compute.VirtualMachineScaleSetVMRunCommandArgs{
 * 			AsyncExecution:           pulumi.Bool(false),
 * 			ErrorBlobManagedIdentity: nil,
 * 			ErrorBlobUri:             pulumi.String("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"),
 * 			InstanceId:               pulumi.String("0"),
 * 			Location:                 pulumi.String("West US"),
 * 			OutputBlobManagedIdentity: &compute.RunCommandManagedIdentityArgs{
 * 				ClientId: pulumi.String("22d35efb-0c99-4041-8c5b-6d24db33a69a"),
 * 			},
 * 			OutputBlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"),
 * 			Parameters: compute.RunCommandInputParameterArray{
 * 				&compute.RunCommandInputParameterArgs{
 * 					Name:  pulumi.String("param1"),
 * 					Value: pulumi.String("value1"),
 * 				},
 * 				&compute.RunCommandInputParameterArgs{
 * 					Name:  pulumi.String("param2"),
 * 					Value: pulumi.String("value2"),
 * 				},
 * 			},
 * 			ResourceGroupName: pulumi.String("myResourceGroup"),
 * 			RunAsPassword:     pulumi.String(""),
 * 			RunAsUser:         pulumi.String("user1"),
 * 			RunCommandName:    pulumi.String("myRunCommand"),
 * 			Source: &compute.VirtualMachineRunCommandScriptSourceArgs{
 * 				ScriptUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1"),
 * 				ScriptUriManagedIdentity: &compute.RunCommandManagedIdentityArgs{
 * 					ObjectId: pulumi.String("4231e4d2-33e4-4e23-96b2-17888afa6072"),
 * 				},
 * 			},
 * 			TimeoutInSeconds:                pulumi.Int(3600),
 * 			TreatFailureAsDeploymentFailure: pulumi.Bool(true),
 * 			VmScaleSetName:                  pulumi.String("myvmScaleSet"),
 * 		})
 * 		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.compute.VirtualMachineScaleSetVMRunCommand;
 * import com.pulumi.azurenative.compute.VirtualMachineScaleSetVMRunCommandArgs;
 * import com.pulumi.azurenative.compute.inputs.RunCommandManagedIdentityArgs;
 * import com.pulumi.azurenative.compute.inputs.RunCommandInputParameterArgs;
 * import com.pulumi.azurenative.compute.inputs.VirtualMachineRunCommandScriptSourceArgs;
 * 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 virtualMachineScaleSetVMRunCommand = new VirtualMachineScaleSetVMRunCommand("virtualMachineScaleSetVMRunCommand", VirtualMachineScaleSetVMRunCommandArgs.builder()
 *             .asyncExecution(false)
 *             .errorBlobManagedIdentity()
 *             .errorBlobUri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt")
 *             .instanceId("0")
 *             .location("West US")
 *             .outputBlobManagedIdentity(RunCommandManagedIdentityArgs.builder()
 *                 .clientId("22d35efb-0c99-4041-8c5b-6d24db33a69a")
 *                 .build())
 *             .outputBlobUri("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt")
 *             .parameters(
 *                 RunCommandInputParameterArgs.builder()
 *                     .name("param1")
 *                     .value("value1")
 *                     .build(),
 *                 RunCommandInputParameterArgs.builder()
 *                     .name("param2")
 *                     .value("value2")
 *                     .build())
 *             .resourceGroupName("myResourceGroup")
 *             .runAsPassword("")
 *             .runAsUser("user1")
 *             .runCommandName("myRunCommand")
 *             .source(VirtualMachineRunCommandScriptSourceArgs.builder()
 *                 .scriptUri("https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1")
 *                 .scriptUriManagedIdentity(RunCommandManagedIdentityArgs.builder()
 *                     .objectId("4231e4d2-33e4-4e23-96b2-17888afa6072")
 *                     .build())
 *                 .build())
 *             .timeoutInSeconds(3600)
 *             .treatFailureAsDeploymentFailure(true)
 *             .vmScaleSetName("myvmScaleSet")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:compute:VirtualMachineScaleSetVMRunCommand myRunCommand /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}
 * ```
 * @property asyncExecution Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
 * @property errorBlobManagedIdentity User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
 * @property errorBlobUri Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
 * @property instanceId The instance ID of the virtual machine.
 * @property location Resource location
 * @property outputBlobManagedIdentity User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
 * @property outputBlobUri Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
 * @property parameters The parameters used by the script.
 * @property protectedParameters The parameters used by the script.
 * @property resourceGroupName The name of the resource group.
 * @property runAsPassword Specifies the user account password on the VM when executing the run command.
 * @property runAsUser Specifies the user account on the VM when executing the run command.
 * @property runCommandName The name of the virtual machine run command.
 * @property source The source of the run command script.
 * @property tags Resource tags
 * @property timeoutInSeconds The timeout in seconds to execute the run command.
 * @property treatFailureAsDeploymentFailure Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results
 * @property vmScaleSetName The name of the VM scale set.
 */
public data class VirtualMachineScaleSetVMRunCommandArgs(
    public val asyncExecution: Output? = null,
    public val errorBlobManagedIdentity: Output? = null,
    public val errorBlobUri: Output? = null,
    public val instanceId: Output? = null,
    public val location: Output? = null,
    public val outputBlobManagedIdentity: Output? = null,
    public val outputBlobUri: Output? = null,
    public val parameters: Output>? = null,
    public val protectedParameters: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val runAsPassword: Output? = null,
    public val runAsUser: Output? = null,
    public val runCommandName: Output? = null,
    public val source: Output? = null,
    public val tags: Output>? = null,
    public val timeoutInSeconds: Output? = null,
    public val treatFailureAsDeploymentFailure: Output? = null,
    public val vmScaleSetName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.compute.VirtualMachineScaleSetVMRunCommandArgs =
        com.pulumi.azurenative.compute.VirtualMachineScaleSetVMRunCommandArgs.builder()
            .asyncExecution(asyncExecution?.applyValue({ args0 -> args0 }))
            .errorBlobManagedIdentity(
                errorBlobManagedIdentity?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .errorBlobUri(errorBlobUri?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .outputBlobManagedIdentity(
                outputBlobManagedIdentity?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .outputBlobUri(outputBlobUri?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .protectedParameters(
                protectedParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .runAsPassword(runAsPassword?.applyValue({ args0 -> args0 }))
            .runAsUser(runAsUser?.applyValue({ args0 -> args0 }))
            .runCommandName(runCommandName?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeoutInSeconds(timeoutInSeconds?.applyValue({ args0 -> args0 }))
            .treatFailureAsDeploymentFailure(treatFailureAsDeploymentFailure?.applyValue({ args0 -> args0 }))
            .vmScaleSetName(vmScaleSetName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VirtualMachineScaleSetVMRunCommandArgs].
 */
@PulumiTagMarker
public class VirtualMachineScaleSetVMRunCommandArgsBuilder internal constructor() {
    private var asyncExecution: Output? = null

    private var errorBlobManagedIdentity: Output? = null

    private var errorBlobUri: Output? = null

    private var instanceId: Output? = null

    private var location: Output? = null

    private var outputBlobManagedIdentity: Output? = null

    private var outputBlobUri: Output? = null

    private var parameters: Output>? = null

    private var protectedParameters: Output>? = null

    private var resourceGroupName: Output? = null

    private var runAsPassword: Output? = null

    private var runAsUser: Output? = null

    private var runCommandName: Output? = null

    private var source: Output? = null

    private var tags: Output>? = null

    private var timeoutInSeconds: Output? = null

    private var treatFailureAsDeploymentFailure: Output? = null

    private var vmScaleSetName: Output? = null

    /**
     * @param value Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
     */
    @JvmName("whqetyttfgjlqjbn")
    public suspend fun asyncExecution(`value`: Output) {
        this.asyncExecution = value
    }

    /**
     * @param value User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     */
    @JvmName("weuldaukbsihejse")
    public suspend fun errorBlobManagedIdentity(`value`: Output) {
        this.errorBlobManagedIdentity = value
    }

    /**
     * @param value Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
     */
    @JvmName("vsydjmyqpbxqijnd")
    public suspend fun errorBlobUri(`value`: Output) {
        this.errorBlobUri = value
    }

    /**
     * @param value The instance ID of the virtual machine.
     */
    @JvmName("hrbxkdwixnxtbdve")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value Resource location
     */
    @JvmName("yujgcwcftiuinbdl")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     */
    @JvmName("ycglmbvfhlmqvsav")
    public suspend fun outputBlobManagedIdentity(`value`: Output) {
        this.outputBlobManagedIdentity = value
    }

    /**
     * @param value Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
     */
    @JvmName("tlomhmaotdioelvu")
    public suspend fun outputBlobUri(`value`: Output) {
        this.outputBlobUri = value
    }

    /**
     * @param value The parameters used by the script.
     */
    @JvmName("njrgibaxevuicwua")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values The parameters used by the script.
     */
    @JvmName("lwiubpdtvaktgrst")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value The parameters used by the script.
     */
    @JvmName("oslowbncfrearxmq")
    public suspend fun protectedParameters(`value`: Output>) {
        this.protectedParameters = value
    }

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

    /**
     * @param values The parameters used by the script.
     */
    @JvmName("qjmqychqsdlaffly")
    public suspend fun protectedParameters(values: List>) {
        this.protectedParameters = Output.all(values)
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("cwqctkjyiulgfesq")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Specifies the user account password on the VM when executing the run command.
     */
    @JvmName("laujckhtadmabnwi")
    public suspend fun runAsPassword(`value`: Output) {
        this.runAsPassword = value
    }

    /**
     * @param value Specifies the user account on the VM when executing the run command.
     */
    @JvmName("uveuwbvhkewbposf")
    public suspend fun runAsUser(`value`: Output) {
        this.runAsUser = value
    }

    /**
     * @param value The name of the virtual machine run command.
     */
    @JvmName("odclasuhjqlvkhdu")
    public suspend fun runCommandName(`value`: Output) {
        this.runCommandName = value
    }

    /**
     * @param value The source of the run command script.
     */
    @JvmName("ciwrsdadapdqadxi")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Resource tags
     */
    @JvmName("xbqnydkfwuxmbnnw")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The timeout in seconds to execute the run command.
     */
    @JvmName("xudpjvyggnuguykj")
    public suspend fun timeoutInSeconds(`value`: Output) {
        this.timeoutInSeconds = value
    }

    /**
     * @param value Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results
     */
    @JvmName("wkuiactsocnwnkrj")
    public suspend fun treatFailureAsDeploymentFailure(`value`: Output) {
        this.treatFailureAsDeploymentFailure = value
    }

    /**
     * @param value The name of the VM scale set.
     */
    @JvmName("lvdyknioqrksvvyv")
    public suspend fun vmScaleSetName(`value`: Output) {
        this.vmScaleSetName = value
    }

    /**
     * @param value Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.
     */
    @JvmName("dpcfoxtwjbdunrdk")
    public suspend fun asyncExecution(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.asyncExecution = mapped
    }

    /**
     * @param value User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     */
    @JvmName("yiagjxngfcetdvgc")
    public suspend fun errorBlobManagedIdentity(`value`: RunCommandManagedIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.errorBlobManagedIdentity = mapped
    }

    /**
     * @param argument User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     */
    @JvmName("csrfujxcjpkqfqnj")
    public suspend fun errorBlobManagedIdentity(argument: suspend RunCommandManagedIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = RunCommandManagedIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.errorBlobManagedIdentity = mapped
    }

    /**
     * @param value Specifies the Azure storage blob where script error stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer errorBlobManagedIdentity parameter.
     */
    @JvmName("ptwchdiflyrmwrce")
    public suspend fun errorBlobUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.errorBlobUri = mapped
    }

    /**
     * @param value The instance ID of the virtual machine.
     */
    @JvmName("ulgccfdpudreeoqc")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value Resource location
     */
    @JvmName("rtcuwvhkiknoiyji")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     */
    @JvmName("xvoqtibcwsdyclku")
    public suspend fun outputBlobManagedIdentity(`value`: RunCommandManagedIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputBlobManagedIdentity = mapped
    }

    /**
     * @param argument User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged
     */
    @JvmName("htmrnxxowciwcqtm")
    public suspend fun outputBlobManagedIdentity(argument: suspend RunCommandManagedIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = RunCommandManagedIdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.outputBlobManagedIdentity = mapped
    }

    /**
     * @param value Specifies the Azure storage blob where script output stream will be uploaded. Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. Refer outputBlobManagedIdentity parameter.
     */
    @JvmName("vtybmtdkyklgftaj")
    public suspend fun outputBlobUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputBlobUri = mapped
    }

    /**
     * @param value The parameters used by the script.
     */
    @JvmName("ssghjmooikntjxgk")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument The parameters used by the script.
     */
    @JvmName("uirvcvdoimebnuqu")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RunCommandInputParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument The parameters used by the script.
     */
    @JvmName("wscjikstwnejcvbq")
    public suspend fun parameters(vararg argument: suspend RunCommandInputParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RunCommandInputParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument The parameters used by the script.
     */
    @JvmName("tifwcswwjtojwnfj")
    public suspend fun parameters(argument: suspend RunCommandInputParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RunCommandInputParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values The parameters used by the script.
     */
    @JvmName("egdykjmxacusngih")
    public suspend fun parameters(vararg values: RunCommandInputParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The parameters used by the script.
     */
    @JvmName("xxokjaamsfchraut")
    public suspend fun protectedParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protectedParameters = mapped
    }

    /**
     * @param argument The parameters used by the script.
     */
    @JvmName("tvuwvbyqtcbrbbml")
    public suspend fun protectedParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RunCommandInputParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.protectedParameters = mapped
    }

    /**
     * @param argument The parameters used by the script.
     */
    @JvmName("bvemgurxwappfgbq")
    public suspend fun protectedParameters(vararg argument: suspend RunCommandInputParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RunCommandInputParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.protectedParameters = mapped
    }

    /**
     * @param argument The parameters used by the script.
     */
    @JvmName("orqadithfewtkeml")
    public suspend fun protectedParameters(argument: suspend RunCommandInputParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RunCommandInputParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.protectedParameters = mapped
    }

    /**
     * @param values The parameters used by the script.
     */
    @JvmName("ufvnfbgrktbirdid")
    public suspend fun protectedParameters(vararg values: RunCommandInputParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protectedParameters = mapped
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("rjddnvjcmlgwxoji")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Specifies the user account password on the VM when executing the run command.
     */
    @JvmName("innfvbodxxsjnspl")
    public suspend fun runAsPassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runAsPassword = mapped
    }

    /**
     * @param value Specifies the user account on the VM when executing the run command.
     */
    @JvmName("gjdmwbpnnclyphsp")
    public suspend fun runAsUser(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runAsUser = mapped
    }

    /**
     * @param value The name of the virtual machine run command.
     */
    @JvmName("htjlqmdejmplhqkq")
    public suspend fun runCommandName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runCommandName = mapped
    }

    /**
     * @param value The source of the run command script.
     */
    @JvmName("evtmxjoylwspqvon")
    public suspend fun source(`value`: VirtualMachineRunCommandScriptSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param argument The source of the run command script.
     */
    @JvmName("dllhnemxxdvmjbgi")
    public suspend fun source(argument: suspend VirtualMachineRunCommandScriptSourceArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineRunCommandScriptSourceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.source = mapped
    }

    /**
     * @param value Resource tags
     */
    @JvmName("xppepwrrujygsugi")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags
     */
    @JvmName("smlbhhmwkxpsjhwy")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The timeout in seconds to execute the run command.
     */
    @JvmName("assiinlqaljfmvmv")
    public suspend fun timeoutInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutInSeconds = mapped
    }

    /**
     * @param value Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results
     */
    @JvmName("quolykmsjpkfryxk")
    public suspend fun treatFailureAsDeploymentFailure(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.treatFailureAsDeploymentFailure = mapped
    }

    /**
     * @param value The name of the VM scale set.
     */
    @JvmName("wttahqpetfsvkpih")
    public suspend fun vmScaleSetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vmScaleSetName = mapped
    }

    internal fun build(): VirtualMachineScaleSetVMRunCommandArgs =
        VirtualMachineScaleSetVMRunCommandArgs(
            asyncExecution = asyncExecution,
            errorBlobManagedIdentity = errorBlobManagedIdentity,
            errorBlobUri = errorBlobUri,
            instanceId = instanceId,
            location = location,
            outputBlobManagedIdentity = outputBlobManagedIdentity,
            outputBlobUri = outputBlobUri,
            parameters = parameters,
            protectedParameters = protectedParameters,
            resourceGroupName = resourceGroupName,
            runAsPassword = runAsPassword,
            runAsUser = runAsUser,
            runCommandName = runCommandName,
            source = source,
            tags = tags,
            timeoutInSeconds = timeoutInSeconds,
            treatFailureAsDeploymentFailure = treatFailureAsDeploymentFailure,
            vmScaleSetName = vmScaleSetName,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy