{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-log-analytics/json-schema/azure-log-analytics-data-export-schema.json",
  "title": "DataExport",
  "description": "The top level data export resource container.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-log-analytics-data-export-api-openapi.yml#/components/schemas/DataExport",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/DataExportProperties",
      "description": "data export properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "DataExportProperties": {
      "type": "object",
      "description": "Data Export properties.",
      "properties": {
        "dataExportId": {
          "type": "string",
          "description": "The data export rule ID."
        },
        "tableNames": {
          "type": "array",
          "description": "An array of tables to export, for example: [“Heartbeat, SecurityEvent”].",
          "items": {
            "type": "string"
          }
        },
        "destination": {
          "$ref": "#/$defs/Destination",
          "description": "destination properties.",
          "x-ms-client-flatten": true
        },
        "enable": {
          "type": "boolean",
          "description": "Active when enabled."
        },
        "createdDate": {
          "type": "string",
          "description": "The latest data export rule modification time."
        },
        "lastModifiedDate": {
          "type": "string",
          "description": "Date and time when the export was last modified."
        }
      },
      "required": [
        "tableNames"
      ]
    },
    "Destination": {
      "type": "object",
      "description": "Destination properties.",
      "properties": {
        "resourceId": {
          "type": "string",
          "description": "The destination resource ID. This can be copied from the Properties entry of the destination resource in Azure."
        },
        "type": {
          "$ref": "#/$defs/Type",
          "description": "The type of the destination resource",
          "readOnly": true
        },
        "metaData": {
          "$ref": "#/$defs/DestinationMetaData",
          "description": "destination meta data.",
          "x-ms-client-flatten": true
        }
      },
      "required": [
        "resourceId"
      ]
    },
    "DestinationMetaData": {
      "type": "object",
      "description": "Destination meta data.",
      "properties": {
        "eventHubName": {
          "type": "string",
          "description": "Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account."
        }
      }
    },
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "Type": {
      "type": "string",
      "description": "The type of the destination resource",
      "enum": [
        "StorageAccount",
        "EventHub"
      ],
      "x-ms-enum": {
        "name": "Type",
        "modelAsString": true,
        "values": [
          {
            "name": "StorageAccount",
            "value": "StorageAccount",
            "description": "StorageAccount"
          },
          {
            "name": "EventHub",
            "value": "EventHub",
            "description": "EventHub"
          }
        ]
      }
    }
  }
}