Virtual Machines - List Applicable Schedules
Lists the applicable start/stop schedules, if any.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules?api-version=2018-09-15
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
lab
|
path | True |
string |
The name of the lab. |
name
|
path | True |
string |
The name of the LabVirtualMachine |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Azure operation completed successfully. |
|
Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
VirtualMachines_ListApplicableSchedules
Sample request
Sample response
{
"properties": {
"labVmsShutdown": {
"name": "LabVmsShutdown",
"type": "Microsoft.DevTestLab/labs/virtualMachines/schedules",
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/schedules/myAutoShutdownSchedule",
"location": "{location}",
"properties": {
"createdDate": "2020-12-29T21:48:14.1369355+00:00",
"dailyRecurrence": {
"time": "1900"
},
"hourlyRecurrence": {
"minute": 30
},
"notificationSettings": {
"emailRecipient": "{email}",
"notificationLocale": "EN",
"status": "Enabled",
"timeInMinutes": 30,
"webhookUrl": "{webhookUrl}"
},
"provisioningState": "Succeeded",
"status": "Enabled",
"targetResourceId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{vmName}",
"taskType": "LabVmsShutdownTask",
"timeZoneId": "Pacific Standard Time",
"uniqueIdentifier": "4acf0408-1c10-49cb-96b7-28ce655c8320",
"weeklyRecurrence": {
"time": "1700",
"weekdays": [
"Friday",
"Saturday",
"Sunday"
]
}
}
},
"labVmsStartup": {
"name": "LabVmAutoStart",
"type": "Microsoft.DevTestLab/labs/virtualMachines/schedules",
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/schedules/myAutoStartSchedule",
"location": "{location}",
"properties": {
"createdDate": "2020-12-29T21:46:37.0473976+00:00",
"dailyRecurrence": {
"time": "0900"
},
"hourlyRecurrence": {
"minute": 30
},
"notificationSettings": {
"emailRecipient": "{email}",
"notificationLocale": "EN",
"status": "Enabled",
"timeInMinutes": 30,
"webhookUrl": "{webhookUrl}"
},
"provisioningState": "Succeeded",
"status": "Enabled",
"targetResourceId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{vmName}",
"taskType": "LabVmsStartupTask",
"timeZoneId": "Pacific Standard Time",
"weeklyRecurrence": {
"time": "1000",
"weekdays": [
"Friday",
"Saturday",
"Sunday"
]
}
}
}
}
}
Definitions
Name | Description |
---|---|
Applicable |
Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level. |
Day |
Properties of a daily schedule. |
Enable |
Indicates if the artifact source is enabled (values: Enabled, Disabled). |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Hour |
Properties of an hourly schedule. |
Notification |
Notification settings for a schedule. |
Schedule |
A schedule. |
Week |
Properties of a weekly schedule. |
ApplicableSchedule
Schedules applicable to a virtual machine. The schedules may have been defined on a VM or on lab level.
Name | Type | Description |
---|---|---|
id |
string |
The identifier of the resource. |
location |
string |
The location of the resource. |
name |
string |
The name of the resource. |
properties.labVmsShutdown |
The auto-shutdown schedule, if one has been set at the lab or lab resource level. |
|
properties.labVmsStartup |
The auto-startup schedule, if one has been set at the lab or lab resource level. |
|
tags |
object |
The tags of the resource. |
type |
string |
The type of the resource. |
DayDetails
Properties of a daily schedule.
Name | Type | Description |
---|---|---|
time |
string |
The time of day the schedule will occur. |
EnableStatus
Indicates if the artifact source is enabled (values: Enabled, Disabled).
Value | Description |
---|---|
Enabled | |
Disabled |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
HourDetails
Properties of an hourly schedule.
Name | Type | Description |
---|---|---|
minute |
integer (int32) |
Minutes of the hour the schedule will run. |
NotificationSettings
Notification settings for a schedule.
Name | Type | Default value | Description |
---|---|---|---|
emailRecipient |
string |
The email recipient to send notifications to (can be a list of semi-colon separated email addresses). |
|
notificationLocale |
string |
The locale to use when sending a notification (fallback for unsupported languages is EN). |
|
status | Disabled |
If notifications are enabled for this schedule (i.e. Enabled, Disabled). |
|
timeInMinutes |
integer (int32) |
Time in minutes before event at which notification will be sent. |
|
webhookUrl |
string |
The webhook URL to which the notification will be sent. |
Schedule
A schedule.
Name | Type | Default value | Description |
---|---|---|---|
id |
string |
The identifier of the resource. |
|
location |
string |
The location of the resource. |
|
name |
string |
The name of the resource. |
|
properties.createdDate |
string (date-time) |
The creation date of the schedule. |
|
properties.dailyRecurrence |
If the schedule will occur once each day of the week, specify the daily recurrence. |
||
properties.hourlyRecurrence |
If the schedule will occur multiple times a day, specify the hourly recurrence. |
||
properties.notificationSettings |
Notification settings. |
||
properties.provisioningState |
string |
The provisioning status of the resource. |
|
properties.status | Disabled |
The status of the schedule (i.e. Enabled, Disabled) |
|
properties.targetResourceId |
string |
The resource ID to which the schedule belongs |
|
properties.taskType |
string |
The task type of the schedule (e.g. LabVmsShutdownTask, LabVmAutoStart). |
|
properties.timeZoneId |
string |
The time zone ID (e.g. China Standard Time, Greenland Standard Time, Pacific Standard time, etc.). The possible values for this property can be found in |
|
properties.uniqueIdentifier |
string |
The unique immutable identifier of a resource (Guid). |
|
properties.weeklyRecurrence |
If the schedule will occur only some days of the week, specify the weekly recurrence. |
||
tags |
object |
The tags of the resource. |
|
type |
string |
The type of the resource. |
WeekDetails
Properties of a weekly schedule.
Name | Type | Description |
---|---|---|
time |
string |
The time of the day the schedule will occur. |
weekdays |
string[] |
The days of the week for which the schedule is set (e.g. Sunday, Monday, Tuesday, etc.). |