Azure Monitor · Schema

Azure Monitor Diagnostic Setting

Represents a diagnostic setting that configures how platform logs and metrics from Azure resources are routed to destinations such as Log Analytics workspaces, Storage Accounts, and Event Hubs.

Application InsightsCloudLogsMetricsMonitoringObservability

Properties

Name Type Description
id string Fully qualified resource ID.
name string The name of the resource.
type string The type of the resource.
properties object
View JSON Schema on GitHub

JSON Schema

azure-monitor-diagnostic-setting-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schema.azure.com/monitor/diagnostic-setting.json",
  "title": "Azure Monitor Diagnostic Setting",
  "description": "Represents a diagnostic setting that configures how platform logs and metrics from Azure resources are routed to destinations such as Log Analytics workspaces, Storage Accounts, and Event Hubs.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "Fully qualified resource ID."
    },
    "name": {
      "type": "string",
      "readOnly": true,
      "description": "The name of the resource."
    },
    "type": {
      "type": "string",
      "readOnly": true,
      "description": "The type of the resource."
    },
    "properties": {
      "$ref": "#/$defs/DiagnosticSettings"
    }
  },
  "$defs": {
    "DiagnosticSettings": {
      "type": "object",
      "properties": {
        "storageAccountId": {
          "type": "string",
          "description": "The resource ID of the storage account to which you would like to send Diagnostic Logs."
        },
        "serviceBusRuleId": {
          "type": "string",
          "description": "The service bus rule ID of the diagnostic setting. This is here to maintain backwards compatibility."
        },
        "eventHubAuthorizationRuleId": {
          "type": "string",
          "description": "The resource ID of the Event Hub authorization rule."
        },
        "eventHubName": {
          "type": "string",
          "description": "The name of the Event Hub. If none is specified, the default Event Hub will be selected."
        },
        "metrics": {
          "type": "array",
          "items": { "$ref": "#/$defs/MetricSettings" },
          "description": "The list of metric settings."
        },
        "logs": {
          "type": "array",
          "items": { "$ref": "#/$defs/LogSettings" },
          "description": "The list of logs settings."
        },
        "workspaceId": {
          "type": "string",
          "description": "The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs."
        },
        "marketplacePartnerId": {
          "type": "string",
          "description": "The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs."
        },
        "logAnalyticsDestinationType": {
          "type": "string",
          "description": "A string indicating whether the export to Log Analytics should use the default destination type or use resource-specific (Dedicated)."
        }
      }
    },
    "MetricSettings": {
      "type": "object",
      "required": ["enabled"],
      "properties": {
        "timeGrain": {
          "type": "string",
          "description": "The timegrain of the metric in ISO 8601 format."
        },
        "category": {
          "type": "string",
          "description": "Name of a Diagnostic Metric category for a resource type."
        },
        "enabled": {
          "type": "boolean",
          "description": "A value indicating whether this category is enabled."
        },
        "retentionPolicy": { "$ref": "#/$defs/RetentionPolicy" }
      }
    },
    "LogSettings": {
      "type": "object",
      "required": ["enabled"],
      "properties": {
        "category": {
          "type": "string",
          "description": "Name of a Diagnostic Log category for a resource type."
        },
        "categoryGroup": {
          "type": "string",
          "description": "Name of a Diagnostic Log category group for a resource type."
        },
        "enabled": {
          "type": "boolean",
          "description": "A value indicating whether this log is enabled."
        },
        "retentionPolicy": { "$ref": "#/$defs/RetentionPolicy" }
      }
    },
    "RetentionPolicy": {
      "type": "object",
      "required": ["enabled", "days"],
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "A value indicating whether the retention policy is enabled."
        },
        "days": {
          "type": "integer",
          "minimum": 0,
          "description": "The number of days for the retention in days. A value of 0 will retain the events indefinitely."
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/azure-monitor-diagnostic-setting"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.