schedules
Creates, updates, deletes, gets or lists a schedules
resource.
Overview
Name | schedules |
Type | Resource |
Id | azure.lab_services.schedules |
Fields
- vw_schedules
- schedules
Name | Datatype | Description |
---|---|---|
labName | text | field from the properties object |
notes | text | field from the properties object |
provisioning_state | text | field from the properties object |
recurrence_pattern | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_operation_error | text | field from the properties object |
scheduleName | text | field from the properties object |
start_at | text | field from the properties object |
stop_at | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
time_zone_id | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Schedule resource properties |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | labName, resourceGroupName, scheduleName, subscriptionId | Returns the properties of a lab Schedule. |
list_by_lab | SELECT | labName, resourceGroupName, subscriptionId | Returns a list of all schedules for a lab. |
create_or_update | INSERT | labName, resourceGroupName, scheduleName, subscriptionId, data__properties | Operation to create or update a lab schedule. |
delete | DELETE | labName, resourceGroupName, scheduleName, subscriptionId | Operation to delete a schedule resource. |
update | UPDATE | labName, resourceGroupName, scheduleName, subscriptionId | Operation to update a lab schedule. |
SELECT
examples
Returns a list of all schedules for a lab.
- vw_schedules
- schedules
SELECT
labName,
notes,
provisioning_state,
recurrence_pattern,
resourceGroupName,
resource_operation_error,
scheduleName,
start_at,
stop_at,
subscriptionId,
system_data,
time_zone_id
FROM azure.lab_services.vw_schedules
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties,
systemData
FROM azure.lab_services.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.lab_services.schedules (
labName,
resourceGroupName,
scheduleName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ labName }}',
'{{ resourceGroupName }}',
'{{ scheduleName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: startAt
value: string
- name: stopAt
value: string
- name: recurrencePattern
value:
- name: frequency
value: []
- name: weekDays
value:
- []
- name: interval
value: integer
- name: expirationDate
value: string
- name: timeZoneId
value: string
- name: notes
value: string
- name: provisioningState
value: []
- name: resourceOperationError
value:
- name: timestamp
value: string
- name: code
value: string
- name: message
value: string
- name: action
value: string
UPDATE
example
Updates a schedules
resource.
/*+ update */
UPDATE azure.lab_services.schedules
SET
properties = '{{ properties }}'
WHERE
labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND scheduleName = '{{ scheduleName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified schedules
resource.
/*+ delete */
DELETE FROM azure.lab_services.schedules
WHERE labName = '{{ labName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND scheduleName = '{{ scheduleName }}'
AND subscriptionId = '{{ subscriptionId }}';