/// <summary> /// Initializes a new instance of the ClusterUpgradeDescriptionObject class. /// </summary> /// <param name="configVersion">The cluster configuration version (specified in the cluster manifest).</param> /// <param name="codeVersion">The ServiceFabric code version of the cluster.</param> /// <param name="upgradeKind">The kind of upgrade out of the following possible values. Possible values include: /// 'Invalid', 'Rolling'</param> /// <param name="rollingUpgradeMode">The mode used to monitor health during a rolling upgrade. The values are /// UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', /// 'UnmonitoredManual', 'Monitored'</param> /// <param name="upgradeReplicaSetCheckTimeoutInSeconds">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="forceRestart">If true, then processes are forcefully restarted during upgrade even when the code /// version has not changed (the upgrade only changes configuration or data).</param> /// <param name="enableDeltaHealthEvaluation">When true, enables delta health evaluation rather than absolute health /// evaluation after completion of each upgrade domain.</param> /// <param name="monitoringPolicy">Describes the parameters for monitoring an upgrade in Monitored mode.</param> /// <param name="clusterHealthPolicy">Defines a health policy used to evaluate the health of the cluster or of a /// cluster node. /// </param> /// <param name="clusterUpgradeHealthPolicy">Defines a health policy used to evaluate the health of the cluster during /// a cluster upgrade.</param> /// <param name="applicationHealthPolicyMap">Defines a map that contains specific application health policies for /// different applications. /// Each entry specifies as key the application name and as value an ApplicationHealthPolicy used to evaluate the /// application health. /// If an application is not specified in the map, the application health evaluation uses the ApplicationHealthPolicy /// found in its application manifest or the default application health policy (if no health policy is defined in the /// manifest). /// The map is empty by default. /// </param> public ClusterUpgradeDescriptionObject( string configVersion = default(string), string codeVersion = default(string), UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, UpgradeMode?rollingUpgradeMode = Common.UpgradeMode.UnmonitoredAuto, long?upgradeReplicaSetCheckTimeoutInSeconds = default(long?), bool?forceRestart = default(bool?), bool?enableDeltaHealthEvaluation = default(bool?), MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription), ClusterHealthPolicy clusterHealthPolicy = default(ClusterHealthPolicy), ClusterUpgradeHealthPolicyObject clusterUpgradeHealthPolicy = default(ClusterUpgradeHealthPolicyObject), IEnumerable <ApplicationHealthPolicyMapItem> applicationHealthPolicyMap = default(IEnumerable <ApplicationHealthPolicyMapItem>)) { this.ConfigVersion = configVersion; this.CodeVersion = codeVersion; this.UpgradeKind = upgradeKind; this.RollingUpgradeMode = rollingUpgradeMode; this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds; this.ForceRestart = forceRestart; this.EnableDeltaHealthEvaluation = enableDeltaHealthEvaluation; this.MonitoringPolicy = monitoringPolicy; this.ClusterHealthPolicy = clusterHealthPolicy; this.ClusterUpgradeHealthPolicy = clusterUpgradeHealthPolicy; this.ApplicationHealthPolicyMap = applicationHealthPolicyMap; }
/// <summary> /// Initializes a new instance of the ChaosParameters class. /// </summary> /// <param name="timeToRunInSeconds">Total time (in seconds) for which Chaos will run before automatically stopping. /// The maximum allowed value is 4,294,967,295 (System.UInt32.MaxValue). /// </param> /// <param name="maxClusterStabilizationTimeoutInSeconds">The maximum amount of time to wait for all cluster entities /// to become stable and healthy. Chaos executes in iterations and at the start of each iteration it validates the /// health of cluster entities. /// During validation if a cluster entity is not stable and healthy within MaxClusterStabilizationTimeoutInSeconds, /// Chaos generates a validation failed event. /// </param> /// <param name="maxConcurrentFaults">MaxConcurrentFaults is the maximum number of concurrent faults induced per /// iteration. /// Chaos executes in iterations and two consecutive iterations are separated by a validation phase. /// The higher the concurrency, the more aggressive the injection of faults -- inducing more complex series of states /// to uncover bugs. /// The recommendation is to start with a value of 2 or 3 and to exercise caution while moving up. /// </param> /// <param name="enableMoveReplicaFaults">Enables or disables the move primary and move secondary faults. /// </param> /// <param name="waitTimeBetweenFaultsInSeconds">Wait time (in seconds) between consecutive faults within a single /// iteration. /// The larger the value, the lower the overlapping between faults and the simpler the sequence of state transitions /// that the cluster goes through. /// The recommendation is to start with a value between 1 and 5 and exercise caution while moving up. /// </param> /// <param name="waitTimeBetweenIterationsInSeconds">Time-separation (in seconds) between two consecutive iterations of /// Chaos. /// The larger the value, the lower the fault injection rate. /// </param> /// <param name="clusterHealthPolicy">Passed-in cluster health policy is used to validate health of the cluster in /// between Chaos iterations. If the cluster health is in error or if an unexpected exception happens during fault /// execution--to provide the cluster with some time to recuperate--Chaos will wait for 30 minutes before the next /// health-check. /// </param> /// <param name="context">Describes a map, which is a collection of (string, string) type key-value pairs. The map can /// be used to record information about /// the Chaos run. There cannot be more than 100 such pairs and each string (key or value) can be at most 4095 /// characters long. /// This map is set by the starter of the Chaos run to optionally store the context about the specific run. /// </param> /// <param name="chaosTargetFilter">List of cluster entities to target for Chaos faults. /// This filter can be used to target Chaos faults only to certain node types or only to certain application instances. /// If ChaosTargetFilter is not used, Chaos faults all cluster entities. /// If ChaosTargetFilter is used, Chaos faults only the entities that meet the ChaosTargetFilter specification. /// </param> public ChaosParameters( string timeToRunInSeconds = "4294967295", long?maxClusterStabilizationTimeoutInSeconds = 60, long?maxConcurrentFaults = 1, bool?enableMoveReplicaFaults = true, long?waitTimeBetweenFaultsInSeconds = 20, long?waitTimeBetweenIterationsInSeconds = 30, ClusterHealthPolicy clusterHealthPolicy = default(ClusterHealthPolicy), ChaosContext context = default(ChaosContext), ChaosTargetFilter chaosTargetFilter = default(ChaosTargetFilter)) { maxClusterStabilizationTimeoutInSeconds?.ThrowIfOutOfInclusiveRange("maxClusterStabilizationTimeoutInSeconds", 0, 4294967295); maxConcurrentFaults?.ThrowIfOutOfInclusiveRange("maxConcurrentFaults", 0, 4294967295); waitTimeBetweenFaultsInSeconds?.ThrowIfOutOfInclusiveRange("waitTimeBetweenFaultsInSeconds", 0, 4294967295); waitTimeBetweenIterationsInSeconds?.ThrowIfOutOfInclusiveRange("waitTimeBetweenIterationsInSeconds", 0, 4294967295); this.TimeToRunInSeconds = timeToRunInSeconds; this.MaxClusterStabilizationTimeoutInSeconds = maxClusterStabilizationTimeoutInSeconds; this.MaxConcurrentFaults = maxConcurrentFaults; this.EnableMoveReplicaFaults = enableMoveReplicaFaults; this.WaitTimeBetweenFaultsInSeconds = waitTimeBetweenFaultsInSeconds; this.WaitTimeBetweenIterationsInSeconds = waitTimeBetweenIterationsInSeconds; this.ClusterHealthPolicy = clusterHealthPolicy; this.Context = context; this.ChaosTargetFilter = chaosTargetFilter; }
/// <summary> /// Initializes a new instance of the ClusterHealthPolicies class. /// </summary> /// <param name="applicationHealthPolicyMap">Defines a map that contains specific application health policies for /// different applications. /// Each entry specifies as key the application name and as value an ApplicationHealthPolicy used to evaluate the /// application health. /// If an application is not specified in the map, the application health evaluation uses the ApplicationHealthPolicy /// found in its application manifest or the default application health policy (if no health policy is defined in the /// manifest). /// The map is empty by default. /// </param> /// <param name="clusterHealthPolicy">Defines a health policy used to evaluate the health of the cluster or of a /// cluster node. /// </param> public ClusterHealthPolicies( IEnumerable <ApplicationHealthPolicyMapItem> applicationHealthPolicyMap = default(IEnumerable <ApplicationHealthPolicyMapItem>), ClusterHealthPolicy clusterHealthPolicy = default(ClusterHealthPolicy)) { this.ApplicationHealthPolicyMap = applicationHealthPolicyMap; this.ClusterHealthPolicy = clusterHealthPolicy; }
/// <summary> /// Initializes a new instance of the StartClusterUpgradeDescription class. /// </summary> /// <param name="codeVersion">The cluster code version.</param> /// <param name="configVersion">The cluster configuration version.</param> /// <param name="upgradeKind">The kind of upgrade out of the following possible values. Possible values include: /// 'Invalid', 'Rolling'</param> /// <param name="rollingUpgradeMode">The mode used to monitor health during a rolling upgrade. The values are /// UnmonitoredAuto, UnmonitoredManual, and Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto', /// 'UnmonitoredManual', 'Monitored'</param> /// <param name="upgradeReplicaSetCheckTimeoutInSeconds">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="forceRestart">If true, then processes are forcefully restarted during upgrade even when the code /// version has not changed (the upgrade only changes configuration or data).</param> /// <param name="sortOrder">Defines the order in which an upgrade proceeds through the cluster. Possible values /// include: 'Invalid', 'Default', 'Numeric', 'Lexicographical', 'ReverseNumeric', 'ReverseLexicographical'</param> /// <param name="monitoringPolicy">Describes the parameters for monitoring an upgrade in Monitored mode.</param> /// <param name="clusterHealthPolicy">Defines a health policy used to evaluate the health of the cluster or of a /// cluster node. /// </param> /// <param name="enableDeltaHealthEvaluation">When true, enables delta health evaluation rather than absolute health /// evaluation after completion of each upgrade domain.</param> /// <param name="clusterUpgradeHealthPolicy">Defines a health policy used to evaluate the health of the cluster during /// a cluster upgrade.</param> /// <param name="applicationHealthPolicyMap">Defines the application health policy map used to evaluate the health of /// an application or one of its children entities. /// </param> /// <param name="instanceCloseDelayDurationInSeconds">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. See /// InstanceCloseDelayDurationSeconds property in $ref: "#/definitions/StatelessServiceDescription.yaml" for details. /// Note, the default value of InstanceCloseDelayDurationInSeconds is 4294967295, which indicates that the behavior /// will entirely depend on the delay configured in the stateless service description. /// </param> public StartClusterUpgradeDescription( string codeVersion = default(string), string configVersion = default(string), UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, UpgradeMode?rollingUpgradeMode = Common.UpgradeMode.UnmonitoredAuto, long?upgradeReplicaSetCheckTimeoutInSeconds = default(long?), bool?forceRestart = default(bool?), UpgradeSortOrder?sortOrder = Common.UpgradeSortOrder.Default, MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription), ClusterHealthPolicy clusterHealthPolicy = default(ClusterHealthPolicy), bool?enableDeltaHealthEvaluation = default(bool?), ClusterUpgradeHealthPolicyObject clusterUpgradeHealthPolicy = default(ClusterUpgradeHealthPolicyObject), ApplicationHealthPolicies applicationHealthPolicyMap = default(ApplicationHealthPolicies), long?instanceCloseDelayDurationInSeconds = default(long?)) { this.CodeVersion = codeVersion; this.ConfigVersion = configVersion; this.UpgradeKind = upgradeKind; this.RollingUpgradeMode = rollingUpgradeMode; this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds; this.ForceRestart = forceRestart; this.SortOrder = sortOrder; this.MonitoringPolicy = monitoringPolicy; this.ClusterHealthPolicy = clusterHealthPolicy; this.EnableDeltaHealthEvaluation = enableDeltaHealthEvaluation; this.ClusterUpgradeHealthPolicy = clusterUpgradeHealthPolicy; this.ApplicationHealthPolicyMap = applicationHealthPolicyMap; this.InstanceCloseDelayDurationInSeconds = instanceCloseDelayDurationInSeconds; }
/// <summary> /// Initializes a new instance of the ClusterHealthChunkQueryDescription class. /// </summary> /// <param name="nodeFilters">Defines a list of filters that specify which nodes to be included in the returned cluster /// health chunk. /// If no filters are specified, no nodes are returned. All the nodes are used to evaluate the cluster's aggregated /// health state, regardless of the input filters. /// The cluster health chunk query may specify multiple node filters. /// For example, it can specify a filter to return all nodes with health state Error and another filter to always /// include a node identified by its NodeName. /// </param> /// <param name="applicationFilters">Defines a list of filters that specify which applications to be included in the /// returned cluster health chunk. /// If no filters are specified, no applications are returned. All the applications are used to evaluate the cluster's /// aggregated health state, regardless of the input filters. /// The cluster health chunk query may specify multiple application filters. /// For example, it can specify a filter to return all applications with health state Error and another filter to /// always include applications of a specified application type. /// </param> /// <param name="clusterHealthPolicy">Defines a health policy used to evaluate the health of the cluster or of a /// cluster node. /// </param> /// <param name="applicationHealthPolicies">Defines the application health policy map used to evaluate the health of an /// application or one of its children entities. /// </param> public ClusterHealthChunkQueryDescription( IEnumerable <NodeHealthStateFilter> nodeFilters = default(IEnumerable <NodeHealthStateFilter>), IEnumerable <ApplicationHealthStateFilter> applicationFilters = default(IEnumerable <ApplicationHealthStateFilter>), ClusterHealthPolicy clusterHealthPolicy = default(ClusterHealthPolicy), ApplicationHealthPolicies applicationHealthPolicies = default(ApplicationHealthPolicies)) { this.NodeFilters = nodeFilters; this.ApplicationFilters = applicationFilters; this.ClusterHealthPolicy = clusterHealthPolicy; this.ApplicationHealthPolicies = applicationHealthPolicies; }
/// <summary> /// Initializes a new instance of the UpdateClusterUpgradeDescription class. /// </summary> /// <param name="upgradeKind">The type of upgrade out of the following possible values. Possible values include: /// 'Invalid', 'Rolling', 'Rolling_ForceRestart'</param> /// <param name="updateDescription">Describes the parameters for updating a rolling upgrade of application or /// cluster.</param> /// <param name="clusterHealthPolicy">Defines a health policy used to evaluate the health of the cluster or of a /// cluster node. /// </param> /// <param name="enableDeltaHealthEvaluation">When true, enables delta health evaluation rather than absolute health /// evaluation after completion of each upgrade domain.</param> /// <param name="clusterUpgradeHealthPolicy">Defines a health policy used to evaluate the health of the cluster during /// a cluster upgrade.</param> /// <param name="applicationHealthPolicyMap">Defines the application health policy map used to evaluate the health of /// an application or one of its children entities. /// </param> public UpdateClusterUpgradeDescription( UpgradeType?upgradeKind = Common.UpgradeType.Rolling, RollingUpgradeUpdateDescription updateDescription = default(RollingUpgradeUpdateDescription), ClusterHealthPolicy clusterHealthPolicy = default(ClusterHealthPolicy), bool?enableDeltaHealthEvaluation = default(bool?), ClusterUpgradeHealthPolicyObject clusterUpgradeHealthPolicy = default(ClusterUpgradeHealthPolicyObject), ApplicationHealthPolicies applicationHealthPolicyMap = default(ApplicationHealthPolicies)) { this.UpgradeKind = upgradeKind; this.UpdateDescription = updateDescription; this.ClusterHealthPolicy = clusterHealthPolicy; this.EnableDeltaHealthEvaluation = enableDeltaHealthEvaluation; this.ClusterUpgradeHealthPolicy = clusterUpgradeHealthPolicy; this.ApplicationHealthPolicyMap = applicationHealthPolicyMap; }