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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.monitoring.AadDiagnosticSetting

Explore with Pulumi AI

Manages an Azure Active Directory Diagnostic Setting for Azure Monitor.

!> Authentication The API for this resource does not support service principal authentication. This resource can only be used with Azure CLI authentication.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-rg",
    location: "west europe",
});
const exampleAccount = new azure.storage.Account("example", {
    name: "examplestorageaccount",
    resourceGroupName: example.name,
    location: example.location,
    accountTier: "Standard",
    accountKind: "StorageV2",
    accountReplicationType: "LRS",
});
const exampleAadDiagnosticSetting = new azure.monitoring.AadDiagnosticSetting("example", {
    name: "setting1",
    storageAccountId: exampleAccount.id,
    enabledLogs: [
        {
            category: "SignInLogs",
        },
        {
            category: "AuditLogs",
        },
        {
            category: "NonInteractiveUserSignInLogs",
        },
        {
            category: "ServicePrincipalSignInLogs",
        },
    ],
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-rg",
    location="west europe")
example_account = azure.storage.Account("example",
    name="examplestorageaccount",
    resource_group_name=example.name,
    location=example.location,
    account_tier="Standard",
    account_kind="StorageV2",
    account_replication_type="LRS")
example_aad_diagnostic_setting = azure.monitoring.AadDiagnosticSetting("example",
    name="setting1",
    storage_account_id=example_account.id,
    enabled_logs=[
        {
            "category": "SignInLogs",
        },
        {
            "category": "AuditLogs",
        },
        {
            "category": "NonInteractiveUserSignInLogs",
        },
        {
            "category": "ServicePrincipalSignInLogs",
        },
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"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-rg"),
			Location: pulumi.String("west europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
			Name:                   pulumi.String("examplestorageaccount"),
			ResourceGroupName:      example.Name,
			Location:               example.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountKind:            pulumi.String("StorageV2"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		_, err = monitoring.NewAadDiagnosticSetting(ctx, "example", &monitoring.AadDiagnosticSettingArgs{
			Name:             pulumi.String("setting1"),
			StorageAccountId: exampleAccount.ID(),
			EnabledLogs: monitoring.AadDiagnosticSettingEnabledLogArray{
				&monitoring.AadDiagnosticSettingEnabledLogArgs{
					Category: pulumi.String("SignInLogs"),
				},
				&monitoring.AadDiagnosticSettingEnabledLogArgs{
					Category: pulumi.String("AuditLogs"),
				},
				&monitoring.AadDiagnosticSettingEnabledLogArgs{
					Category: pulumi.String("NonInteractiveUserSignInLogs"),
				},
				&monitoring.AadDiagnosticSettingEnabledLogArgs{
					Category: pulumi.String("ServicePrincipalSignInLogs"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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-rg",
        Location = "west europe",
    });

    var exampleAccount = new Azure.Storage.Account("example", new()
    {
        Name = "examplestorageaccount",
        ResourceGroupName = example.Name,
        Location = example.Location,
        AccountTier = "Standard",
        AccountKind = "StorageV2",
        AccountReplicationType = "LRS",
    });

    var exampleAadDiagnosticSetting = new Azure.Monitoring.AadDiagnosticSetting("example", new()
    {
        Name = "setting1",
        StorageAccountId = exampleAccount.Id,
        EnabledLogs = new[]
        {
            new Azure.Monitoring.Inputs.AadDiagnosticSettingEnabledLogArgs
            {
                Category = "SignInLogs",
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingEnabledLogArgs
            {
                Category = "AuditLogs",
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingEnabledLogArgs
            {
                Category = "NonInteractiveUserSignInLogs",
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingEnabledLogArgs
            {
                Category = "ServicePrincipalSignInLogs",
            },
        },
    });

});
Copy
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.monitoring.AadDiagnosticSetting;
import com.pulumi.azure.monitoring.AadDiagnosticSettingArgs;
import com.pulumi.azure.monitoring.inputs.AadDiagnosticSettingEnabledLogArgs;
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-rg")
            .location("west europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("examplestorageaccount")
            .resourceGroupName(example.name())
            .location(example.location())
            .accountTier("Standard")
            .accountKind("StorageV2")
            .accountReplicationType("LRS")
            .build());

        var exampleAadDiagnosticSetting = new AadDiagnosticSetting("exampleAadDiagnosticSetting", AadDiagnosticSettingArgs.builder()
            .name("setting1")
            .storageAccountId(exampleAccount.id())
            .enabledLogs(            
                AadDiagnosticSettingEnabledLogArgs.builder()
                    .category("SignInLogs")
                    .build(),
                AadDiagnosticSettingEnabledLogArgs.builder()
                    .category("AuditLogs")
                    .build(),
                AadDiagnosticSettingEnabledLogArgs.builder()
                    .category("NonInteractiveUserSignInLogs")
                    .build(),
                AadDiagnosticSettingEnabledLogArgs.builder()
                    .category("ServicePrincipalSignInLogs")
                    .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-rg
      location: west europe
  exampleAccount:
    type: azure:storage:Account
    name: example
    properties:
      name: examplestorageaccount
      resourceGroupName: ${example.name}
      location: ${example.location}
      accountTier: Standard
      accountKind: StorageV2
      accountReplicationType: LRS
  exampleAadDiagnosticSetting:
    type: azure:monitoring:AadDiagnosticSetting
    name: example
    properties:
      name: setting1
      storageAccountId: ${exampleAccount.id}
      enabledLogs:
        - category: SignInLogs
        - category: AuditLogs
        - category: NonInteractiveUserSignInLogs
        - category: ServicePrincipalSignInLogs
Copy

Create AadDiagnosticSetting Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AadDiagnosticSetting(name: string, args?: AadDiagnosticSettingArgs, opts?: CustomResourceOptions);
@overload
def AadDiagnosticSetting(resource_name: str,
                         args: Optional[AadDiagnosticSettingArgs] = None,
                         opts: Optional[ResourceOptions] = None)

@overload
def AadDiagnosticSetting(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         enabled_logs: Optional[Sequence[AadDiagnosticSettingEnabledLogArgs]] = None,
                         eventhub_authorization_rule_id: Optional[str] = None,
                         eventhub_name: Optional[str] = None,
                         log_analytics_workspace_id: Optional[str] = None,
                         name: Optional[str] = None,
                         storage_account_id: Optional[str] = None)
func NewAadDiagnosticSetting(ctx *Context, name string, args *AadDiagnosticSettingArgs, opts ...ResourceOption) (*AadDiagnosticSetting, error)
public AadDiagnosticSetting(string name, AadDiagnosticSettingArgs? args = null, CustomResourceOptions? opts = null)
public AadDiagnosticSetting(String name, AadDiagnosticSettingArgs args)
public AadDiagnosticSetting(String name, AadDiagnosticSettingArgs args, CustomResourceOptions options)
type: azure:monitoring:AadDiagnosticSetting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args AadDiagnosticSettingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args AadDiagnosticSettingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args AadDiagnosticSettingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args AadDiagnosticSettingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AadDiagnosticSettingArgs
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 aadDiagnosticSettingResource = new Azure.Monitoring.AadDiagnosticSetting("aadDiagnosticSettingResource", new()
{
    EnabledLogs = new[]
    {
        new Azure.Monitoring.Inputs.AadDiagnosticSettingEnabledLogArgs
        {
            Category = "string",
        },
    },
    EventhubAuthorizationRuleId = "string",
    EventhubName = "string",
    LogAnalyticsWorkspaceId = "string",
    Name = "string",
    StorageAccountId = "string",
});
Copy
example, err := monitoring.NewAadDiagnosticSetting(ctx, "aadDiagnosticSettingResource", &monitoring.AadDiagnosticSettingArgs{
	EnabledLogs: monitoring.AadDiagnosticSettingEnabledLogArray{
		&monitoring.AadDiagnosticSettingEnabledLogArgs{
			Category: pulumi.String("string"),
		},
	},
	EventhubAuthorizationRuleId: pulumi.String("string"),
	EventhubName:                pulumi.String("string"),
	LogAnalyticsWorkspaceId:     pulumi.String("string"),
	Name:                        pulumi.String("string"),
	StorageAccountId:            pulumi.String("string"),
})
Copy
var aadDiagnosticSettingResource = new AadDiagnosticSetting("aadDiagnosticSettingResource", AadDiagnosticSettingArgs.builder()
    .enabledLogs(AadDiagnosticSettingEnabledLogArgs.builder()
        .category("string")
        .build())
    .eventhubAuthorizationRuleId("string")
    .eventhubName("string")
    .logAnalyticsWorkspaceId("string")
    .name("string")
    .storageAccountId("string")
    .build());
Copy
aad_diagnostic_setting_resource = azure.monitoring.AadDiagnosticSetting("aadDiagnosticSettingResource",
    enabled_logs=[{
        "category": "string",
    }],
    eventhub_authorization_rule_id="string",
    eventhub_name="string",
    log_analytics_workspace_id="string",
    name="string",
    storage_account_id="string")
Copy
const aadDiagnosticSettingResource = new azure.monitoring.AadDiagnosticSetting("aadDiagnosticSettingResource", {
    enabledLogs: [{
        category: "string",
    }],
    eventhubAuthorizationRuleId: "string",
    eventhubName: "string",
    logAnalyticsWorkspaceId: "string",
    name: "string",
    storageAccountId: "string",
});
Copy
type: azure:monitoring:AadDiagnosticSetting
properties:
    enabledLogs:
        - category: string
    eventhubAuthorizationRuleId: string
    eventhubName: string
    logAnalyticsWorkspaceId: string
    name: string
    storageAccountId: string
Copy

AadDiagnosticSetting 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 AadDiagnosticSetting resource accepts the following input properties:

EnabledLogs List<AadDiagnosticSettingEnabledLog>
One or more enabled_log blocks as defined below.
EventhubAuthorizationRuleId Changes to this property will trigger replacement. string

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

EventhubName Changes to this property will trigger replacement. string
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId string
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
Name Changes to this property will trigger replacement. string
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
StorageAccountId Changes to this property will trigger replacement. string

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

EnabledLogs []AadDiagnosticSettingEnabledLogArgs
One or more enabled_log blocks as defined below.
EventhubAuthorizationRuleId Changes to this property will trigger replacement. string

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

EventhubName Changes to this property will trigger replacement. string
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId string
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
Name Changes to this property will trigger replacement. string
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
StorageAccountId Changes to this property will trigger replacement. string

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabledLogs List<AadDiagnosticSettingEnabledLog>
One or more enabled_log blocks as defined below.
eventhubAuthorizationRuleId Changes to this property will trigger replacement. String

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhubName Changes to this property will trigger replacement. String
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
logAnalyticsWorkspaceId String
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. String
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storageAccountId Changes to this property will trigger replacement. String

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabledLogs AadDiagnosticSettingEnabledLog[]
One or more enabled_log blocks as defined below.
eventhubAuthorizationRuleId Changes to this property will trigger replacement. string

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhubName Changes to this property will trigger replacement. string
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
logAnalyticsWorkspaceId string
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. string
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storageAccountId Changes to this property will trigger replacement. string

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabled_logs Sequence[AadDiagnosticSettingEnabledLogArgs]
One or more enabled_log blocks as defined below.
eventhub_authorization_rule_id Changes to this property will trigger replacement. str

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhub_name Changes to this property will trigger replacement. str
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
log_analytics_workspace_id str
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. str
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storage_account_id Changes to this property will trigger replacement. str

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabledLogs List<Property Map>
One or more enabled_log blocks as defined below.
eventhubAuthorizationRuleId Changes to this property will trigger replacement. String

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhubName Changes to this property will trigger replacement. String
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
logAnalyticsWorkspaceId String
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. String
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storageAccountId Changes to this property will trigger replacement. String

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

Outputs

All input properties are implicitly available as output properties. Additionally, the AadDiagnosticSetting 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 AadDiagnosticSetting Resource

Get an existing AadDiagnosticSetting 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?: AadDiagnosticSettingState, opts?: CustomResourceOptions): AadDiagnosticSetting
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled_logs: Optional[Sequence[AadDiagnosticSettingEnabledLogArgs]] = None,
        eventhub_authorization_rule_id: Optional[str] = None,
        eventhub_name: Optional[str] = None,
        log_analytics_workspace_id: Optional[str] = None,
        name: Optional[str] = None,
        storage_account_id: Optional[str] = None) -> AadDiagnosticSetting
func GetAadDiagnosticSetting(ctx *Context, name string, id IDInput, state *AadDiagnosticSettingState, opts ...ResourceOption) (*AadDiagnosticSetting, error)
public static AadDiagnosticSetting Get(string name, Input<string> id, AadDiagnosticSettingState? state, CustomResourceOptions? opts = null)
public static AadDiagnosticSetting get(String name, Output<String> id, AadDiagnosticSettingState state, CustomResourceOptions options)
resources:  _:    type: azure:monitoring:AadDiagnosticSetting    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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<AadDiagnosticSettingEnabledLog>
One or more enabled_log blocks as defined below.
EventhubAuthorizationRuleId Changes to this property will trigger replacement. string

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

EventhubName Changes to this property will trigger replacement. string
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId string
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
Name Changes to this property will trigger replacement. string
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
StorageAccountId Changes to this property will trigger replacement. string

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

EnabledLogs []AadDiagnosticSettingEnabledLogArgs
One or more enabled_log blocks as defined below.
EventhubAuthorizationRuleId Changes to this property will trigger replacement. string

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

EventhubName Changes to this property will trigger replacement. string
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
LogAnalyticsWorkspaceId string
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
Name Changes to this property will trigger replacement. string
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
StorageAccountId Changes to this property will trigger replacement. string

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabledLogs List<AadDiagnosticSettingEnabledLog>
One or more enabled_log blocks as defined below.
eventhubAuthorizationRuleId Changes to this property will trigger replacement. String

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhubName Changes to this property will trigger replacement. String
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
logAnalyticsWorkspaceId String
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. String
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storageAccountId Changes to this property will trigger replacement. String

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabledLogs AadDiagnosticSettingEnabledLog[]
One or more enabled_log blocks as defined below.
eventhubAuthorizationRuleId Changes to this property will trigger replacement. string

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhubName Changes to this property will trigger replacement. string
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
logAnalyticsWorkspaceId string
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. string
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storageAccountId Changes to this property will trigger replacement. string

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabled_logs Sequence[AadDiagnosticSettingEnabledLogArgs]
One or more enabled_log blocks as defined below.
eventhub_authorization_rule_id Changes to this property will trigger replacement. str

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhub_name Changes to this property will trigger replacement. str
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
log_analytics_workspace_id str
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. str
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storage_account_id Changes to this property will trigger replacement. str

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

enabledLogs List<Property Map>
One or more enabled_log blocks as defined below.
eventhubAuthorizationRuleId Changes to this property will trigger replacement. String

Specifies the ID of an Event Hub Namespace Authorization Rule used to send Diagnostics Data. Changing this forces a new resource to be created.

NOTE: This can be sourced from the azure.eventhub.EventHubNamespaceAuthorizationRule resource and is different from a azure.eventhub.AuthorizationRule resource.

eventhubName Changes to this property will trigger replacement. String
Specifies the name of the Event Hub where Diagnostics Data should be sent. If not specified, the default Event Hub will be used. Changing this forces a new resource to be created.
logAnalyticsWorkspaceId String
Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.
name Changes to this property will trigger replacement. String
The name which should be used for this Monitor Azure Active Directory Diagnostic Setting. Changing this forces a new Monitor Azure Active Directory Diagnostic Setting to be created.
storageAccountId Changes to this property will trigger replacement. String

The ID of the Storage Account where logs should be sent. Changing this forces a new resource to be created.

NOTE: One of eventhub_authorization_rule_id, log_analytics_workspace_id and storage_account_id must be specified.

Supporting Types

AadDiagnosticSettingEnabledLog
, AadDiagnosticSettingEnabledLogArgs

Category This property is required. string
The log category for the Azure Active Directory Diagnostic.
RetentionPolicy AadDiagnosticSettingEnabledLogRetentionPolicy

Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings

Category This property is required. string
The log category for the Azure Active Directory Diagnostic.
RetentionPolicy AadDiagnosticSettingEnabledLogRetentionPolicy

Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings

category This property is required. String
The log category for the Azure Active Directory Diagnostic.
retentionPolicy AadDiagnosticSettingEnabledLogRetentionPolicy

Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings

category This property is required. string
The log category for the Azure Active Directory Diagnostic.
retentionPolicy AadDiagnosticSettingEnabledLogRetentionPolicy

Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings

category This property is required. str
The log category for the Azure Active Directory Diagnostic.
retention_policy AadDiagnosticSettingEnabledLogRetentionPolicy

Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings

category This property is required. String
The log category for the Azure Active Directory Diagnostic.
retentionPolicy Property Map

Deprecated: Azure does not support retention for new Azure Active Directory Diagnostic Settings

AadDiagnosticSettingEnabledLogRetentionPolicy
, AadDiagnosticSettingEnabledLogRetentionPolicyArgs

Days int
Enabled bool
Days int
Enabled bool
days Integer
enabled Boolean
days number
enabled boolean
days int
enabled bool
days Number
enabled Boolean

Import

Monitor Azure Active Directory Diagnostic Settings can be imported using the resource id, e.g.

$ pulumi import azure:monitoring/aadDiagnosticSetting:AadDiagnosticSetting example /providers/Microsoft.AADIAM/diagnosticSettings/setting1
Copy

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.