Skip to content

Commit ab88105

Browse files
szimmer-devamarzavery
authored andcommitted
Add terminate profile and scheduled events profile to Microsoft.Compute (#6683)
* Add terminate notification profile and scheduled events profile to the Microosft.Compute autorest config. * Correct definition format * Update specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json Co-Authored-By: Nick Schonning <[email protected]> * Update specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json Co-Authored-By: Nick Schonning <[email protected]> * Add ScheduledEventsProfile to the UpdateVMScaleSetVM model, and add instance view expansion to get VM Scale Set VM. * Add an example for terminate scheduled events, and add type:object to scheudled events and termiante profile schemas. * Add example reference into compute.json * Fix example file naming. * Fix terminate scheduled event reference.
1 parent e30b61d commit ab88105

File tree

2 files changed

+281
-0
lines changed

2 files changed

+281
-0
lines changed

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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3126,6 +3126,9 @@
31263126
},
31273127
"Create a scale set with ephemeral os disks.": {
31283128
"$ref": "./examples/CreateAScaleSetWithDiffOsDisk.json"
3129+
},
3130+
"Create a scale set with terminate scheduled events enabled.": {
3131+
"$ref": "./examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json"
31293132
}
31303133
}
31313134
},
@@ -4681,6 +4684,20 @@
46814684
"type": "string",
46824685
"description": "The instance ID of the virtual machine."
46834686
},
4687+
{
4688+
"name": "$expand",
4689+
"in": "query",
4690+
"required": false,
4691+
"type": "string",
4692+
"description": "The expand expression to apply on the operation.",
4693+
"enum": [
4694+
"instanceView"
4695+
],
4696+
"x-ms-enum": {
4697+
"name": "InstanceViewTypes",
4698+
"modelAsString": false
4699+
}
4700+
},
46844701
{
46854702
"$ref": "#/parameters/ApiVersionParameter"
46864703
},
@@ -8498,6 +8515,10 @@
84988515
"name": "VirtualMachineEvictionPolicyTypes",
84998516
"modelAsString": true
85008517
}
8518+
},
8519+
"scheduledEventsProfile" : {
8520+
"$ref":"#/definitions/ScheduledEventsProfile",
8521+
"description": "Specifies Scheduled Event related configurations."
85018522
}
85028523
},
85038524
"description": "Describes a virtual machine scale set virtual machine profile."
@@ -8527,6 +8548,10 @@
85278548
"licenseType": {
85288549
"type": "string",
85298550
"description": "The license type, which is for bring your own license scenario."
8551+
},
8552+
"scheduledEventsProfile" : {
8553+
"$ref":"#/definitions/ScheduledEventsProfile",
8554+
"description": "Specifies Scheduled Event related configurations."
85308555
}
85318556
},
85328557
"description": "Describes a virtual machine scale set virtual machine profile."
@@ -9241,6 +9266,29 @@
92419266
},
92429267
"description": "The protection policy of a virtual machine scale set VM."
92439268
},
9269+
"ScheduledEventsProfile": {
9270+
"type": "object",
9271+
"properties": {
9272+
"terminateNotificationProfile":
9273+
{
9274+
"$ref":"#/definitions/TerminateNotificationProfile",
9275+
"description": "Specifies Terminate Scheduled Event related configurations."
9276+
}
9277+
}
9278+
},
9279+
"TerminateNotificationProfile": {
9280+
"type": "object",
9281+
"properties": {
9282+
"notBeforeTimeout": {
9283+
"type": "string",
9284+
"description" : "Configurable length of time a Virtual Machine being deleted will have to potentially approve the Terminate Scheduled Event before the event is auto approved (timed out). The configuration must be specified in ISO 8601 format, the default value is 5 minutes (PT5M)"
9285+
},
9286+
"enable" : {
9287+
"type": "boolean",
9288+
"description": "Specifies whether the Terminate Scheduled event is enabled or disabled."
9289+
}
9290+
}
9291+
},
92449292
"VirtualMachineHealthStatus": {
92459293
"properties": {
92469294
"status": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"vmScaleSetName": "{vmss-name}",
6+
"api-version": "2019-03-01",
7+
"parameters": {
8+
"sku": {
9+
"tier": "Standard",
10+
"capacity": 3,
11+
"name": "Standard_D1_v2"
12+
},
13+
"location": "westus",
14+
"properties": {
15+
"overprovision": true,
16+
"virtualMachineProfile": {
17+
"storageProfile": {
18+
"imageReference": {
19+
"sku": "2016-Datacenter",
20+
"publisher": "MicrosoftWindowsServer",
21+
"version": "latest",
22+
"offer": "WindowsServer"
23+
},
24+
"osDisk": {
25+
"caching": "ReadWrite",
26+
"managedDisk": {
27+
"storageAccountType": "Standard_LRS"
28+
},
29+
"createOption": "FromImage"
30+
}
31+
},
32+
"osProfile": {
33+
"computerNamePrefix": "{vmss-name}",
34+
"adminUsername": "{your-username}",
35+
"adminPassword": "{your-password}"
36+
},
37+
"networkProfile": {
38+
"networkInterfaceConfigurations": [
39+
{
40+
"name": "{vmss-name}",
41+
"properties": {
42+
"primary": true,
43+
"enableIPForwarding": true,
44+
"ipConfigurations": [
45+
{
46+
"name": "{vmss-name}",
47+
"properties": {
48+
"subnet": {
49+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}"
50+
}
51+
}
52+
}
53+
]
54+
}
55+
}
56+
]
57+
},
58+
"scheduledEventsProfile" : {
59+
"terminateNotificationProfile" : {
60+
"enable": true,
61+
"notBeforeTimeout": "PT5M"
62+
}
63+
}
64+
},
65+
"upgradePolicy": {
66+
"mode": "Manual"
67+
}
68+
}
69+
}
70+
},
71+
"responses": {
72+
"200": {
73+
"body": {
74+
"sku": {
75+
"tier": "Standard",
76+
"capacity": 3,
77+
"name": "Standard_D1_v2"
78+
},
79+
"name": "{vmss-name}",
80+
"properties": {
81+
"singlePlacementGroup": true,
82+
"overprovision": true,
83+
"uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
84+
"virtualMachineProfile": {
85+
"storageProfile": {
86+
"imageReference": {
87+
"sku": "2016-Datacenter",
88+
"publisher": "MicrosoftWindowsServer",
89+
"version": "latest",
90+
"offer": "WindowsServer"
91+
},
92+
"osDisk": {
93+
"caching": "ReadWrite",
94+
"managedDisk": {
95+
"storageAccountType": "Standard_LRS"
96+
},
97+
"createOption": "FromImage"
98+
}
99+
},
100+
"osProfile": {
101+
"computerNamePrefix": "{vmss-name}",
102+
"adminUsername": "{your-username}",
103+
"secrets": [],
104+
"windowsConfiguration": {
105+
"provisionVMAgent": true,
106+
"enableAutomaticUpdates": true
107+
}
108+
},
109+
"networkProfile": {
110+
"networkInterfaceConfigurations": [
111+
{
112+
"name": "{vmss-name}",
113+
"properties": {
114+
"dnsSettings": {
115+
"dnsServers": []
116+
},
117+
"primary": true,
118+
"enableIPForwarding": true,
119+
"ipConfigurations": [
120+
{
121+
"name": "{vmss-name}",
122+
"properties": {
123+
"subnet": {
124+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
125+
},
126+
"privateIPAddressVersion": "IPv4"
127+
}
128+
}
129+
],
130+
"enableAcceleratedNetworking": false
131+
}
132+
}
133+
]
134+
},
135+
"scheduledEventsProfile" : {
136+
"terminateNotificationProfile" : {
137+
"enable": true,
138+
"notBeforeTimeout": "PT5M"
139+
}
140+
}
141+
},
142+
"upgradePolicy": {
143+
"mode": "Manual"
144+
},
145+
"provisioningState": "Creating"
146+
},
147+
"location": "westus",
148+
"type": "Microsoft.Compute/virtualMachineScaleSets",
149+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
150+
}
151+
},
152+
"201": {
153+
"body": {
154+
"sku": {
155+
"tier": "Standard",
156+
"capacity": 3,
157+
"name": "Standard_D1_v2"
158+
},
159+
"name": "{vmss-name}",
160+
"properties": {
161+
"singlePlacementGroup": true,
162+
"overprovision": true,
163+
"uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7",
164+
"virtualMachineProfile": {
165+
"storageProfile": {
166+
"imageReference": {
167+
"sku": "2016-Datacenter",
168+
"publisher": "MicrosoftWindowsServer",
169+
"version": "latest",
170+
"offer": "WindowsServer"
171+
},
172+
"osDisk": {
173+
"caching": "ReadWrite",
174+
"managedDisk": {
175+
"storageAccountType": "Standard_LRS"
176+
},
177+
"createOption": "FromImage"
178+
}
179+
},
180+
"osProfile": {
181+
"computerNamePrefix": "{vmss-name}",
182+
"adminUsername": "{your-username}",
183+
"secrets": [],
184+
"windowsConfiguration": {
185+
"provisionVMAgent": true,
186+
"enableAutomaticUpdates": true
187+
}
188+
},
189+
"networkProfile": {
190+
"networkInterfaceConfigurations": [
191+
{
192+
"name": "{vmss-name}",
193+
"properties": {
194+
"dnsSettings": {
195+
"dnsServers": []
196+
},
197+
"primary": true,
198+
"enableIPForwarding": true,
199+
"ipConfigurations": [
200+
{
201+
"name": "{vmss-name}",
202+
"properties": {
203+
"subnet": {
204+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet"
205+
},
206+
"privateIPAddressVersion": "IPv4"
207+
}
208+
}
209+
],
210+
"enableAcceleratedNetworking": false
211+
}
212+
}
213+
]
214+
},
215+
"scheduledEventsProfile" : {
216+
"terminateNotificationProfile" : {
217+
"enable": true,
218+
"notBeforeTimeout": "PT5M"
219+
}
220+
}
221+
},
222+
"upgradePolicy": {
223+
"mode": "Manual"
224+
},
225+
"provisioningState": "Creating"
226+
},
227+
"location": "westus",
228+
"type": "Microsoft.Compute/virtualMachineScaleSets",
229+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
230+
}
231+
}
232+
}
233+
}

0 commit comments

Comments
 (0)