azure-native.hybridcompute.MachineRunCommand
Explore with Pulumi AI
Describes a Run Command Azure REST API version: 2023-10-03-preview.
Other available API versions: 2024-03-31-preview, 2024-05-20-preview, 2024-07-31-preview, 2024-09-10-preview.
Example Usage
Create or Update a Run Command
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var machineRunCommand = new AzureNative.HybridCompute.MachineRunCommand("machineRunCommand", new()
{
AsyncExecution = false,
ErrorBlobUri = "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt",
Location = "eastus2",
MachineName = "myMachine",
OutputBlobUri = "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt",
Parameters = new[]
{
new AzureNative.HybridCompute.Inputs.RunCommandInputParameterArgs
{
Name = "param1",
Value = "value1",
},
new AzureNative.HybridCompute.Inputs.RunCommandInputParameterArgs
{
Name = "param2",
Value = "value2",
},
},
ResourceGroupName = "myResourceGroup",
RunAsPassword = "<runAsPassword>",
RunAsUser = "user1",
RunCommandName = "myRunCommand",
Source = new AzureNative.HybridCompute.Inputs.MachineRunCommandScriptSourceArgs
{
Script = "Write-Host Hello World!",
},
TimeoutInSeconds = 3600,
});
});
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.NewMachineRunCommand(ctx, "machineRunCommand", &hybridcompute.MachineRunCommandArgs{
AsyncExecution: pulumi.Bool(false),
ErrorBlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt"),
Location: pulumi.String("eastus2"),
MachineName: pulumi.String("myMachine"),
OutputBlobUri: pulumi.String("https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt"),
Parameters: hybridcompute.RunCommandInputParameterArray{
&hybridcompute.RunCommandInputParameterArgs{
Name: pulumi.String("param1"),
Value: pulumi.String("value1"),
},
&hybridcompute.RunCommandInputParameterArgs{
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: &hybridcompute.MachineRunCommandScriptSourceArgs{
Script: pulumi.String("Write-Host Hello World!"),
},
TimeoutInSeconds: pulumi.Int(3600),
})
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.hybridcompute.MachineRunCommand;
import com.pulumi.azurenative.hybridcompute.MachineRunCommandArgs;
import com.pulumi.azurenative.hybridcompute.inputs.RunCommandInputParameterArgs;
import com.pulumi.azurenative.hybridcompute.inputs.MachineRunCommandScriptSourceArgs;
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 machineRunCommand = new MachineRunCommand("machineRunCommand", MachineRunCommandArgs.builder()
.asyncExecution(false)
.errorBlobUri("https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt")
.location("eastus2")
.machineName("myMachine")
.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("<runAsPassword>")
.runAsUser("user1")
.runCommandName("myRunCommand")
.source(MachineRunCommandScriptSourceArgs.builder()
.script("Write-Host Hello World!")
.build())
.timeoutInSeconds(3600)
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
machine_run_command = azure_native.hybridcompute.MachineRunCommand("machineRunCommand",
async_execution=False,
error_blob_uri="https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt",
location="eastus2",
machine_name="myMachine",
output_blob_uri="https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt",
parameters=[
{
"name": "param1",
"value": "value1",
},
{
"name": "param2",
"value": "value2",
},
],
resource_group_name="myResourceGroup",
run_as_password="<runAsPassword>",
run_as_user="user1",
run_command_name="myRunCommand",
source={
"script": "Write-Host Hello World!",
},
timeout_in_seconds=3600)
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const machineRunCommand = new azure_native.hybridcompute.MachineRunCommand("machineRunCommand", {
asyncExecution: false,
errorBlobUri: "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt",
location: "eastus2",
machineName: "myMachine",
outputBlobUri: "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt",
parameters: [
{
name: "param1",
value: "value1",
},
{
name: "param2",
value: "value2",
},
],
resourceGroupName: "myResourceGroup",
runAsPassword: "<runAsPassword>",
runAsUser: "user1",
runCommandName: "myRunCommand",
source: {
script: "Write-Host Hello World!",
},
timeoutInSeconds: 3600,
});
resources:
machineRunCommand:
type: azure-native:hybridcompute:MachineRunCommand
properties:
asyncExecution: false
errorBlobUri: https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt
location: eastus2
machineName: myMachine
outputBlobUri: https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt
parameters:
- name: param1
value: value1
- name: param2
value: value2
resourceGroupName: myResourceGroup
runAsPassword: <runAsPassword>
runAsUser: user1
runCommandName: myRunCommand
source:
script: Write-Host Hello World!
timeoutInSeconds: 3600
Create MachineRunCommand Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MachineRunCommand(name: string, args: MachineRunCommandArgs, opts?: CustomResourceOptions);
@overload
def MachineRunCommand(resource_name: str,
args: MachineRunCommandArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MachineRunCommand(resource_name: str,
opts: Optional[ResourceOptions] = None,
machine_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
protected_parameters: Optional[Sequence[RunCommandInputParameterArgs]] = None,
error_blob_managed_identity: Optional[RunCommandManagedIdentityArgs] = None,
error_blob_uri: Optional[str] = None,
output_blob_managed_identity: Optional[RunCommandManagedIdentityArgs] = None,
output_blob_uri: Optional[str] = None,
parameters: Optional[Sequence[RunCommandInputParameterArgs]] = None,
async_execution: Optional[bool] = None,
location: Optional[str] = None,
run_as_password: Optional[str] = None,
run_as_user: Optional[str] = None,
run_command_name: Optional[str] = None,
source: Optional[MachineRunCommandScriptSourceArgs] = None,
tags: Optional[Mapping[str, str]] = None,
timeout_in_seconds: Optional[int] = None)
func NewMachineRunCommand(ctx *Context, name string, args MachineRunCommandArgs, opts ...ResourceOption) (*MachineRunCommand, error)
public MachineRunCommand(string name, MachineRunCommandArgs args, CustomResourceOptions? opts = null)
public MachineRunCommand(String name, MachineRunCommandArgs args)
public MachineRunCommand(String name, MachineRunCommandArgs args, CustomResourceOptions options)
type: azure-native:hybridcompute:MachineRunCommand
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MachineRunCommandArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MachineRunCommandArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MachineRunCommandArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MachineRunCommandArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MachineRunCommandArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var machineRunCommandResource = new AzureNative.HybridCompute.MachineRunCommand("machineRunCommandResource", new()
{
MachineName = "string",
ResourceGroupName = "string",
ProtectedParameters = new[]
{
new AzureNative.HybridCompute.Inputs.RunCommandInputParameterArgs
{
Name = "string",
Value = "string",
},
},
ErrorBlobManagedIdentity = new AzureNative.HybridCompute.Inputs.RunCommandManagedIdentityArgs
{
ClientId = "string",
ObjectId = "string",
},
ErrorBlobUri = "string",
OutputBlobManagedIdentity = new AzureNative.HybridCompute.Inputs.RunCommandManagedIdentityArgs
{
ClientId = "string",
ObjectId = "string",
},
OutputBlobUri = "string",
Parameters = new[]
{
new AzureNative.HybridCompute.Inputs.RunCommandInputParameterArgs
{
Name = "string",
Value = "string",
},
},
AsyncExecution = false,
Location = "string",
RunAsPassword = "string",
RunAsUser = "string",
RunCommandName = "string",
Source = new AzureNative.HybridCompute.Inputs.MachineRunCommandScriptSourceArgs
{
CommandId = "string",
Script = "string",
ScriptUri = "string",
ScriptUriManagedIdentity = new AzureNative.HybridCompute.Inputs.RunCommandManagedIdentityArgs
{
ClientId = "string",
ObjectId = "string",
},
},
Tags =
{
{ "string", "string" },
},
TimeoutInSeconds = 0,
});
example, err := hybridcompute.NewMachineRunCommand(ctx, "machineRunCommandResource", &hybridcompute.MachineRunCommandArgs{
MachineName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
ProtectedParameters: hybridcompute.RunCommandInputParameterArray{
&hybridcompute.RunCommandInputParameterArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
ErrorBlobManagedIdentity: &hybridcompute.RunCommandManagedIdentityArgs{
ClientId: pulumi.String("string"),
ObjectId: pulumi.String("string"),
},
ErrorBlobUri: pulumi.String("string"),
OutputBlobManagedIdentity: &hybridcompute.RunCommandManagedIdentityArgs{
ClientId: pulumi.String("string"),
ObjectId: pulumi.String("string"),
},
OutputBlobUri: pulumi.String("string"),
Parameters: hybridcompute.RunCommandInputParameterArray{
&hybridcompute.RunCommandInputParameterArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
AsyncExecution: pulumi.Bool(false),
Location: pulumi.String("string"),
RunAsPassword: pulumi.String("string"),
RunAsUser: pulumi.String("string"),
RunCommandName: pulumi.String("string"),
Source: &hybridcompute.MachineRunCommandScriptSourceArgs{
CommandId: pulumi.String("string"),
Script: pulumi.String("string"),
ScriptUri: pulumi.String("string"),
ScriptUriManagedIdentity: &hybridcompute.RunCommandManagedIdentityArgs{
ClientId: pulumi.String("string"),
ObjectId: pulumi.String("string"),
},
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TimeoutInSeconds: pulumi.Int(0),
})
var machineRunCommandResource = new MachineRunCommand("machineRunCommandResource", MachineRunCommandArgs.builder()
.machineName("string")
.resourceGroupName("string")
.protectedParameters(RunCommandInputParameterArgs.builder()
.name("string")
.value("string")
.build())
.errorBlobManagedIdentity(RunCommandManagedIdentityArgs.builder()
.clientId("string")
.objectId("string")
.build())
.errorBlobUri("string")
.outputBlobManagedIdentity(RunCommandManagedIdentityArgs.builder()
.clientId("string")
.objectId("string")
.build())
.outputBlobUri("string")
.parameters(RunCommandInputParameterArgs.builder()
.name("string")
.value("string")
.build())
.asyncExecution(false)
.location("string")
.runAsPassword("string")
.runAsUser("string")
.runCommandName("string")
.source(MachineRunCommandScriptSourceArgs.builder()
.commandId("string")
.script("string")
.scriptUri("string")
.scriptUriManagedIdentity(RunCommandManagedIdentityArgs.builder()
.clientId("string")
.objectId("string")
.build())
.build())
.tags(Map.of("string", "string"))
.timeoutInSeconds(0)
.build());
machine_run_command_resource = azure_native.hybridcompute.MachineRunCommand("machineRunCommandResource",
machine_name="string",
resource_group_name="string",
protected_parameters=[{
"name": "string",
"value": "string",
}],
error_blob_managed_identity={
"client_id": "string",
"object_id": "string",
},
error_blob_uri="string",
output_blob_managed_identity={
"client_id": "string",
"object_id": "string",
},
output_blob_uri="string",
parameters=[{
"name": "string",
"value": "string",
}],
async_execution=False,
location="string",
run_as_password="string",
run_as_user="string",
run_command_name="string",
source={
"command_id": "string",
"script": "string",
"script_uri": "string",
"script_uri_managed_identity": {
"client_id": "string",
"object_id": "string",
},
},
tags={
"string": "string",
},
timeout_in_seconds=0)
const machineRunCommandResource = new azure_native.hybridcompute.MachineRunCommand("machineRunCommandResource", {
machineName: "string",
resourceGroupName: "string",
protectedParameters: [{
name: "string",
value: "string",
}],
errorBlobManagedIdentity: {
clientId: "string",
objectId: "string",
},
errorBlobUri: "string",
outputBlobManagedIdentity: {
clientId: "string",
objectId: "string",
},
outputBlobUri: "string",
parameters: [{
name: "string",
value: "string",
}],
asyncExecution: false,
location: "string",
runAsPassword: "string",
runAsUser: "string",
runCommandName: "string",
source: {
commandId: "string",
script: "string",
scriptUri: "string",
scriptUriManagedIdentity: {
clientId: "string",
objectId: "string",
},
},
tags: {
string: "string",
},
timeoutInSeconds: 0,
});
type: azure-native:hybridcompute:MachineRunCommand
properties:
asyncExecution: false
errorBlobManagedIdentity:
clientId: string
objectId: string
errorBlobUri: string
location: string
machineName: string
outputBlobManagedIdentity:
clientId: string
objectId: string
outputBlobUri: string
parameters:
- name: string
value: string
protectedParameters:
- name: string
value: string
resourceGroupName: string
runAsPassword: string
runAsUser: string
runCommandName: string
source:
commandId: string
script: string
scriptUri: string
scriptUriManagedIdentity:
clientId: string
objectId: string
tags:
string: string
timeoutInSeconds: 0
MachineRunCommand Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MachineRunCommand resource accepts the following input properties:
- Machine
Name string - The name of the hybrid machine.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Async
Execution bool - Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
- Error
Blob Pulumi.Managed Identity Azure Native. Hybrid Compute. Inputs. Run Command Managed Identity - 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
- Error
Blob stringUri - 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.
- Location string
- The geo-location where the resource lives
- Output
Blob Pulumi.Managed Identity Azure Native. Hybrid Compute. Inputs. Run Command Managed Identity - 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
- Output
Blob stringUri - 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.
- Parameters
List<Pulumi.
Azure Native. Hybrid Compute. Inputs. Run Command Input Parameter> - The parameters used by the script.
- Protected
Parameters List<Pulumi.Azure Native. Hybrid Compute. Inputs. Run Command Input Parameter> - The parameters used by the script.
- Run
As stringPassword - Specifies the user account password on the machine when executing the run command.
- Run
As stringUser - Specifies the user account on the machine when executing the run command.
- Run
Command stringName - The name of the run command.
- Source
Pulumi.
Azure Native. Hybrid Compute. Inputs. Machine Run Command Script Source - The source of the run command script.
- Dictionary<string, string>
- Resource tags.
- Timeout
In intSeconds - The timeout in seconds to execute the run command.
- Machine
Name string - The name of the hybrid machine.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Async
Execution bool - Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
- Error
Blob RunManaged Identity Command Managed Identity Args - 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
- Error
Blob stringUri - 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.
- Location string
- The geo-location where the resource lives
- Output
Blob RunManaged Identity Command Managed Identity Args - 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
- Output
Blob stringUri - 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.
- Parameters
[]Run
Command Input Parameter Args - The parameters used by the script.
- Protected
Parameters []RunCommand Input Parameter Args - The parameters used by the script.
- Run
As stringPassword - Specifies the user account password on the machine when executing the run command.
- Run
As stringUser - Specifies the user account on the machine when executing the run command.
- Run
Command stringName - The name of the run command.
- Source
Machine
Run Command Script Source Args - The source of the run command script.
- map[string]string
- Resource tags.
- Timeout
In intSeconds - The timeout in seconds to execute the run command.
- machine
Name String - The name of the hybrid machine.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- async
Execution Boolean - Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
- error
Blob RunManaged Identity Command Managed Identity - 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
- error
Blob StringUri - 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.
- location String
- The geo-location where the resource lives
- output
Blob RunManaged Identity Command Managed Identity - 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
- output
Blob StringUri - 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.
- parameters
List<Run
Command Input Parameter> - The parameters used by the script.
- protected
Parameters List<RunCommand Input Parameter> - The parameters used by the script.
- run
As StringPassword - Specifies the user account password on the machine when executing the run command.
- run
As StringUser - Specifies the user account on the machine when executing the run command.
- run
Command StringName - The name of the run command.
- source
Machine
Run Command Script Source - The source of the run command script.
- Map<String,String>
- Resource tags.
- timeout
In IntegerSeconds - The timeout in seconds to execute the run command.
- machine
Name string - The name of the hybrid machine.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- async
Execution boolean - Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
- error
Blob RunManaged Identity Command Managed Identity - 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
- error
Blob stringUri - 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.
- location string
- The geo-location where the resource lives
- output
Blob RunManaged Identity Command Managed Identity - 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
- output
Blob stringUri - 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.
- parameters
Run
Command Input Parameter[] - The parameters used by the script.
- protected
Parameters RunCommand Input Parameter[] - The parameters used by the script.
- run
As stringPassword - Specifies the user account password on the machine when executing the run command.
- run
As stringUser - Specifies the user account on the machine when executing the run command.
- run
Command stringName - The name of the run command.
- source
Machine
Run Command Script Source - The source of the run command script.
- {[key: string]: string}
- Resource tags.
- timeout
In numberSeconds - The timeout in seconds to execute the run command.
- machine_
name str - The name of the hybrid machine.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- async_
execution bool - Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
- error_
blob_ Runmanaged_ identity Command Managed Identity Args - 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
- error_
blob_ struri - 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.
- location str
- The geo-location where the resource lives
- output_
blob_ Runmanaged_ identity Command Managed Identity Args - 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
- output_
blob_ struri - 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.
- parameters
Sequence[Run
Command Input Parameter Args] - The parameters used by the script.
- protected_
parameters Sequence[RunCommand Input Parameter Args] - The parameters used by the script.
- run_
as_ strpassword - Specifies the user account password on the machine when executing the run command.
- run_
as_ struser - Specifies the user account on the machine when executing the run command.
- run_
command_ strname - The name of the run command.
- source
Machine
Run Command Script Source Args - The source of the run command script.
- Mapping[str, str]
- Resource tags.
- timeout_
in_ intseconds - The timeout in seconds to execute the run command.
- machine
Name String - The name of the hybrid machine.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- async
Execution Boolean - Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete.
- error
Blob Property MapManaged Identity - 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
- error
Blob StringUri - 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.
- location String
- The geo-location where the resource lives
- output
Blob Property MapManaged Identity - 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
- output
Blob StringUri - 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.
- parameters List<Property Map>
- The parameters used by the script.
- protected
Parameters List<Property Map> - The parameters used by the script.
- run
As StringPassword - Specifies the user account password on the machine when executing the run command.
- run
As StringUser - Specifies the user account on the machine when executing the run command.
- run
Command StringName - The name of the run command.
- source Property Map
- The source of the run command script.
- Map<String>
- Resource tags.
- timeout
In NumberSeconds - The timeout in seconds to execute the run command.
Outputs
All input properties are implicitly available as output properties. Additionally, the MachineRunCommand resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
View Pulumi.Azure Native. Hybrid Compute. Outputs. Machine Run Command Instance View Response - The machine run command instance view.
- Name string
- The name of the resource
- Provisioning
State string - The provisioning state, which only appears in the response.
- System
Data Pulumi.Azure Native. Hybrid Compute. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
View MachineRun Command Instance View Response - The machine run command instance view.
- Name string
- The name of the resource
- Provisioning
State string - The provisioning state, which only appears in the response.
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- instance
View MachineRun Command Instance View Response - The machine run command instance view.
- name String
- The name of the resource
- provisioning
State String - The provisioning state, which only appears in the response.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id string
- The provider-assigned unique ID for this managed resource.
- instance
View MachineRun Command Instance View Response - The machine run command instance view.
- name string
- The name of the resource
- provisioning
State string - The provisioning state, which only appears in the response.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
view MachineRun Command Instance View Response - The machine run command instance view.
- name str
- The name of the resource
- provisioning_
state str - The provisioning state, which only appears in the response.
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- id String
- The provider-assigned unique ID for this managed resource.
- instance
View Property Map - The machine run command instance view.
- name String
- The name of the resource
- provisioning
State String - The provisioning state, which only appears in the response.
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
ExtensionsResourceStatusResponse, ExtensionsResourceStatusResponseArgs
- Code string
- The status code.
- Display
Status string - The short localizable label for the status.
- Level string
- The level code.
- Message string
- The detailed status message, including for alerts and error messages.
- Time string
- The time of the status.
- Code string
- The status code.
- Display
Status string - The short localizable label for the status.
- Level string
- The level code.
- Message string
- The detailed status message, including for alerts and error messages.
- Time string
- The time of the status.
- code String
- The status code.
- display
Status String - The short localizable label for the status.
- level String
- The level code.
- message String
- The detailed status message, including for alerts and error messages.
- time String
- The time of the status.
- code string
- The status code.
- display
Status string - The short localizable label for the status.
- level string
- The level code.
- message string
- The detailed status message, including for alerts and error messages.
- time string
- The time of the status.
- code str
- The status code.
- display_
status str - The short localizable label for the status.
- level str
- The level code.
- message str
- The detailed status message, including for alerts and error messages.
- time str
- The time of the status.
- code String
- The status code.
- display
Status String - The short localizable label for the status.
- level String
- The level code.
- message String
- The detailed status message, including for alerts and error messages.
- time String
- The time of the status.
MachineRunCommandInstanceViewResponse, MachineRunCommandInstanceViewResponseArgs
- End
Time string - Script end time.
- Error string
- Script error stream.
- Execution
Message string - Communicate script configuration errors or execution messages.
- Execution
State string - Script execution status.
- Exit
Code int - Exit code returned from script execution.
- Output string
- Script output stream.
- Start
Time string - Script start time.
- Statuses
List<Pulumi.
Azure Native. Hybrid Compute. Inputs. Extensions Resource Status Response> - The status information.
- End
Time string - Script end time.
- Error string
- Script error stream.
- Execution
Message string - Communicate script configuration errors or execution messages.
- Execution
State string - Script execution status.
- Exit
Code int - Exit code returned from script execution.
- Output string
- Script output stream.
- Start
Time string - Script start time.
- Statuses
[]Extensions
Resource Status Response - The status information.
- end
Time String - Script end time.
- error String
- Script error stream.
- execution
Message String - Communicate script configuration errors or execution messages.
- execution
State String - Script execution status.
- exit
Code Integer - Exit code returned from script execution.
- output String
- Script output stream.
- start
Time String - Script start time.
- statuses
List<Extensions
Resource Status Response> - The status information.
- end
Time string - Script end time.
- error string
- Script error stream.
- execution
Message string - Communicate script configuration errors or execution messages.
- execution
State string - Script execution status.
- exit
Code number - Exit code returned from script execution.
- output string
- Script output stream.
- start
Time string - Script start time.
- statuses
Extensions
Resource Status Response[] - The status information.
- end_
time str - Script end time.
- error str
- Script error stream.
- execution_
message str - Communicate script configuration errors or execution messages.
- execution_
state str - Script execution status.
- exit_
code int - Exit code returned from script execution.
- output str
- Script output stream.
- start_
time str - Script start time.
- statuses
Sequence[Extensions
Resource Status Response] - The status information.
- end
Time String - Script end time.
- error String
- Script error stream.
- execution
Message String - Communicate script configuration errors or execution messages.
- execution
State String - Script execution status.
- exit
Code Number - Exit code returned from script execution.
- output String
- Script output stream.
- start
Time String - Script start time.
- statuses List<Property Map>
- The status information.
MachineRunCommandScriptSource, MachineRunCommandScriptSourceArgs
- Command
Id string - Specifies the commandId of predefined built-in script.
- Script string
- Specifies the script content to be executed on the machine.
- Script
Uri string - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- Script
Uri Pulumi.Managed Identity Azure Native. Hybrid Compute. Inputs. Run Command Managed Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- Command
Id string - Specifies the commandId of predefined built-in script.
- Script string
- Specifies the script content to be executed on the machine.
- Script
Uri string - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- Script
Uri RunManaged Identity Command Managed Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command
Id String - Specifies the commandId of predefined built-in script.
- script String
- Specifies the script content to be executed on the machine.
- script
Uri String - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script
Uri RunManaged Identity Command Managed Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command
Id string - Specifies the commandId of predefined built-in script.
- script string
- Specifies the script content to be executed on the machine.
- script
Uri string - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script
Uri RunManaged Identity Command Managed Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command_
id str - Specifies the commandId of predefined built-in script.
- script str
- Specifies the script content to be executed on the machine.
- script_
uri str - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script_
uri_ Runmanaged_ identity Command Managed Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command
Id String - Specifies the commandId of predefined built-in script.
- script String
- Specifies the script content to be executed on the machine.
- script
Uri String - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script
Uri Property MapManaged Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
MachineRunCommandScriptSourceResponse, MachineRunCommandScriptSourceResponseArgs
- Command
Id string - Specifies the commandId of predefined built-in script.
- Script string
- Specifies the script content to be executed on the machine.
- Script
Uri string - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- Script
Uri Pulumi.Managed Identity Azure Native. Hybrid Compute. Inputs. Run Command Managed Identity Response - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- Command
Id string - Specifies the commandId of predefined built-in script.
- Script string
- Specifies the script content to be executed on the machine.
- Script
Uri string - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- Script
Uri RunManaged Identity Command Managed Identity Response - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command
Id String - Specifies the commandId of predefined built-in script.
- script String
- Specifies the script content to be executed on the machine.
- script
Uri String - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script
Uri RunManaged Identity Command Managed Identity Response - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command
Id string - Specifies the commandId of predefined built-in script.
- script string
- Specifies the script content to be executed on the machine.
- script
Uri string - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script
Uri RunManaged Identity Command Managed Identity Response - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command_
id str - Specifies the commandId of predefined built-in script.
- script str
- Specifies the script content to be executed on the machine.
- script_
uri str - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script_
uri_ Runmanaged_ identity Command Managed Identity Response - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
- command
Id String - Specifies the commandId of predefined built-in script.
- script String
- Specifies the script content to be executed on the machine.
- script
Uri String - Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- script
Uri Property MapManaged Identity - User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' 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.
RunCommandInputParameter, RunCommandInputParameterArgs
RunCommandInputParameterResponse, RunCommandInputParameterResponseArgs
RunCommandManagedIdentity, RunCommandManagedIdentityArgs
RunCommandManagedIdentityResponse, RunCommandManagedIdentityResponseArgs
SystemDataResponse, SystemDataResponseArgs
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:hybridcompute:MachineRunCommand myRunCommand /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}/runCommands/{runCommandName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0