From d8c4a9af8e66ecbc5ee99b37d9be636279c40bc0 Mon Sep 17 00:00:00 2001 From: adxsdknet Date: Wed, 24 Apr 2019 19:30:22 +0000 Subject: [PATCH] .NET SDK Resource Provider:'Compute' REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/5753' REST Spec PR Author 'robhat1' REST Spec PR Last commit --- src/SDKs/Compute/AzSdk.RP.props | 2 +- .../Models/AutomaticOSUpgradePolicy.cs | 21 ++++-- .../Generated/Models/DataDisk.cs | 13 +++- .../Models/ResourceSkuLocationInfo.cs | 11 +++- .../Models/ResourceSkuZoneDetails.cs | 65 +++++++++++++++++++ .../Models/VirtualMachineScaleSet.cs | 18 ++++- .../Models/VirtualMachineScaleSetUpdate.cs | 18 ++++- .../Models/VirtualMachineScaleSetVMProfile.cs | 17 +---- .../Generated/Models/WindowsConfiguration.cs | 10 ++- .../Generated/ResourceSkusOperations.cs | 2 +- .../SdkInfo_ComputeManagementClient.cs | 2 +- 11 files changed, 147 insertions(+), 32 deletions(-) create mode 100644 src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuZoneDetails.cs diff --git a/src/SDKs/Compute/AzSdk.RP.props b/src/SDKs/Compute/AzSdk.RP.props index a22c36aebd490..3d2b4e3b39d71 100644 --- a/src/SDKs/Compute/AzSdk.RP.props +++ b/src/SDKs/Compute/AzSdk.RP.props @@ -1,7 +1,7 @@  - Compute_2019-03-01;Compute_2018-09-30;Compute_2017-09-01;ContainerService_2017-01-31; + Compute_2019-03-01;Compute_2018-09-30;Compute_2019-04-01;ContainerService_2017-01-31; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/AutomaticOSUpgradePolicy.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/AutomaticOSUpgradePolicy.cs index 9325514cc05ae..1a7ad4aca3b4e 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/AutomaticOSUpgradePolicy.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/AutomaticOSUpgradePolicy.cs @@ -29,10 +29,13 @@ public AutomaticOSUpgradePolicy() /// /// Initializes a new instance of the AutomaticOSUpgradePolicy class. /// - /// Whether OS upgrades should - /// automatically be applied to scale set instances in a rolling - /// fashion when a newer version of the image becomes available. - /// Default value is false. + /// Indicates whether OS + /// upgrades should automatically be applied to scale set instances in + /// a rolling fashion when a newer version of the OS image becomes + /// available. Default value is false. If this is set to true for + /// Windows based scale sets, recommendation is to set + /// [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) + /// to false. /// Whether OS image rollback /// feature should be disabled. Default value is false. public AutomaticOSUpgradePolicy(bool? enableAutomaticOSUpgrade = default(bool?), bool? disableAutomaticRollback = default(bool?)) @@ -48,9 +51,13 @@ public AutomaticOSUpgradePolicy() partial void CustomInit(); /// - /// Gets or sets whether OS upgrades should automatically be applied to - /// scale set instances in a rolling fashion when a newer version of - /// the image becomes available. Default value is false. + /// Gets or sets indicates whether OS upgrades should automatically be + /// applied to scale set instances in a rolling fashion when a newer + /// version of the OS image becomes available. Default value is false. + /// If this is set to true for Windows based scale sets, recommendation + /// is to set + /// [enableAutomaticUpdates](https://docs.microsoft.com/dotnet/api/microsoft.azure.management.compute.models.windowsconfiguration.enableautomaticupdates?view=azure-dotnet) + /// to false. /// [JsonProperty(PropertyName = "enableAutomaticOSUpgrade")] public bool? EnableAutomaticOSUpgrade { get; set; } diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/DataDisk.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/DataDisk.cs index 90992707dba61..1d000cad5a524 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/DataDisk.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/DataDisk.cs @@ -63,7 +63,10 @@ public DataDisk() /// disk in a virtual machine image. <br><br> This value /// cannot be larger than 1023 GB /// The managed disk parameters. - public DataDisk(int lun, string createOption, string name = default(string), VirtualHardDisk vhd = default(VirtualHardDisk), VirtualHardDisk image = default(VirtualHardDisk), CachingTypes? caching = default(CachingTypes?), bool? writeAcceleratorEnabled = default(bool?), int? diskSizeGB = default(int?), ManagedDiskParameters managedDisk = default(ManagedDiskParameters)) + /// Specifies whether the datadisk is in + /// process of detachment from the + /// VirtualMachine/VirtualMachineScaleset + public DataDisk(int lun, string createOption, string name = default(string), VirtualHardDisk vhd = default(VirtualHardDisk), VirtualHardDisk image = default(VirtualHardDisk), CachingTypes? caching = default(CachingTypes?), bool? writeAcceleratorEnabled = default(bool?), int? diskSizeGB = default(int?), ManagedDiskParameters managedDisk = default(ManagedDiskParameters), bool? toBeDetached = default(bool?)) { Lun = lun; Name = name; @@ -74,6 +77,7 @@ public DataDisk() CreateOption = createOption; DiskSizeGB = diskSizeGB; ManagedDisk = managedDisk; + ToBeDetached = toBeDetached; CustomInit(); } @@ -161,6 +165,13 @@ public DataDisk() [JsonProperty(PropertyName = "managedDisk")] public ManagedDiskParameters ManagedDisk { get; set; } + /// + /// Gets or sets specifies whether the datadisk is in process of + /// detachment from the VirtualMachine/VirtualMachineScaleset + /// + [JsonProperty(PropertyName = "toBeDetached")] + public bool? ToBeDetached { get; set; } + /// /// Validate the object. /// diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuLocationInfo.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuLocationInfo.cs index 8105b5c692507..2c487527fc18a 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuLocationInfo.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuLocationInfo.cs @@ -31,10 +31,13 @@ public ResourceSkuLocationInfo() /// Location of the SKU /// List of availability zones where the SKU is /// supported. - public ResourceSkuLocationInfo(string location = default(string), IList zones = default(IList)) + /// Details of capabilities available to a + /// SKU in specific zones. + public ResourceSkuLocationInfo(string location = default(string), IList zones = default(IList), IList zoneDetails = default(IList)) { Location = location; Zones = zones; + ZoneDetails = zoneDetails; CustomInit(); } @@ -55,5 +58,11 @@ public ResourceSkuLocationInfo() [JsonProperty(PropertyName = "zones")] public IList Zones { get; private set; } + /// + /// Gets details of capabilities available to a SKU in specific zones. + /// + [JsonProperty(PropertyName = "zoneDetails")] + public IList ZoneDetails { get; private set; } + } } diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuZoneDetails.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuZoneDetails.cs new file mode 100644 index 0000000000000..fa00779641712 --- /dev/null +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/ResourceSkuZoneDetails.cs @@ -0,0 +1,65 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Describes The zonal capabilities of a SKU. + /// + public partial class ResourceSkuZoneDetails + { + /// + /// Initializes a new instance of the ResourceSkuZoneDetails class. + /// + public ResourceSkuZoneDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResourceSkuZoneDetails class. + /// + /// The set of zones that the SKU is available in + /// with the specified capabilities. + /// A list of capabilities that are + /// available for the SKU in the specified list of zones. + public ResourceSkuZoneDetails(IList name = default(IList), IList capabilities = default(IList)) + { + Name = name; + Capabilities = capabilities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the set of zones that the SKU is available in with the + /// specified capabilities. + /// + [JsonProperty(PropertyName = "name")] + public IList Name { get; private set; } + + /// + /// Gets a list of capabilities that are available for the SKU in the + /// specified list of zones. + /// + [JsonProperty(PropertyName = "capabilities")] + public IList Capabilities { get; private set; } + + } +} diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs index 8933ac0dc5a3f..b72fa2db6acf7 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSet.cs @@ -73,10 +73,15 @@ public VirtualMachineScaleSet() /// the proximity placement group that the virtual machine scale set /// should be assigned to. <br><br>Minimum api-version: /// 2018-04-01. + /// Specifies additional + /// capabilities enabled or disabled on the Virtual Machines in the + /// Virtual Machine Scale Set. For instance: whether the Virtual + /// Machines have the capability to support attaching managed data + /// disks with UltraSSD_LRS storage account type. /// The identity of the virtual machine scale /// set, if configured. /// The virtual machine scale set zones. - public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), VirtualMachineScaleSetVMProfile virtualMachineProfile = default(VirtualMachineScaleSetVMProfile), string provisioningState = default(string), bool? overprovision = default(bool?), bool? doNotRunExtensionsOnOverprovisionedVMs = default(bool?), string uniqueId = default(string), bool? singlePlacementGroup = default(bool?), bool? zoneBalance = default(bool?), int? platformFaultDomainCount = default(int?), SubResource proximityPlacementGroup = default(SubResource), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList zones = default(IList)) + public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), VirtualMachineScaleSetVMProfile virtualMachineProfile = default(VirtualMachineScaleSetVMProfile), string provisioningState = default(string), bool? overprovision = default(bool?), bool? doNotRunExtensionsOnOverprovisionedVMs = default(bool?), string uniqueId = default(string), bool? singlePlacementGroup = default(bool?), bool? zoneBalance = default(bool?), int? platformFaultDomainCount = default(int?), SubResource proximityPlacementGroup = default(SubResource), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList zones = default(IList)) : base(location, id, name, type, tags) { Sku = sku; @@ -91,6 +96,7 @@ public VirtualMachineScaleSet() ZoneBalance = zoneBalance; PlatformFaultDomainCount = platformFaultDomainCount; ProximityPlacementGroup = proximityPlacementGroup; + AdditionalCapabilities = additionalCapabilities; Identity = identity; Zones = zones; CustomInit(); @@ -189,6 +195,16 @@ public VirtualMachineScaleSet() [JsonProperty(PropertyName = "properties.proximityPlacementGroup")] public SubResource ProximityPlacementGroup { get; set; } + /// + /// Gets or sets specifies additional capabilities enabled or disabled + /// on the Virtual Machines in the Virtual Machine Scale Set. For + /// instance: whether the Virtual Machines have the capability to + /// support attaching managed data disks with UltraSSD_LRS storage + /// account type. + /// + [JsonProperty(PropertyName = "properties.additionalCapabilities")] + public AdditionalCapabilities AdditionalCapabilities { get; set; } + /// /// Gets or sets the identity of the virtual machine scale set, if /// configured. diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetUpdate.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetUpdate.cs index c6e43d28c9df1..0f18654a44616 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetUpdate.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetUpdate.cs @@ -48,9 +48,14 @@ public VirtualMachineScaleSetUpdate() /// When true this limits the scale /// set to a single placement group, of max size 100 virtual /// machines. + /// Specifies additional + /// capabilities enabled or disabled on the Virtual Machines in the + /// Virtual Machine Scale Set. For instance: whether the Virtual + /// Machines have the capability to support attaching managed data + /// disks with UltraSSD_LRS storage account type. /// The identity of the virtual machine scale /// set, if configured. - public VirtualMachineScaleSetUpdate(IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile = default(VirtualMachineScaleSetUpdateVMProfile), bool? overprovision = default(bool?), bool? singlePlacementGroup = default(bool?), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity)) + public VirtualMachineScaleSetUpdate(IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), VirtualMachineScaleSetUpdateVMProfile virtualMachineProfile = default(VirtualMachineScaleSetUpdateVMProfile), bool? overprovision = default(bool?), bool? singlePlacementGroup = default(bool?), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity)) : base(tags) { Sku = sku; @@ -59,6 +64,7 @@ public VirtualMachineScaleSetUpdate() VirtualMachineProfile = virtualMachineProfile; Overprovision = overprovision; SinglePlacementGroup = singlePlacementGroup; + AdditionalCapabilities = additionalCapabilities; Identity = identity; CustomInit(); } @@ -107,6 +113,16 @@ public VirtualMachineScaleSetUpdate() [JsonProperty(PropertyName = "properties.singlePlacementGroup")] public bool? SinglePlacementGroup { get; set; } + /// + /// Gets or sets specifies additional capabilities enabled or disabled + /// on the Virtual Machines in the Virtual Machine Scale Set. For + /// instance: whether the Virtual Machines have the capability to + /// support attaching managed data disks with UltraSSD_LRS storage + /// account type. + /// + [JsonProperty(PropertyName = "properties.additionalCapabilities")] + public AdditionalCapabilities AdditionalCapabilities { get; set; } + /// /// Gets or sets the identity of the virtual machine scale set, if /// configured. diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProfile.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProfile.cs index eba1bad43770f..682bdb4ee2add 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProfile.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/VirtualMachineScaleSetVMProfile.cs @@ -35,11 +35,6 @@ public VirtualMachineScaleSetVMProfile() /// the virtual machines in the scale set. /// Specifies the storage settings for the /// virtual machine disks. - /// Specifies additional - /// capabilities enabled or disabled on the virtual machine in the - /// scale set. For instance: whether the virtual machine has the - /// capability to support attaching managed data disks with - /// UltraSSD_LRS storage account type. /// Specifies properties of the network /// interfaces of the virtual machines in the scale set. /// Specifies the boot diagnostic @@ -67,11 +62,10 @@ public VirtualMachineScaleSetVMProfile() /// virtual machines in a low priority scale set. /// <br><br>Minimum api-version: 2017-10-30-preview. /// Possible values include: 'Deallocate', 'Delete' - public VirtualMachineScaleSetVMProfile(VirtualMachineScaleSetOSProfile osProfile = default(VirtualMachineScaleSetOSProfile), VirtualMachineScaleSetStorageProfile storageProfile = default(VirtualMachineScaleSetStorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), VirtualMachineScaleSetNetworkProfile networkProfile = default(VirtualMachineScaleSetNetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), VirtualMachineScaleSetExtensionProfile extensionProfile = default(VirtualMachineScaleSetExtensionProfile), string licenseType = default(string), string priority = default(string), string evictionPolicy = default(string)) + public VirtualMachineScaleSetVMProfile(VirtualMachineScaleSetOSProfile osProfile = default(VirtualMachineScaleSetOSProfile), VirtualMachineScaleSetStorageProfile storageProfile = default(VirtualMachineScaleSetStorageProfile), VirtualMachineScaleSetNetworkProfile networkProfile = default(VirtualMachineScaleSetNetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), VirtualMachineScaleSetExtensionProfile extensionProfile = default(VirtualMachineScaleSetExtensionProfile), string licenseType = default(string), string priority = default(string), string evictionPolicy = default(string)) { OsProfile = osProfile; StorageProfile = storageProfile; - AdditionalCapabilities = additionalCapabilities; NetworkProfile = networkProfile; DiagnosticsProfile = diagnosticsProfile; ExtensionProfile = extensionProfile; @@ -100,15 +94,6 @@ public VirtualMachineScaleSetVMProfile() [JsonProperty(PropertyName = "storageProfile")] public VirtualMachineScaleSetStorageProfile StorageProfile { get; set; } - /// - /// Gets or sets specifies additional capabilities enabled or disabled - /// on the virtual machine in the scale set. For instance: whether the - /// virtual machine has the capability to support attaching managed - /// data disks with UltraSSD_LRS storage account type. - /// - [JsonProperty(PropertyName = "additionalCapabilities")] - public AdditionalCapabilities AdditionalCapabilities { get; set; } - /// /// Gets or sets specifies properties of the network interfaces of the /// virtual machines in the scale set. diff --git a/src/SDKs/Compute/Management.Compute/Generated/Models/WindowsConfiguration.cs b/src/SDKs/Compute/Management.Compute/Generated/Models/WindowsConfiguration.cs index 6c29485789df8..b2d86a79a3c4e 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/Models/WindowsConfiguration.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/Models/WindowsConfiguration.cs @@ -38,7 +38,10 @@ public WindowsConfiguration() /// ensure that VM Agent is installed on the VM so that extensions can /// be added to the VM later. /// Indicates whether virtual - /// machine is enabled for automatic updates. + /// machine is enabled for automatic Windows updates. Default value is + /// true. <br><br> For virtual machine scale sets, this + /// property can be updated and updates will take effect on OS + /// reprovisioning. /// Specifies the time zone of the virtual /// machine. e.g. "Pacific Standard Time" /// Specifies additional @@ -74,7 +77,10 @@ public WindowsConfiguration() /// /// Gets or sets indicates whether virtual machine is enabled for - /// automatic updates. + /// automatic Windows updates. Default value is true. + /// &lt;br&gt;&lt;br&gt; For virtual machine scale + /// sets, this property can be updated and updates will take effect on + /// OS reprovisioning. /// [JsonProperty(PropertyName = "enableAutomaticUpdates")] public bool? EnableAutomaticUpdates { get; set; } diff --git a/src/SDKs/Compute/Management.Compute/Generated/ResourceSkusOperations.cs b/src/SDKs/Compute/Management.Compute/Generated/ResourceSkusOperations.cs index 47c67ab29e267..f876eb9d6c137 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/ResourceSkusOperations.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/ResourceSkusOperations.cs @@ -80,7 +80,7 @@ internal ResourceSkusOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2017-09-01"; + string apiVersion = "2019-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs b/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs index 35a56379d8c0f..59285c0f7a3c1 100644 --- a/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs +++ b/src/SDKs/Compute/Management.Compute/Generated/SdkInfo_ComputeManagementClient.cs @@ -28,7 +28,7 @@ public static IEnumerable> ApiInfo_ComputeManageme new Tuple("Compute", "LogAnalytics", "2019-03-01"), new Tuple("Compute", "Operations", "2019-03-01"), new Tuple("Compute", "ProximityPlacementGroups", "2019-03-01"), - new Tuple("Compute", "ResourceSkus", "2017-09-01"), + new Tuple("Compute", "ResourceSkus", "2019-04-01"), new Tuple("Compute", "Snapshots", "2018-09-30"), new Tuple("Compute", "Usage", "2019-03-01"), new Tuple("Compute", "VirtualMachineExtensionImages", "2019-03-01"),