virtual_machine_run_commands
Creates, updates, deletes, gets or lists a virtual_machine_run_commands
resource.
Overview
Name | virtual_machine_run_commands |
Type | Resource |
Id | azure.compute.virtual_machine_run_commands |
Fields
The following fields are returned by SELECT
queries:
- get_by_virtual_machine
- get
- list_by_virtual_machine
- list
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
location | string | Resource location |
properties | object | Describes the properties of a Virtual Machine run command. |
tags | object | Resource tags |
type | string | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | The VM run command id. |
$schema | string | The VM run command schema. |
description | string | The VM run command description. |
label | string | The VM run command label. |
osType | string | The Operating System type. |
parameters | array | The parameters used by the script. |
script | array | The script to be executed. |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
location | string | Resource location |
properties | object | Describes the properties of a Virtual Machine run command. |
tags | object | Resource tags |
type | string | Resource type |
Name | Datatype | Description |
---|---|---|
id | string | The VM run command id. |
$schema | string | The VM run command schema. |
description | string | The VM run command description. |
label | string | The VM run command label. |
osType | string | The Operating System type. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_by_virtual_machine | select | resourceGroupName , vmName , runCommandName , subscriptionId | $expand | The operation to get the run command. |
get | select | location , commandId , subscriptionId | Gets specific run command for a subscription in a location. | |
list_by_virtual_machine | select | resourceGroupName , vmName , subscriptionId | $expand | The operation to get all run commands of a Virtual Machine. |
list | select | location , subscriptionId | Lists all available run commands for a subscription in a location. | |
create_or_update | insert | resourceGroupName , vmName , runCommandName , subscriptionId | The operation to create or update the run command. | |
update | update | resourceGroupName , vmName , runCommandName , subscriptionId | The operation to update the run command. | |
delete | delete | resourceGroupName , vmName , runCommandName , subscriptionId | The operation to delete the run command. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
commandId | string | The command id. |
location | string | The location upon which run commands is queried. |
resourceGroupName | string | The name of the resource group. |
runCommandName | string | The name of the virtual machine run command. |
subscriptionId | string | Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
vmName | string | The name of the virtual machine where the run command should be deleted. |
$expand | string | The expand expression to apply on the operation. |
SELECT
examples
- get_by_virtual_machine
- get
- list_by_virtual_machine
- list
The operation to get the run command.
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.compute.virtual_machine_run_commands
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND vmName = '{{ vmName }}' -- required
AND runCommandName = '{{ runCommandName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;
Gets specific run command for a subscription in a location.
SELECT
id,
$schema,
description,
label,
osType,
parameters,
script
FROM azure.compute.virtual_machine_run_commands
WHERE location = '{{ location }}' -- required
AND commandId = '{{ commandId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
The operation to get all run commands of a Virtual Machine.
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.compute.virtual_machine_run_commands
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND vmName = '{{ vmName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;
Lists all available run commands for a subscription in a location.
SELECT
id,
$schema,
description,
label,
osType
FROM azure.compute.virtual_machine_run_commands
WHERE location = '{{ location }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
The operation to create or update the run command.
INSERT INTO azure.compute.virtual_machine_run_commands (
data__properties,
data__location,
data__tags,
resourceGroupName,
vmName,
runCommandName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ vmName }}',
'{{ runCommandName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: virtual_machine_run_commands
props:
- name: resourceGroupName
value: string
description: Required parameter for the virtual_machine_run_commands resource.
- name: vmName
value: string
description: Required parameter for the virtual_machine_run_commands resource.
- name: runCommandName
value: string
description: Required parameter for the virtual_machine_run_commands resource.
- name: subscriptionId
value: string
description: Required parameter for the virtual_machine_run_commands resource.
- name: properties
value: object
description: |
Describes the properties of a Virtual Machine run command.
- name: location
value: string
description: |
Resource location
- name: tags
value: object
description: |
Resource tags
UPDATE
examples
- update
The operation to update the run command.
UPDATE azure.compute.virtual_machine_run_commands
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND vmName = '{{ vmName }}' --required
AND runCommandName = '{{ runCommandName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
tags,
type;
DELETE
examples
- delete
The operation to delete the run command.
DELETE FROM azure.compute.virtual_machine_run_commands
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND vmName = '{{ vmName }}' --required
AND runCommandName = '{{ runCommandName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;