From 6ea73c46f6f25380bc9dba66244a8cdd1d710856 Mon Sep 17 00:00:00 2001
From: hari-bodicherla <43284966+hari-bodicherla@users.noreply.github.com>
Date: Mon, 23 Sep 2019 17:03:12 -0700
Subject: [PATCH] Added DiskEnryptionSet property in the managed disk
parameters for the VM/VMSS (#7293)
* updated swagger
* updated swagger
* Removed example files which are not relevant and added links to examples for newly added property
* fixed the syntax error
* updated swagger
* fixed the sytax error
---
.../stable/2019-07-01/compute.json | 92 ++++---
...ScalesetWithDiskEncryptionSetResource.json | 255 ++++++++++++++++++
...reateAVmWithDiskEncryptionSetResource.json | 229 ++++++++++++++++
...AnImageFromABlobWithDiskEncryptionSet.json | 71 +++++
...FromAManagedDiskWithDiskEncryptionSet.json | 77 ++++++
...ageFromASnapshotWithDiskEncryptionSet.json | 77 ++++++
6 files changed, 761 insertions(+), 40 deletions(-)
create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAScalesetWithDiskEncryptionSetResource.json
create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAVmWithDiskEncryptionSetResource.json
create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlobWithDiskEncryptionSet.json
create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDiskWithDiskEncryptionSet.json
create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshotWithDiskEncryptionSet.json
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json
index 9600309e5d8b..6e16bdeb0f44 100644
--- a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/compute.json
@@ -2003,6 +2003,15 @@
},
"Create a virtual machine image that includes a data disk from a managed disk.": {
"$ref": "./examples/CreateAnImageThatIncludesADataDiskFromAManagedDisk.json"
+ },
+ "Create a virtual machine image from a blob with DiskEncryptionSet resource.": {
+ "$ref": "./examples/CreateAnImageFromABlobWithDiskEncryptionSet.json"
+ },
+ "Create a virtual machine image from a snapshot with DiskEncryptionSet resource.": {
+ "$ref": "./examples/CreateAnImageFromASnapshotWithDiskEncryptionSet.json"
+ },
+ "Create a virtual machine image from a managed disk with DiskEncryptionSet resource.": {
+ "$ref": "./examples/CreateAnImageFromAManagedDiskWithDiskEncryptionSet.json"
}
},
"x-ms-long-running-operation": true
@@ -2365,6 +2374,9 @@
},
"Create a vm with ephemeral os disk.": {
"$ref": "./examples/CreateAVmWithADiffOsDisk.json"
+ },
+ "Create a vm with DiskEncryptionSet resource id in the os disk and data disk.": {
+ "$ref": "./examples/CreateAVmWithDiskEncryptionSetResource.json"
}
}
},
@@ -3186,6 +3198,9 @@
},
"Create a scale set with terminate scheduled events enabled.": {
"$ref": "./examples/CreateAScaleSetWithTerminateScheduledEventEnabled.json"
+ },
+ "Create a scale set with DiskEncryptionSet resource in os disk and data disk.": {
+ "$ref": "./examples/CreateAScalesetWithDiskEncryptionSetResource.json"
}
}
},
@@ -6523,6 +6538,10 @@
],
"description": "Describes a reference to Key Vault Secret"
},
+ "DiskEncryptionSet": {
+ "$ref": "#/definitions/SubResource",
+ "description": "Describes the parameter of customer managed disk encryption set resource id that can be specified for disk.
NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details."
+ },
"KeyVaultKeyReference": {
"properties": {
"keyUrl": {
@@ -6631,6 +6650,10 @@
"storageAccountType": {
"$ref": "#/definitions/StorageAccountType",
"description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk."
+ },
+ "diskEncryptionSet": {
+ "$ref": "#/definitions/DiskEncryptionSet",
+ "description": "Specifies the customer managed disk encryption set resource id for the managed disk."
}
},
"allOf": [
@@ -7627,42 +7650,13 @@
"name": "OperatingSystemStateTypes",
"modelAsString": false
}
- },
- "snapshot": {
- "$ref": "#/definitions/SubResource",
- "description": "The snapshot."
- },
- "managedDisk": {
- "$ref": "#/definitions/SubResource",
- "description": "The managedDisk."
- },
- "blobUri": {
- "type": "string",
- "description": "The Virtual Hard Disk."
- },
- "caching": {
- "type": "string",
- "description": "Specifies the caching requirements.
Possible values are:
**None**
**ReadOnly**
**ReadWrite**
Default: **None for Standard storage. ReadOnly for Premium storage**",
- "enum": [
- "None",
- "ReadOnly",
- "ReadWrite"
- ],
- "x-ms-enum": {
- "name": "CachingTypes",
- "modelAsString": false
- }
- },
- "diskSizeGB": {
- "type": "integer",
- "format": "int32",
- "description": "Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image.
This value cannot be larger than 1023 GB"
- },
- "storageAccountType": {
- "$ref": "#/definitions/StorageAccountType",
- "description": "Specifies the storage account type for the managed disk. UltraSSD_LRS cannot be used with OS Disk."
}
},
+ "allOf": [
+ {
+ "$ref": "#/definitions/ImageDisk"
+ }
+ ],
"required": [
"osType",
"osState"
@@ -7675,8 +7669,21 @@
"type": "integer",
"format": "int32",
"description": "Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM."
- },
- "snapshot": {
+ }
+ },
+ "allOf": [
+ {
+ "$ref": "#/definitions/ImageDisk"
+ }
+ ],
+ "required": [
+ "lun"
+ ],
+ "description": "Describes a data disk."
+ },
+ "ImageDisk": {
+ "properties": {
+ "snapshot": {
"$ref": "#/definitions/SubResource",
"description": "The snapshot."
},
@@ -7709,12 +7716,13 @@
"storageAccountType": {
"$ref": "#/definitions/StorageAccountType",
"description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk."
+ },
+ "diskEncryptionSet": {
+ "$ref": "#/definitions/DiskEncryptionSet",
+ "description": "Specifies the customer managed disk encryption set resource id for the managed image disk."
}
},
- "required": [
- "lun"
- ],
- "description": "Describes a data disk."
+ "description": "Describes a image disk."
},
"ImageStorageProfile": {
"properties": {
@@ -7918,6 +7926,10 @@
"storageAccountType": {
"$ref": "#/definitions/StorageAccountType",
"description": "Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk."
+ },
+ "diskEncryptionSet": {
+ "$ref": "#/definitions/DiskEncryptionSet",
+ "description": "Specifies the customer managed disk encryption set resource id for the managed disk."
}
},
"description": "Describes the parameters of a ScaleSet managed disk."
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAScalesetWithDiskEncryptionSetResource.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAScalesetWithDiskEncryptionSetResource.json
new file mode 100644
index 000000000000..6e77c5e1e3d2
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAScalesetWithDiskEncryptionSetResource.json
@@ -0,0 +1,255 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "vmScaleSetName": "{vmss-name}",
+ "api-version": "2019-07-01",
+ "parameters": {
+ "sku": {
+ "tier": "Standard",
+ "capacity": 3,
+ "name": "Standard_DS1_v2"
+ },
+ "properties": {
+ "overprovision": true,
+ "virtualMachineProfile": {
+ "storageProfile": {
+ "imageReference": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "createOption": "FromImage"
+ },
+ "dataDisks": [
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Empty",
+ "lun": 0
+ }
+ ]
+ },
+ "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}"
+ }
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "upgradePolicy": {
+ "mode": "Manual"
+ }
+ },
+ "location": "westus"
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "sku": {
+ "tier": "Standard",
+ "capacity": 3,
+ "name": "Standard_D1_v2"
+ },
+ "name": "{vmss-name}",
+ "properties": {
+ "singlePlacementGroup": true,
+ "overprovision": true,
+ "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
+ "virtualMachineProfile": {
+ "storageProfile": {
+ "imageReference": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "createOption": "FromImage"
+ },
+ "dataDisks": [
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Empty",
+ "lun": 0
+ }
+ ]
+ },
+ "osProfile": {
+ "computerNamePrefix": "{vmss-name}",
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "linuxConfiguration": {
+ "disablePasswordAuthentication": false
+ }
+ },
+ "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
+ }
+ }
+ ]
+ }
+ },
+ "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": "afa2afa8-9e49-48fb-9d18-c86323b5d064",
+ "virtualMachineProfile": {
+ "storageProfile": {
+ "imageReference": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "createOption": "FromImage"
+ },
+ "dataDisks": [
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Empty",
+ "lun": 0
+ }
+ ]
+ },
+ "osProfile": {
+ "computerNamePrefix": "{vmss-name}",
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "linuxConfiguration": {
+ "disablePasswordAuthentication": false
+ }
+ },
+ "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
+ }
+ }
+ ]
+ }
+ },
+ "upgradePolicy": {
+ "mode": "Manual"
+ },
+ "provisioningState": "Creating"
+ },
+ "location": "westus",
+ "type": "Microsoft.Compute/virtualMachineScaleSets",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}"
+ }
+ }
+ }
+}
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAVmWithDiskEncryptionSetResource.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAVmWithDiskEncryptionSetResource.json
new file mode 100644
index 000000000000..38817d67e796
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAVmWithDiskEncryptionSetResource.json
@@ -0,0 +1,229 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "vmName": "myVM",
+ "api-version": "2019-07-01",
+ "parameters": {
+ "location": "westus",
+ "properties": {
+ "hardwareProfile": {
+ "vmSize": "Standard_D1_v2"
+ },
+ "storageProfile": {
+ "imageReference": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}"
+ },
+ "osDisk": {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "name": "myVMosdisk",
+ "createOption": "FromImage"
+ },
+ "dataDisks": [
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Empty",
+ "lun": 0
+ },
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}",
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Attach",
+ "lun": 1
+ }
+ ]
+ },
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "computerName": "myVM",
+ "adminPassword": "{your-password}"
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
+ "type": "Microsoft.Compute/virtualMachines",
+ "properties": {
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "computerName": "myVM",
+ "linuxConfiguration": {
+ "disablePasswordAuthentication": false
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ },
+ "storageProfile": {
+ "imageReference": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
+ },
+ "osDisk": {
+ "name": "myVMosdisk",
+ "diskSizeGB": 30,
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskencryptionset-name}"
+ }
+ },
+ "caching": "ReadWrite",
+ "createOption": "FromImage",
+ "osType": "Linux"
+ },
+ "dataDisks": [
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Empty",
+ "lun": 0
+ },
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}",
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Attach",
+ "lun": 1
+ }
+ ]
+ },
+ "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
+ "hardwareProfile": {
+ "vmSize": "Standard_D1_v2"
+ },
+ "provisioningState": "Creating"
+ },
+ "name": "myVM",
+ "location": "westus"
+ }
+ },
+ "201": {
+ "body": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
+ "type": "Microsoft.Compute/virtualMachines",
+ "properties": {
+ "osProfile": {
+ "adminUsername": "{your-username}",
+ "secrets": [],
+ "computerName": "myVM",
+ "linuxConfiguration": {
+ "disablePasswordAuthentication": false
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
+ "properties": {
+ "primary": true
+ }
+ }
+ ]
+ },
+ "storageProfile": {
+ "imageReference": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom"
+ },
+ "osDisk": {
+ "name": "myVMosdisk",
+ "diskSizeGB": 30,
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS"
+ },
+ "caching": "ReadWrite",
+ "createOption": "FromImage",
+ "osType": "Linux"
+ },
+ "dataDisks": [
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Empty",
+ "lun": 0
+ },
+ {
+ "caching": "ReadWrite",
+ "managedDisk": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}",
+ "storageAccountType": "Standard_LRS",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ }
+ },
+ "diskSizeGB": 1023,
+ "createOption": "Attach",
+ "lun": 1
+ }
+ ]
+ },
+ "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865",
+ "hardwareProfile": {
+ "vmSize": "Standard_D1_v2"
+ },
+ "provisioningState": "Creating"
+ },
+ "name": "myVM",
+ "location": "westus"
+ }
+ }
+ }
+}
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlobWithDiskEncryptionSet.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlobWithDiskEncryptionSet.json
new file mode 100644
index 000000000000..3536694c5a4a
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromABlobWithDiskEncryptionSet.json
@@ -0,0 +1,71 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "api-version": "2019-07-01",
+ "imageName": "myImage",
+ "parameters": {
+ "location": "West US",
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized"
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "osState": "Generalized",
+ "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "caching": "ReadWrite"
+ },
+ "dataDisks": []
+ },
+ "provisioningState": "Creating"
+ },
+ "type": "Microsoft.Compute/images",
+ "location": "westus",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
+ "name": "myImage"
+ }
+ },
+ "201": {
+ "body": {
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "osState": "Generalized",
+ "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd",
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "caching": "ReadWrite"
+ },
+ "dataDisks": []
+ },
+ "provisioningState": "Creating"
+ },
+ "type": "Microsoft.Compute/images",
+ "location": "westus",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
+ "name": "myImage"
+ }
+ }
+ }
+}
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDiskWithDiskEncryptionSet.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDiskWithDiskEncryptionSet.json
new file mode 100644
index 000000000000..eaad87dd0151
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromAManagedDiskWithDiskEncryptionSet.json
@@ -0,0 +1,77 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "api-version": "2019-07-01",
+ "imageName": "myImage",
+ "parameters": {
+ "location": "West US",
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "managedDisk": {
+ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
+ },
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized"
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "managedDisk": {
+ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
+ },
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized",
+ "caching": "ReadWrite"
+ },
+ "dataDisks": []
+ },
+ "provisioningState": "Creating"
+ },
+ "type": "Microsoft.Compute/images",
+ "location": "westus",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
+ "name": "myImage"
+ }
+ },
+ "201": {
+ "body": {
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "managedDisk": {
+ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk"
+ },
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized",
+ "caching": "ReadWrite"
+ },
+ "dataDisks": []
+ },
+ "provisioningState": "Creating"
+ },
+ "type": "Microsoft.Compute/images",
+ "location": "westus",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
+ "name": "myImage"
+ }
+ }
+ }
+}
diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshotWithDiskEncryptionSet.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshotWithDiskEncryptionSet.json
new file mode 100644
index 000000000000..63788cf408de
--- /dev/null
+++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2019-07-01/examples/CreateAnImageFromASnapshotWithDiskEncryptionSet.json
@@ -0,0 +1,77 @@
+{
+ "parameters": {
+ "subscriptionId": "{subscription-id}",
+ "resourceGroupName": "myResourceGroup",
+ "api-version": "2019-07-01",
+ "imageName": "myImage",
+ "parameters": {
+ "location": "West US",
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "snapshot": {
+ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
+ },
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized"
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "body": {
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "snapshot": {
+ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
+ },
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized",
+ "caching": "ReadWrite"
+ },
+ "dataDisks": []
+ },
+ "provisioningState": "Creating"
+ },
+ "type": "Microsoft.Compute/images",
+ "location": "westus",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
+ "name": "myImage"
+ }
+ },
+ "201": {
+ "body": {
+ "properties": {
+ "storageProfile": {
+ "osDisk": {
+ "osType": "Linux",
+ "snapshot": {
+ "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot"
+ },
+ "diskEncryptionSet": {
+ "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}"
+ },
+ "osState": "Generalized",
+ "caching": "ReadWrite"
+ },
+ "dataDisks": []
+ },
+ "provisioningState": "Creating"
+ },
+ "type": "Microsoft.Compute/images",
+ "location": "westus",
+ "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage",
+ "name": "myImage"
+ }
+ }
+ }
+}