Skip to main content

schedules

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

Overview

Nameschedules
TypeResource
Idazure.dev_test_labs.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
weekly_recurrencetextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTlabName, name, resourceGroupName, subscriptionIdGet schedule.
listSELECTlabName, resourceGroupName, subscriptionIdList schedules in a given lab.
create_or_updateINSERTlabName, name, resourceGroupName, subscriptionId, data__propertiesCreate or replace an existing schedule.
deleteDELETElabName, name, resourceGroupName, subscriptionIdDelete schedule.
updateUPDATElabName, name, resourceGroupName, subscriptionIdAllows modifying tags of schedules. All other properties will be ignored.
executeEXEClabName, name, resourceGroupName, subscriptionIdExecute a schedule. This operation can take a while to complete.

SELECT examples

List schedules in a given lab.

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,
weekly_recurrence
FROM azure.dev_test_labs.vw_schedules
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a schedules resource.

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

DELETE example

Deletes the specified schedules resource.

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