/// <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="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>
 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?),
     MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription),
     ClusterHealthPolicy clusterHealthPolicy      = default(ClusterHealthPolicy),
     bool?enableDeltaHealthEvaluation             = default(bool?),
     ClusterUpgradeHealthPolicyObject clusterUpgradeHealthPolicy = default(ClusterUpgradeHealthPolicyObject),
     ApplicationHealthPolicies applicationHealthPolicyMap        = default(ApplicationHealthPolicies))
 {
     this.CodeVersion        = codeVersion;
     this.ConfigVersion      = configVersion;
     this.UpgradeKind        = upgradeKind;
     this.RollingUpgradeMode = rollingUpgradeMode;
     this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds;
     this.ForceRestart                = forceRestart;
     this.MonitoringPolicy            = monitoringPolicy;
     this.ClusterHealthPolicy         = clusterHealthPolicy;
     this.EnableDeltaHealthEvaluation = enableDeltaHealthEvaluation;
     this.ClusterUpgradeHealthPolicy  = clusterUpgradeHealthPolicy;
     this.ApplicationHealthPolicyMap  = applicationHealthPolicyMap;
 }
 /// <summary>
 /// Initializes a new instance of the ClusterConfigurationUpgradeDescription class.
 /// </summary>
 /// <param name="clusterConfig">The cluster configuration.</param>
 /// <param name="healthCheckRetryTimeout">The length of time between attempts to perform a health checks if the
 /// application or cluster is not healthy.</param>
 /// <param name="healthCheckWaitDurationInSeconds">The length of time to wait after completing an upgrade domain before
 /// starting the health checks process.</param>
 /// <param name="healthCheckStableDurationInSeconds">The length of time that the application or cluster must remain
 /// healthy.</param>
 /// <param name="upgradeDomainTimeoutInSeconds">The timeout for the upgrade domain.</param>
 /// <param name="upgradeTimeoutInSeconds">The upgrade timeout.</param>
 /// <param name="maxPercentUnhealthyApplications">The maximum allowed percentage of unhealthy applications during the
 /// upgrade. Allowed values are integer values from zero to 100.</param>
 /// <param name="maxPercentUnhealthyNodes">The maximum allowed percentage of unhealthy nodes during the upgrade.
 /// Allowed values are integer values from zero to 100.</param>
 /// <param name="maxPercentDeltaUnhealthyNodes">The maximum allowed percentage of delta health degradation during the
 /// upgrade. Allowed values are integer values from zero to 100.</param>
 /// <param name="maxPercentUpgradeDomainDeltaUnhealthyNodes">The maximum allowed percentage of upgrade domain delta
 /// health degradation during the upgrade. Allowed values are integer values from zero to 100.</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 ClusterConfigurationUpgradeDescription(
     string clusterConfig,
     TimeSpan?healthCheckRetryTimeout            = default(TimeSpan?),
     TimeSpan?healthCheckWaitDurationInSeconds   = default(TimeSpan?),
     TimeSpan?healthCheckStableDurationInSeconds = default(TimeSpan?),
     TimeSpan?upgradeDomainTimeoutInSeconds      = default(TimeSpan?),
     TimeSpan?upgradeTimeoutInSeconds            = default(TimeSpan?),
     int?maxPercentUnhealthyApplications         = 0,
     int?maxPercentUnhealthyNodes      = 0,
     int?maxPercentDeltaUnhealthyNodes = 0,
     int?maxPercentUpgradeDomainDeltaUnhealthyNodes      = 0,
     ApplicationHealthPolicies applicationHealthPolicies = default(ApplicationHealthPolicies))
 {
     clusterConfig.ThrowIfNull(nameof(clusterConfig));
     this.ClusterConfig                              = clusterConfig;
     this.HealthCheckRetryTimeout                    = healthCheckRetryTimeout;
     this.HealthCheckWaitDurationInSeconds           = healthCheckWaitDurationInSeconds;
     this.HealthCheckStableDurationInSeconds         = healthCheckStableDurationInSeconds;
     this.UpgradeDomainTimeoutInSeconds              = upgradeDomainTimeoutInSeconds;
     this.UpgradeTimeoutInSeconds                    = upgradeTimeoutInSeconds;
     this.MaxPercentUnhealthyApplications            = maxPercentUnhealthyApplications;
     this.MaxPercentUnhealthyNodes                   = maxPercentUnhealthyNodes;
     this.MaxPercentDeltaUnhealthyNodes              = maxPercentDeltaUnhealthyNodes;
     this.MaxPercentUpgradeDomainDeltaUnhealthyNodes = maxPercentUpgradeDomainDeltaUnhealthyNodes;
     this.ApplicationHealthPolicies                  = applicationHealthPolicies;
 }
コード例 #3
0
 /// <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;
 }