/// <summary> /// Initializes a new instance of the ApplicationUpgradeDescription class. /// </summary> /// <param name="name">The name of the target application, including the 'fabric:' URI scheme.</param> /// <param name="targetApplicationTypeVersion">The target application type version (found in the application manifest) /// for the application upgrade.</param> /// <param name="parameters">List of application parameters with overridden values from their default values specified /// in the application manifest.</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="applicationHealthPolicy">Defines a health policy used to evaluate the health of an application or one /// of its children entities. /// </param> public ApplicationUpgradeDescription( string name, string targetApplicationTypeVersion, IReadOnlyDictionary <string, string> parameters, UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, UpgradeMode?rollingUpgradeMode = Common.UpgradeMode.UnmonitoredAuto, long?upgradeReplicaSetCheckTimeoutInSeconds = default(long?), bool?forceRestart = default(bool?), MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription), ApplicationHealthPolicy applicationHealthPolicy = default(ApplicationHealthPolicy)) { name.ThrowIfNull(nameof(name)); targetApplicationTypeVersion.ThrowIfNull(nameof(targetApplicationTypeVersion)); parameters.ThrowIfNull(nameof(parameters)); upgradeKind.ThrowIfNull(nameof(upgradeKind)); this.Name = name; this.TargetApplicationTypeVersion = targetApplicationTypeVersion; this.Parameters = parameters; this.UpgradeKind = upgradeKind; this.RollingUpgradeMode = rollingUpgradeMode; this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds; this.ForceRestart = forceRestart; this.MonitoringPolicy = monitoringPolicy; this.ApplicationHealthPolicy = applicationHealthPolicy; }
/// <summary> /// Initializes a new instance of the ApplicationUpgradeDescription class. /// </summary> /// <param name="name">The name of the target application, including the 'fabric:' URI scheme.</param> /// <param name="targetApplicationTypeVersion">The target application type version (found in the application manifest) /// for the application upgrade.</param> /// <param name="upgradeKind">The kind of upgrade out of the following possible values. Possible values include: /// 'Invalid', 'Rolling'</param> /// <param name="parameters">List of application parameters with overridden values from their default values specified /// in the application manifest.</param> /// <param name="rollingUpgradeMode">The mode used to monitor health during a rolling upgrade. The values are /// UnmonitoredAuto, UnmonitoredManual, Monitored, and UnmonitoredDeferred. Possible values include: 'Invalid', /// 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored', 'UnmonitoredDeferred'</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="applicationHealthPolicy">Defines a health policy 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> /// <param name="managedApplicationIdentity">Managed application identity description.</param> public ApplicationUpgradeDescription( string name, string targetApplicationTypeVersion, UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, IReadOnlyDictionary <string, string> parameters = default(IReadOnlyDictionary <string, string>), UpgradeMode?rollingUpgradeMode = Common.UpgradeMode.UnmonitoredAuto, long?upgradeReplicaSetCheckTimeoutInSeconds = default(long?), bool?forceRestart = default(bool?), UpgradeSortOrder?sortOrder = Common.UpgradeSortOrder.Default, MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription), ApplicationHealthPolicy applicationHealthPolicy = default(ApplicationHealthPolicy), long?instanceCloseDelayDurationInSeconds = default(long?), ManagedApplicationIdentityDescription managedApplicationIdentity = default(ManagedApplicationIdentityDescription)) { name.ThrowIfNull(nameof(name)); targetApplicationTypeVersion.ThrowIfNull(nameof(targetApplicationTypeVersion)); upgradeKind.ThrowIfNull(nameof(upgradeKind)); this.Name = name; this.TargetApplicationTypeVersion = targetApplicationTypeVersion; this.UpgradeKind = upgradeKind; this.Parameters = parameters; this.RollingUpgradeMode = rollingUpgradeMode; this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds; this.ForceRestart = forceRestart; this.SortOrder = sortOrder; this.MonitoringPolicy = monitoringPolicy; this.ApplicationHealthPolicy = applicationHealthPolicy; this.InstanceCloseDelayDurationInSeconds = instanceCloseDelayDurationInSeconds; this.ManagedApplicationIdentity = managedApplicationIdentity; }
/// <summary> /// Initializes a new instance of the ApplicationHealthPolicyMapItem class. /// </summary> /// <param name="key">The key of the application health policy map item. This is the name of the application.</param> /// <param name="value">The value of the application health policy map item. This is the ApplicationHealthPolicy for /// this application.</param> public ApplicationHealthPolicyMapItem( ApplicationName key, ApplicationHealthPolicy value) { key.ThrowIfNull(nameof(key)); value.ThrowIfNull(nameof(value)); this.Key = key; this.Value = value; }
/// <summary> /// Initializes a new instance of the ApplicationUpgradeUpdateDescription class. /// </summary> /// <param name="name">The name of the application, including the 'fabric:' URI scheme.</param> /// <param name="upgradeKind">The kind of upgrade out of the following possible values. Possible values include: /// 'Invalid', 'Rolling'</param> /// <param name="applicationHealthPolicy">Defines a health policy used to evaluate the health of an application or one /// of its children entities. /// </param> /// <param name="updateDescription">Describes the parameters for updating a rolling upgrade of application or /// cluster.</param> public ApplicationUpgradeUpdateDescription( ApplicationName name, UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, ApplicationHealthPolicy applicationHealthPolicy = default(ApplicationHealthPolicy), RollingUpgradeUpdateDescription updateDescription = default(RollingUpgradeUpdateDescription)) { name.ThrowIfNull(nameof(name)); upgradeKind.ThrowIfNull(nameof(upgradeKind)); this.Name = name; this.UpgradeKind = upgradeKind; this.ApplicationHealthPolicy = applicationHealthPolicy; this.UpdateDescription = updateDescription; }
/// <summary> /// Initializes a new instance of the ComposeDeploymentUpgradeProgressInfo class. /// </summary> /// <param name="deploymentName">The name of the target deployment.</param> /// <param name="applicationName">The name of the target application, including the 'fabric:' URI scheme.</param> /// <param name="upgradeState">The state of the compose deployment upgrade. /// . Possible values include: 'Invalid', 'ProvisioningTarget', 'RollingForwardInProgress', 'RollingForwardPending', /// 'UnprovisioningCurrent', 'RollingForwardCompleted', 'RollingBackInProgress', 'UnprovisioningTarget', /// 'RollingBackCompleted', 'Failed'</param> /// <param name="upgradeStatusDetails">Additional detailed information about the status of the pending upgrade.</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="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="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="monitoringPolicy">Describes the parameters for monitoring an upgrade in Monitored mode.</param> /// <param name="applicationHealthPolicy">Defines a health policy used to evaluate the health of an application or one /// of its children entities. /// </param> /// <param name="targetApplicationTypeVersion">The target application type version (found in the application manifest) /// for the application upgrade.</param> /// <param name="upgradeDuration">The estimated amount of time that the overall upgrade elapsed. It is first /// interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number /// representing the total number of milliseconds.</param> /// <param name="currentUpgradeDomainDuration">The estimated amount of time spent processing current Upgrade Domain. It /// is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a /// number representing the total number of milliseconds.</param> /// <param name="applicationUnhealthyEvaluations">List of health evaluations that resulted in the current aggregated /// health state.</param> /// <param name="currentUpgradeDomainProgress">Information about the current in-progress upgrade domain.</param> /// <param name="startTimestampUtc">The estimated UTC datetime when the upgrade started.</param> /// <param name="failureTimestampUtc">The estimated UTC datetime when the upgrade failed and FailureAction was /// executed.</param> /// <param name="failureReason">The cause of an upgrade failure that resulted in FailureAction being executed. Possible /// values include: 'None', 'Interrupted', 'HealthCheck', 'UpgradeDomainTimeout', 'OverallUpgradeTimeout'</param> /// <param name="upgradeDomainProgressAtFailure">Information about the upgrade domain progress at the time of upgrade /// failure.</param> /// <param name="applicationUpgradeStatusDetails">Additional details of application upgrade including failure /// message.</param> public ComposeDeploymentUpgradeProgressInfo( string deploymentName = default(string), string applicationName = default(string), ComposeDeploymentUpgradeState?upgradeState = default(ComposeDeploymentUpgradeState?), string upgradeStatusDetails = default(string), UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, UpgradeMode?rollingUpgradeMode = Common.UpgradeMode.UnmonitoredAuto, bool?forceRestart = default(bool?), long?upgradeReplicaSetCheckTimeoutInSeconds = default(long?), MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription), ApplicationHealthPolicy applicationHealthPolicy = default(ApplicationHealthPolicy), string targetApplicationTypeVersion = default(string), string upgradeDuration = default(string), string currentUpgradeDomainDuration = default(string), IEnumerable <HealthEvaluationWrapper> applicationUnhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>), CurrentUpgradeDomainProgressInfo currentUpgradeDomainProgress = default(CurrentUpgradeDomainProgressInfo), string startTimestampUtc = default(string), string failureTimestampUtc = default(string), FailureReason?failureReason = default(FailureReason?), FailureUpgradeDomainProgressInfo upgradeDomainProgressAtFailure = default(FailureUpgradeDomainProgressInfo), string applicationUpgradeStatusDetails = default(string)) { this.DeploymentName = deploymentName; this.ApplicationName = applicationName; this.UpgradeState = upgradeState; this.UpgradeStatusDetails = upgradeStatusDetails; this.UpgradeKind = upgradeKind; this.RollingUpgradeMode = rollingUpgradeMode; this.ForceRestart = forceRestart; this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds; this.MonitoringPolicy = monitoringPolicy; this.ApplicationHealthPolicy = applicationHealthPolicy; this.TargetApplicationTypeVersion = targetApplicationTypeVersion; this.UpgradeDuration = upgradeDuration; this.CurrentUpgradeDomainDuration = currentUpgradeDomainDuration; this.ApplicationUnhealthyEvaluations = applicationUnhealthyEvaluations; this.CurrentUpgradeDomainProgress = currentUpgradeDomainProgress; this.StartTimestampUtc = startTimestampUtc; this.FailureTimestampUtc = failureTimestampUtc; this.FailureReason = failureReason; this.UpgradeDomainProgressAtFailure = upgradeDomainProgressAtFailure; this.ApplicationUpgradeStatusDetails = applicationUpgradeStatusDetails; }
/// <summary> /// Initializes a new instance of the ComposeDeploymentUpgradeDescription class. /// </summary> /// <param name="deploymentName">The name of the deployment.</param> /// <param name="composeFileContent">The content of the compose file that describes the deployment to create.</param> /// <param name="upgradeKind">The kind of upgrade out of the following possible values. Possible values include: /// 'Invalid', 'Rolling'</param> /// <param name="registryCredential">Credential information to connect to container registry.</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="applicationHealthPolicy">Defines a health policy used to evaluate the health of an application or one /// of its children entities. /// </param> public ComposeDeploymentUpgradeDescription( string deploymentName, string composeFileContent, UpgradeKind?upgradeKind = Common.UpgradeKind.Rolling, RegistryCredential registryCredential = default(RegistryCredential), UpgradeMode?rollingUpgradeMode = Common.UpgradeMode.UnmonitoredAuto, long?upgradeReplicaSetCheckTimeoutInSeconds = default(long?), bool?forceRestart = default(bool?), MonitoringPolicyDescription monitoringPolicy = default(MonitoringPolicyDescription), ApplicationHealthPolicy applicationHealthPolicy = default(ApplicationHealthPolicy)) { deploymentName.ThrowIfNull(nameof(deploymentName)); composeFileContent.ThrowIfNull(nameof(composeFileContent)); upgradeKind.ThrowIfNull(nameof(upgradeKind)); this.DeploymentName = deploymentName; this.ComposeFileContent = composeFileContent; this.UpgradeKind = upgradeKind; this.RegistryCredential = registryCredential; this.RollingUpgradeMode = rollingUpgradeMode; this.UpgradeReplicaSetCheckTimeoutInSeconds = upgradeReplicaSetCheckTimeoutInSeconds; this.ForceRestart = forceRestart; this.MonitoringPolicy = monitoringPolicy; this.ApplicationHealthPolicy = applicationHealthPolicy; }