AadDiagnosticSettingArgs

data class AadDiagnosticSettingArgs(val enabledLogs: Output<List<AadDiagnosticSettingEnabledLogArgs>>? = null, val eventhubAuthorizationRuleId: Output<String>? = null, val eventhubName: Output<String>? = null, val logAnalyticsWorkspaceId: Output<String>? = null, val logs: Output<List<AadDiagnosticSettingLogArgs>>? = null, val name: Output<String>? = null, val storageAccountId: Output<String>? = null) : ConvertibleToJava<AadDiagnosticSettingArgs>

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

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 com.pulumi.azure.monitoring.inputs.AadDiagnosticSettingEnabledLogRetentionPolicyArgs;
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())
.enabledLogs(
AadDiagnosticSettingEnabledLogArgs.builder()
.category("SignInLogs")
.retentionPolicy(AadDiagnosticSettingEnabledLogRetentionPolicyArgs.builder()
.enabled(true)
.days(1)
.build())
.build(),
AadDiagnosticSettingEnabledLogArgs.builder()
.category("AuditLogs")
.retentionPolicy(AadDiagnosticSettingEnabledLogRetentionPolicyArgs.builder()
.enabled(true)
.days(1)
.build())
.build(),
AadDiagnosticSettingEnabledLogArgs.builder()
.category("NonInteractiveUserSignInLogs")
.retentionPolicy(AadDiagnosticSettingEnabledLogRetentionPolicyArgs.builder()
.enabled(true)
.days(1)
.build())
.build(),
AadDiagnosticSettingEnabledLogArgs.builder()
.category("ServicePrincipalSignInLogs")
.retentionPolicy(AadDiagnosticSettingEnabledLogRetentionPolicyArgs.builder()
.enabled(true)
.days(1)
.build())
.build())
.build());
}
}

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

Constructors

Link copied to clipboard
fun AadDiagnosticSettingArgs(enabledLogs: Output<List<AadDiagnosticSettingEnabledLogArgs>>? = null, eventhubAuthorizationRuleId: Output<String>? = null, eventhubName: Output<String>? = null, logAnalyticsWorkspaceId: Output<String>? = null, logs: Output<List<AadDiagnosticSettingLogArgs>>? = null, name: Output<String>? = null, storageAccountId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): AadDiagnosticSettingArgs

Properties

Link copied to clipboard

One or more enabled_log blocks as defined below.

Link copied to clipboard
val eventhubAuthorizationRuleId: Output<String>? = null

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

Link copied to clipboard
val eventhubName: Output<String>? = null

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.

Link copied to clipboard
val logAnalyticsWorkspaceId: Output<String>? = null

Specifies the ID of a Log Analytics Workspace where Diagnostics Data should be sent.

Link copied to clipboard
val logs: Output<List<AadDiagnosticSettingLogArgs>>? = null

One or more log blocks as defined below.

Link copied to clipboard
val name: Output<String>? = null

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.

Link copied to clipboard
val storageAccountId: Output<String>? = null

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