We recommend using Azure Native.
azure.monitoring.DiagnosticSetting
Explore with Pulumi AI
Manages a Diagnostic Setting for an existing Resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
    name: "example-resources",
    location: "West Europe",
});
const exampleAccount = new azure.storage.Account("example", {
    name: "storageaccountname",
    resourceGroupName: example.name,
    location: example.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
});
const current = azure.core.getClientConfig({});
const exampleKeyVault = new azure.keyvault.KeyVault("example", {
    name: "examplekeyvault",
    location: example.location,
    resourceGroupName: example.name,
    tenantId: current.then(current => current.tenantId),
    softDeleteRetentionDays: 7,
    purgeProtectionEnabled: false,
    skuName: "standard",
});
const exampleDiagnosticSetting = new azure.monitoring.DiagnosticSetting("example", {
    name: "example",
    targetResourceId: exampleKeyVault.id,
    storageAccountId: exampleAccount.id,
    enabledLogs: [{
        category: "AuditEvent",
    }],
    metrics: [{
        category: "AllMetrics",
    }],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
    name="example-resources",
    location="West Europe")
example_account = azure.storage.Account("example",
    name="storageaccountname",
    resource_group_name=example.name,
    location=example.location,
    account_tier="Standard",
    account_replication_type="LRS")
current = azure.core.get_client_config()
example_key_vault = azure.keyvault.KeyVault("example",
    name="examplekeyvault",
    location=example.location,
    resource_group_name=example.name,
    tenant_id=current.tenant_id,
    soft_delete_retention_days=7,
    purge_protection_enabled=False,
    sku_name="standard")
example_diagnostic_setting = azure.monitoring.DiagnosticSetting("example",
    name="example",
    target_resource_id=example_key_vault.id,
    storage_account_id=example_account.id,
    enabled_logs=[{
        "category": "AuditEvent",
    }],
    metrics=[{
        "category": "AllMetrics",
    }])
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/keyvault"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("example-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
			Name:                   pulumi.String("storageaccountname"),
			ResourceGroupName:      example.Name,
			Location:               example.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		current, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		exampleKeyVault, err := keyvault.NewKeyVault(ctx, "example", &keyvault.KeyVaultArgs{
			Name:                    pulumi.String("examplekeyvault"),
			Location:                example.Location,
			ResourceGroupName:       example.Name,
			TenantId:                pulumi.String(current.TenantId),
			SoftDeleteRetentionDays: pulumi.Int(7),
			PurgeProtectionEnabled:  pulumi.Bool(false),
			SkuName:                 pulumi.String("standard"),
		})
		if err != nil {
			return err
		}
		_, err = monitoring.NewDiagnosticSetting(ctx, "example", &monitoring.DiagnosticSettingArgs{
			Name:             pulumi.String("example"),
			TargetResourceId: exampleKeyVault.ID(),
			StorageAccountId: exampleAccount.ID(),
			EnabledLogs: monitoring.DiagnosticSettingEnabledLogArray{
				&monitoring.DiagnosticSettingEnabledLogArgs{
					Category: pulumi.String("AuditEvent"),
				},
			},
			Metrics: monitoring.DiagnosticSettingMetricArray{
				&monitoring.DiagnosticSettingMetricArgs{
					Category: pulumi.String("AllMetrics"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "example-resources",
        Location = "West Europe",
    });
    var exampleAccount = new Azure.Storage.Account("example", new()
    {
        Name = "storageaccountname",
        ResourceGroupName = example.Name,
        Location = example.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
    });
    var current = Azure.Core.GetClientConfig.Invoke();
    var exampleKeyVault = new Azure.KeyVault.KeyVault("example", new()
    {
        Name = "examplekeyvault",
        Location = example.Location,
        ResourceGroupName = example.Name,
        TenantId = current.Apply(getClientConfigResult => getClientConfigResult.TenantId),
        SoftDeleteRetentionDays = 7,
        PurgeProtectionEnabled = false,
        SkuName = "standard",
    });
    var exampleDiagnosticSetting = new Azure.Monitoring.DiagnosticSetting("example", new()
    {
        Name = "example",
        TargetResourceId = exampleKeyVault.Id,
        StorageAccountId = exampleAccount.Id,
        EnabledLogs = new[]
        {
            new Azure.Monitoring.Inputs.DiagnosticSettingEnabledLogArgs
            {
                Category = "AuditEvent",
            },
        },
        Metrics = new[]
        {
            new Azure.Monitoring.Inputs.DiagnosticSettingMetricArgs
            {
                Category = "AllMetrics",
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.keyvault.KeyVault;
import com.pulumi.azure.keyvault.KeyVaultArgs;
import com.pulumi.azure.monitoring.DiagnosticSetting;
import com.pulumi.azure.monitoring.DiagnosticSettingArgs;
import com.pulumi.azure.monitoring.inputs.DiagnosticSettingEnabledLogArgs;
import com.pulumi.azure.monitoring.inputs.DiagnosticSettingMetricArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("example-resources")
            .location("West Europe")
            .build());
        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("storageaccountname")
            .resourceGroupName(example.name())
            .location(example.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .build());
        final var current = CoreFunctions.getClientConfig();
        var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
            .name("examplekeyvault")
            .location(example.location())
            .resourceGroupName(example.name())
            .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
            .softDeleteRetentionDays(7)
            .purgeProtectionEnabled(false)
            .skuName("standard")
            .build());
        var exampleDiagnosticSetting = new DiagnosticSetting("exampleDiagnosticSetting", DiagnosticSettingArgs.builder()
            .name("example")
            .targetResourceId(exampleKeyVault.id())
            .storageAccountId(exampleAccount.id())
            .enabledLogs(DiagnosticSettingEnabledLogArgs.builder()
                .category("AuditEvent")
                .build())
            .metrics(DiagnosticSettingMetricArgs.builder()
                .category("AllMetrics")
                .build())
            .build());
    }
}
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-resources
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: storageaccountname
      resourceGroupName: ${example.name}
      location: ${example.location}
      accountTier: Standard
      accountReplicationType: LRS
  exampleKeyVault:
    type: azure:keyvault:KeyVault
    name: example
    properties:
      name: examplekeyvault
      location: ${example.location}
      resourceGroupName: ${example.name}
      tenantId: ${current.tenantId}
      softDeleteRetentionDays: 7
      purgeProtectionEnabled: false
      skuName: standard
  exampleDiagnosticSetting:
    type: azure:monitoring:DiagnosticSetting
    name: example
    properties:
      name: example
      targetResourceId: ${exampleKeyVault.id}
      storageAccountId: ${exampleAccount.id}
      enabledLogs:
        - category: AuditEvent
      metrics:
        - category: AllMetrics
variables:
  current:
    fn::invoke:
      function: azure:core:getClientConfig
      arguments: {}
Create DiagnosticSetting Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DiagnosticSetting(name: string, args: DiagnosticSettingArgs, opts?: CustomResourceOptions);@overload
def DiagnosticSetting(resource_name: str,
                      args: DiagnosticSettingArgs,
                      opts: Optional[ResourceOptions] = None)
@overload
def DiagnosticSetting(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      target_resource_id: Optional[str] = None,
                      enabled_logs: Optional[Sequence[DiagnosticSettingEnabledLogArgs]] = None,
                      eventhub_authorization_rule_id: Optional[str] = None,
                      eventhub_name: Optional[str] = None,
                      log_analytics_destination_type: Optional[str] = None,
                      log_analytics_workspace_id: Optional[str] = None,
                      metrics: Optional[Sequence[DiagnosticSettingMetricArgs]] = None,
                      name: Optional[str] = None,
                      partner_solution_id: Optional[str] = None,
                      storage_account_id: Optional[str] = None)func NewDiagnosticSetting(ctx *Context, name string, args DiagnosticSettingArgs, opts ...ResourceOption) (*DiagnosticSetting, error)public DiagnosticSetting(string name, DiagnosticSettingArgs args, CustomResourceOptions? opts = null)
public DiagnosticSetting(String name, DiagnosticSettingArgs args)
public DiagnosticSetting(String name, DiagnosticSettingArgs args, CustomResourceOptions options)
type: azure:monitoring:DiagnosticSetting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DiagnosticSettingArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var diagnosticSettingResource = new Azure.Monitoring.DiagnosticSetting("diagnosticSettingResource", new()
{
    TargetResourceId = "string",
    EnabledLogs = new[]
    {
        new Azure.Monitoring.Inputs.DiagnosticSettingEnabledLogArgs
        {
            Category = "string",
            CategoryGroup = "string",
        },
    },
    EventhubAuthorizationRuleId = "string",
    EventhubName = "string",
    LogAnalyticsDestinationType = "string",
    LogAnalyticsWorkspaceId = "string",
    Metrics = new[]
    {
        new Azure.Monitoring.Inputs.DiagnosticSettingMetricArgs
        {
            Category = "string",
            Enabled = false,
        },
    },
    Name = "string",
    PartnerSolutionId = "string",
    StorageAccountId = "string",
});
example, err := monitoring.NewDiagnosticSetting(ctx, "diagnosticSettingResource", &monitoring.DiagnosticSettingArgs{
	TargetResourceId: pulumi.String("string"),
	EnabledLogs: monitoring.DiagnosticSettingEnabledLogArray{
		&monitoring.DiagnosticSettingEnabledLogArgs{
			Category:      pulumi.String("string"),
			CategoryGroup: pulumi.String("string"),
		},
	},
	EventhubAuthorizationRuleId: pulumi.String("string"),
	EventhubName:                pulumi.String("string"),
	LogAnalyticsDestinationType: pulumi.String("string"),
	LogAnalyticsWorkspaceId:     pulumi.String("string"),
	Metrics: monitoring.DiagnosticSettingMetricArray{
		&monitoring.DiagnosticSettingMetricArgs{
			Category: pulumi.String("string"),
			Enabled:  pulumi.Bool(false),
		},
	},
	Name:              pulumi.String("string"),
	PartnerSolutionId: pulumi.String("string"),
	StorageAccountId:  pulumi.String("string"),
})
var diagnosticSettingResource = new DiagnosticSetting("diagnosticSettingResource", DiagnosticSettingArgs.builder()
    .targetResourceId("string")
    .enabledLogs(DiagnosticSettingEnabledLogArgs.builder()
        .category("string")
        .categoryGroup("string")
        .build())
    .eventhubAuthorizationRuleId("string")
    .eventhubName("string")
    .logAnalyticsDestinationType("string")
    .logAnalyticsWorkspaceId("string")
    .metrics(DiagnosticSettingMetricArgs.builder()
        .category("string")
        .enabled(false)
        .build())
    .name("string")
    .partnerSolutionId("string")
    .storageAccountId("string")
    .build());
diagnostic_setting_resource = azure.monitoring.DiagnosticSetting("diagnosticSettingResource",
    target_resource_id="string",
    enabled_logs=[{
        "category": "string",
        "category_group": "string",
    }],
    eventhub_authorization_rule_id="string",
    eventhub_name="string",
    log_analytics_destination_type="string",
    log_analytics_workspace_id="string",
    metrics=[{
        "category": "string",
        "enabled": False,
    }],
    name="string",
    partner_solution_id="string",
    storage_account_id="string")
const diagnosticSettingResource = new azure.monitoring.DiagnosticSetting("diagnosticSettingResource", {
    targetResourceId: "string",
    enabledLogs: [{
        category: "string",
        categoryGroup: "string",
    }],
    eventhubAuthorizationRuleId: "string",
    eventhubName: "string",
    logAnalyticsDestinationType: "string",
    logAnalyticsWorkspaceId: "string",
    metrics: [{
        category: "string",
        enabled: false,
    }],
    name: "string",
    partnerSolutionId: "string",
    storageAccountId: "string",
});
type: azure:monitoring:DiagnosticSetting
properties:
    enabledLogs:
        - category: string
          categoryGroup: string
    eventhubAuthorizationRuleId: string
    eventhubName: string
    logAnalyticsDestinationType: string
    logAnalyticsWorkspaceId: string
    metrics:
        - category: string
          enabled: false
    name: string
    partnerSolutionId: string
    storageAccountId: string
    targetResourceId: string
DiagnosticSetting Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DiagnosticSetting resource accepts the following input properties:
- TargetResource stringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- EnabledLogs List<DiagnosticSetting Enabled Log> 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- EventhubName string
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- LogAnalytics stringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- LogAnalytics stringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- Metrics
List<DiagnosticSetting Metric> 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- Name string
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- PartnerSolution stringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- StorageAccount stringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- TargetResource stringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- EnabledLogs []DiagnosticSetting Enabled Log Args 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- EventhubName string
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- LogAnalytics stringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- LogAnalytics stringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- Metrics
[]DiagnosticSetting Metric Args 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- Name string
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- PartnerSolution stringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- StorageAccount stringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- targetResource StringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabledLogs List<DiagnosticSetting Enabled Log> 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhubName String
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- logAnalytics StringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- logAnalytics StringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics
List<DiagnosticSetting Metric> 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name String
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partnerSolution StringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storageAccount StringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- targetResource stringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabledLogs DiagnosticSetting Enabled Log[] 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhubName string
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- logAnalytics stringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- logAnalytics stringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics
DiagnosticSetting Metric[] 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name string
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partnerSolution stringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storageAccount stringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- target_resource_ strid 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabled_logs Sequence[DiagnosticSetting Enabled Log Args] 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- str
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhub_name str
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- log_analytics_ strdestination_ type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- log_analytics_ strworkspace_ id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics
Sequence[DiagnosticSetting Metric Args] 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name str
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partner_solution_ strid 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storage_account_ strid 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- targetResource StringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabledLogs List<Property Map>
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhubName String
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- logAnalytics StringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- logAnalytics StringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics List<Property Map>
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name String
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partnerSolution StringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storageAccount StringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the DiagnosticSetting resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DiagnosticSetting Resource
Get an existing DiagnosticSetting resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DiagnosticSettingState, opts?: CustomResourceOptions): DiagnosticSetting@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled_logs: Optional[Sequence[DiagnosticSettingEnabledLogArgs]] = None,
        eventhub_authorization_rule_id: Optional[str] = None,
        eventhub_name: Optional[str] = None,
        log_analytics_destination_type: Optional[str] = None,
        log_analytics_workspace_id: Optional[str] = None,
        metrics: Optional[Sequence[DiagnosticSettingMetricArgs]] = None,
        name: Optional[str] = None,
        partner_solution_id: Optional[str] = None,
        storage_account_id: Optional[str] = None,
        target_resource_id: Optional[str] = None) -> DiagnosticSettingfunc GetDiagnosticSetting(ctx *Context, name string, id IDInput, state *DiagnosticSettingState, opts ...ResourceOption) (*DiagnosticSetting, error)public static DiagnosticSetting Get(string name, Input<string> id, DiagnosticSettingState? state, CustomResourceOptions? opts = null)public static DiagnosticSetting get(String name, Output<String> id, DiagnosticSettingState state, CustomResourceOptions options)resources:  _:    type: azure:monitoring:DiagnosticSetting    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- EnabledLogs List<DiagnosticSetting Enabled Log> 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- EventhubName string
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- LogAnalytics stringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- LogAnalytics stringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- Metrics
List<DiagnosticSetting Metric> 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- Name string
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- PartnerSolution stringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- StorageAccount stringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- TargetResource stringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- EnabledLogs []DiagnosticSetting Enabled Log Args 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- EventhubName string
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- LogAnalytics stringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- LogAnalytics stringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- Metrics
[]DiagnosticSetting Metric Args 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- Name string
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- PartnerSolution stringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- StorageAccount stringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- TargetResource stringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabledLogs List<DiagnosticSetting Enabled Log> 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhubName String
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- logAnalytics StringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- logAnalytics StringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics
List<DiagnosticSetting Metric> 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name String
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partnerSolution StringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storageAccount StringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- targetResource StringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabledLogs DiagnosticSetting Enabled Log[] 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- string
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhubName string
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- logAnalytics stringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- logAnalytics stringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics
DiagnosticSetting Metric[] 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name string
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partnerSolution stringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storageAccount stringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- targetResource stringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabled_logs Sequence[DiagnosticSetting Enabled Log Args] 
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- str
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhub_name str
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- log_analytics_ strdestination_ type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- log_analytics_ strworkspace_ id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics
Sequence[DiagnosticSetting Metric Args] 
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name str
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partner_solution_ strid 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storage_account_ strid 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- target_resource_ strid 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
- enabledLogs List<Property Map>
- One or more - enabled_logblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified. At least one type of Log or Metric must be enabled.
- String
- Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. - NOTE: This can be sourced from the - azure.eventhub.EventHubNamespaceAuthorizationRuleresource and is different from a- azure.eventhub.AuthorizationRuleresource.- NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- eventhubName String
- Specifies the name of the Event Hub where Diagnostics Data should be sent. - NOTE: If this isn't specified then the default Event Hub will be used. 
- logAnalytics StringDestination Type 
- Possible values are - AzureDiagnosticsand- Dedicated. When set to- Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy- AzureDiagnosticstable.- NOTE: This setting will only have an effect if a - log_analytics_workspace_idis provided. For some target resource type (e.g., Key Vault), this field is unconfigurable. Please see resource types for services that use each method. Please see the documentation for details on the differences between destination types.
- logAnalytics StringWorkspace Id 
- Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- metrics List<Property Map>
- One or more - metricblocks as defined below.- NOTE: At least one - enabled_logor- metricblock must be specified.
- name String
- Specifies the name of the Diagnostic Setting. Changing this forces a new resource to be created. - NOTE: If the name is set to 'service' it will not be possible to fully delete the diagnostic setting. This is due to legacy API support. 
- partnerSolution StringId 
- The ID of the market partner solution where Diagnostics Data should be sent. For potential partner integrations, click to learn more about partner integration. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- storageAccount StringId 
- The ID of the Storage Account where logs should be sent. - NOTE: At least one of - eventhub_authorization_rule_id,- log_analytics_workspace_id,- partner_solution_idand- storage_account_idmust be specified.
- targetResource StringId 
- The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
Supporting Types
DiagnosticSettingEnabledLog, DiagnosticSettingEnabledLogArgs        
- Category string
- The name of a Diagnostic Log Category for this Resource. - NOTE: The Log Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source or list of service specific schemas to identify which categories are available for a given Resource.
- CategoryGroup string
- The name of a Diagnostic Log Category Group for this Resource. - NOTE: Not all resources have category groups available. - NOTE: Exactly one of - categoryor- category_groupmust be specified.
- RetentionPolicy DiagnosticSetting Enabled Log Retention Policy 
- Category string
- The name of a Diagnostic Log Category for this Resource. - NOTE: The Log Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source or list of service specific schemas to identify which categories are available for a given Resource.
- CategoryGroup string
- The name of a Diagnostic Log Category Group for this Resource. - NOTE: Not all resources have category groups available. - NOTE: Exactly one of - categoryor- category_groupmust be specified.
- RetentionPolicy DiagnosticSetting Enabled Log Retention Policy 
- category String
- The name of a Diagnostic Log Category for this Resource. - NOTE: The Log Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source or list of service specific schemas to identify which categories are available for a given Resource.
- categoryGroup String
- The name of a Diagnostic Log Category Group for this Resource. - NOTE: Not all resources have category groups available. - NOTE: Exactly one of - categoryor- category_groupmust be specified.
- retentionPolicy DiagnosticSetting Enabled Log Retention Policy 
- category string
- The name of a Diagnostic Log Category for this Resource. - NOTE: The Log Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source or list of service specific schemas to identify which categories are available for a given Resource.
- categoryGroup string
- The name of a Diagnostic Log Category Group for this Resource. - NOTE: Not all resources have category groups available. - NOTE: Exactly one of - categoryor- category_groupmust be specified.
- retentionPolicy DiagnosticSetting Enabled Log Retention Policy 
- category str
- The name of a Diagnostic Log Category for this Resource. - NOTE: The Log Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source or list of service specific schemas to identify which categories are available for a given Resource.
- category_group str
- The name of a Diagnostic Log Category Group for this Resource. - NOTE: Not all resources have category groups available. - NOTE: Exactly one of - categoryor- category_groupmust be specified.
- retention_policy DiagnosticSetting Enabled Log Retention Policy 
- category String
- The name of a Diagnostic Log Category for this Resource. - NOTE: The Log Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source or list of service specific schemas to identify which categories are available for a given Resource.
- categoryGroup String
- The name of a Diagnostic Log Category Group for this Resource. - NOTE: Not all resources have category groups available. - NOTE: Exactly one of - categoryor- category_groupmust be specified.
- retentionPolicy Property Map
DiagnosticSettingEnabledLogRetentionPolicy, DiagnosticSettingEnabledLogRetentionPolicyArgs            
DiagnosticSettingMetric, DiagnosticSettingMetricArgs      
- Category string
- The name of a Diagnostic Metric Category for this Resource. - NOTE: The Metric Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source to identify which categories are available for a given Resource.
- Enabled bool
- Is this Diagnostic Metric enabled? Defaults to true.
- RetentionPolicy DiagnosticSetting Metric Retention Policy 
- Category string
- The name of a Diagnostic Metric Category for this Resource. - NOTE: The Metric Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source to identify which categories are available for a given Resource.
- Enabled bool
- Is this Diagnostic Metric enabled? Defaults to true.
- RetentionPolicy DiagnosticSetting Metric Retention Policy 
- category String
- The name of a Diagnostic Metric Category for this Resource. - NOTE: The Metric Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source to identify which categories are available for a given Resource.
- enabled Boolean
- Is this Diagnostic Metric enabled? Defaults to true.
- retentionPolicy DiagnosticSetting Metric Retention Policy 
- category string
- The name of a Diagnostic Metric Category for this Resource. - NOTE: The Metric Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source to identify which categories are available for a given Resource.
- enabled boolean
- Is this Diagnostic Metric enabled? Defaults to true.
- retentionPolicy DiagnosticSetting Metric Retention Policy 
- category str
- The name of a Diagnostic Metric Category for this Resource. - NOTE: The Metric Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source to identify which categories are available for a given Resource.
- enabled bool
- Is this Diagnostic Metric enabled? Defaults to true.
- retention_policy DiagnosticSetting Metric Retention Policy 
- category String
- The name of a Diagnostic Metric Category for this Resource. - NOTE: The Metric Categories available vary depending on the Resource being used. You may wish to use the - azure.monitoring.getDiagnosticCategoriesData Source to identify which categories are available for a given Resource.
- enabled Boolean
- Is this Diagnostic Metric enabled? Defaults to true.
- retentionPolicy Property Map
DiagnosticSettingMetricRetentionPolicy, DiagnosticSettingMetricRetentionPolicyArgs          
Import
Diagnostic Settings can be imported using the resource id, e.g.
$ pulumi import azure:monitoring/diagnosticSetting:DiagnosticSetting example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.KeyVault/vaults/vault1|logMonitoring1"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.