{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-event-hubs/json-schema/microsoft-azure-event-hubs-eventhub-schema.json",
  "title": "Eventhub",
  "description": "Single item in List or Get Event Hub operation.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-event-hubs-event-hubs-api-openapi.yml#/components/schemas/Eventhub",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "Fully qualified resource ID for the resource."
    },
    "name": {
      "type": "string",
      "readOnly": true,
      "description": "The name of the resource."
    },
    "type": {
      "type": "string",
      "readOnly": true,
      "description": "The type of the resource."
    },
    "location": {
      "type": "string",
      "readOnly": true,
      "description": "The geo-location where the resource lives."
    },
    "properties": {
      "type": "object",
      "properties": {
        "partitionIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "readOnly": true,
          "description": "Current number of shards on the Event Hub."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "Exact time the Event Hub was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": true,
          "description": "The exact time the message was updated."
        },
        "messageRetentionInDays": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "description": "Number of days to retain the events for this Event Hub, value should be 1 to 7 days."
        },
        "partitionCount": {
          "type": "integer",
          "format": "int64",
          "minimum": 1,
          "description": "Number of partitions created for the Event Hub, allowed values are from 1 to 32 partitions."
        },
        "status": {
          "type": "string",
          "description": "Enumerates the possible values for the status of the Event Hub.",
          "enum": [
            "Active",
            "Disabled",
            "Restoring",
            "SendDisabled",
            "ReceiveDisabled",
            "Creating",
            "Deleting",
            "Renaming",
            "Unknown"
          ]
        },
        "userMetadata": {
          "type": "string",
          "description": "Gets and Sets Metadata of User."
        },
        "captureDescription": {
          "$ref": "#/$defs/CaptureDescription"
        },
        "retentionDescription": {
          "$ref": "#/$defs/RetentionDescription"
        }
      }
    },
    "systemData": {
      "$ref": "#/$defs/SystemData"
    }
  },
  "$defs": {
    "CaptureDescription": {
      "type": "object",
      "description": "Properties to configure capture description for eventhub.",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "A value that indicates whether capture description is enabled."
        },
        "encoding": {
          "type": "string",
          "description": "Enumerates the possible values for the encoding format of capture description.",
          "enum": [
            "Avro",
            "AvroDeflate"
          ]
        },
        "destination": {
          "$ref": "#/$defs/Destination"
        },
        "intervalInSeconds": {
          "type": "integer",
          "format": "int32",
          "description": "The time window allows you to set the frequency with which the capture to Azure Blobs will happen, value should between 60 to 900 seconds."
        },
        "sizeLimitInBytes": {
          "type": "integer",
          "format": "int32",
          "description": "The size window defines the amount of data built up in your Event Hub before a capture operation, value should be between 10485760 to 524288000 bytes."
        },
        "skipEmptyArchives": {
          "type": "boolean",
          "description": "A value that indicates whether to skip empty archives."
        }
      }
    },
    "CaptureIdentity": {
      "type": "object",
      "description": "A value that indicates whether capture description is enabled.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of Azure Active Directory Managed Identity.",
          "enum": [
            "SystemAssigned",
            "UserAssigned"
          ]
        },
        "userAssignedIdentity": {
          "type": "string",
          "description": "ARM ID of Managed User Identity. This property is required if the type is UserAssignedIdentity."
        }
      }
    },
    "Destination": {
      "type": "object",
      "description": "Capture storage details for capture description.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name for capture destination."
        },
        "identity": {
          "$ref": "#/$defs/CaptureIdentity"
        },
        "properties": {
          "type": "object",
          "properties": {
            "storageAccountResourceId": {
              "type": "string",
              "description": "Resource id of the storage account to be used to create the blobs."
            },
            "blobContainer": {
              "type": "string",
              "description": "Blob container Name."
            },
            "archiveNameFormat": {
              "type": "string",
              "description": "Blob naming convention for archive, e.g. {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}."
            },
            "dataLakeAccountName": {
              "type": "string",
              "description": "The Azure Data Lake Store name for the captured events."
            },
            "dataLakeFolderPath": {
              "type": "string",
              "description": "The destination folder path for the captured events."
            },
            "dataLakeSubscriptionId": {
              "type": "string",
              "format": "uuid",
              "description": "Subscription Id of Azure Data Lake Store."
            }
          }
        }
      }
    },
    "RetentionDescription": {
      "type": "object",
      "description": "Properties to configure retention settings for the eventhub.",
      "properties": {
        "cleanupPolicy": {
          "type": "string",
          "description": "Enumerates the possible values for cleanup policy.",
          "enum": [
            "Delete",
            "Compact"
          ]
        },
        "retentionTimeInHours": {
          "type": "integer",
          "format": "int64",
          "description": "Number of hours to retain the events for this Event Hub. This value is only used when cleanupPolicy is Delete."
        },
        "tombstoneRetentionTimeInHours": {
          "type": "integer",
          "format": "int32",
          "description": "Number of hours to retain the tombstone markers of a compacted Event Hub. This value is only used when cleanupPolicy is Compact."
        }
      }
    },
    "SystemData": {
      "type": "object",
      "description": "Metadata pertaining to creation and last modification of the resource.",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource."
        },
        "createdByType": {
          "type": "string",
          "description": "The type of identity that created the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ]
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)."
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource."
        },
        "lastModifiedByType": {
          "type": "string",
          "description": "The type of identity that last modified the resource.",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ]
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)."
        }
      }
    }
  }
}