Skip to content

Commit

Permalink
Add UserData properties for VM and VMSS for stable 2021-03-01 (#13220)
Browse files Browse the repository at this point in the history
* added

* remove hello

* add userData to VM properties and VMSS vm profile

* update enums

* update $expand;

* update

* add json files

* reference the json files

* update examples

* addressing comments from PR

* document min api versions

* revert changes to 2020 12 1

* remove two files

* undo changes to computejosn

* fix json

* try fix descrition

* revert descrition

* addressing comments from PR

* addressing comments from PR

* change modelAsString to false

* update json

* remove userdata from enum

* add UserData to enum

* update userdata enum for breaking change intentionally

* rename enum names

* update

* use modelAsString false

* updated desc

* add UserData for InstanceViewTypes enum

* udpate api versin

* add userData to 2020-08-02/HybridCompute.json

* add userData to cloudService.json

* update

* add userdata to get vm example

* add two new example jsons

* update examples

* prettier fix

* modify examples

* remove userData

* remove userData from cloudService

* explain userData in comments

* addressing comments from PR

* resolve conflict

* update comment

* update
  • Loading branch information
roipmsft authored Apr 26, 2021
1 parent 80921ec commit d97c7d3
Show file tree
Hide file tree
Showing 7 changed files with 699 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@
{
"in": "query",
"name": "$expand",
"description": "The expand expression to apply to the operation.",
"description": "The expand expression to apply to the operation. 'UserData' is not supported for cloud services.",
"type": "string",
"enum": [
"instanceView"
"instanceView",
"userData"
],
"x-ms-enum": {
"name": "InstanceViewTypes",
Expand Down Expand Up @@ -219,10 +220,11 @@
{
"in": "query",
"name": "$expand",
"description": "The expand expression to apply to the operation.",
"description": "The expand expression to apply to the operation. 'UserData' is not supported for cloud services.",
"type": "string",
"enum": [
"instanceView"
"instanceView",
"userData"
],
"x-ms-enum": {
"name": "InstanceViewTypes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,10 @@
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation. The response shows the list of instance view of the dedicated hosts under the dedicated host group.",
"description": "The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated hosts under the dedicated host group. 'UserData' is not supported for dedicated host group.",
"enum": [
"instanceView"
"instanceView",
"userData"
],
"x-ms-enum": {
"name": "InstanceViewTypes",
Expand Down Expand Up @@ -1082,9 +1083,10 @@
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation.",
"description": "The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the dedicated host. 'UserData' is not supported for dedicated host.",
"enum": [
"instanceView"
"instanceView",
"userData"
],
"x-ms-enum": {
"name": "InstanceViewTypes",
Expand Down Expand Up @@ -3120,6 +3122,9 @@
},
"Create a VM with network interface configuration": {
"$ref": "./examples/CreateAVmWithNetworkInterfaceConfiguration.json"
},
"Create a VM with UserData": {
"$ref": "./examples/CreateOrUpdateAVmWithUserData.json"
}
}
},
Expand Down Expand Up @@ -3257,9 +3262,10 @@
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation.",
"description": "The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine.",
"enum": [
"instanceView"
"instanceView",
"userData"
],
"x-ms-enum": {
"name": "InstanceViewTypes",
Expand Down Expand Up @@ -4232,6 +4238,9 @@
},
"Create a scale set with Uefi Settings of secureBoot and vTPM.": {
"$ref": "./examples/CreateAScaleSetWithUefiSettings.json"
},
"Create a scale set with userData.": {
"$ref": "./examples/CreateOrUpdateAScaleSetWithUserData.json"
}
}
},
Expand Down Expand Up @@ -4361,6 +4370,20 @@
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"name": "$expand",
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation. 'UserData' will retrieve the UserData of the virtual machine scale set.",
"enum": [
"userData"
],
"x-ms-enum": {
"name": "ExpandTypesForGetVMScaleSets",
"modelAsString": true
}
}
],
"responses": {
Expand All @@ -4374,6 +4397,9 @@
"x-ms-examples": {
"Get a virtual machine scale set placed on a dedicated host group through automatic placement.": {
"$ref": "./examples/GetVirtualMachineScaleSetAutoPlacedOnDedicatedHostGroup.json"
},
"Get a virtual machine scale set with UserData": {
"$ref": "./examples/GetVirtualMachineScaleSetWithUserData.json"
}
}
}
Expand Down Expand Up @@ -6291,9 +6317,10 @@
"in": "query",
"required": false,
"type": "string",
"description": "The expand expression to apply on the operation.",
"description": "The expand expression to apply on the operation. 'InstanceView' will retrieve the instance view of the virtual machine. 'UserData' will retrieve the UserData of the virtual machine.",
"enum": [
"instanceView"
"instanceView",
"userData"
],
"x-ms-enum": {
"name": "InstanceViewTypes",
Expand All @@ -6314,6 +6341,11 @@
"$ref": "#/definitions/VirtualMachineScaleSetVM"
}
}
},
"x-ms-examples": {
"Get VM scale set VM with UserData": {
"$ref": "./examples/GetVirtualMachineScaleSetVMWithUserData.json"
}
}
}
},
Expand Down Expand Up @@ -9094,7 +9126,7 @@
"required": [
"createOption"
],
"description": "Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"DataDisk": {
"properties": {
Expand Down Expand Up @@ -9175,14 +9207,14 @@
},
"osDisk": {
"$ref": "#/definitions/OSDisk",
"description": "Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"dataDisks": {
"type": "array",
"items": {
"$ref": "#/definitions/DataDisk"
},
"description": "Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
}
},
"description": "Specifies the storage settings for the virtual machine disks."
Expand Down Expand Up @@ -10242,6 +10274,10 @@
"scheduledEventsProfile": {
"$ref": "#/definitions/ScheduledEventsProfile",
"description": "Specifies Scheduled Event related configurations."
},
"userData": {
"type": "string",
"description": "UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01"
}
},
"description": "Describes the properties of a Virtual Machine."
Expand Down Expand Up @@ -10576,14 +10612,14 @@
"properties": {
"osDisk": {
"$ref": "#/definitions/ImageOSDisk",
"description": "Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"dataDisks": {
"type": "array",
"items": {
"$ref": "#/definitions/ImageDataDisk"
},
"description": "Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"zoneResilient": {
"type": "boolean",
Expand Down Expand Up @@ -10937,14 +10973,14 @@
},
"osDisk": {
"$ref": "#/definitions/VirtualMachineScaleSetOSDisk",
"description": "Specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies information about the operating system disk used by the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
},
"dataDisks": {
"type": "array",
"items": {
"$ref": "#/definitions/VirtualMachineScaleSetDataDisk"
},
"description": "Specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)."
"description": "Specifies the parameters that are used to add data disks to the virtual machines in the scale set. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview)."
}
},
"description": "Describes a virtual machine scale set storage profile."
Expand Down Expand Up @@ -11643,6 +11679,10 @@
"scheduledEventsProfile": {
"$ref": "#/definitions/ScheduledEventsProfile",
"description": "Specifies Scheduled Event related configurations."
},
"userData": {
"type": "string",
"description": "UserData for the virtual machines in the scale set, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01"
}
},
"description": "Describes a virtual machine scale set virtual machine profile."
Expand Down Expand Up @@ -11684,6 +11724,10 @@
"scheduledEventsProfile": {
"$ref": "#/definitions/ScheduledEventsProfile",
"description": "Specifies Scheduled Event related configurations."
},
"userData": {
"type": "string",
"description": "UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01"
}
},
"description": "Describes a virtual machine scale set virtual machine profile."
Expand Down Expand Up @@ -12343,6 +12387,10 @@
"protectionPolicy": {
"$ref": "#/definitions/VirtualMachineScaleSetVMProtectionPolicy",
"description": "Specifies the protection policy of the virtual machine."
},
"userData": {
"type": "string",
"description": "UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01"
}
},
"description": "Describes the properties of a virtual machine scale set virtual machine."
Expand Down
Loading

0 comments on commit d97c7d3

Please sign in to comment.