{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oracle/json-schema/oracle-instance-maintenance-event-schema.json",
  "title": "InstanceMaintenanceEvent",
  "description": "It is the event in which the maintenance action will be be performed on the customer instance on the scheduled date and time.\n",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/oracle-compute-api-openapi.yml#/components/schemas/InstanceMaintenanceEvent",
  "properties": {
    "additionalDetails": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Additional details of the maintenance in the form of json.\n",
      "type": "object"
    },
    "alternativeResolutionActions": {
      "description": "These are alternative actions to the requested instanceAction that can be taken to resolve the Maintenance.\n",
      "items": {
        "enum": [
          "REBOOT_MIGRATION",
          "TERMINATE"
        ],
        "type": "string",
        "x-obmcs-top-level-enum": "#/definitions/InstanceMaintenanceAlternativeResolutionActions"
      },
      "type": "array"
    },
    "canDeleteLocalStorage": {
      "description": "For Instances that have local storage, this field is set to true when local storage\nwill be deleted as a result of the Maintenance.\n",
      "type": "boolean"
    },
    "canReschedule": {
      "description": "Indicates if this MaintenanceEvent is capable of being rescheduled up to the timeHardDueDate.\n",
      "type": "boolean"
    },
    "compartmentId": {
      "description": "The OCID of the compartment that contains the instance.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "correlationToken": {
      "description": "A unique identifier that will group Instances that have a relationship with one another and must be scheduled\ntogether for the Maintenance to proceed. Any Instances that have a relationship with one another from a Maintenance\nperspective will have a matching correlationToken.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "createdBy": {
      "description": "The creator of the maintenance event.\n",
      "enum": [
        "CUSTOMER",
        "SYSTEM"
      ],
      "type": "string"
    },
    "definedTags": {
      "additionalProperties": {
        "additionalProperties": {
          "description": "The value of the tag. Only the String type is supported.\n",
          "type": "object"
        },
        "description": "Key-value pair representing a defined tag key and value, scoped to a namespace.\n\nExample: `{\"CostCenter\": \"42\"}`\n",
        "type": "object"
      },
      "description": "Defined tags for this resource. Each key is predefined and scoped to a\nnamespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Operations\": {\"CostCenter\": \"42\"}}`\n",
      "type": "object"
    },
    "description": {
      "description": "It is the descriptive information about the maintenance taking place on the customer instance.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "displayName": {
      "description": "A user-friendly name. Does not have to be unique, and it's changeable.\nAvoid entering confidential information.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "estimatedDuration": {
      "description": "This is the estimated duration of the Maintenance, once the Maintenance has entered the STARTED state.\n",
      "format": "x-obmcs-duration",
      "type": "string"
    },
    "freeformTags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Free-form tags for this resource. Each tag is a simple key-value pair with no\npredefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm).\n\nExample: `{\"Department\": \"Finance\"}`\n",
      "type": "object"
    },
    "id": {
      "description": "The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the maintenance event.\n",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "instanceAction": {
      "description": "This is the action that will be performed on the Instance by OCI when the Maintenance begins.\n",
      "enum": [
        "REBOOT_MIGRATION",
        "TERMINATE",
        "STOP",
        "NONE"
      ],
      "type": "string"
    },
    "instanceId": {
      "description": "The OCID of the instance.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "lifecycleDetails": {
      "description": "Provides more details about the state of the maintenance event.\n",
      "type": "string"
    },
    "lifecycleState": {
      "description": "The current state of the maintenance event.\n",
      "enum": [
        "SCHEDULED",
        "QUEUED",
        "STARTED",
        "PROCESSING",
        "SUCCEEDED",
        "FAILED",
        "CANCELED"
      ],
      "type": "string"
    },
    "maintenanceCategory": {
      "description": "This indicates the priority and allowed actions for this Maintenance. Higher priority forms of Maintenance have\ntighter restrictions and may not be rescheduled, while lower priority/severity Maintenance can be rescheduled,\ndeferred, or even cancelled. Please see the\n[Instance Maintenance](/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details.\n",
      "enum": [
        "EMERGENCY",
        "MANDATORY",
        "FLEXIBLE",
        "OPTIONAL",
        "NOTIFICATION"
      ],
      "type": "string"
    },
    "maintenanceReason": {
      "description": "This is the reason that Maintenance is being performed. See\n[Instance Maintenance](/iaas/Content/Compute/Tasks/placeholder.htm) documentation for details.\n",
      "enum": [
        "EVACUATION",
        "ENVIRONMENTAL_FACTORS",
        "DECOMMISSION",
        "HARDWARE_REPLACEMENT",
        "FIRMWARE_UPDATE",
        "SECURITY_UPDATE"
      ],
      "type": "string"
    },
    "startWindowDuration": {
      "description": "The duration of the time window Maintenance is scheduled to begin within.\n",
      "format": "x-obmcs-duration",
      "type": "string"
    },
    "timeCreated": {
      "description": "The date and time the maintenance event was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339).\nExample: `2016-08-25T21:10:29.600Z`\n",
      "format": "date-time",
      "type": "string"
    },
    "timeFinished": {
      "description": "The time at which the Maintenance actually finished.\n",
      "format": "date-time",
      "type": "string"
    },
    "timeHardDueDate": {
      "description": "It is the scheduled hard due date and time of the maintenance event.\nThe maintenance event will happen at this time and the due date will not be extended.\n",
      "format": "date-time",
      "type": "string"
    },
    "timeStarted": {
      "description": "The time at which the Maintenance actually started.\n",
      "format": "date-time",
      "type": "string"
    },
    "timeWindowStart": {
      "description": "The beginning of the time window when Maintenance is scheduled to begin. The Maintenance will not begin before\nthis time.\n",
      "format": "date-time",
      "type": "string"
    }
  },
  "required": [
    "id",
    "instanceId",
    "compartmentId",
    "instanceAction",
    "timeWindowStart",
    "timeCreated",
    "canReschedule",
    "maintenanceReason",
    "lifecycleState",
    "createdBy",
    "maintenanceCategory",
    "alternativeResolutionActions"
  ]
}