{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-maintenance-event-action-response-schema.json",
  "title": "MaintenanceEventActionResponse",
  "description": "Response model for maintenance event reschedule and apply-now actions.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-openapi.yml#/components/schemas/MaintenanceEventActionResponse",
  "type": "object",
  "properties": {
    "maintenanceEventId": {
      "type": "string",
      "description": "The maintenance event name (maintenance ID)."
    },
    "serverId": {
      "type": "string",
      "format": "arm-id",
      "description": "The full Azure resource ID of the server."
    },
    "status": {
      "$ref": "#/$defs/MaintenanceEventStatus"
    },
    "plannedStartTime": {
      "type": "string",
      "format": "date-time",
      "description": "The planned start time of the maintenance event (UTC)."
    },
    "plannedEndTime": {
      "type": "string",
      "format": "date-time",
      "description": "The planned end time of the maintenance event (UTC)."
    },
    "appliedNow": {
      "type": "boolean",
      "description": "A value indicating whether this was an apply-now (immediate) action. True for ApplyNow; false for Reschedule."
    },
    "lastUpdatedTime": {
      "type": "string",
      "format": "date-time",
      "description": "The time this maintenance event record was last updated (UTC)."
    }
  },
  "$defs": {
    "MaintenanceEventStatus": {
      "type": "string",
      "description": "The status of a maintenance event.",
      "enum": [
        "Planned",
        "InProgress",
        "Complete",
        "Rescheduled",
        "Canceled"
      ],
      "x-ms-enum": {
        "name": "MaintenanceEventStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "Planned",
            "value": "Planned",
            "description": "The maintenance event is scheduled and has not yet started."
          },
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "The maintenance event is currently in progress."
          },
          {
            "name": "Complete",
            "value": "Complete",
            "description": "The maintenance event has completed successfully."
          },
          {
            "name": "Rescheduled",
            "value": "Rescheduled",
            "description": "The maintenance event has been rescheduled (postponed) by the customer."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "The maintenance event was canceled, failed, or timed out."
          }
        ]
      }
    }
  }
}