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

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "west europe",
    });

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

    var exampleAadDiagnosticSetting = new Azure.Monitoring.AadDiagnosticSetting("exampleAadDiagnosticSetting", new()
    {
        StorageAccountId = exampleAccount.Id,
        Logs = new[]
        {
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "SignInLogs",
                Enabled = true,
                RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
                {
                    Enabled = true,
                    Days = 1,
                },
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "AuditLogs",
                Enabled = true,
                RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
                {
                    Enabled = true,
                    Days = 1,
                },
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "NonInteractiveUserSignInLogs",
                Enabled = true,
                RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
                {
                    Enabled = true,
                    Days = 1,
                },
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "ServicePrincipalSignInLogs",
                Enabled = true,
                RetentionPolicy = new Azure.Monitoring.Inputs.AadDiagnosticSettingLogRetentionPolicyArgs
                {
                    Enabled = true,
                    Days = 1,
                },
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "ManagedIdentitySignInLogs",
                Enabled = false,
                RetentionPolicy = null,
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "ProvisioningLogs",
                Enabled = false,
                RetentionPolicy = null,
            },
            new Azure.Monitoring.Inputs.AadDiagnosticSettingLogArgs
            {
                Category = "ADFSSignInLogs",
                Enabled = false,
                RetentionPolicy = null,
            },
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("west europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.Location,
			AccountTier:            pulumi.String("Standard"),
			AccountKind:            pulumi.String("StorageV2"),
			AccountReplicationType: pulumi.String("LRS"),
		})
		if err != nil {
			return err
		}
		_, err = monitoring.NewAadDiagnosticSetting(ctx, "exampleAadDiagnosticSetting", &monitoring.AadDiagnosticSettingArgs{
			StorageAccountId: exampleAccount.ID(),
			Logs: monitoring.AadDiagnosticSettingLogArray{
				&monitoring.AadDiagnosticSettingLogArgs{
					Category: pulumi.String("SignInLogs"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
						Enabled: pulumi.Bool(true),
						Days:    pulumi.Int(1),
					},
				},
				&monitoring.AadDiagnosticSettingLogArgs{
					Category: pulumi.String("AuditLogs"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
						Enabled: pulumi.Bool(true),
						Days:    pulumi.Int(1),
					},
				},
				&monitoring.AadDiagnosticSettingLogArgs{
					Category: pulumi.String("NonInteractiveUserSignInLogs"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
						Enabled: pulumi.Bool(true),
						Days:    pulumi.Int(1),
					},
				},
				&monitoring.AadDiagnosticSettingLogArgs{
					Category: pulumi.String("ServicePrincipalSignInLogs"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitoring.AadDiagnosticSettingLogRetentionPolicyArgs{
						Enabled: pulumi.Bool(true),
						Days:    pulumi.Int(1),
					},
				},
				&monitoring.AadDiagnosticSettingLogArgs{
					Category:        pulumi.String("ManagedIdentitySignInLogs"),
					Enabled:         pulumi.Bool(false),
					RetentionPolicy: nil,
				},
				&monitoring.AadDiagnosticSettingLogArgs{
					Category:        pulumi.String("ProvisioningLogs"),
					Enabled:         pulumi.Bool(false),
					RetentionPolicy: nil,
				},
				&monitoring.AadDiagnosticSettingLogArgs{
					Category:        pulumi.String("ADFSSignInLogs"),
					Enabled:         pulumi.Bool(false),
					RetentionPolicy: nil,
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.AadDiagnosticSettingLogArgs;
import com.pulumi.azure.monitoring.inputs.AadDiagnosticSettingLogRetentionPolicyArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("west europe")
            .build());

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

        var exampleAadDiagnosticSetting = new AadDiagnosticSetting("exampleAadDiagnosticSetting", AadDiagnosticSettingArgs.builder()        
            .storageAccountId(exampleAccount.id())
            .logs(            
                AadDiagnosticSettingLogArgs.builder()
                    .category("SignInLogs")
                    .enabled(true)
                    .retentionPolicy(AadDiagnosticSettingLogRetentionPolicyArgs.builder()
                        .enabled(true)
                        .days(1)
                        .build())
                    .build(),
                AadDiagnosticSettingLogArgs.builder()
                    .category("AuditLogs")
                    .enabled(true)
                    .retentionPolicy(AadDiagnosticSettingLogRetentionPolicyArgs.builder()
                        .enabled(true)
                        .days(1)
                        .build())
                    .build(),
                AadDiagnosticSettingLogArgs.builder()
                    .category("NonInteractiveUserSignInLogs")
                    .enabled(true)
                    .retentionPolicy(AadDiagnosticSettingLogRetentionPolicyArgs.builder()
                        .enabled(true)
                        .days(1)
                        .build())
                    .build(),
                AadDiagnosticSettingLogArgs.builder()
                    .category("ServicePrincipalSignInLogs")
                    .enabled(true)
                    .retentionPolicy(AadDiagnosticSettingLogRetentionPolicyArgs.builder()
                        .enabled(true)
                        .days(1)
                        .build())
                    .build(),
                AadDiagnosticSettingLogArgs.builder()
                    .category("ManagedIdentitySignInLogs")
                    .enabled(false)
                    .retentionPolicy()
                    .build(),
                AadDiagnosticSettingLogArgs.builder()
                    .category("ProvisioningLogs")
                    .enabled(false)
                    .retentionPolicy()
                    .build(),
                AadDiagnosticSettingLogArgs.builder()
                    .category("ADFSSignInLogs")
                    .enabled(false)
                    .retentionPolicy()
                    .build())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="west europe")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_kind="StorageV2",
    account_replication_type="LRS")
example_aad_diagnostic_setting = azure.monitoring.AadDiagnosticSetting("exampleAadDiagnosticSetting",
    storage_account_id=example_account.id,
    logs=[
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="SignInLogs",
            enabled=True,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
                enabled=True,
                days=1,
            ),
        ),
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="AuditLogs",
            enabled=True,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
                enabled=True,
                days=1,
            ),
        ),
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="NonInteractiveUserSignInLogs",
            enabled=True,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
                enabled=True,
                days=1,
            ),
        ),
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="ServicePrincipalSignInLogs",
            enabled=True,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(
                enabled=True,
                days=1,
            ),
        ),
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="ManagedIdentitySignInLogs",
            enabled=False,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(),
        ),
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="ProvisioningLogs",
            enabled=False,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(),
        ),
        azure.monitoring.AadDiagnosticSettingLogArgs(
            category="ADFSSignInLogs",
            enabled=False,
            retention_policy=azure.monitoring.AadDiagnosticSettingLogRetentionPolicyArgs(),
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "west europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountKind: "StorageV2",
    accountReplicationType: "LRS",
});
const exampleAadDiagnosticSetting = new azure.monitoring.AadDiagnosticSetting("exampleAadDiagnosticSetting", {
    storageAccountId: exampleAccount.id,
    logs: [
        {
            category: "SignInLogs",
            enabled: true,
            retentionPolicy: {
                enabled: true,
                days: 1,
            },
        },
        {
            category: "AuditLogs",
            enabled: true,
            retentionPolicy: {
                enabled: true,
                days: 1,
            },
        },
        {
            category: "NonInteractiveUserSignInLogs",
            enabled: true,
            retentionPolicy: {
                enabled: true,
                days: 1,
            },
        },
        {
            category: "ServicePrincipalSignInLogs",
            enabled: true,
            retentionPolicy: {
                enabled: true,
                days: 1,
            },
        },
        {
            category: "ManagedIdentitySignInLogs",
            enabled: false,
            retentionPolicy: {},
        },
        {
            category: "ProvisioningLogs",
            enabled: false,
            retentionPolicy: {},
        },
        {
            category: "ADFSSignInLogs",
            enabled: false,
            retentionPolicy: {},
        },
    ],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: west europe
  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountKind: StorageV2
      accountReplicationType: LRS
  exampleAadDiagnosticSetting:
    type: azure:monitoring:AadDiagnosticSetting
    properties:
      storageAccountId: ${exampleAccount.id}
      logs:
        - category: SignInLogs
          enabled: true
          retentionPolicy:
            enabled: true
            days: 1
        - category: AuditLogs
          enabled: true
          retentionPolicy:
            enabled: true
            days: 1
        - category: NonInteractiveUserSignInLogs
          enabled: true
          retentionPolicy:
            enabled: true
            days: 1
        - category: ServicePrincipalSignInLogs
          enabled: true
          retentionPolicy:
            enabled: true
            days: 1
        - category: ManagedIdentitySignInLogs
          enabled: false
          retentionPolicy: {}
        - category: ProvisioningLogs
          enabled: false
          retentionPolicy: {}
        - category: ADFSSignInLogs
          enabled: false
          retentionPolicy: {}

Create AadDiagnosticSetting Resource

new AadDiagnosticSetting(name: string, args: AadDiagnosticSettingArgs, opts?: CustomResourceOptions);
@overload
def AadDiagnosticSetting(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         eventhub_authorization_rule_id: Optional[str] = None,
                         eventhub_name: Optional[str] = None,
                         log_analytics_workspace_id: Optional[str] = None,
                         logs: Optional[Sequence[AadDiagnosticSettingLogArgs]] = None,
                         name: Optional[str] = None,
                         storage_account_id: Optional[str] = None)
@overload
def AadDiagnosticSetting(resource_name: str,
                         args: AadDiagnosticSettingArgs,
                         opts: Optional[ResourceOptions] = None)
func NewAadDiagnosticSetting(ctx *Context, name string, args AadDiagnosticSettingArgs, opts ...ResourceOption) (*AadDiagnosticSetting, error)
public AadDiagnosticSetting(string name, AadDiagnosticSettingArgs args, 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.

name 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 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 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 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 String
The unique name of the resource.
args AadDiagnosticSettingArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The AadDiagnosticSetting resource accepts the following input properties:

Logs List<AadDiagnosticSettingLogArgs>

One or more log blocks as defined below.

EventhubAuthorizationRuleId 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.

EventhubName 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 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 string

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

Logs []AadDiagnosticSettingLogArgs

One or more log blocks as defined below.

EventhubAuthorizationRuleId 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.

EventhubName 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 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 string

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

logs List<AadDiagnosticSettingLogArgs>

One or more log blocks as defined below.

eventhubAuthorizationRuleId 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.

eventhubName 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 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 String

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

logs AadDiagnosticSettingLogArgs[]

One or more log blocks as defined below.

eventhubAuthorizationRuleId 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.

eventhubName 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 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 string

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

logs Sequence[AadDiagnosticSettingLogArgs]

One or more log blocks as defined below.

eventhub_authorization_rule_id 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.

eventhub_name 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 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 str

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

logs List<Property Map>

One or more log blocks as defined below.

eventhubAuthorizationRuleId 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.

eventhubName 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 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 String

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

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,
        eventhub_authorization_rule_id: Optional[str] = None,
        eventhub_name: Optional[str] = None,
        log_analytics_workspace_id: Optional[str] = None,
        logs: Optional[Sequence[AadDiagnosticSettingLogArgs]] = 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)
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:
EventhubAuthorizationRuleId 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.

EventhubName 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.

Logs List<AadDiagnosticSettingLogArgs>

One or more log blocks as defined below.

Name 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 string

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

EventhubAuthorizationRuleId 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.

EventhubName 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.

Logs []AadDiagnosticSettingLogArgs

One or more log blocks as defined below.

Name 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 string

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

eventhubAuthorizationRuleId 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.

eventhubName 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.

logs List<AadDiagnosticSettingLogArgs>

One or more log blocks as defined below.

name 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 String

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

eventhubAuthorizationRuleId 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.

eventhubName 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.

logs AadDiagnosticSettingLogArgs[]

One or more log blocks as defined below.

name 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 string

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

eventhub_authorization_rule_id 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.

eventhub_name 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.

logs Sequence[AadDiagnosticSettingLogArgs]

One or more log blocks as defined below.

name 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 str

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

eventhubAuthorizationRuleId 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.

eventhubName 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.

logs List<Property Map>

One or more log blocks as defined below.

name 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 String

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

Supporting Types

AadDiagnosticSettingLog

Category string

The log category for the Azure Active Directory Diagnostic.

RetentionPolicy AadDiagnosticSettingLogRetentionPolicy

A retention_policy block as defined below.

Enabled bool

Is this Diagnostic Log enabled? Defaults to true.

Category string

The log category for the Azure Active Directory Diagnostic.

RetentionPolicy AadDiagnosticSettingLogRetentionPolicy

A retention_policy block as defined below.

Enabled bool

Is this Diagnostic Log enabled? Defaults to true.

category String

The log category for the Azure Active Directory Diagnostic.

retentionPolicy AadDiagnosticSettingLogRetentionPolicy

A retention_policy block as defined below.

enabled Boolean

Is this Diagnostic Log enabled? Defaults to true.

category string

The log category for the Azure Active Directory Diagnostic.

retentionPolicy AadDiagnosticSettingLogRetentionPolicy

A retention_policy block as defined below.

enabled boolean

Is this Diagnostic Log enabled? Defaults to true.

category str

The log category for the Azure Active Directory Diagnostic.

retention_policy AadDiagnosticSettingLogRetentionPolicy

A retention_policy block as defined below.

enabled bool

Is this Diagnostic Log enabled? Defaults to true.

category String

The log category for the Azure Active Directory Diagnostic.

retentionPolicy Property Map

A retention_policy block as defined below.

enabled Boolean

Is this Diagnostic Log enabled? Defaults to true.

AadDiagnosticSettingLogRetentionPolicy

Days int

The number of days for which this Retention Policy should apply. Defaults to 0.

Enabled bool

Is this Retention Policy enabled? Defaults to false.

Days int

The number of days for which this Retention Policy should apply. Defaults to 0.

Enabled bool

Is this Retention Policy enabled? Defaults to false.

days Integer

The number of days for which this Retention Policy should apply. Defaults to 0.

enabled Boolean

Is this Retention Policy enabled? Defaults to false.

days number

The number of days for which this Retention Policy should apply. Defaults to 0.

enabled boolean

Is this Retention Policy enabled? Defaults to false.

days int

The number of days for which this Retention Policy should apply. Defaults to 0.

enabled bool

Is this Retention Policy enabled? Defaults to false.

days Number

The number of days for which this Retention Policy should apply. Defaults to 0.

enabled Boolean

Is this Retention Policy enabled? Defaults to false.

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

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.