Skip to content

Commit 4893282

Browse files
authored
Scheduled Events feature (#14233)
* Scheduled Events feature * Scheduled Events feature example
1 parent 973089a commit 4893282

File tree

2 files changed

+196
-0
lines changed

2 files changed

+196
-0
lines changed

specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,6 +3049,9 @@
30493049
"Create a vm in an availability set.": {
30503050
"$ref": "./examples/CreateAVmInAnAvailabilitySet.json"
30513051
},
3052+
"Create a vm with Scheduled Events Profile": {
3053+
"$ref": "./examples/CreateAVmWithScheduledEventsProfile.json"
3054+
},
30523055
"Create a vm with boot diagnostics.": {
30533056
"$ref": "./examples/CreateAVmWithBootDiagnostics.json"
30543057
},
@@ -9911,6 +9914,10 @@
99119914
"type": "integer",
99129915
"format": "int32",
99139916
"description": "Specifies the scale set logical fault domain into which the Virtual Machine will be created. By default, the Virtual Machine will by automatically assigned to a fault domain that best maintains balance across available fault domains.<br><li>This is applicable only if the 'virtualMachineScaleSet' property of this Virtual Machine is set.<li>The Virtual Machine Scale Set that is referenced, must have 'platformFaultDomainCount' &gt; 1.<li>This property cannot be updated once the Virtual Machine is created.<li>Fault domain assignment can be viewed in the Virtual Machine Instance View.<br><br>Minimum api‐version: 2020‐12‐01"
9917+
},
9918+
"scheduledEventsProfile": {
9919+
"$ref": "#/definitions/ScheduledEventsProfile",
9920+
"description": "Specifies Scheduled Event related configurations."
99149921
}
99159922
},
99169923
"description": "Describes the properties of a Virtual Machine."
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"vmName": "myVM",
6+
"api-version": "2021-03-01",
7+
"parameters": {
8+
"location": "westus",
9+
"properties": {
10+
"hardwareProfile": {
11+
"vmSize": "Standard_D1_v2"
12+
},
13+
"storageProfile": {
14+
"imageReference": {
15+
"sku": "2016-Datacenter",
16+
"publisher": "MicrosoftWindowsServer",
17+
"version": "latest",
18+
"offer": "WindowsServer"
19+
},
20+
"osDisk": {
21+
"caching": "ReadWrite",
22+
"managedDisk": {
23+
"storageAccountType": "Standard_LRS"
24+
},
25+
"name": "myVMosdisk",
26+
"createOption": "FromImage"
27+
}
28+
},
29+
"networkProfile": {
30+
"networkInterfaces": [
31+
{
32+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
33+
"properties": {
34+
"primary": true
35+
}
36+
}
37+
]
38+
},
39+
"osProfile": {
40+
"adminUsername": "{your-username}",
41+
"computerName": "myVM",
42+
"adminPassword": "{your-password}"
43+
},
44+
"diagnosticsProfile": {
45+
"bootDiagnostics": {
46+
"storageUri": "http://{existing-storage-account-name}.blob.core.windows.net",
47+
"enabled": true
48+
}
49+
},
50+
"scheduledEventsProfile": {
51+
"terminateNotificationProfile": {
52+
"notBeforeTimeout": "PT10M",
53+
"enable": true
54+
}
55+
}
56+
}
57+
}
58+
},
59+
"responses": {
60+
"200": {
61+
"body": {
62+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
63+
"type": "Microsoft.Compute/virtualMachines",
64+
"properties": {
65+
"osProfile": {
66+
"adminUsername": "{your-username}",
67+
"secrets": [],
68+
"computerName": "myVM",
69+
"windowsConfiguration": {
70+
"provisionVMAgent": true,
71+
"enableAutomaticUpdates": true
72+
}
73+
},
74+
"networkProfile": {
75+
"networkInterfaces": [
76+
{
77+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
78+
"properties": {
79+
"primary": true
80+
}
81+
}
82+
]
83+
},
84+
"storageProfile": {
85+
"imageReference": {
86+
"sku": "2016-Datacenter",
87+
"publisher": "MicrosoftWindowsServer",
88+
"version": "latest",
89+
"offer": "WindowsServer"
90+
},
91+
"osDisk": {
92+
"osType": "Windows",
93+
"caching": "ReadWrite",
94+
"createOption": "FromImage",
95+
"name": "myVMosdisk",
96+
"managedDisk": {
97+
"storageAccountType": "Standard_LRS"
98+
}
99+
},
100+
"dataDisks": []
101+
},
102+
"diagnosticsProfile": {
103+
"bootDiagnostics": {
104+
"storageUri": "http://nsgdiagnostic.blob.core.windows.net",
105+
"enabled": true
106+
}
107+
},
108+
"vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
109+
"hardwareProfile": {
110+
"vmSize": "Standard_D1_v2"
111+
},
112+
"scheduledEventsProfile": {
113+
"terminateNotificationProfile": {
114+
"notBeforeTimeout": "PT10M",
115+
"enable": true
116+
}
117+
},
118+
"provisioningState": "Creating"
119+
},
120+
"name": "myVM",
121+
"location": "westus"
122+
}
123+
},
124+
"201": {
125+
"body": {
126+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
127+
"type": "Microsoft.Compute/virtualMachines",
128+
"properties": {
129+
"osProfile": {
130+
"adminUsername": "{your-username}",
131+
"secrets": [],
132+
"computerName": "myVM",
133+
"windowsConfiguration": {
134+
"provisionVMAgent": true,
135+
"enableAutomaticUpdates": true
136+
}
137+
},
138+
"networkProfile": {
139+
"networkInterfaces": [
140+
{
141+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
142+
"properties": {
143+
"primary": true
144+
}
145+
}
146+
]
147+
},
148+
"storageProfile": {
149+
"imageReference": {
150+
"sku": "2016-Datacenter",
151+
"publisher": "MicrosoftWindowsServer",
152+
"version": "latest",
153+
"offer": "WindowsServer"
154+
},
155+
"osDisk": {
156+
"osType": "Windows",
157+
"caching": "ReadWrite",
158+
"createOption": "FromImage",
159+
"name": "myVMosdisk",
160+
"managedDisk": {
161+
"storageAccountType": "Standard_LRS"
162+
}
163+
},
164+
"dataDisks": []
165+
},
166+
"diagnosticsProfile": {
167+
"bootDiagnostics": {
168+
"storageUri": "http://nsgdiagnostic.blob.core.windows.net",
169+
"enabled": true
170+
}
171+
},
172+
"vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa",
173+
"hardwareProfile": {
174+
"vmSize": "Standard_D1_v2"
175+
},
176+
"scheduledEventsProfile": {
177+
"terminateNotificationProfile": {
178+
"notBeforeTimeout": "PT10M",
179+
"enable": true
180+
}
181+
},
182+
"provisioningState": "Creating"
183+
},
184+
"name": "myVM",
185+
"location": "westus"
186+
}
187+
}
188+
}
189+
}

0 commit comments

Comments
 (0)