Virtual Machines - List Applicable Schedules
列出適用的啟動/停止排程 (若有的話)。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/listApplicableSchedules?api-version=2018-09-15
URI 參數
Name | In | Required | Type | Description |
---|---|---|---|---|
lab
|
path | True |
|
實驗室的名稱。 |
name
|
path | True |
|
虛擬機器的名稱。 |
resource
|
path | True |
|
資源群組的名稱。 |
subscription
|
path | True |
|
訂閱識別碼。 |
api-version
|
query | True |
|
用戶端 API 版本。 |
回應
Name | Type | Description |
---|---|---|
200 OK |
確定 |
|
Other Status Codes |
BadRequest |
安全性
azure_auth
OAuth2 隱含授與
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | 存取 Microsoft Azure |
範例
VirtualMachines_ListApplicableSchedules
Sample Request
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{vmName}/listApplicableSchedules?api-version=2018-09-15
Sample Response
{
"properties": {
"labVmsShutdown": {
"properties": {
"status": "Enabled",
"taskType": "LabVmsShutdownTask",
"weeklyRecurrence": {
"weekdays": [
"Friday",
"Saturday",
"Sunday"
],
"time": "1700"
},
"dailyRecurrence": {
"time": "1900"
},
"hourlyRecurrence": {
"minute": 30
},
"timeZoneId": "Pacific Standard Time",
"notificationSettings": {
"status": "Enabled",
"timeInMinutes": 30,
"webhookUrl": "{webhookUrl}",
"emailRecipient": "{email}",
"notificationLocale": "EN"
},
"createdDate": "2020-12-29T21:48:14.1369355+00:00",
"targetResourceId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{vmName}",
"provisioningState": "Succeeded",
"uniqueIdentifier": "4acf0408-1c10-49cb-96b7-28ce655c8320"
},
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/schedules/myAutoShutdownSchedule",
"name": "LabVmsShutdown",
"type": "Microsoft.DevTestLab/labs/virtualMachines/schedules",
"location": "{location}"
},
"labVmsStartup": {
"properties": {
"status": "Enabled",
"taskType": "LabVmsStartupTask",
"weeklyRecurrence": {
"weekdays": [
"Friday",
"Saturday",
"Sunday"
],
"time": "1000"
},
"dailyRecurrence": {
"time": "0900"
},
"hourlyRecurrence": {
"minute": 30
},
"timeZoneId": "Pacific Standard Time",
"notificationSettings": {
"status": "Enabled",
"timeInMinutes": 30,
"webhookUrl": "{webhookUrl}",
"emailRecipient": "{email}",
"notificationLocale": "EN"
},
"createdDate": "2020-12-29T21:46:37.0473976+00:00",
"targetResourceId": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{vmName}",
"provisioningState": "Succeeded"
},
"id": "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/Microsoft.DevTestLab/labs/{labName}/schedules/myAutoStartSchedule",
"name": "LabVmAutoStart",
"type": "Microsoft.DevTestLab/labs/virtualMachines/schedules",
"location": "{location}"
}
}
}
定義
Applicable |
適用于虛擬機器的排程。 可能已在 VM 或實驗室層級上定義排程。 |
Cloud |
來自 REST 要求的錯誤。 |
Cloud |
來自 REST 要求的錯誤主體。 |
Day |
每日排程的屬性。 |
Enable |
排程的狀態 (即已啟用、已停用) |
Hour |
每小時排程的屬性。 |
Notification |
排程的通知設定。 |
Schedule |
排程。 |
Week |
每週排程的屬性。 |
ApplicableSchedule
適用于虛擬機器的排程。 可能已在 VM 或實驗室層級上定義排程。
Name | Type | Description |
---|---|---|
id |
|
資源的識別碼。 |
location |
|
資源的位置。 |
name |
|
資源名稱。 |
properties.labVmsShutdown |
自動關機排程(如果已在實驗室或實驗室資源層級設定的話)。 |
|
properties.labVmsStartup |
自動啟動排程(如果已在實驗室或實驗室資源層級設定的話)。 |
|
tags |
|
資源的標記。 |
type |
|
資源類型。 |
CloudError
來自 REST 要求的錯誤。
Name | Type | Description |
---|---|---|
error |
發生的雲端錯誤 |
CloudErrorBody
來自 REST 要求的錯誤主體。
Name | Type | Description |
---|---|---|
code |
|
錯誤碼。 |
details |
內部錯誤。 |
|
message |
|
錯誤訊息。 |
target |
|
錯誤目標。 |
DayDetails
每日排程的屬性。
Name | Type | Description |
---|---|---|
time |
|
排程將會發生的當日時間。 |
EnableStatus
排程的狀態 (即已啟用、已停用)
Name | Type | Description |
---|---|---|
Disabled |
|
|
Enabled |
|
HourDetails
每小時排程的屬性。
Name | Type | Description |
---|---|---|
minute |
|
排程將執行的小時數。 |
NotificationSettings
排程的通知設定。
Name | Type | Description |
---|---|---|
emailRecipient |
|
傳送通知給 (的電子郵件收件者可以是) 分號分隔的電子郵件地址清單。 |
notificationLocale |
|
傳送通知時所要使用的地區設定 (不受支援語言的回復為 EN) 。 |
status |
如果已啟用此排程的通知 (即已啟用、已停用) 。 |
|
timeInMinutes |
|
將傳送通知的事件時間(分鐘)。 |
webhookUrl |
|
將傳送通知的 webhook URL。 |
Schedule
排程。
Name | Type | Description |
---|---|---|
id |
|
資源的識別碼。 |
location |
|
資源的位置。 |
name |
|
資源名稱。 |
properties.createdDate |
|
排程的建立日期。 |
properties.dailyRecurrence |
如果每一周的每一天都會發生排程,請指定每日週期。 |
|
properties.hourlyRecurrence |
如果排程會一天多次發生,請指定每小時的週期。 |
|
properties.notificationSettings |
通知設定。 |
|
properties.provisioningState |
|
資源的布建狀態。 |
properties.status |
排程的狀態 (即已啟用、已停用) |
|
properties.targetResourceId |
|
排程所屬的資源識別碼 |
properties.taskType |
|
排程 (的工作類型,例如 LabVmsShutdownTask、LabVmAutoStart) 。 |
properties.timeZoneId |
|
時區識別碼 (例如太平洋標準時間) 。 |
properties.uniqueIdentifier |
|
資源 (Guid) 的唯一不彈性識別碼。 |
properties.weeklyRecurrence |
如果排程只會在一周的某天發生,請指定每週週期。 |
|
tags |
|
資源的標記。 |
type |
|
資源類型。 |
WeekDetails
每週排程的屬性。
Name | Type | Description |
---|---|---|
time |
|
排程將會發生的當日時間。 |
weekdays |
|
排程設定的周間天數 (例如星期日、星期一、星期二等 ) 。 |