VirtualMachineScaleSetVMRunCommandArgs

data class VirtualMachineScaleSetVMRunCommandArgs(val asyncExecution: Output<Boolean>? = null, val errorBlobUri: Output<String>? = null, val instanceId: Output<String>? = null, val location: Output<String>? = null, val outputBlobUri: Output<String>? = null, val parameters: Output<List<RunCommandInputParameterArgs>>? = null, val protectedParameters: Output<List<RunCommandInputParameterArgs>>? = null, val resourceGroupName: Output<String>? = null, val runAsPassword: Output<String>? = null, val runAsUser: Output<String>? = null, val runCommandName: Output<String>? = null, val source: Output<VirtualMachineRunCommandScriptSourceArgs>? = null, val tags: Output<Map<String, String>>? = null, val timeoutInSeconds: Output<Int>? = null, val vmScaleSetName: Output<String>? = null) : ConvertibleToJava<VirtualMachineScaleSetVMRunCommandArgs>

Describes a Virtual Machine run command. API Version: 2021-03-01.

Example Usage

Create VirtualMachineScaleSet VM run command.

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,
InstanceId = "0",
Location = "West US",
Parameters = new[]
{
new AzureNative.Compute.Inputs.RunCommandInputParameterArgs
{
Name = "param1",
Value = "value1",
},
new AzureNative.Compute.Inputs.RunCommandInputParameterArgs
{
Name = "param2",
Value = "value2",
},
},
ResourceGroupName = "myResourceGroup",
RunAsPassword = "<runAsPassword>",
RunAsUser = "user1",
RunCommandName = "myRunCommand",
Source = new AzureNative.Compute.Inputs.VirtualMachineRunCommandScriptSourceArgs
{
Script = "Write-Host Hello World!",
},
TimeoutInSeconds = 3600,
VmScaleSetName = "myvmScaleSet",
});
});
package main
import (
compute "github.com/pulumi/pulumi-azure-native-sdk/compute"
"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),
InstanceId: pulumi.String("0"),
Location: pulumi.String("West US"),
Parameters: []compute.RunCommandInputParameterArgs{
{
Name: pulumi.String("param1"),
Value: pulumi.String("value1"),
},
{
Name: pulumi.String("param2"),
Value: pulumi.String("value2"),
},
},
ResourceGroupName: pulumi.String("myResourceGroup"),
RunAsPassword: pulumi.String("<runAsPassword>"),
RunAsUser: pulumi.String("user1"),
RunCommandName: pulumi.String("myRunCommand"),
Source: &compute.VirtualMachineRunCommandScriptSourceArgs{
Script: pulumi.String("Write-Host Hello World!"),
},
TimeoutInSeconds: pulumi.Int(3600),
VmScaleSetName: pulumi.String("myvmScaleSet"),
})
if err != nil {
return err
}
return nil
})
}
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 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)
.instanceId("0")
.location("West US")
.parameters(
Map.ofEntries(
Map.entry("name", "param1"),
Map.entry("value", "value1")
),
Map.ofEntries(
Map.entry("name", "param2"),
Map.entry("value", "value2")
))
.resourceGroupName("myResourceGroup")
.runAsPassword("<runAsPassword>")
.runAsUser("user1")
.runCommandName("myRunCommand")
.source(Map.of("script", "Write-Host Hello World!"))
.timeoutInSeconds(3600)
.vmScaleSetName("myvmScaleSet")
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:compute:VirtualMachineScaleSetVMRunCommand myRunCommand /subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/runCommands/myRunCommand

Constructors

Link copied to clipboard
constructor(asyncExecution: Output<Boolean>? = null, errorBlobUri: Output<String>? = null, instanceId: Output<String>? = null, location: Output<String>? = null, outputBlobUri: Output<String>? = null, parameters: Output<List<RunCommandInputParameterArgs>>? = null, protectedParameters: Output<List<RunCommandInputParameterArgs>>? = null, resourceGroupName: Output<String>? = null, runAsPassword: Output<String>? = null, runAsUser: Output<String>? = null, runCommandName: Output<String>? = null, source: Output<VirtualMachineRunCommandScriptSourceArgs>? = null, tags: Output<Map<String, String>>? = null, timeoutInSeconds: Output<Int>? = null, vmScaleSetName: Output<String>? = null)

Properties

Link copied to clipboard
val asyncExecution: Output<Boolean>? = null

Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.

Link copied to clipboard
val errorBlobUri: Output<String>? = null

Specifies the Azure storage blob where script error stream will be uploaded.

Link copied to clipboard
val instanceId: Output<String>? = null

The instance ID of the virtual machine.

Link copied to clipboard
val location: Output<String>? = null

Resource location

Link copied to clipboard
val outputBlobUri: Output<String>? = null

Specifies the Azure storage blob where script output stream will be uploaded.

Link copied to clipboard

The parameters used by the script.

Link copied to clipboard

The parameters used by the script.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group.

Link copied to clipboard
val runAsPassword: Output<String>? = null

Specifies the user account password on the VM when executing the run command.

Link copied to clipboard
val runAsUser: Output<String>? = null

Specifies the user account on the VM when executing the run command.

Link copied to clipboard
val runCommandName: Output<String>? = null

The name of the virtual machine run command.

Link copied to clipboard

The source of the run command script.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags

Link copied to clipboard
val timeoutInSeconds: Output<Int>? = null

The timeout in seconds to execute the run command.

Link copied to clipboard
val vmScaleSetName: Output<String>? = null

The name of the VM scale set.

Functions

Link copied to clipboard
open override fun toJava(): VirtualMachineScaleSetVMRunCommandArgs