{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-devops-health/json-schema/azure-devops-health-availability-status-schema.json",
  "title": "availabilityStatus",
  "description": "availabilityStatus of a resource.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-devops-health-availabilitystatuses-api-openapi.yml#/components/schemas/availabilityStatus",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AvailabilityStatusProperties",
      "description": "Properties of availability state."
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "AvailabilityStateValues": {
      "type": "string",
      "description": "Impacted resource status of the resource.",
      "enum": [
        "Available",
        "Unavailable",
        "Degraded",
        "Unknown"
      ],
      "x-ms-enum": {
        "name": "AvailabilityStateValues",
        "modelAsString": true,
        "values": [
          {
            "name": "Available",
            "value": "Available",
            "description": "Available"
          },
          {
            "name": "Unavailable",
            "value": "Unavailable",
            "description": "Unavailable"
          },
          {
            "name": "Degraded",
            "value": "Degraded",
            "description": "Degraded"
          },
          {
            "name": "Unknown",
            "value": "Unknown",
            "description": "Unknown"
          }
        ]
      }
    },
    "AvailabilityStatusProperties": {
      "type": "object",
      "description": "Properties of availability state.",
      "properties": {
        "availabilityState": {
          "$ref": "#/$defs/AvailabilityStateValues",
          "description": "Availability status of the resource. When it is null, this availabilityStatus object represents an availability impacting event"
        },
        "title": {
          "type": "string",
          "description": "Title description of the availability status."
        },
        "summary": {
          "type": "string",
          "description": "Summary description of the availability status."
        },
        "detailedStatus": {
          "type": "string",
          "description": "Details of the availability status."
        },
        "reasonType": {
          "type": "string",
          "description": "When the resource's availabilityState is Unavailable, it describes where the health impacting event was originated. Examples are planned, unplanned, user initiated or an outage etc."
        },
        "context": {
          "type": "string",
          "description": "When an event is created, it can either be triggered by a customer or the platform of the resource and this field will illustrate that. This field is connected to the category field in this object."
        },
        "category": {
          "type": "string",
          "description": "When a context field is set to Platform, this field will reflect if the event was planned or unplanned. If the context field does not have a value of Platform, then this field will be ignored."
        },
        "articleId": {
          "type": "string",
          "description": "The Article Id"
        },
        "rootCauseAttributionTime": {
          "type": "string",
          "format": "date-time",
          "description": "When the resource's availabilityState is Unavailable, it provides the Timestamp for when the health impacting event was received."
        },
        "healthEventType": {
          "type": "string",
          "description": "In case of an availability impacting event, it describes when the health impacting event was originated. Examples are Lifecycle, Downtime, Fault Analysis etc."
        },
        "healthEventCause": {
          "type": "string",
          "description": "In case of an availability impacting event, it describes where the health impacting event was originated. Examples are PlatformInitiated, UserInitiated etc."
        },
        "healthEventCategory": {
          "type": "string",
          "description": "In case of an availability impacting event, it describes the category of a PlatformInitiated health impacting event. Examples are Planned, Unplanned etc."
        },
        "healthEventId": {
          "type": "string",
          "description": "It is a unique Id that identifies the event"
        },
        "resolutionETA": {
          "type": "string",
          "format": "date-time",
          "description": "When the resource's availabilityState is Unavailable and the reasonType is not User Initiated, it provides the date and time for when the issue is expected to be resolved."
        },
        "occuredTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for when last change in health status occurred."
        },
        "reasonChronicity": {
          "$ref": "#/$defs/reasonChronicityTypes",
          "description": "Chronicity of the availability transition."
        },
        "reportedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for when the health was last checked."
        },
        "recentlyResolved": {
          "$ref": "#/$defs/AvailabilityStatusPropertiesRecentlyResolved",
          "description": "An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned"
        },
        "recommendedActions": {
          "type": "array",
          "description": "Lists actions the user can take based on the current availabilityState of the resource.",
          "items": {
            "$ref": "#/$defs/recommendedAction"
          },
          "x-ms-identifiers": [
            "action"
          ]
        },
        "serviceImpactingEvents": {
          "type": "array",
          "description": "Lists the service impacting events that may be affecting the health of the resource.",
          "items": {
            "$ref": "#/$defs/serviceImpactingEvent"
          },
          "x-ms-identifiers": [
            "correlationId"
          ]
        }
      }
    },
    "AvailabilityStatusPropertiesRecentlyResolved": {
      "type": "object",
      "description": "An annotation describing a change in the availabilityState to Available from Unavailable with a reasonType of type Unplanned",
      "properties": {
        "unavailableOccuredTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for when the availabilityState changed to Unavailable"
        },
        "resolvedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the availabilityState changes to Available."
        },
        "unavailableSummary": {
          "type": "string",
          "description": "Brief description of cause of the resource becoming unavailable."
        }
      }
    },
    "Azure.Core.armResourceType": {
      "type": "string",
      "description": "Represents an Azure Resource Type."
    },
    "ProxyResource": {
      "type": "object",
      "description": "ARM proxy resource.",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Azure Resource Manager Identity for the availabilityStatuses resource."
        },
        "name": {
          "type": "string"
        },
        "type": {
          "$ref": "#/$defs/Azure.Core.armResourceType",
          "description": "Microsoft.ResourceHealth/AvailabilityStatuses."
        },
        "location": {
          "type": "string",
          "description": "Azure Resource Manager geo location of the resource."
        }
      }
    },
    "ServiceImpactingEventIncidentProperties": {
      "type": "object",
      "description": "Properties of the service impacting event.",
      "properties": {
        "title": {
          "type": "string",
          "description": "Title of the incident."
        },
        "service": {
          "type": "string",
          "description": "Service impacted by the event."
        },
        "region": {
          "type": "string",
          "description": "Region impacted by the event."
        },
        "incidentType": {
          "type": "string",
          "description": "Type of Event."
        }
      }
    },
    "ServiceImpactingEventStatus": {
      "type": "object",
      "description": "Status of the service impacting event.",
      "properties": {
        "value": {
          "type": "string",
          "description": "Current status of the event"
        }
      }
    },
    "reasonChronicityTypes": {
      "type": "string",
      "description": "Chronicity of the availability transition.",
      "enum": [
        "Transient",
        "Persistent"
      ],
      "x-ms-enum": {
        "name": "reasonChronicityTypes",
        "modelAsString": true,
        "values": [
          {
            "name": "Transient",
            "value": "Transient",
            "description": "Transient"
          },
          {
            "name": "Persistent",
            "value": "Persistent",
            "description": "Persistent"
          }
        ]
      }
    },
    "recommendedAction": {
      "type": "object",
      "description": "Lists actions the user can take based on the current availabilityState of the resource.",
      "properties": {
        "action": {
          "type": "string",
          "description": "Recommended action."
        },
        "actionUrl": {
          "type": "string",
          "description": "Link to the action"
        },
        "_ActionUrl.Comment": {
          "type": "string",
          "description": "the comment for the Action"
        },
        "actionUrlText": {
          "type": "string",
          "description": "Substring of action, it describes which text should host the action URL."
        }
      }
    },
    "serviceImpactingEvent": {
      "type": "object",
      "description": "Lists the service impacting events that may be affecting the health of the resource.",
      "properties": {
        "eventStartTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for when the event started."
        },
        "eventStatusLastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp for when event was submitted/detected."
        },
        "correlationId": {
          "type": "string",
          "description": "Correlation id for the event"
        },
        "status": {
          "$ref": "#/$defs/ServiceImpactingEventStatus",
          "description": "Status of the service impacting event."
        },
        "incidentProperties": {
          "$ref": "#/$defs/ServiceImpactingEventIncidentProperties",
          "description": "Properties of the service impacting event."
        }
      }
    }
  }
}