{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-maintenance-run-schema.json",
  "title": "MaintenanceRun",
  "description": "Details of a maintenance run.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-datainfracc-api-openapi.yml#/components/schemas/MaintenanceRun",
  "properties": {
    "compartmentId": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the compartment.",
      "type": "string"
    },
    "customActionTimeoutInMins": {
      "description": "Determines the amount of time the system will wait before the start of each server update operation.\nSupported values are 15 to 120 minutes.\n",
      "type": "integer"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer, and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing predefined tag keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a namespace.\nExample: `{\"foo-namespace\": {\"bar-key\": \"value\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "Description of the maintenance run.",
      "type": "string"
    },
    "displayName": {
      "description": "The user-friendly name for the maintenance run.",
      "type": "string"
    },
    "effectiveMaintenanceMethod": {
      "description": "The maintenance method ultimately applied to the maintenance run.\n",
      "enum": [
        "ROLLING",
        "NONROLLING"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MaintenanceMethodEnum"
    },
    "estimatedMaintenanceTimeInMins": {
      "description": "The estimated end-to-end maintenance duration (minutes).\n",
      "type": "integer"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Simple key-value pair that is applied without any predefined name, type or scope. This tag option exists for cross-compatibility only.\nExample: `{\"bar-key\": \"value\"}`\n",
      "type": "object"
    },
    "id": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the maintenance run.",
      "type": "string"
    },
    "infrastructureId": {
      "description": "The [OCID](/Content/General/Concepts/identifiers.htm) of the Data Infrastructure on which the maintenance run execution occurs.",
      "type": "string"
    },
    "isCustomActionTimeoutEnabled": {
      "description": "Whether a custom action timeout (waiting period) is configured for the server update operations.",
      "type": "boolean"
    },
    "lifecycleDetails": {
      "description": "Additional information about the current lifecycle state.",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current state of the maintenance run.\n",
      "enum": [
        "CREATING",
        "SCHEDULED",
        "IN_PROGRESS",
        "SUCCEEDED",
        "SKIPPED",
        "FAILED",
        "UPDATING",
        "DELETING",
        "DELETED",
        "CANCELED",
        "PARTIAL_SUCCESS"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MaintenanceRunLifecycleState"
    },
    "maintenanceRunType": {
      "description": "Maintenance run type.",
      "enum": [
        "QUARTERLY",
        "PLANNED",
        "MANDATORY",
        "SECURITY_MONTHLY"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MaintenanceRunTypeEnum"
    },
    "preferredMaintenanceMethod": {
      "description": "The maintenance method preference for the maintenance run, as selected by the user.\n",
      "enum": [
        "ROLLING",
        "NONROLLING"
      ],
      "type": "string",
      "x-obmcs-top-level-enum": "#/definitions/MaintenanceMethodEnum"
    },
    "sourceVersion": {
      "description": "The Oracle Data Infrastructure version from which the maintenance is performed.",
      "type": "string"
    },
    "systemTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only string, integer and boolean types are supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing system tags' keys and values scoped to a namespace.\nExample: `{\"bar-key\": \"value\"}`\n",
        "type": "object"
      },
      "description": "Usage of system tag keys. These predefined keys are scoped to namespaces.\nExample: `{ \"orcl-cloud\": { \"free-tier-retained\": \"true\" } }`\n",
      "type": "object"
    },
    "targetVersion": {
      "description": "The Data Infrastructure version that will be applied as the outcome of the maintenance operation.",
      "type": "string"
    },
    "timeEnded": {
      "description": "The date and time the maintenance run was completed.",
      "format": "date-time",
      "type": "string"
    },
    "timeScheduled": {
      "description": "The date and time the maintenance run is scheduled to occur.",
      "format": "date-time",
      "type": "string"
    },
    "timeStarted": {
      "description": "The date and time the maintenance run starts.",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "compartmentId",
    "displayName",
    "lifecycleState",
    "timeScheduled"
  ],
  "type": "object"
}