/// <summary> /// Initializes a new instance of the ApplicationUpgradePolicy class. /// </summary> /// <param name="instanceCloseDelayDuration">Duration in seconds, to /// wait before a stateless instance is closed, to allow the active /// requests to drain gracefully. This would be effective when the /// instance is closing during the application/cluster upgrade, only /// for those instances which have a non-zero delay duration configured /// in the service description.</param> /// <param name="upgradeMode">Possible values include: 'Monitored', /// 'UnmonitoredAuto'</param> /// <param name="upgradeReplicaSetCheckTimeout">The maximum amount of /// time to block processing of an upgrade domain and prevent loss of /// availability when there are unexpected issues. When this timeout /// expires, processing of the upgrade domain will proceed regardless /// of availability loss issues. The timeout is reset at the start of /// each upgrade domain. Valid values are between 0 and 42949672925 /// inclusive. (unsigned 32-bit integer).</param> /// <param name="recreateApplication">Determines whether the /// application should be recreated on update. If value=true, the rest /// of the upgrade policy parameters are not allowed.</param> public ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolicy = default(ApplicationHealthPolicy), bool?forceRestart = default(bool?), RollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy = default(RollingUpgradeMonitoringPolicy), long?instanceCloseDelayDuration = default(long?), string upgradeMode = default(string), long?upgradeReplicaSetCheckTimeout = default(long?), bool?recreateApplication = default(bool?)) { ApplicationHealthPolicy = applicationHealthPolicy; ForceRestart = forceRestart; RollingUpgradeMonitoringPolicy = rollingUpgradeMonitoringPolicy; InstanceCloseDelayDuration = instanceCloseDelayDuration; UpgradeMode = upgradeMode; UpgradeReplicaSetCheckTimeout = upgradeReplicaSetCheckTimeout; RecreateApplication = recreateApplication; CustomInit(); }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="Rest.ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (ApplicationHealthPolicy != null) { ApplicationHealthPolicy.Validate(); } if (RollingUpgradeMonitoringPolicy != null) { RollingUpgradeMonitoringPolicy.Validate(); } }