Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR Microsoft.Azure.Management.Compute] vmss: support for passing a health probe to update #251

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// Describes a scale-in policy for a virtual machine scale set.
/// </summary>
public partial class ScaleInPolicy
{
/// <summary>
/// Initializes a new instance of the ScaleInPolicy class.
/// </summary>
public ScaleInPolicy()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ScaleInPolicy class.
/// </summary>
/// <param name="rules">The rules to be followed when scaling-in a
/// virtual machine scale set. &lt;br&gt;&lt;br&gt; Possible values
/// are: &lt;br&gt;&lt;br&gt; **Default** When a virtual machine scale
/// set is scaled in, the scale set will first be balanced across zones
/// if it is a zonal scale set. Then, it will be balanced across Fault
/// Domains as far as possible. Within each Fault Domain, the virtual
/// machines chosen for removal will be the newest ones that are not
/// protected from scale-in. &lt;br&gt;&lt;br&gt; **OldestVM** When a
/// virtual machine scale set is being scaled-in, the oldest virtual
/// machines that are not protected from scale-in will be chosen for
/// removal. For zonal virtual machine scale sets, the scale set will
/// first be balanced across zones. Within each zone, the oldest
/// virtual machines that are not protected will be chosen for removal.
/// &lt;br&gt;&lt;br&gt; **NewestVM** When a virtual machine scale set
/// is being scaled-in, the newest virtual machines that are not
/// protected from scale-in will be chosen for removal. For zonal
/// virtual machine scale sets, the scale set will first be balanced
/// across zones. Within each zone, the newest virtual machines that
/// are not protected will be chosen for removal.
/// &lt;br&gt;&lt;br&gt;</param>
public ScaleInPolicy(IList<string> rules = default(IList<string>))
{
Rules = rules;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets the rules to be followed when scaling-in a virtual
/// machine scale set. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; Possible
/// values are: &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; **Default** When a
/// virtual machine scale set is scaled in, the scale set will first be
/// balanced across zones if it is a zonal scale set. Then, it will be
/// balanced across Fault Domains as far as possible. Within each Fault
/// Domain, the virtual machines chosen for removal will be the newest
/// ones that are not protected from scale-in.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; **OldestVM** When a virtual
/// machine scale set is being scaled-in, the oldest virtual machines
/// that are not protected from scale-in will be chosen for removal.
/// For zonal virtual machine scale sets, the scale set will first be
/// balanced across zones. Within each zone, the oldest virtual
/// machines that are not protected will be chosen for removal.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; **NewestVM** When a virtual
/// machine scale set is being scaled-in, the newest virtual machines
/// that are not protected from scale-in will be chosen for removal.
/// For zonal virtual machine scale sets, the scale set will first be
/// balanced across zones. Within each zone, the newest virtual
/// machines that are not protected will be chosen for removal.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
/// </summary>
[JsonProperty(PropertyName = "rules")]
public IList<string> Rules { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ public VirtualMachineScaleSet()
/// 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.</param>
/// <param name="scaleInPolicy">Specifies the scale-in policy that
/// decides which virtual machines are chosen for removal when a
/// Virtual Machine Scale Set is scaled-in.</param>
/// <param name="identity">The identity of the virtual machine scale
/// set, if configured.</param>
/// <param name="zones">The virtual machine scale set zones.</param>
public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), 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<string> zones = default(IList<string>))
public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), 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), ScaleInPolicy scaleInPolicy = default(ScaleInPolicy), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList<string> zones = default(IList<string>))
: base(location, id, name, type, tags)
{
Sku = sku;
Expand All @@ -97,6 +100,7 @@ public VirtualMachineScaleSet()
PlatformFaultDomainCount = platformFaultDomainCount;
ProximityPlacementGroup = proximityPlacementGroup;
AdditionalCapabilities = additionalCapabilities;
ScaleInPolicy = scaleInPolicy;
Identity = identity;
Zones = zones;
CustomInit();
Expand Down Expand Up @@ -205,6 +209,14 @@ public VirtualMachineScaleSet()
[JsonProperty(PropertyName = "properties.additionalCapabilities")]
public AdditionalCapabilities AdditionalCapabilities { get; set; }

/// <summary>
/// Gets or sets specifies the scale-in policy that decides which
/// virtual machines are chosen for removal when a Virtual Machine
/// Scale Set is scaled-in.
/// </summary>
[JsonProperty(PropertyName = "properties.scaleInPolicy")]
public ScaleInPolicy ScaleInPolicy { get; set; }

/// <summary>
/// Gets or sets the identity of the virtual machine scale set, if
/// configured.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{

/// <summary>
/// Defines values for VirtualMachineScaleSetScaleInRules.
/// </summary>
public static class VirtualMachineScaleSetScaleInRules
{
public const string Default = "Default";
public const string OldestVM = "OldestVM";
public const string NewestVM = "NewestVM";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ public VirtualMachineScaleSetUpdate()
/// 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.</param>
/// <param name="scaleInPolicy">Specifies the scale-in policy that
/// decides which virtual machines are chosen for removal when a
/// Virtual Machine Scale Set is scaled-in.</param>
/// <param name="identity">The identity of the virtual machine scale
/// set, if configured.</param>
public VirtualMachineScaleSetUpdate(IDictionary<string, string> tags = default(IDictionary<string, string>), 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))
public VirtualMachineScaleSetUpdate(IDictionary<string, string> tags = default(IDictionary<string, string>), 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), ScaleInPolicy scaleInPolicy = default(ScaleInPolicy), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity))
: base(tags)
{
Sku = sku;
Expand All @@ -65,6 +68,7 @@ public VirtualMachineScaleSetUpdate()
Overprovision = overprovision;
SinglePlacementGroup = singlePlacementGroup;
AdditionalCapabilities = additionalCapabilities;
ScaleInPolicy = scaleInPolicy;
Identity = identity;
CustomInit();
}
Expand Down Expand Up @@ -123,6 +127,14 @@ public VirtualMachineScaleSetUpdate()
[JsonProperty(PropertyName = "properties.additionalCapabilities")]
public AdditionalCapabilities AdditionalCapabilities { get; set; }

