How to override autogenerated Azure Monitor settings for APIM

Hey community,

Could someone help me please,

I create a diagnostic setting to enable collection of API Management logs.

resource "azurerm_monitor_diagnostic_setting" "example" {
  name               = "example"
  target_resource_id = var.apim.id
  log_analytics_workspace_id = var.log_analytics.id
  log_analytics_destination_type = "Dedicated"

  enabled_log {
    category = "GatewayLogs"
  }

  metric {
    category = "AllMetrics"
  }
}

Diagnostic Settings are created as expected, I can review them on the APIM > Diagnostic settings page. However I noticed that logging is also automatically enabled for all APIs, with some default settings (the APIM > APIs > All APIs > Settings > Azure Monitor page).

How can I override these global Azure Monitor settings via Terraform?

Thanks is advance