---
title: "Updates an ongoing application upgrade in the Service Fabric cluster."
method: POST
path: "/Applications/{applicationId}/$/UpdateUpgrade"
tags: ["Application"]
---

# Updates an ongoing application upgrade in the Service Fabric cluster.

`POST /Applications/{applicationId}/$/UpdateUpgrade`

Updates the parameters of an ongoing application upgrade from the ones specified at the time of starting the application upgrade. This may be required to mitigate stuck application upgrades due to incorrect parameters or issues in the application to make progress.

## Path parameters

- `applicationId` string, required

## Query parameters

- `api-version` '6.0', required
- `timeout` integer

## Request body

- ApplicationUpgradeUpdateDescription — Describes the parameters for updating an ongoing application upgrade.
  - `Name` string, required — The name of the application, including the 'fabric:' URI scheme.
  - `UpgradeKind` 'Invalid' | 'Rolling', required — The kind of upgrade out of the following possible values.
  - `ApplicationHealthPolicy` ApplicationHealthPolicy — Defines a health policy used to evaluate the health of an application or one of its children entities.
    - `ConsiderWarningAsError` boolean — Indicates whether warnings are treated with the same severity as errors.
    - `MaxPercentUnhealthyDeployedApplications` integer — The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.
    - `DefaultServiceTypeHealthPolicy` ServiceTypeHealthPolicy — Represents the health policy used to evaluate the health of services belonging to a service type.
      - `MaxPercentUnhealthyPartitionsPerService` integer — The maximum allowed percentage of unhealthy partitions per service. Allowed values are Byte values from zero to 100 The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. The computation rounds up to tolerate one failure on small numbers of partitions. Default percentage is zero.
      - `MaxPercentUnhealthyReplicasPerPartition` integer — The maximum allowed percentage of unhealthy replicas per partition. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. The computation rounds up to tolerate one failure on small numbers of replicas. Default percentage is zero.
      - `MaxPercentUnhealthyServices` integer — The maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. The computation rounds up to tolerate one failure on small numbers of services. Default percentage is zero.
    - `ServiceTypeHealthPolicyMap` ServiceTypeHealthPolicyMapItem[] — Defines a ServiceTypeHealthPolicy per service type name. The entries in the map replace the default service type health policy for each specified service type. For example, in an application that contains both a stateless gateway service type and a stateful engine service type, the health policies for the stateless and stateful services can be configured differently. With policy per service type, there's more granular control of the health of the service. If no policy is specified for a service type name, the DefaultServiceTypeHealthPolicy is used for evaluation.
      - `Key` string, required — The key of the service type health policy map item. This is the name of the service type.
      - `Value` ServiceTypeHealthPolicy, required — Represents the health policy used to evaluate the health of services belonging to a service type.
        - `MaxPercentUnhealthyPartitionsPerService` integer — The maximum allowed percentage of unhealthy partitions per service. Allowed values are Byte values from zero to 100 The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. The computation rounds up to tolerate one failure on small numbers of partitions. Default percentage is zero.
        - `MaxPercentUnhealthyReplicasPerPartition` integer — The maximum allowed percentage of unhealthy replicas per partition. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. The computation rounds up to tolerate one failure on small numbers of replicas. Default percentage is zero.
        - `MaxPercentUnhealthyServices` integer — The maximum allowed percentage of unhealthy services. Allowed values are Byte values from zero to 100. The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. The computation rounds up to tolerate one failure on small numbers of services. Default percentage is zero.
  - `UpdateDescription` RollingUpgradeUpdateDescription — Describes the parameters for updating a rolling upgrade of application or cluster.
    - `RollingUpgradeMode` 'Invalid' | 'UnmonitoredAuto' | 'UnmonitoredManual' | 'Monitored', required — The mode used to monitor health during a rolling upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.
    - `ForceRestart` boolean — If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data).
    - `ReplicaSetCheckTimeoutInMilliseconds` integer — 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).
    - `FailureAction` 'Invalid' | 'Rollback' | 'Manual' — The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode.
    - `HealthCheckWaitDurationInMilliseconds` string — The amount of time to wait after completing an upgrade domain before applying health policies. 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.
    - `HealthCheckStableDurationInMilliseconds` string — The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next 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.
    - `HealthCheckRetryTimeoutInMilliseconds` string — The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. 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.
    - `UpgradeTimeoutInMilliseconds` string — The amount of time the overall upgrade has to complete before FailureAction is executed. 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.
    - `UpgradeDomainTimeoutInMilliseconds` string — The amount of time each upgrade domain has to complete before FailureAction is executed. 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.

## Response `200`

A successful response means that the application upgrade has updated with the specified parameters. Use GetApplicationUpgrade operation to get the status of the upgrade.

## Other responses

- `default` — The detailed error response.

---

[API](https://skmtc.net/azure/apis/service-fabric-client-apis.md) · [All operations](https://skmtc.net/azure/apis/service-fabric-client-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/service-fabric-client-apis/versions/6df9f2f4d542/schema)