/// <summary>
/// Gets or sets specifies the scale-in policy that decides which
/// virtual machines are chosen for removal when a Virtual Machine
/// Scale Set is scaled-in.
/// </summary>
[JsonProperty(PropertyName = "properties.scaleInPolicy")]
public ScaleInPolicy ScaleInPolicy { get; set; }

/// <summary>
/// Gets or sets the identity of the virtual machine scale set, if
/// configured.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ public VirtualMachineScaleSetUpdateNetworkProfile()
/// Initializes a new instance of the
/// VirtualMachineScaleSetUpdateNetworkProfile class.
/// </summary>
/// <param name="healthProbe">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}'.</param>
/// <param name="networkInterfaceConfigurations">The list of network
/// configurations.</param>
public VirtualMachineScaleSetUpdateNetworkProfile(IList<VirtualMachineScaleSetUpdateNetworkConfiguration> networkInterfaceConfigurations = default(IList<VirtualMachineScaleSetUpdateNetworkConfiguration>))
public VirtualMachineScaleSetUpdateNetworkProfile(ApiEntityReference healthProbe = default(ApiEntityReference), IList<VirtualMachineScaleSetUpdateNetworkConfiguration> networkInterfaceConfigurations = default(IList<VirtualMachineScaleSetUpdateNetworkConfiguration>))
{
HealthProbe = healthProbe;
NetworkInterfaceConfigurations = networkInterfaceConfigurations;
CustomInit();
}
Expand All @@ -46,6 +51,15 @@ public VirtualMachineScaleSetUpdateNetworkProfile()
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets 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}'.
/// </summary>
[JsonProperty(PropertyName = "healthProbe")]
public ApiEntityReference HealthProbe { get; set; }

/// <summary>
/// Gets or sets the list of network configurations.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,5 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_ComputeManageme
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "[email protected]";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\hylee-sdk\\avset\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "6359c5dac93947b24007afd9c569e23e92848ea5";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ private void Initialize()
};
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<CopyLogDetails>("copyLogDetailsType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<CopyLogDetails>("copyLogDetailsType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DestinationAccountDetails>("dataDestinationType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DestinationAccountDetails>("dataDestinationType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<JobDetails>("jobDetailsType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<JobDetails>("jobDetailsType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<JobSecrets>("jobSecretsType"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ public CopyProgress()
/// as of now.</param>
/// <param name="totalBytesToProcess">Total amount of data to be
/// processed by the job.</param>
public CopyProgress(string storageAccountName = default(string), string accountId = default(string), long? bytesSentToCloud = default(long?), long? totalBytesToProcess = default(long?))
/// <param name="filesProcessed">Number of files processed by the job
/// as of now.</param>
/// <param name="totalFilesToProcess">Total number of files to be
/// processed by the job.</param>
public CopyProgress(string storageAccountName = default(string), string accountId = default(string), long? bytesSentToCloud = default(long?), long? totalBytesToProcess = default(long?), long? filesProcessed = default(long?), long? totalFilesToProcess = default(long?))
{
StorageAccountName = storageAccountName;
AccountId = accountId;
BytesSentToCloud = bytesSentToCloud;
TotalBytesToProcess = totalBytesToProcess;
FilesProcessed = filesProcessed;
TotalFilesToProcess = totalFilesToProcess;
CustomInit();
}

Expand Down Expand Up @@ -76,5 +82,17 @@ public CopyProgress()
[JsonProperty(PropertyName = "totalBytesToProcess")]
public long? TotalBytesToProcess { get; private set; }

/// <summary>
/// Gets number of files processed by the job as of now.
/// </summary>
[JsonProperty(PropertyName = "filesProcessed")]
public long? FilesProcessed { get; private set; }

/// <summary>
/// Gets total number of files to be processed by the job.
/// </summary>
[JsonProperty(PropertyName = "totalFilesToProcess")]
public long? TotalFilesToProcess { get; private set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.DataBox.Models
public enum CopyStatus
{
/// <summary>
/// Data copy hasnt started yet.
/// Data copy hasn't started yet.
/// </summary>
[EnumMember(Value = "NotStarted")]
NotStarted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public DataBoxDiskJobDetails()
/// <param name="destinationAccountDetails">Destination account
/// details.</param>
/// <param name="expectedDataSizeInTeraBytes">The expected size of the
/// data, which needs to be transfered in this job, in tera
/// bytes.</param>
/// data, which needs to be transferred in this job, in
/// terabytes.</param>
/// <param name="jobStages">List of stages that run in the job.</param>
/// <param name="deliveryPackage">Delivery package shipping
/// details.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.DataBox.Models
using System.Linq;

/// <summary>
/// Copy log details for a storage account for Databox heavy
/// Copy log details for a storage account for DataBoxHeavy
/// </summary>
[Newtonsoft.Json.JsonObject("DataBoxHeavy")]
public partial class DataBoxHeavyAccountCopyLogDetails : CopyLogDetails
Expand Down
Loading