{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-service-fabric/json-schema/microsoft-azure-service-fabric-application-update-description-schema.json",
  "title": "ApplicationUpdateDescription",
  "description": "Describes the parameters for updating an application instance.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-service-fabric-client-api-openapi.yml#/components/schemas/ApplicationUpdateDescription",
  "properties": {
    "Flags": {
      "type": "string",
      "description": "Flags indicating whether other properties are set. Each of the associated properties corresponds to a flag, specified below, which, if set, indicate that the property is specified.\nIf flags are not specified for a certain property, the property will not be updated even if the new value is provided.\nThis property can be a combination of those flags obtained using bitwise 'OR' operator. Exception is RemoveApplicationCapacity which cannot be specified along with other parameters.\nFor example, if the provided value is 3 then the flags for MinimumNodes (1) and MaximumNodes (2) are set.\n\n- None - Does not indicate any other properties are set. The value is 0.\n- MinimumNodes - Indicates whether the MinimumNodes property is set. The value is 1.\n- MaximumNodes - Indicates whether the MinimumNodes property is set. The value is  2.\n- ApplicationMetrics - Indicates whether the ApplicationMetrics property is set. The value is 4."
    },
    "RemoveApplicationCapacity": {
      "type": "boolean",
      "description": "Used to clear all parameters related to Application Capacity for this application. |\nIt is not possible to specify this parameter together with other Application Capacity parameters.",
      "default": false
    },
    "MinimumNodes": {
      "type": "integer",
      "format": "int64",
      "description": "The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.",
      "minimum": 0
    },
    "MaximumNodes": {
      "type": "integer",
      "format": "int64",
      "description": "The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.",
      "minimum": 0,
      "default": 0
    },
    "ApplicationMetrics": {
      "$ref": "#/$defs/ApplicationMetricDescriptionList"
    }
  },
  "$defs": {
    "ApplicationMetricDescription": {
      "description": "Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application.",
      "properties": {
        "Name": {
          "type": "string",
          "description": "The name of the metric."
        },
        "MaximumCapacity": {
          "type": "integer",
          "format": "int64",
          "description": "The maximum node capacity for Service Fabric application.\nThis is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value.\nIf set to zero, capacity for this metric is unlimited on each node.\nWhen creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.\nWhen updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity."
        },
        "ReservationCapacity": {
          "type": "integer",
          "format": "int64",
          "description": "The node reservation capacity for Service Fabric application.\nThis is the amount of load which is reserved on nodes which have instances of this application.\nIf MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application.\nIf set to zero, no capacity is reserved for this metric.\nWhen setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric."
        },
        "TotalApplicationCapacity": {
          "description": "The total metric capacity for Service Fabric application.\nThis is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value.\nWhen creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.",
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "ApplicationMetricDescriptionList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ApplicationMetricDescription"
      },
      "description": "List of application capacity metric description."
    }
  }
}