1. Packages
  2. Azure Native v2
  3. API Docs
  4. aadiam
  5. DiagnosticSetting
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.aadiam.DiagnosticSetting

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

The diagnostic setting resource. Azure REST API version: 2017-04-01. Prior API version in Azure Native 1.x: 2017-04-01.

Other available API versions: 2017-04-01-preview.

Example Usage

BatchAccountDelete

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

return await Deployment.RunAsync(() => 
{
    var diagnosticSetting = new AzureNative.AadIam.DiagnosticSetting("diagnosticSetting", new()
    {
        EventHubAuthorizationRuleId = "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
        EventHubName = "myeventhub",
        Logs = new[]
        {
            new AzureNative.AadIam.Inputs.LogSettingsArgs
            {
                Category = AzureNative.AadIam.Category.AuditLogs,
                Enabled = true,
                RetentionPolicy = new AzureNative.AadIam.Inputs.RetentionPolicyArgs
                {
                    Days = 0,
                    Enabled = false,
                },
            },
        },
        Name = "mysetting",
        StorageAccountId = "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
        WorkspaceId = "",
    });

});
Copy
package main

import (
	aadiam "github.com/pulumi/pulumi-azure-native-sdk/aadiam/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := aadiam.NewDiagnosticSetting(ctx, "diagnosticSetting", &aadiam.DiagnosticSettingArgs{
			EventHubAuthorizationRuleId: pulumi.String("/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule"),
			EventHubName:                pulumi.String("myeventhub"),
			Logs: aadiam.LogSettingsArray{
				&aadiam.LogSettingsArgs{
					Category: pulumi.String(aadiam.CategoryAuditLogs),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &aadiam.RetentionPolicyArgs{
						Days:    pulumi.Int(0),
						Enabled: pulumi.Bool(false),
					},
				},
			},
			Name:             pulumi.String("mysetting"),
			StorageAccountId: pulumi.String("/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1"),
			WorkspaceId:      pulumi.String(""),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.aadiam.DiagnosticSetting;
import com.pulumi.azurenative.aadiam.DiagnosticSettingArgs;
import com.pulumi.azurenative.aadiam.inputs.LogSettingsArgs;
import com.pulumi.azurenative.aadiam.inputs.RetentionPolicyArgs;
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 diagnosticSetting = new DiagnosticSetting("diagnosticSetting", DiagnosticSettingArgs.builder()
            .eventHubAuthorizationRuleId("/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule")
            .eventHubName("myeventhub")
            .logs(LogSettingsArgs.builder()
                .category("AuditLogs")
                .enabled(true)
                .retentionPolicy(RetentionPolicyArgs.builder()
                    .days(0)
                    .enabled(false)
                    .build())
                .build())
            .name("mysetting")
            .storageAccountId("/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1")
            .workspaceId("")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const diagnosticSetting = new azure_native.aadiam.DiagnosticSetting("diagnosticSetting", {
    eventHubAuthorizationRuleId: "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
    eventHubName: "myeventhub",
    logs: [{
        category: azure_native.aadiam.Category.AuditLogs,
        enabled: true,
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    name: "mysetting",
    storageAccountId: "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
    workspaceId: "",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

diagnostic_setting = azure_native.aadiam.DiagnosticSetting("diagnosticSetting",
    event_hub_authorization_rule_id="/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule",
    event_hub_name="myeventhub",
    logs=[{
        "category": azure_native.aadiam.Category.AUDIT_LOGS,
        "enabled": True,
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
    }],
    name="mysetting",
    storage_account_id="/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
    workspace_id="")
Copy
resources:
  diagnosticSetting:
    type: azure-native:aadiam:DiagnosticSetting
    properties:
      eventHubAuthorizationRuleId: /subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/eventhubs/myeventhub/authorizationrules/myrule
      eventHubName: myeventhub
      logs:
        - category: AuditLogs
          enabled: true
          retentionPolicy:
            days: 0
            enabled: false
      name: mysetting
      storageAccountId: /subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1
      workspaceId: ""
Copy

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: Optional[DiagnosticSettingArgs] = None,
                      opts: Optional[ResourceOptions] = None)

@overload
def DiagnosticSetting(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      event_hub_authorization_rule_id: Optional[str] = None,
                      event_hub_name: Optional[str] = None,
                      logs: Optional[Sequence[LogSettingsArgs]] = None,
                      name: Optional[str] = None,
                      service_bus_rule_id: Optional[str] = None,
                      storage_account_id: Optional[str] = None,
                      workspace_id: Optional[str] = None)
func NewDiagnosticSetting(ctx *Context, name string, args *DiagnosticSettingArgs, opts ...ResourceOption) (*DiagnosticSetting, error)
public DiagnosticSetting(string name, DiagnosticSettingArgs? args = null, CustomResourceOptions? opts = null)
public DiagnosticSetting(String name, DiagnosticSettingArgs args)
public DiagnosticSetting(String name, DiagnosticSettingArgs args, CustomResourceOptions options)
type: azure-native:aadiam:DiagnosticSetting
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 DiagnosticSettingArgs
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 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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 AzureNative.Aadiam.DiagnosticSetting("diagnosticSettingResource", new()
{
    EventHubAuthorizationRuleId = "string",
    EventHubName = "string",
    Logs = new[]
    {
        
        {
            { "enabled", false },
            { "category", "string" },
            { "retentionPolicy", 
            {
                { "days", 0 },
                { "enabled", false },
            } },
        },
    },
    Name = "string",
    ServiceBusRuleId = "string",
    StorageAccountId = "string",
    WorkspaceId = "string",
});
Copy
example, err := aadiam.NewDiagnosticSetting(ctx, "diagnosticSettingResource", &aadiam.DiagnosticSettingArgs{
	EventHubAuthorizationRuleId: "string",
	EventHubName:                "string",
	Logs: []map[string]interface{}{
		map[string]interface{}{
			"enabled":  false,
			"category": "string",
			"retentionPolicy": map[string]interface{}{
				"days":    0,
				"enabled": false,
			},
		},
	},
	Name:             "string",
	ServiceBusRuleId: "string",
	StorageAccountId: "string",
	WorkspaceId:      "string",
})
Copy
var diagnosticSettingResource = new DiagnosticSetting("diagnosticSettingResource", DiagnosticSettingArgs.builder()
    .eventHubAuthorizationRuleId("string")
    .eventHubName("string")
    .logs(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .name("string")
    .serviceBusRuleId("string")
    .storageAccountId("string")
    .workspaceId("string")
    .build());
Copy
diagnostic_setting_resource = azure_native.aadiam.DiagnosticSetting("diagnosticSettingResource",
    event_hub_authorization_rule_id=string,
    event_hub_name=string,
    logs=[{
        enabled: False,
        category: string,
        retentionPolicy: {
            days: 0,
            enabled: False,
        },
    }],
    name=string,
    service_bus_rule_id=string,
    storage_account_id=string,
    workspace_id=string)
Copy
const diagnosticSettingResource = new azure_native.aadiam.DiagnosticSetting("diagnosticSettingResource", {
    eventHubAuthorizationRuleId: "string",
    eventHubName: "string",
    logs: [{
        enabled: false,
        category: "string",
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    name: "string",
    serviceBusRuleId: "string",
    storageAccountId: "string",
    workspaceId: "string",
});
Copy
type: azure-native:aadiam:DiagnosticSetting
properties:
    eventHubAuthorizationRuleId: string
    eventHubName: string
    logs:
        - category: string
          enabled: false
          retentionPolicy:
            days: 0
            enabled: false
    name: string
    serviceBusRuleId: string
    storageAccountId: string
    workspaceId: string
Copy

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:

EventHubAuthorizationRuleId string
The resource Id for the event hub authorization rule.
EventHubName string
The name of the event hub. If none is specified, the default event hub will be selected.
Logs List<Pulumi.AzureNative.AadIam.Inputs.LogSettings>
The list of logs settings.
Name Changes to this property will trigger replacement. string
The name of the diagnostic setting.
ServiceBusRuleId string
The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
StorageAccountId string
The resource ID of the storage account to which you would like to send Diagnostic Logs.
WorkspaceId string
The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
EventHubAuthorizationRuleId string
The resource Id for the event hub authorization rule.
EventHubName string
The name of the event hub. If none is specified, the default event hub will be selected.
Logs []LogSettingsArgs
The list of logs settings.
Name Changes to this property will trigger replacement. string
The name of the diagnostic setting.
ServiceBusRuleId string
The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
StorageAccountId string
The resource ID of the storage account to which you would like to send Diagnostic Logs.
WorkspaceId string
The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
eventHubAuthorizationRuleId String
The resource Id for the event hub authorization rule.
eventHubName String
The name of the event hub. If none is specified, the default event hub will be selected.
logs List<LogSettings>
The list of logs settings.
name Changes to this property will trigger replacement. String
The name of the diagnostic setting.
serviceBusRuleId String
The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
storageAccountId String
The resource ID of the storage account to which you would like to send Diagnostic Logs.
workspaceId String
The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
eventHubAuthorizationRuleId string
The resource Id for the event hub authorization rule.
eventHubName string
The name of the event hub. If none is specified, the default event hub will be selected.
logs LogSettings[]
The list of logs settings.
name Changes to this property will trigger replacement. string
The name of the diagnostic setting.
serviceBusRuleId string
The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
storageAccountId string
The resource ID of the storage account to which you would like to send Diagnostic Logs.
workspaceId string
The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
event_hub_authorization_rule_id str
The resource Id for the event hub authorization rule.
event_hub_name str
The name of the event hub. If none is specified, the default event hub will be selected.
logs Sequence[LogSettingsArgs]
The list of logs settings.
name Changes to this property will trigger replacement. str
The name of the diagnostic setting.
service_bus_rule_id str
The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
storage_account_id str
The resource ID of the storage account to which you would like to send Diagnostic Logs.
workspace_id str
The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2
eventHubAuthorizationRuleId String
The resource Id for the event hub authorization rule.
eventHubName String
The name of the event hub. If none is specified, the default event hub will be selected.
logs List<Property Map>
The list of logs settings.
name Changes to this property will trigger replacement. String
The name of the diagnostic setting.
serviceBusRuleId String
The service bus rule Id of the diagnostic setting. This is here to maintain backwards compatibility.
storageAccountId String
The resource ID of the storage account to which you would like to send Diagnostic Logs.
workspaceId String
The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2

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.
Type string
Azure resource type
Id string
The provider-assigned unique ID for this managed resource.
Type string
Azure resource type
id String
The provider-assigned unique ID for this managed resource.
type String
Azure resource type
id string
The provider-assigned unique ID for this managed resource.
type string
Azure resource type
id str
The provider-assigned unique ID for this managed resource.
type str
Azure resource type
id String
The provider-assigned unique ID for this managed resource.
type String
Azure resource type

Supporting Types

Category
, CategoryArgs

AuditLogs
AuditLogs
SignInLogs
SignInLogs
CategoryAuditLogs
AuditLogs
CategorySignInLogs
SignInLogs
AuditLogs
AuditLogs
SignInLogs
SignInLogs
AuditLogs
AuditLogs
SignInLogs
SignInLogs
AUDIT_LOGS
AuditLogs
SIGN_IN_LOGS
SignInLogs
"AuditLogs"
AuditLogs
"SignInLogs"
SignInLogs

LogSettings
, LogSettingsArgs

Enabled This property is required. bool
A value indicating whether this log is enabled.
Category string | Pulumi.AzureNative.AadIam.Category
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy Pulumi.AzureNative.AadIam.Inputs.RetentionPolicy
The retention policy for this log.
Enabled This property is required. bool
A value indicating whether this log is enabled.
Category string | Category
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy RetentionPolicy
The retention policy for this log.
enabled This property is required. Boolean
A value indicating whether this log is enabled.
category String | Category
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicy
The retention policy for this log.
enabled This property is required. boolean
A value indicating whether this log is enabled.
category string | Category
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicy
The retention policy for this log.
enabled This property is required. bool
A value indicating whether this log is enabled.
category str | Category
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retention_policy RetentionPolicy
The retention policy for this log.
enabled This property is required. Boolean
A value indicating whether this log is enabled.
category String | "AuditLogs" | "SignInLogs"
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy Property Map
The retention policy for this log.

LogSettingsResponse
, LogSettingsResponseArgs

Enabled This property is required. bool
A value indicating whether this log is enabled.
Category string
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy Pulumi.AzureNative.AadIam.Inputs.RetentionPolicyResponse
The retention policy for this log.
Enabled This property is required. bool
A value indicating whether this log is enabled.
Category string
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy RetentionPolicyResponse
The retention policy for this log.
enabled This property is required. Boolean
A value indicating whether this log is enabled.
category String
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicyResponse
The retention policy for this log.
enabled This property is required. boolean
A value indicating whether this log is enabled.
category string
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicyResponse
The retention policy for this log.
enabled This property is required. bool
A value indicating whether this log is enabled.
category str
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retention_policy RetentionPolicyResponse
The retention policy for this log.
enabled This property is required. Boolean
A value indicating whether this log is enabled.
category String
Name of a Diagnostic Log category for a resource type this setting is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy Property Map
The retention policy for this log.

RetentionPolicy
, RetentionPolicyArgs

Days This property is required. int
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Enabled This property is required. bool
A value indicating whether the retention policy is enabled.
Days This property is required. int
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Enabled This property is required. bool
A value indicating whether the retention policy is enabled.
days This property is required. Integer
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. Boolean
A value indicating whether the retention policy is enabled.
days This property is required. number
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. boolean
A value indicating whether the retention policy is enabled.
days This property is required. int
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. bool
A value indicating whether the retention policy is enabled.
days This property is required. Number
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. Boolean
A value indicating whether the retention policy is enabled.

RetentionPolicyResponse
, RetentionPolicyResponseArgs

Days This property is required. int
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Enabled This property is required. bool
A value indicating whether the retention policy is enabled.
Days This property is required. int
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
Enabled This property is required. bool
A value indicating whether the retention policy is enabled.
days This property is required. Integer
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. Boolean
A value indicating whether the retention policy is enabled.
days This property is required. number
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. boolean
A value indicating whether the retention policy is enabled.
days This property is required. int
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. bool
A value indicating whether the retention policy is enabled.
days This property is required. Number
The number of days for the retention in days. A value of 0 will retain the events indefinitely.
enabled This property is required. Boolean
A value indicating whether the retention policy is enabled.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:aadiam:DiagnosticSetting mysetting /providers/microsoft.aadiam/diagnosticSettings/{name} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi