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
- vw_virtual_machine_run_commands
- virtual_machine_run_commands
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | string | Resource name |
async_execution | text | field from the properties object |
error_blob_managed_identity | text | field from the properties object |
error_blob_uri | text | field from the properties object |
instance_view | text | field from the properties object |
location | string | Resource location |
output_blob_managed_identity | text | field from the properties object |
output_blob_uri | text | field from the properties object |
parameters | text | field from the properties object |
protected_parameters | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
runCommandName | text | field from the properties object |
run_as_password | text | field from the properties object |
run_as_user | text | field from the properties object |
source | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | object | Resource tags |
timeout_in_seconds | text | field from the properties object |
treat_failure_as_deployment_failure | text | field from the properties object |
type | string | Resource type |
vmName | text | field from the properties object |
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 |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | commandId, location, subscriptionId | Gets specific run command for a subscription in a location. |
get_by_virtual_machine | SELECT | resourceGroupName, runCommandName, subscriptionId, vmName | The operation to get the run command. |
list | SELECT | location, subscriptionId | Lists all available run commands for a subscription in a location. |
list_by_virtual_machine | SELECT | resourceGroupName, subscriptionId, vmName | The operation to get all run commands of a Virtual Machine. |
create_or_update | INSERT | resourceGroupName, runCommandName, subscriptionId, vmName | The operation to create or update the run command. |
delete | DELETE | resourceGroupName, runCommandName, subscriptionId, vmName | The operation to delete the run command. |
update | UPDATE | resourceGroupName, runCommandName, subscriptionId, vmName | The operation to update the run command. |
SELECT
examples
Lists all available run commands for a subscription in a location.
- vw_virtual_machine_run_commands
- virtual_machine_run_commands
SELECT
id,
name,
async_execution,
error_blob_managed_identity,
error_blob_uri,
instance_view,
location,
output_blob_managed_identity,
output_blob_uri,
parameters,
protected_parameters,
provisioning_state,
resourceGroupName,
runCommandName,
run_as_password,
run_as_user,
source,
subscriptionId,
tags,
timeout_in_seconds,
treat_failure_as_deployment_failure,
type,
vmName
FROM azure.compute.vw_virtual_machine_run_commands
WHERE location = '{{ location }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.compute.virtual_machine_run_commands
WHERE location = '{{ location }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new virtual_machine_run_commands
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.compute.virtual_machine_run_commands (
resourceGroupName,
runCommandName,
subscriptionId,
vmName,
properties,
location,
tags
)
SELECT
'{{ resourceGroupName }}',
'{{ runCommandName }}',
'{{ subscriptionId }}',
'{{ vmName }}',
'{{ properties }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: source
value:
- name: script
value: string
- name: scriptUri
value: string
- name: commandId
value: string
- name: scriptUriManagedIdentity
value:
- name: clientId
value: string
- name: objectId
value: string
- name: parameters
value:
- - name: name
value: string
- name: value
value: string
- name: protectedParameters
value:
- - name: name
value: string
- name: value
value: string
- name: asyncExecution
value: boolean
- name: runAsUser
value: string
- name: runAsPassword
value: string
- name: timeoutInSeconds
value: integer
- name: outputBlobUri
value: string
- name: errorBlobUri
value: string
- name: provisioningState
value: string
- name: instanceView
value:
- name: executionState
value: string
- name: executionMessage
value: string
- name: exitCode
value: integer
- name: output
value: string
- name: error
value: string
- name: startTime
value: string
- name: endTime
value: string
- name: statuses
value:
- - name: code
value: string
- name: level
value: string
- name: displayStatus
value: string
- name: message
value: string
- name: time
value: string
- name: treatFailureAsDeploymentFailure
value: boolean
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
UPDATE
example
Updates a virtual_machine_run_commands
resource.
/*+ update */
UPDATE azure.compute.virtual_machine_run_commands
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND runCommandName = '{{ runCommandName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vmName = '{{ vmName }}';
DELETE
example
Deletes the specified virtual_machine_run_commands
resource.
/*+ delete */
DELETE FROM azure.compute.virtual_machine_run_commands
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND runCommandName = '{{ runCommandName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vmName = '{{ vmName }}';