From 24bcc4252330eaafa3b0b0aade274f2e7566e7a2 Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Fri, 19 Jul 2019 16:42:04 -0700 Subject: [PATCH 1/9] Add terminate notification profile and scheduled events profile to the Microosft.Compute autorest config. --- .../stable/2019-03-01/compute.json | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 9afb3356de34..9e4e89c92401 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -5483,7 +5483,7 @@ "items": { "type": "string" }, - "description": "Availability Zone to use for this host group – only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." + "description": "Availability Zone to use for this host group � only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." } }, "allOf": [ @@ -5504,7 +5504,7 @@ "items": { "type": "string" }, - "description": "Availability Zone to use for this host group – only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." + "description": "Availability Zone to use for this host group � only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." } }, "allOf": [ @@ -8498,6 +8498,10 @@ "name": "VirtualMachineEvictionPolicyTypes", "modelAsString": true } + }, + "scheduledEventsProfile" : { + "$ref":"#definitions/ScheduledEventsProfile", + "description": "Specifies Scheduled Event related configurations." } }, "description": "Describes a virtual machine scale set virtual machine profile." @@ -9241,6 +9245,27 @@ }, "description": "The protection policy of a virtual machine scale set VM." }, + "ScheduledEventsProfile": { + "properties": { + "terminateNotificationProfile": + { + "$ref":"#definitions/TerminateNotificationProfile", + "description": "Specifies Terminate Scheduled Event related configurations." + } + } + }, + "TerminateNotificationProfile": { + "properties": { + "notBeforeTimeout": { + "type": "string", + "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)" + }, + "enable" : { + "type": "boolean", + "description": "Specifies whether the Terminate Scheduled event is enabled or disabled." + } + } + }, "VirtualMachineHealthStatus": { "properties": { "status": { From 9bb1d5b7f21a0e03e97ce3817554307244d45422 Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Fri, 19 Jul 2019 17:44:31 -0700 Subject: [PATCH 2/9] Correct definition format --- .../Microsoft.Compute/stable/2019-03-01/compute.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 9e4e89c92401..9b528286a1f9 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -8500,7 +8500,7 @@ } }, "scheduledEventsProfile" : { - "$ref":"#definitions/ScheduledEventsProfile", + "$ref":"#/definitions/ScheduledEventsProfile", "description": "Specifies Scheduled Event related configurations." } }, @@ -9249,7 +9249,7 @@ "properties": { "terminateNotificationProfile": { - "$ref":"#definitions/TerminateNotificationProfile", + "$ref":"#/definitions/TerminateNotificationProfile", "description": "Specifies Terminate Scheduled Event related configurations." } } From a7b448e1a3b0adb04d6cb7590f06346b738b7af6 Mon Sep 17 00:00:00 2001 From: szimmerMicrosoft Date: Wed, 24 Jul 2019 15:20:54 -0700 Subject: [PATCH 3/9] Update specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json Co-Authored-By: Nick Schonning --- .../Microsoft.Compute/stable/2019-03-01/compute.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 9b528286a1f9..76091df864ed 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -5504,7 +5504,7 @@ "items": { "type": "string" }, - "description": "Availability Zone to use for this host group � only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." + "description": "Availability Zone to use for this host group only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." } }, "allOf": [ From d99620f7b534fb3d1d35d055a7c1ab042f76b4a9 Mon Sep 17 00:00:00 2001 From: szimmerMicrosoft Date: Wed, 24 Jul 2019 15:21:12 -0700 Subject: [PATCH 4/9] Update specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json Co-Authored-By: Nick Schonning --- .../Microsoft.Compute/stable/2019-03-01/compute.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 76091df864ed..32b32b072a0f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -5483,7 +5483,7 @@ "items": { "type": "string" }, - "description": "Availability Zone to use for this host group � only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." + "description": "Availability Zone to use for this host group only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone." } }, "allOf": [ From 722acaf57e0b56a7566b0ebcaf5fdb2c1cf74349 Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Mon, 29 Jul 2019 12:00:25 -0700 Subject: [PATCH 5/9] Add ScheduledEventsProfile to the UpdateVMScaleSetVM model, and add instance view expansion to get VM Scale Set VM. --- .../stable/2019-03-01/compute.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 32b32b072a0f..67fbf8365f4f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -4681,6 +4681,20 @@ "type": "string", "description": "The instance ID of the virtual machine." }, + { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "description": "The expand expression to apply on the operation.", + "enum": [ + "instanceView" + ], + "x-ms-enum": { + "name": "InstanceViewTypes", + "modelAsString": false + } + }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -8531,6 +8545,10 @@ "licenseType": { "type": "string", "description": "The license type, which is for bring your own license scenario." + }, + "scheduledEventsProfile" : { + "$ref":"#/definitions/ScheduledEventsProfile", + "description": "Specifies Scheduled Event related configurations." } }, "description": "Describes a virtual machine scale set virtual machine profile." From edd04f8b3378e844ba4ee4150b951c13cf1be8db Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Wed, 31 Jul 2019 11:14:53 -0700 Subject: [PATCH 6/9] Add an example for terminate scheduled events, and add type:object to scheudled events and termiante profile schemas. --- .../Microsoft.Compute/stable/2019-03-01/compute.json | 2 ++ .../CreateAScaleSetWithTerminateScheudledEventEnabled.json | 0 2 files changed, 2 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index f3c2fda78018..c1a3061d7934 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -9264,6 +9264,7 @@ "description": "The protection policy of a virtual machine scale set VM." }, "ScheduledEventsProfile": { + "type": "object", "properties": { "terminateNotificationProfile": { @@ -9273,6 +9274,7 @@ } }, "TerminateNotificationProfile": { + "type": "object", "properties": { "notBeforeTimeout": { "type": "string", diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json new file mode 100644 index 000000000000..e69de29bb2d1 From 19a6129d7c58da0c40d08c605f051a8b6d559af7 Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Wed, 31 Jul 2019 11:59:18 -0700 Subject: [PATCH 7/9] Add example reference into compute.json --- .../Microsoft.Compute/stable/2019-03-01/compute.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index c1a3061d7934..2db3946dd9a4 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -3126,6 +3126,9 @@ }, "Create a scale set with ephemeral os disks.": { "$ref": "./examples/CreateAScaleSetWithDiffOsDisk.json" + }, + "Create a scale set with terminate scheduled events enabled.": { + "$ref": "./examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json" } } }, From 37f32086a3bf8c2e8b31d413ae3d6e19718d1408 Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Wed, 31 Jul 2019 12:28:15 -0700 Subject: [PATCH 8/9] Fix example file naming. --- ...SetWithTerminateScheduledEventEnabled.json | 233 ++++++++++++++++++ ...SetWithTerminateScheudledEventEnabled.json | 0 2 files changed, 233 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json delete mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json new file mode 100644 index 000000000000..b461cdb07a86 --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json @@ -0,0 +1,233 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmScaleSetName": "{vmss-name}", + "api-version": "2019-03-01", + "parameters": { + "sku": { + "tier": "Standard", + "capacity": 3, + "name": "Standard_D1_v2" + }, + "location": "westus", + "properties": { + "overprovision": true, + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "FromImage" + } + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "adminPassword": "{your-password}" + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ] + } + } + ] + }, + "scheduledEventsProfile" : { + "terminateNotificationProfile" : { + "enable": true, + "notBeforeTimeout": "PT5M" + } + } + }, + "upgradePolicy": { + "mode": "Manual" + } + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "tier": "Standard", + "capacity": 3, + "name": "Standard_D1_v2" + }, + "name": "{vmss-name}", + "properties": { + "singlePlacementGroup": true, + "overprovision": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "FromImage" + } + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "secrets": [], + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + }, + "privateIPAddressVersion": "IPv4" + } + } + ], + "enableAcceleratedNetworking": false + } + } + ] + }, + "scheduledEventsProfile" : { + "terminateNotificationProfile" : { + "enable": true, + "notBeforeTimeout": "PT5M" + } + } + }, + "upgradePolicy": { + "mode": "Manual" + }, + "provisioningState": "Creating" + }, + "location": "westus", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" + } + }, + "201": { + "body": { + "sku": { + "tier": "Standard", + "capacity": 3, + "name": "Standard_D1_v2" + }, + "name": "{vmss-name}", + "properties": { + "singlePlacementGroup": true, + "overprovision": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "virtualMachineProfile": { + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "createOption": "FromImage" + } + }, + "osProfile": { + "computerNamePrefix": "{vmss-name}", + "adminUsername": "{your-username}", + "secrets": [], + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "primary": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + }, + "privateIPAddressVersion": "IPv4" + } + } + ], + "enableAcceleratedNetworking": false + } + } + ] + }, + "scheduledEventsProfile" : { + "terminateNotificationProfile" : { + "enable": true, + "notBeforeTimeout": "PT5M" + } + } + }, + "upgradePolicy": { + "mode": "Manual" + }, + "provisioningState": "Creating" + }, + "location": "westus", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}" + } + } + } +} \ No newline at end of file diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json deleted file mode 100644 index e69de29bb2d1..000000000000 From 84963d029aeeb05f63d500f41e2e21b365c6109e Mon Sep 17 00:00:00 2001 From: "Sean Zimmerman (AZURE)" Date: Wed, 31 Jul 2019 12:51:04 -0700 Subject: [PATCH 9/9] Fix terminate scheduled event reference. --- .../Microsoft.Compute/stable/2019-03-01/compute.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json index 2db3946dd9a4..8cd0384a6aff 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-03-01/compute.json @@ -3128,7 +3128,7 @@ "$ref": "./examples/CreateAScaleSetWithDiffOsDisk.json" }, "Create a scale set with terminate scheduled events enabled.": { - "$ref": "./examples/CreateAScaleSetWithTerminateScheudledEventEnabled.json" + "$ref": "./examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json" } } },