From e49722d3007864bc80949a15aa9b88ba95ea0a89 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Tue, 16 Mar 2021 09:43:07 -0700 Subject: [PATCH 01/12] Add network interface configuration schema for virtual machine network profile --- .../stable/2021-03-01/compute.json | 471 +++++++++++++++++- 1 file changed, 470 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index ae4ad73dc63f..dffe179e91e0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9444,6 +9444,18 @@ "primary": { "type": "boolean", "description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface." + }, + "deleteOption": { + "type": "string", + "description": "Specify what happens to the network interface when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": false + } } }, "description": "Describes a network interface reference properties." @@ -9462,17 +9474,424 @@ ], "description": "Describes a network interface reference." }, + "VirtualMachineIpTag": { + "properties": { + "ipTagType": { + "type": "string", + "description": "IP tag type. Example: FirstPartyUsage." + }, + "tag": { + "type": "string", + "description": "IP tag associated with the public IP. Example: SQL, Storage etc." + } + }, + "description": "Contains the IP tag associated with the public IP address." + }, + "VirtualMachinePublicIPAddressDnsSettingsConfiguration": { + "properties": { + "domainNameLabel": { + "type": "string", + "description": "The Domain name label. The concatenation of the domain name label and vm [what] will be the domain name labels of the PublicIPAddress resources that will be created" + } + }, + "required": [ + "domainNameLabel" + ], + "description": "Describes a virtual machines network configuration's DNS settings." + }, + "VirtualMachinePublicIPAddressConfigurationProperties": { + "properties": { + "idleTimeoutInMinutes": { + "type": "integer", + "format": "int32", + "description": "The idle timeout of the public IP address." + }, + "deleteOption": { + "type": "string", + "description": "Specify what happens to the public IP address when the VM is deleted", + "default": "Delete", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": false + } + }, + "dnsSettings": { + "$ref": "#/definitions/VirtualMachinePublicIPAddressDnsSettingsConfiguration", + "description": "The dns settings to be applied on the publicIP addresses ." + }, + "ipTags": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineIpTag" + }, + "description": "The list of IP tags associated with the public IP address." + }, + "publicIPPrefix": { + "$ref": "#/definitions/SubResource", + "description": "The PublicIPPrefix from which to allocate publicIP addresses." + }, + "publicIPAddressVersion": { + "type": "string", + "description": "Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.", + "enum": [ + "IPv4", + "IPv6" + ], + "x-ms-enum": { + "name": "IPVersions", + "modelAsString": true + } + }, + "publicIPAllocationMethod": { + "type": "string", + "description": "Specify the public IP allocation type", + "enum": [ + "Dynamic", + "Static" + ], + "x-ms-enum": { + "name": "PublicIPAllocationMethod", + "modelAsString": false + } + } + }, + "description": "Describes a virtual machines IP Configuration's PublicIPAddress configuration" + }, + "LoadBalancerAndPublicIPSku": { + "properties": { + "name": { + "type": "string", + "description": "Specify public IP sku name", + "enum": [ + "Basic", + "Standard", + "Classic", + "Gateway" + ], + "x-ms-enum": { + "name": "SkuName", + "modelAsString": true + } + }, + "tier": { + "type": "string", + "description": "Specify public IP sku tier", + "enum": [ + "Regional", + "Global" + ], + "x-ms-enum": { + "name": "SkuTier", + "modelAsString": true + } + } + }, + "required": [ + "name" + ], + "description": "Describes the public IP Sku" + }, + "VirtualMachinePublicIPAddressConfiguration": { + "properties": { + "name": { + "type": "string", + "description": "The publicIP address configuration name." + }, + "sku": { + "$ref": "#/definitions/LoadBalancerAndPublicIPSku" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/VirtualMachinePublicIPAddressConfigurationProperties" + } + }, + "required": [ + "name" + ], + "description": "Describes a virtual machines IP Configuration's PublicIPAddress configuration" + }, + "VirtualMachineNetworkInterfaceIPConfigurationProperties": { + "properties": { + "subnet": { + "$ref": "#/definitions/ApiEntityReference", + "description": "Specifies the identifier of the subnet." + }, + "primary": { + "type": "boolean", + "description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface." + }, + "publicIPAddressConfiguration": { + "$ref": "#/definitions/VirtualMachinePublicIPAddressConfiguration", + "description": "The publicIPAddressConfiguration." + }, + "privateIPAddressVersion": { + "type": "string", + "description": "Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.", + "enum": [ + "IPv4", + "IPv6" + ], + "x-ms-enum": { + "name": "IPVersions", + "modelAsString": true + } + }, + "applicationSecurityGroups": { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + }, + "description": "Specifies an array of references to application security group." + }, + "applicationGatewayBackendAddressPools": { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + }, + "description": "Specifies an array of references to backend address pools of application gateways. A virtual machine can reference backend address pools of multiple application gateways. Multiple virtual machines cannot use the same application gateway." + }, + "loadBalancerBackendAddressPools": { + "type": "array", + "items": { + "$ref": "#/definitions/SubResource" + }, + "description": "Specifies an array of references to backend address pools of load balancers. A virtual machine can reference backend address pools of one public and one internal load balancer. [Multiple virtual machines cannot use the same basic sku load balancer]." + } + }, + "description": "Describes a virtual machine network interface IP configuration properties." + }, + "VirtualMachineNetworkInterfaceIPConfiguration": { + "properties": { + "name": { + "type": "string", + "description": "The IP configuration name." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/VirtualMachineNetworkInterfaceIPConfigurationProperties" + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "#/definitions/SubResource" + } + ], + "description": "Describes a virtual machine network profile's IP configuration." + }, + "VirtualMachineNetworkInterfaceDnsSettingsConfiguration": { + "properties": { + "dnsServers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of DNS servers IP addresses" + } + }, + "description": "Describes a virtual machines network configuration's DNS settings." + }, + "QoSIPRange": { + "properties": { + "startIP": { + "type": "string" + }, + "endIP": { + "type": "string" + } + } + }, + "QoSPortRange": { + "properties": { + "start": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "end": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + } + } + }, + "DscpConfigurationProperties": { + "properties": { + "markings": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Set the priority for the traffic tied to this configuration." + }, + "destinationIPRanges": { + "type": "array", + "items": { + "$ref": "#/definitions/QoSIPRange" + } + }, + "sourceIPRanges": { + "type": "array", + "items": { + "$ref": "#/definitions/QoSIPRange" + } + }, + "destinationPortRanges": { + "type": "array", + "items": { + "$ref": "#/definitions/QoSPortRange" + } + }, + "sourcePortRanges": { + "type": "array", + "items": { + "$ref": "#/definitions/QoSPortRange" + } + }, + "protocol": { + "type": "string", + "enum": [ + "Icmp", + "Tcp", + "Udp", + "Gre", + "Esp", + "Ah", + "Vxlan", + "All" + ], + "x-ms-enum": { + "name": "DscpProtocolOptions", + "modelAsString": false + } + }, + "associatedNetworkInterfaces": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterfaceReference" + } + } + } + }, + "DscpConfiguration": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DscpConfigurationProperties" + } + } + }, + "VirtualMachineNetworkInterfaceConfigurationProperties": { + "properties": { + "primary": { + "type": "boolean", + "description": "Specifies the primary network interface in case the virtual machine has more than 1 network interface." + }, + "deleteOption": { + "type": "string", + "default": "Delete", + "description": "Specify what happens to the network interface when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": false + } + }, + "enableAcceleratedNetworking": { + "type": "boolean", + "description": "Specifies whether the network interface is accelerated networking-enabled." + }, + "enableFpga": { + "type": "boolean", + "description": "Specifies whether the network interface is FPGA networking-enabled." + }, + "enableIPForwarding": { + "type": "boolean", + "description": "Whether IP forwarding enabled on this NIC." + }, + "networkSecurityGroup": { + "$ref": "#/definitions/SubResource", + "description": "The network security group." + }, + "dnsSettings": { + "$ref": "#/definitions/VirtualMachineNetworkInterfaceDnsSettingsConfiguration", + "description": "The dns settings to be applied on the network interfaces." + }, + "ipConfigurations": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineNetworkInterfaceIPConfiguration" + }, + "description": "Specifies the IP configurations of the network interface." + }, + "dscpConfiguration": { + "$ref": "#/definitions/DscpConfiguration" + } + }, + "required": [ + "ipConfigurations" + ], + "description": "Describes a virtual machine network profile's IP configuration." + }, + "VirtualMachineNetworkInterfaceConfiguration": { + "properties": { + "name": { + "type": "string", + "description": "The network interface configuration name." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/VirtualMachineNetworkInterfaceConfigurationProperties" + } + }, + "required": [ + "name" + ], + "allOf": [ + { + "$ref": "#/definitions/SubResource" + } + ], + "description": "Describes a virtual machine network interface configurations." + }, "NetworkProfile": { "properties": { + "networkApiVersion": { + "type": "string", + "description": "", + "enum": [ + "2021-03-01" + ], + "x-ms-enum": { + "name": "NetworkApiVersion", + "modelAsString": true + } + }, "networkInterfaces": { "type": "array", "items": { "$ref": "#/definitions/NetworkInterfaceReference" }, "description": "Specifies the list of resource Ids for the network interfaces associated with the virtual machine." + }, + "NetworkInterfaceConfigurations": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualMachineNetworkInterfaceConfiguration" + }, + "description": "Specifies the networking configurations that will be used to create the virtual machine networking resources." } }, - "description": "Specifies the network interfaces of the virtual machine." + "description": "Specifies the network interfaces or the networking configuration of the virtual machine." }, "BootDiagnostics": { "properties": { @@ -10810,6 +11229,19 @@ "enableIPForwarding": { "type": "boolean", "description": "Whether IP forwarding enabled on this NIC." + }, + "deleteOption": { + "type": "string", + "default": null, + "description": "Specify what happens to the network interface when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": false + } } }, "required": [ @@ -10849,6 +11281,19 @@ "enableIPForwarding": { "type": "boolean", "description": "Whether IP forwarding enabled on this NIC." + }, + "deleteOption": { + "type": "string", + "default": null, + "description": "Specify what happens to the network interface when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": false + } } }, "description": "Describes a virtual machine scale set updatable network profile's IP configuration.Use this object for updating network profile's IP Configuration." @@ -11011,6 +11456,18 @@ }, "VirtualMachineScaleSetNetworkProfile": { "properties": { + "networkApiVersion": { + "type": "string", + "default": null, + "description": "", + "enum": [ + "2021-03-01" + ], + "x-ms-enum": { + "name": "NetworkApiVersion", + "modelAsString": true + } + }, "healthProbe": { "$ref": "#/definitions/ApiEntityReference", "description": "A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'." @@ -11027,6 +11484,18 @@ }, "VirtualMachineScaleSetUpdateNetworkProfile": { "properties": { + "networkApiVersion": { + "type": "string", + "default": null, + "description": "", + "enum": [ + "2021-03-01" + ], + "x-ms-enum": { + "name": "NetworkApiVersion", + "modelAsString": true + } + }, "healthProbe": { "$ref": "#/definitions/ApiEntityReference", "description": "A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'." From 53498283a59d5a58dfa3fe705e39158fe2dae345 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Thu, 18 Mar 2021 13:32:57 -0700 Subject: [PATCH 02/12] PR comments --- .../stable/2021-03-01/compute.json | 111 +++--------------- 1 file changed, 17 insertions(+), 94 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index dffe179e91e0..087178f71c2d 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9454,7 +9454,7 @@ ], "x-ms-enum": { "name": "DeleteOptions", - "modelAsString": false + "modelAsString": true } } }, @@ -9491,7 +9491,7 @@ "properties": { "domainNameLabel": { "type": "string", - "description": "The Domain name label. The concatenation of the domain name label and vm [what] will be the domain name labels of the PublicIPAddress resources that will be created" + "description": "The Domain name label prefix. The concatenation of the domain name label and vm [what] will be the domain name labels of the PublicIPAddress resources that will be created" } }, "required": [ @@ -9516,7 +9516,7 @@ ], "x-ms-enum": { "name": "DeleteOptions", - "modelAsString": false + "modelAsString": true } }, "dnsSettings": { @@ -9555,29 +9555,27 @@ ], "x-ms-enum": { "name": "PublicIPAllocationMethod", - "modelAsString": false + "modelAsString": true } } }, "description": "Describes a virtual machines IP Configuration's PublicIPAddress configuration" }, - "LoadBalancerAndPublicIPSku": { + "PublicIPAddressSku": { "properties": { - "name": { + "publicIPAddressSkuName": { "type": "string", "description": "Specify public IP sku name", "enum": [ "Basic", - "Standard", - "Classic", - "Gateway" + "Standard" ], "x-ms-enum": { - "name": "SkuName", + "name": "PublicIPAddressSkuName", "modelAsString": true } }, - "tier": { + "publicIPAddressSkuTier": { "type": "string", "description": "Specify public IP sku tier", "enum": [ @@ -9585,13 +9583,13 @@ "Global" ], "x-ms-enum": { - "name": "SkuTier", + "name": "PublicIPAddressSkuTier", "modelAsString": true } } }, "required": [ - "name" + "publicIPAddressSkuName" ], "description": "Describes the public IP Sku" }, @@ -9602,7 +9600,7 @@ "description": "The publicIP address configuration name." }, "sku": { - "$ref": "#/definitions/LoadBalancerAndPublicIPSku" + "$ref": "#/definitions/PublicIPAddressSku" }, "properties": { "x-ms-client-flatten": true, @@ -9617,7 +9615,7 @@ "VirtualMachineNetworkInterfaceIPConfigurationProperties": { "properties": { "subnet": { - "$ref": "#/definitions/ApiEntityReference", + "$ref": "#/definitions/SubResource", "description": "Specifies the identifier of the subnet." }, "primary": { @@ -9678,11 +9676,6 @@ "required": [ "name" ], - "allOf": [ - { - "$ref": "#/definitions/SubResource" - } - ], "description": "Describes a virtual machine network profile's IP configuration." }, "VirtualMachineNetworkInterfaceDnsSettingsConfiguration": { @@ -9721,72 +9714,6 @@ } } }, - "DscpConfigurationProperties": { - "properties": { - "markings": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Set the priority for the traffic tied to this configuration." - }, - "destinationIPRanges": { - "type": "array", - "items": { - "$ref": "#/definitions/QoSIPRange" - } - }, - "sourceIPRanges": { - "type": "array", - "items": { - "$ref": "#/definitions/QoSIPRange" - } - }, - "destinationPortRanges": { - "type": "array", - "items": { - "$ref": "#/definitions/QoSPortRange" - } - }, - "sourcePortRanges": { - "type": "array", - "items": { - "$ref": "#/definitions/QoSPortRange" - } - }, - "protocol": { - "type": "string", - "enum": [ - "Icmp", - "Tcp", - "Udp", - "Gre", - "Esp", - "Ah", - "Vxlan", - "All" - ], - "x-ms-enum": { - "name": "DscpProtocolOptions", - "modelAsString": false - } - }, - "associatedNetworkInterfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterfaceReference" - } - } - } - }, - "DscpConfiguration": { - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/DscpConfigurationProperties" - } - } - }, "VirtualMachineNetworkInterfaceConfigurationProperties": { "properties": { "primary": { @@ -9803,7 +9730,7 @@ ], "x-ms-enum": { "name": "DeleteOptions", - "modelAsString": false + "modelAsString": true } }, "enableAcceleratedNetworking": { @@ -9834,7 +9761,7 @@ "description": "Specifies the IP configurations of the network interface." }, "dscpConfiguration": { - "$ref": "#/definitions/DscpConfiguration" + "$ref": "#/definitions/SubResource" } }, "required": [ @@ -11232,7 +11159,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11240,7 +11166,7 @@ ], "x-ms-enum": { "name": "DeleteOptions", - "modelAsString": false + "modelAsString": true } } }, @@ -11284,7 +11210,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11292,7 +11217,7 @@ ], "x-ms-enum": { "name": "DeleteOptions", - "modelAsString": false + "modelAsString": true } } }, @@ -11458,7 +11383,6 @@ "properties": { "networkApiVersion": { "type": "string", - "default": null, "description": "", "enum": [ "2021-03-01" @@ -11486,7 +11410,6 @@ "properties": { "networkApiVersion": { "type": "string", - "default": null, "description": "", "enum": [ "2021-03-01" From b53d0349e79827f6e24e0606fb6fd82a329a281b Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Fri, 19 Mar 2021 09:45:35 -0700 Subject: [PATCH 03/12] fix lint errors --- .../stable/2021-03-01/compute.json | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index 087178f71c2d..275223b005ae 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9690,30 +9690,6 @@ }, "description": "Describes a virtual machines network configuration's DNS settings." }, - "QoSIPRange": { - "properties": { - "startIP": { - "type": "string" - }, - "endIP": { - "type": "string" - } - } - }, - "QoSPortRange": { - "properties": { - "start": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - }, - "end": { - "type": "integer", - "minimum": 0, - "maximum": 65535 - } - } - }, "VirtualMachineNetworkInterfaceConfigurationProperties": { "properties": { "primary": { @@ -9810,7 +9786,7 @@ }, "description": "Specifies the list of resource Ids for the network interfaces associated with the virtual machine." }, - "NetworkInterfaceConfigurations": { + "networkInterfaceConfigurations": { "type": "array", "items": { "$ref": "#/definitions/VirtualMachineNetworkInterfaceConfiguration" @@ -11305,6 +11281,9 @@ "type": "string", "description": "The publicIP address configuration name." }, + "sku": { + "$ref": "#/definitions/PublicIPAddressSku" + }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/VirtualMachineScaleSetPublicIPAddressConfigurationProperties" From 2578ff5686ef6ac9577d8e47a5e9a0f78d61aecd Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Mon, 22 Mar 2021 14:45:14 -0700 Subject: [PATCH 04/12] PR comments --- .../stable/2021-03-01/compute.json | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index 275223b005ae..ba9a77ec4efa 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9491,7 +9491,7 @@ "properties": { "domainNameLabel": { "type": "string", - "description": "The Domain name label prefix. The concatenation of the domain name label and vm [what] will be the domain name labels of the PublicIPAddress resources that will be created" + "description": "The Domain name label prefix of the PublicIPAddress resources that will be created. The generated name label is the concatenation of the domain name label and vm network profile unique ID." } }, "required": [ @@ -11000,6 +11000,18 @@ "$ref": "#/definitions/SubResource" }, "description": "Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer." + }, + "deleteOption": { + "type": "string", + "description": "Specify what happens to the public IP when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": true + } } }, "description": "Describes a virtual machine scale set network profile's IP configuration properties." @@ -11057,6 +11069,18 @@ "$ref": "#/definitions/SubResource" }, "description": "The load balancer inbound nat pools." + }, + "deleteOption": { + "type": "string", + "description": "Specify what happens to the public IP when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": true + } } }, "description": "Describes a virtual machine scale set network profile's IP configuration properties." From 78e5735bdc943a28a8517e6f92b5bc643b13a951 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Mon, 22 Mar 2021 16:11:57 -0700 Subject: [PATCH 05/12] comments and fixes --- .../stable/2021-03-01/compute.json | 75 ++++++++++--------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index ba9a77ec4efa..864cc7366881 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9447,6 +9447,7 @@ }, "deleteOption": { "type": "string", + "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -9509,7 +9510,7 @@ "deleteOption": { "type": "string", "description": "Specify what happens to the public IP address when the VM is deleted", - "default": "Delete", + "default": null, "enum": [ "Delete", "Detach" @@ -9599,12 +9600,12 @@ "type": "string", "description": "The publicIP address configuration name." }, - "sku": { - "$ref": "#/definitions/PublicIPAddressSku" - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/VirtualMachinePublicIPAddressConfigurationProperties" + }, + "sku": { + "$ref": "#/definitions/PublicIPAddressSku" } }, "required": [ @@ -9698,7 +9699,7 @@ }, "deleteOption": { "type": "string", - "default": "Delete", + "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -9768,9 +9769,16 @@ }, "NetworkProfile": { "properties": { + "networkInterfaces": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkInterfaceReference" + }, + "description": "Specifies the list of resource Ids for the network interfaces associated with the virtual machine." + }, "networkApiVersion": { "type": "string", - "description": "", + "description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations", "enum": [ "2021-03-01" ], @@ -9779,13 +9787,6 @@ "modelAsString": true } }, - "networkInterfaces": { - "type": "array", - "items": { - "$ref": "#/definitions/NetworkInterfaceReference" - }, - "description": "Specifies the list of resource Ids for the network interfaces associated with the virtual machine." - }, "networkInterfaceConfigurations": { "type": "array", "items": { @@ -11003,6 +11004,7 @@ }, "deleteOption": { "type": "string", + "default": null, "description": "Specify what happens to the public IP when the VM is deleted", "enum": [ "Delete", @@ -11072,6 +11074,7 @@ }, "deleteOption": { "type": "string", + "default": null, "description": "Specify what happens to the public IP when the VM is deleted", "enum": [ "Delete", @@ -11159,6 +11162,7 @@ }, "deleteOption": { "type": "string", + "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11210,6 +11214,7 @@ }, "deleteOption": { "type": "string", + "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11305,12 +11310,12 @@ "type": "string", "description": "The publicIP address configuration name." }, - "sku": { - "$ref": "#/definitions/PublicIPAddressSku" - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/VirtualMachineScaleSetPublicIPAddressConfigurationProperties" + }, + "sku": { + "$ref": "#/definitions/PublicIPAddressSku" } }, "required": [ @@ -11384,17 +11389,6 @@ }, "VirtualMachineScaleSetNetworkProfile": { "properties": { - "networkApiVersion": { - "type": "string", - "description": "", - "enum": [ - "2021-03-01" - ], - "x-ms-enum": { - "name": "NetworkApiVersion", - "modelAsString": true - } - }, "healthProbe": { "$ref": "#/definitions/ApiEntityReference", "description": "A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'." @@ -11405,15 +11399,10 @@ "$ref": "#/definitions/VirtualMachineScaleSetNetworkConfiguration" }, "description": "The list of network configurations." - } - }, - "description": "Describes a virtual machine scale set network profile." - }, - "VirtualMachineScaleSetUpdateNetworkProfile": { - "properties": { + }, "networkApiVersion": { "type": "string", - "description": "", + "description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'", "enum": [ "2021-03-01" ], @@ -11421,7 +11410,12 @@ "name": "NetworkApiVersion", "modelAsString": true } - }, + } + }, + "description": "Describes a virtual machine scale set network profile." + }, + "VirtualMachineScaleSetUpdateNetworkProfile": { + "properties": { "healthProbe": { "$ref": "#/definitions/ApiEntityReference", "description": "A reference to a load balancer probe used to determine the health of an instance in the virtual machine scale set. The reference will be in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'." @@ -11432,6 +11426,17 @@ "$ref": "#/definitions/VirtualMachineScaleSetUpdateNetworkConfiguration" }, "description": "The list of network configurations." + }, + "networkApiVersion": { + "type": "string", + "description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'", + "enum": [ + "2021-03-01" + ], + "x-ms-enum": { + "name": "NetworkApiVersion", + "modelAsString": true + } } }, "description": "Describes a virtual machine scale set network profile." From 3c8f00c9e61ffbfec02adaa8e65c2bdfbbfa8d70 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Tue, 23 Mar 2021 09:57:32 -0700 Subject: [PATCH 06/12] move DeleteOption from VirtualMachineScaleSetIPConfigurationProperties to VirtualMachineScaleSetPublicIPAddressConfiguration --- .../stable/2021-03-01/compute.json | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index 864cc7366881..94f1a444d271 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -11001,19 +11001,6 @@ "$ref": "#/definitions/SubResource" }, "description": "Specifies an array of references to inbound Nat pools of the load balancers. A scale set can reference inbound nat pools of one public and one internal load balancer. Multiple scale sets cannot use the same basic sku load balancer." - }, - "deleteOption": { - "type": "string", - "default": null, - "description": "Specify what happens to the public IP when the VM is deleted", - "enum": [ - "Delete", - "Detach" - ], - "x-ms-enum": { - "name": "DeleteOptions", - "modelAsString": true - } } }, "description": "Describes a virtual machine scale set network profile's IP configuration properties." @@ -11071,19 +11058,6 @@ "$ref": "#/definitions/SubResource" }, "description": "The load balancer inbound nat pools." - }, - "deleteOption": { - "type": "string", - "default": null, - "description": "Specify what happens to the public IP when the VM is deleted", - "enum": [ - "Delete", - "Detach" - ], - "x-ms-enum": { - "name": "DeleteOptions", - "modelAsString": true - } } }, "description": "Describes a virtual machine scale set network profile's IP configuration properties." @@ -11369,6 +11343,19 @@ "name": "IPVersion", "modelAsString": true } + }, + "deleteOption": { + "type": "string", + "default": null, + "description": "Specify what happens to the public IP when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": true + } } }, "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration" @@ -11383,6 +11370,19 @@ "dnsSettings": { "$ref": "#/definitions/VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings", "description": "The dns settings to be applied on the publicIP addresses ." + }, + "deleteOption": { + "type": "string", + "default": null, + "description": "Specify what happens to the public IP when the VM is deleted", + "enum": [ + "Delete", + "Detach" + ], + "x-ms-enum": { + "name": "DeleteOptions", + "modelAsString": true + } } }, "description": "Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration" From b2d3f0c51e81fb048f5a771edb44667e9c0760db Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Wed, 24 Mar 2021 00:16:11 -0700 Subject: [PATCH 07/12] fix build checks --- .../Microsoft.Compute/stable/2021-03-01/compute.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index 94f1a444d271..2780ce164c76 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9447,7 +9447,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -9510,7 +9509,6 @@ "deleteOption": { "type": "string", "description": "Specify what happens to the public IP address when the VM is deleted", - "default": null, "enum": [ "Delete", "Detach" @@ -9699,7 +9697,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11136,7 +11133,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11188,7 +11184,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the network interface when the VM is deleted", "enum": [ "Delete", @@ -11346,7 +11341,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the public IP when the VM is deleted", "enum": [ "Delete", @@ -11373,7 +11367,6 @@ }, "deleteOption": { "type": "string", - "default": null, "description": "Specify what happens to the public IP when the VM is deleted", "enum": [ "Delete", From 18e2912a8fdfbefae8613ee4d5ca2326ea646ad6 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Wed, 24 Mar 2021 11:36:35 -0700 Subject: [PATCH 08/12] fix VirtualMachineNetworkInterfaceConfiguration definition --- .../Microsoft.Compute/stable/2021-03-01/compute.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index 2780ce164c76..b9bfb4e54df0 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9757,11 +9757,6 @@ "required": [ "name" ], - "allOf": [ - { - "$ref": "#/definitions/SubResource" - } - ], "description": "Describes a virtual machine network interface configurations." }, "NetworkProfile": { From 21c79db8af9ef2d5dcc862505ff26f80090d39f1 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Wed, 24 Mar 2021 17:35:07 -0700 Subject: [PATCH 09/12] fix networking api version --- .../Microsoft.Compute/stable/2021-03-01/compute.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index b9bfb4e54df0..f22c248fe02f 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -9772,7 +9772,7 @@ "type": "string", "description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations", "enum": [ - "2021-03-01" + "2020-11-01" ], "x-ms-enum": { "name": "NetworkApiVersion", @@ -11392,7 +11392,7 @@ "type": "string", "description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'", "enum": [ - "2021-03-01" + "2020-11-01" ], "x-ms-enum": { "name": "NetworkApiVersion", @@ -11419,7 +11419,7 @@ "type": "string", "description": "specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'", "enum": [ - "2021-03-01" + "2020-11-01" ], "x-ms-enum": { "name": "NetworkApiVersion", From 396a3a1bfd08f4f9fb7bda6ea782dfab20abd1f3 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Fri, 26 Mar 2021 19:59:04 -0700 Subject: [PATCH 10/12] Add example --- ...eAVmWithNetworkInterfaceConfiguration.json | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json new file mode 100644 index 000000000000..b6b58705466d --- /dev/null +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json @@ -0,0 +1,174 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "vmName": "myVM", + "api-version": "2021-03-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "name": "myVMosdisk", + "createOption": "FromImage" + } + }, + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{nic-config-name}", + "properties": { + "primary": true, + "deleteOption": "Delete", + "ipConfigurations": [ + { + "name": "{ip-config-name}", + "properties": { + "primary": true, + "publicIPAddressConfiguration": { + "name": "{publicIP-config-name}", + "sku": { + "publicIPAddressSkuName": "Basic", + "PublicIPAddressSkuTier": "Global" + }, + "properties": { + "deleteOption": "Detach", + "publicIPAllocationMethod": "Static" + } + } + } + } + ] + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "adminPassword": "{your-password}" + } + } + } + }, + "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", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "dataDisks": [] + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f", + "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", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "sku": "2016-Datacenter", + "publisher": "MicrosoftWindowsServer", + "version": "latest", + "offer": "WindowsServer" + }, + "osDisk": { + "osType": "Windows", + "caching": "ReadWrite", + "createOption": "FromImage", + "name": "myVMosdisk", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + "dataDisks": [] + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "provisioningState": "Creating" + }, + "name": "myVM", + "location": "westus" + } + } + } +} From dbeee3f88416132a60041c76abd204fda8803e0f Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Thu, 1 Apr 2021 11:33:07 -0700 Subject: [PATCH 11/12] link example file --- .../Microsoft.Compute/stable/2021-03-01/compute.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json index f22c248fe02f..91b08793fc27 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/compute.json @@ -3108,6 +3108,9 @@ }, "Create a VM with Uefi Settings of secureBoot and vTPM.": { "$ref": "./examples/CreateAVmWithUefiSettings.json" + }, + "Create a VM with network interface configuration": { + "$ref": "./examples/CreateAVmWithNetworkInterfaceConfiguration.json" } } }, From d8edf831b884957df6f21b431f5f39c682c4a285 Mon Sep 17 00:00:00 2001 From: Bashar Gharaibeh Date: Fri, 2 Apr 2021 10:31:18 -0700 Subject: [PATCH 12/12] fix example --- .../examples/CreateAVmWithNetworkInterfaceConfiguration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json index b6b58705466d..75cb4f765ab2 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json +++ b/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/examples/CreateAVmWithNetworkInterfaceConfiguration.json @@ -43,7 +43,7 @@ "name": "{publicIP-config-name}", "sku": { "publicIPAddressSkuName": "Basic", - "PublicIPAddressSkuTier": "Global" + "publicIPAddressSkuTier": "Global" }, "properties": { "deleteOption": "Detach",