Skip to main content

virtual_machine_schedules

Creates, updates, deletes, gets or lists a virtual_machine_schedules resource.

Overview

Namevirtual_machine_schedules
TypeResource
Idazure.dev_test_labs.virtual_machine_schedules

Fields

NameDatatypeDescription
idtextThe identifier of the resource.
nametextThe name of the resource.
created_datetextfield from the properties object
daily_recurrencetextfield from the properties object
hourly_recurrencetextfield from the properties object
labNametextfield from the properties object
locationtextThe location of the resource.
notification_settingstextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextThe tags of the resource.
target_resource_idtextfield from the properties object
task_typetextfield from the properties object
time_zone_idtextfield from the properties object
typetextThe type of the resource.
unique_identifiertextfield from the properties object
virtualMachineNametextfield from the properties object
weekly_recurrencetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, name, resourceGroupName, subscriptionId, virtualMachineNameGet schedule.
listSELECTlabName, resourceGroupName, subscriptionId, virtualMachineNameList schedules in a given virtual machine.
create_or_updateINSERTlabName, name, resourceGroupName, subscriptionId, virtualMachineName, data__propertiesCreate or replace an existing schedule.
deleteDELETElabName, name, resourceGroupName, subscriptionId, virtualMachineNameDelete schedule.
updateUPDATElabName, name, resourceGroupName, subscriptionId, virtualMachineNameAllows modifying tags of schedules. All other properties will be ignored.
executeEXEClabName, name, resourceGroupName, subscriptionId, virtualMachineNameExecute a schedule. This operation can take a while to complete.

SELECT examples

List schedules in a given virtual machine.

SELECT
id,
name,
created_date,
daily_recurrence,
hourly_recurrence,
labName,
location,
notification_settings,
provisioning_state,
resourceGroupName,
status,
subscriptionId,
tags,
target_resource_id,
task_type,
time_zone_id,
type,
unique_identifier,
virtualMachineName,
weekly_recurrence
FROM azure.dev_test_labs.vw_virtual_machine_schedules
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';

INSERT example

Use the following StackQL query and manifest file to create a new virtual_machine_schedules resource.

/*+ create */
INSERT INTO azure.dev_test_labs.virtual_machine_schedules (
labName,
name,
resourceGroupName,
subscriptionId,
virtualMachineName,
data__properties,
location,
tags,
properties
)
SELECT
'{{ labName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ virtualMachineName }}',
'{{ data__properties }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;

UPDATE example

Updates a virtual_machine_schedules resource.

/*+ update */
UPDATE azure.dev_test_labs.virtual_machine_schedules
SET
tags = '{{ tags }}'
WHERE
labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';

DELETE example

Deletes the specified virtual_machine_schedules resource.

/*+ delete */
DELETE FROM azure.dev_test_labs.virtual_machine_schedules
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND virtualMachineName = '{{ virtualMachineName }}';