{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-api-management/json-schema/microsoft-azure-api-management-ai-gateway-telemetry-exporter-update-parameters-schema.json",
  "title": "AiGatewayTelemetryExporterUpdateParameters",
  "description": "Parameters for updating an AI Gateway telemetry exporter.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-api-management-aigatewaytelemetryexporterresources-api-openapi.yml#/components/schemas/AiGatewayTelemetryExporterUpdateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/AiGatewayTelemetryExporterUpdateProperties",
      "description": "Exporter properties to update."
    }
  },
  "$defs": {
    "AiGatewayApplicationInsightsConfiguration": {
      "type": "object",
      "description": "Application Insights export destination.",
      "properties": {
        "connectionString": {
          "type": "string",
          "format": "password",
          "description": "Application Insights connection string. Required when creating this exporter kind.",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        },
        "resourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Azure resource identifier of the Application Insights component.",
          "x-ms-arm-id-details": {
            "allowedResources": [
              {
                "type": "Microsoft.Insights/components"
              }
            ]
          }
        }
      }
    },
    "AiGatewayOpenTelemetryConfiguration": {
      "type": "object",
      "description": "OpenTelemetry export destinations and authentication.",
      "properties": {
        "metricsEndpoint": {
          "type": "string",
          "format": "uri",
          "description": "Full OTLP metrics endpoint URL, used without appending a signal path."
        },
        "logsEndpoint": {
          "type": "string",
          "format": "uri",
          "description": "Full OTLP logs endpoint URL, used without appending a signal path."
        },
        "tracesEndpoint": {
          "type": "string",
          "format": "uri",
          "description": "Full OTLP traces endpoint URL, used without appending a signal path."
        },
        "headers": {
          "type": "object",
          "format": "password",
          "description": "Legacy secret HTTP headers, mutually exclusive with credentials.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        },
        "managedIdentity": {
          "$ref": "#/$defs/AiGatewayTelemetryManagedIdentity",
          "description": "Legacy managed identity settings, mutually exclusive with credentials."
        },
        "credentials": {
          "$ref": "#/$defs/AiGatewayTelemetryCredentials",
          "description": "Authentication settings, mutually exclusive with top-level headers and managedIdentity."
        }
      }
    },
    "AiGatewayTelemetryAttributeMappingUpdate": {
      "type": "object",
      "description": "A claim mapping to update.",
      "properties": {
        "source": {
          "$ref": "#/$defs/AiGatewayTelemetryAttributeSourceUpdate",
          "description": "Claim source."
        },
        "signals": {
          "type": "array",
          "description": "Distinct signals to enrich.",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/AiGatewayTelemetrySignal"
          }
        }
      }
    },
    "AiGatewayTelemetryAttributeSourceUpdate": {
      "type": "object",
      "description": "A claim source to update.",
      "properties": {
        "kind": {
          "type": "string",
          "description": "Source kind. Only claims is currently supported.",
          "enum": [
            "claims"
          ],
          "x-ms-enum": {
            "modelAsString": false
          }
        },
        "value": {
          "type": "string",
          "description": "Nonempty, case-sensitive claim name.",
          "minLength": 1
        }
      }
    },
    "AiGatewayTelemetryConfigurationUpdate": {
      "type": "object",
      "description": "Telemetry enrichment settings to update.",
      "properties": {
        "attributes": {
          "type": "array",
          "description": "Observed-claim mappings; an empty array removes existing mappings.",
          "items": {
            "$ref": "#/$defs/AiGatewayTelemetryAttributeMappingUpdate"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "AiGatewayTelemetryCredentials": {
      "type": "object",
      "description": "Authentication settings for an OpenTelemetry exporter.",
      "properties": {
        "headers": {
          "type": "object",
          "format": "password",
          "description": "Secret HTTP headers sent with export requests.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        },
        "managedIdentity": {
          "$ref": "#/$defs/AiGatewayTelemetryManagedIdentity",
          "description": "Managed identity authentication for export requests."
        }
      }
    },
    "AiGatewayTelemetryExporterUpdateProperties": {
      "type": "object",
      "description": "Properties to update on an AI Gateway telemetry exporter.",
      "properties": {
        "payloadCapture": {
          "type": "boolean",
          "description": "Capture prompts, completions, and tool input/output."
        },
        "applicationInsights": {
          "$ref": "#/$defs/AiGatewayApplicationInsightsConfiguration",
          "description": "Application Insights configuration."
        },
        "openTelemetry": {
          "$ref": "#/$defs/AiGatewayOpenTelemetryConfiguration",
          "description": "OpenTelemetry configuration."
        },
        "telemetry": {
          "$ref": "#/$defs/AiGatewayTelemetryConfigurationUpdate",
          "description": "Observed-claim mappings to update."
        }
      }
    },
    "AiGatewayTelemetryManagedIdentity": {
      "type": "object",
      "description": "Managed identity used to authenticate telemetry export requests.",
      "properties": {
        "resource": {
          "type": "string",
          "description": "Token audience requested for the managed identity."
        },
        "clientId": {
          "type": "string",
          "description": "User-assigned managed identity client ID; omit for the system-assigned identity."
        }
      }
    },
    "AiGatewayTelemetrySignal": {
      "type": "string",
      "description": "Telemetry signal receiving a claim attribute.",
      "enum": [
        "logs",
        "traces",
        "metrics"
      ],
      "x-ms-enum": {
        "name": "AiGatewayTelemetrySignal",
        "modelAsString": true,
        "values": [
          {
            "name": "Logs",
            "value": "logs",
            "description": "Log records."
          },
          {
            "name": "Traces",
            "value": "traces",
            "description": "Trace spans."
          },
          {
            "name": "Metrics",
            "value": "metrics",
            "description": "Token-usage and token-cost metrics."
          }
        ]
      }
    }
  }
}