{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-windows-server/json-schema/microsoft-windows-server-application-pool-update-schema.json",
  "title": "ApplicationPoolUpdate",
  "description": "Request body for updating an application pool. Only include properties that should be changed.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-windows-server-application-pools-api-openapi.yml#/components/schemas/ApplicationPoolUpdate",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "auto_start": {
      "type": "boolean"
    },
    "pipeline_mode": {
      "type": "string",
      "enum": [
        "integrated",
        "classic"
      ]
    },
    "managed_runtime_version": {
      "type": "string"
    },
    "enable_32bit_win64": {
      "type": "boolean"
    },
    "queue_length": {
      "type": "integer"
    },
    "cpu": {
      "$ref": "#/$defs/CpuSettings"
    },
    "process_model": {
      "$ref": "#/$defs/ProcessModel"
    },
    "identity": {
      "$ref": "#/$defs/Identity"
    },
    "recycling": {
      "$ref": "#/$defs/Recycling"
    },
    "rapid_fail_protection": {
      "$ref": "#/$defs/RapidFailProtection"
    },
    "process_orphaning": {
      "$ref": "#/$defs/ProcessOrphaning"
    }
  },
  "$defs": {
    "CpuSettings": {
      "type": "object",
      "description": "CPU usage settings for the application pool.",
      "properties": {
        "limit": {
          "type": "integer",
          "description": "The maximum CPU usage percentage (in 1/1000ths of a percent) allowed for the application pool.",
          "default": 0
        },
        "limit_interval": {
          "type": "integer",
          "description": "The interval in minutes for CPU limit monitoring.",
          "default": 5
        },
        "action": {
          "type": "string",
          "description": "The action to take when the CPU limit is exceeded.",
          "enum": [
            "NoAction",
            "KillW3wp",
            "Throttle",
            "ThrottleUnderLoad"
          ],
          "default": "NoAction"
        },
        "processor_affinity_enabled": {
          "type": "boolean",
          "description": "Whether processor affinity is enabled.",
          "default": false
        },
        "processor_affinity_mask32": {
          "type": "string",
          "description": "The 32-bit processor affinity mask.",
          "default": "0xFFFFFFFF"
        },
        "processor_affinity_mask64": {
          "type": "string",
          "description": "The 64-bit processor affinity mask.",
          "default": "0xFFFFFFFF"
        }
      }
    },
    "Identity": {
      "type": "object",
      "description": "The identity configuration for the application pool worker process.",
      "properties": {
        "identity_type": {
          "type": "string",
          "description": "The type of identity used by the application pool.",
          "enum": [
            "ApplicationPoolIdentity",
            "LocalSystem",
            "LocalService",
            "NetworkService",
            "SpecificUser"
          ],
          "default": "ApplicationPoolIdentity"
        },
        "username": {
          "type": "string",
          "description": "The username for the identity when using SpecificUser identity type."
        },
        "load_user_profile": {
          "type": "boolean",
          "description": "Whether to load the user profile for the worker process.",
          "default": true
        }
      }
    },
    "PeriodicRestart": {
      "type": "object",
      "description": "Periodic restart configuration for the application pool.",
      "properties": {
        "time_interval": {
          "type": "integer",
          "description": "The time interval in minutes after which the application pool recycles.",
          "default": 1740
        },
        "private_memory": {
          "type": "integer",
          "description": "The private memory threshold in kilobytes that triggers recycling. 0 means disabled.",
          "default": 0
        },
        "request_limit": {
          "type": "integer",
          "description": "The number of requests after which the application pool recycles. 0 means disabled.",
          "default": 0
        },
        "virtual_memory": {
          "type": "integer",
          "description": "The virtual memory threshold in kilobytes that triggers recycling. 0 means disabled.",
          "default": 0
        },
        "schedule": {
          "type": "array",
          "description": "Scheduled times for recycling the application pool.",
          "items": {
            "type": "string",
            "format": "time"
          }
        }
      }
    },
    "ProcessModel": {
      "type": "object",
      "description": "Process model settings for the application pool worker processes.",
      "properties": {
        "idle_timeout": {
          "type": "integer",
          "description": "The idle timeout in minutes before a worker process is shut down.",
          "default": 20
        },
        "max_processes": {
          "type": "integer",
          "description": "The maximum number of worker processes for the application pool (web garden).",
          "default": 1
        },
        "pinging_enabled": {
          "type": "boolean",
          "description": "Whether health monitoring pings are enabled.",
          "default": true
        },
        "ping_interval": {
          "type": "integer",
          "description": "The interval in seconds between health monitoring pings.",
          "default": 30
        },
        "ping_response_time": {
          "type": "integer",
          "description": "The maximum time in seconds allowed for a worker process to respond to a health ping.",
          "default": 90
        },
        "shutdown_time_limit": {
          "type": "integer",
          "description": "The time in seconds allowed for a worker process to gracefully shut down.",
          "default": 90
        },
        "startup_time_limit": {
          "type": "integer",
          "description": "The time in seconds allowed for a worker process to start up.",
          "default": 90
        },
        "idle_timeout_action": {
          "type": "string",
          "description": "The action to take when the idle timeout is reached.",
          "enum": [
            "Terminate",
            "Suspend"
          ],
          "default": "Terminate"
        }
      }
    },
    "ProcessOrphaning": {
      "type": "object",
      "description": "Process orphaning settings that control behavior when a worker process cannot be shut down gracefully.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether process orphaning is enabled.",
          "default": false
        },
        "orphan_action_exe": {
          "type": "string",
          "description": "The path to an executable to run when a worker process is orphaned."
        },
        "orphan_action_params": {
          "type": "string",
          "description": "Parameters for the orphan action executable."
        }
      }
    },
    "RapidFailProtection": {
      "type": "object",
      "description": "Rapid fail protection settings that determine how IIS responds to repeated worker process failures.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether rapid fail protection is enabled.",
          "default": true
        },
        "load_balancer_capabilities": {
          "type": "string",
          "description": "The load balancer capabilities response type.",
          "enum": [
            "HttpLevel",
            "TcpLevel"
          ],
          "default": "HttpLevel"
        },
        "interval": {
          "type": "integer",
          "description": "The time interval in minutes during which the max crash count is monitored.",
          "default": 5
        },
        "max_crashes": {
          "type": "integer",
          "description": "The maximum number of worker process crashes allowed within the interval.",
          "default": 5
        },
        "auto_shutdown_exe": {
          "type": "string",
          "description": "The path to an executable to run when the application pool is shut down due to rapid fail protection."
        },
        "auto_shutdown_params": {
          "type": "string",
          "description": "Parameters for the auto shutdown executable."
        }
      }
    },
    "Recycling": {
      "type": "object",
      "description": "Recycling settings for the application pool.",
      "properties": {
        "disable_overlapped_recycle": {
          "type": "boolean",
          "description": "Whether to disable overlapped recycling.",
          "default": false
        },
        "disable_recycle_on_config_change": {
          "type": "boolean",
          "description": "Whether to disable recycling on configuration changes.",
          "default": false
        },
        "log_events": {
          "$ref": "#/$defs/RecyclingLogEvents"
        },
        "periodic_restart": {
          "$ref": "#/$defs/PeriodicRestart"
        }
      }
    },
    "RecyclingLogEvents": {
      "type": "object",
      "description": "Configuration for which recycling events are logged.",
      "properties": {
        "time": {
          "type": "boolean",
          "default": true
        },
        "requests": {
          "type": "boolean",
          "default": true
        },
        "schedule": {
          "type": "boolean",
          "default": true
        },
        "memory": {
          "type": "boolean",
          "default": true
        },
        "isapi_unhealthy": {
          "type": "boolean",
          "default": true
        },
        "on_demand": {
          "type": "boolean",
          "default": true
        },
        "config_change": {
          "type": "boolean",
          "default": true
        },
        "private_memory": {
          "type": "boolean",
          "default": true
        }
      }
    }
  }
}