1. Packages
  2. Azure Classic
  3. API Docs
  4. monitoring
  5. DiagnosticSetting

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.monitoring.DiagnosticSetting

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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:

    TargetResourceId string
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    EnabledLogs List<DiagnosticSettingEnabledLog>

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    EventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    LogAnalyticsDestinationType string

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    LogAnalyticsWorkspaceId string

    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_id and storage_account_id must be specified.

    Metrics List<DiagnosticSettingMetric>

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    PartnerSolutionId string

    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_id and storage_account_id must be specified.

    StorageAccountId string

    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_id and storage_account_id must be specified.

    TargetResourceId string
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    EnabledLogs []DiagnosticSettingEnabledLogArgs

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    EventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    LogAnalyticsDestinationType string

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    LogAnalyticsWorkspaceId string

    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_id and storage_account_id must be specified.

    Metrics []DiagnosticSettingMetricArgs

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    PartnerSolutionId string

    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_id and storage_account_id must be specified.

    StorageAccountId string

    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_id and storage_account_id must be specified.

    targetResourceId String
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    enabledLogs List<DiagnosticSettingEnabledLog>

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    logAnalyticsDestinationType String

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    logAnalyticsWorkspaceId String

    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_id and storage_account_id must be specified.

    metrics List<DiagnosticSettingMetric>

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    partnerSolutionId String

    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_id and storage_account_id must be specified.

    storageAccountId String

    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_id and storage_account_id must be specified.

    targetResourceId string
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    enabledLogs DiagnosticSettingEnabledLog[]

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    logAnalyticsDestinationType string

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    logAnalyticsWorkspaceId string

    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_id and storage_account_id must be specified.

    metrics DiagnosticSettingMetric[]

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    partnerSolutionId string

    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_id and storage_account_id must be specified.

    storageAccountId string

    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_id and storage_account_id must be specified.

    target_resource_id str
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    enabled_logs Sequence[DiagnosticSettingEnabledLogArgs]

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhub_authorization_rule_id 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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_destination_type str

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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_workspace_id str

    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_id and storage_account_id must be specified.

    metrics Sequence[DiagnosticSettingMetricArgs]

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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_id str

    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_id and storage_account_id must be specified.

    storage_account_id str

    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_id and storage_account_id must be specified.

    targetResourceId String
    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_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    logAnalyticsDestinationType String

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    logAnalyticsWorkspaceId String

    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_id and storage_account_id must be specified.

    metrics List<Property Map>

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    partnerSolutionId String

    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_id and storage_account_id must be specified.

    storageAccountId String

    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_id and storage_account_id must 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) -> DiagnosticSetting
    func 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)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    EnabledLogs List<DiagnosticSettingEnabledLog>

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    EventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    LogAnalyticsDestinationType string

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    LogAnalyticsWorkspaceId string

    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_id and storage_account_id must be specified.

    Metrics List<DiagnosticSettingMetric>

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    PartnerSolutionId string

    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_id and storage_account_id must be specified.

    StorageAccountId string

    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_id and storage_account_id must be specified.

    TargetResourceId string
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    EnabledLogs []DiagnosticSettingEnabledLogArgs

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    EventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    LogAnalyticsDestinationType string

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    LogAnalyticsWorkspaceId string

    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_id and storage_account_id must be specified.

    Metrics []DiagnosticSettingMetricArgs

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    PartnerSolutionId string

    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_id and storage_account_id must be specified.

    StorageAccountId string

    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_id and storage_account_id must be specified.

    TargetResourceId string
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    enabledLogs List<DiagnosticSettingEnabledLog>

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    logAnalyticsDestinationType String

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    logAnalyticsWorkspaceId String

    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_id and storage_account_id must be specified.

    metrics List<DiagnosticSettingMetric>

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    partnerSolutionId String

    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_id and storage_account_id must be specified.

    storageAccountId String

    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_id and storage_account_id must be specified.

    targetResourceId String
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    enabledLogs DiagnosticSettingEnabledLog[]

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    logAnalyticsDestinationType string

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    logAnalyticsWorkspaceId string

    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_id and storage_account_id must be specified.

    metrics DiagnosticSettingMetric[]

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    partnerSolutionId string

    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_id and storage_account_id must be specified.

    storageAccountId string

    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_id and storage_account_id must be specified.

    targetResourceId string
    The ID of an existing Resource on which to configure Diagnostic Settings. Changing this forces a new resource to be created.
    enabled_logs Sequence[DiagnosticSettingEnabledLogArgs]

    One or more enabled_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhub_authorization_rule_id 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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_destination_type str

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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_workspace_id str

    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_id and storage_account_id must be specified.

    metrics Sequence[DiagnosticSettingMetricArgs]

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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_id str

    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_id and storage_account_id must be specified.

    storage_account_id str

    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_id and storage_account_id must be specified.

    target_resource_id str
    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_log blocks as defined below.

    NOTE: At least one enabled_log or metric block must be specified. At least one type of Log or Metric must be enabled.

    eventhubAuthorizationRuleId 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.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

    NOTE: At least one of eventhub_authorization_rule_id, log_analytics_workspace_id, partner_solution_id and storage_account_id must 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.

    logAnalyticsDestinationType String

    Possible values are AzureDiagnostics and Dedicated. When set to Dedicated, logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table.

    NOTE: This setting will only have an effect if a log_analytics_workspace_id is 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.

    logAnalyticsWorkspaceId String

    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_id and storage_account_id must be specified.

    metrics List<Property Map>

    One or more metric blocks as defined below.

    NOTE: At least one enabled_log or metric block 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.

    partnerSolutionId String

    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_id and storage_account_id must be specified.

    storageAccountId String

    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_id and storage_account_id must be specified.

    targetResourceId String
    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.getDiagnosticCategories Data 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 category or category_group must be specified.

    RetentionPolicy DiagnosticSettingEnabledLogRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data 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 category or category_group must be specified.

    RetentionPolicy DiagnosticSettingEnabledLogRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data 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 category or category_group must be specified.

    retentionPolicy DiagnosticSettingEnabledLogRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data 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 category or category_group must be specified.

    retentionPolicy DiagnosticSettingEnabledLogRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data 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 category or category_group must be specified.

    retention_policy DiagnosticSettingEnabledLogRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data 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 category or category_group must be specified.

    retentionPolicy Property Map

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    DiagnosticSettingEnabledLogRetentionPolicy, DiagnosticSettingEnabledLogRetentionPolicyArgs

    Enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    Days int
    Enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    Days int
    enabled Boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    days Integer
    enabled boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    days number
    enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    days int
    enabled Boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    days Number

    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.getDiagnosticCategories Data Source to identify which categories are available for a given Resource.

    Enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    RetentionPolicy DiagnosticSettingMetricRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data Source to identify which categories are available for a given Resource.

    Enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    RetentionPolicy DiagnosticSettingMetricRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data Source to identify which categories are available for a given Resource.

    enabled Boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    retentionPolicy DiagnosticSettingMetricRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data Source to identify which categories are available for a given Resource.

    enabled boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    retentionPolicy DiagnosticSettingMetricRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data Source to identify which categories are available for a given Resource.

    enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    retention_policy DiagnosticSettingMetricRetentionPolicy

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    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.getDiagnosticCategories Data Source to identify which categories are available for a given Resource.

    enabled Boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    retentionPolicy Property Map

    Deprecated: retention_policy has been deprecated in favor of azure.storage.ManagementPolicy resource - to learn more https://aka.ms/diagnostic_settings_log_retention

    DiagnosticSettingMetricRetentionPolicy, DiagnosticSettingMetricRetentionPolicyArgs

    Enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    Days int
    Enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    Days int
    enabled Boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    days Integer
    enabled boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    days number
    enabled bool
    Is this Diagnostic Metric enabled? Defaults to true.
    days int
    enabled Boolean
    Is this Diagnostic Metric enabled? Defaults to true.
    days Number

    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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi