1. Packages
  2. Azure Native
  3. API Docs
  4. monitor
  5. DiagnosticSetting
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.monitor.DiagnosticSetting

Explore with Pulumi AI

The diagnostic setting resource.

Uses Azure REST API version 2021-05-01-preview.

Example Usage

Creates or Updates the diagnostic setting

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

return await Deployment.RunAsync(() => 
{
    var diagnosticSetting = new AzureNative.Monitor.DiagnosticSetting("diagnosticSetting", new()
    {
        EventHubAuthorizationRuleId = "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
        EventHubName = "myeventhub",
        LogAnalyticsDestinationType = "Dedicated",
        Logs = new[]
        {
            new AzureNative.Monitor.Inputs.LogSettingsArgs
            {
                CategoryGroup = "allLogs",
                Enabled = true,
                RetentionPolicy = new AzureNative.Monitor.Inputs.RetentionPolicyArgs
                {
                    Days = 0,
                    Enabled = false,
                },
            },
        },
        MarketplacePartnerId = "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
        Metrics = new[]
        {
            new AzureNative.Monitor.Inputs.MetricSettingsArgs
            {
                Category = "WorkflowMetrics",
                Enabled = true,
                RetentionPolicy = new AzureNative.Monitor.Inputs.RetentionPolicyArgs
                {
                    Days = 0,
                    Enabled = false,
                },
            },
        },
        Name = "mysetting",
        ResourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
        StorageAccountId = "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
        WorkspaceId = "",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := monitor.NewDiagnosticSetting(ctx, "diagnosticSetting", &monitor.DiagnosticSettingArgs{
			EventHubAuthorizationRuleId: pulumi.String("/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule"),
			EventHubName:                pulumi.String("myeventhub"),
			LogAnalyticsDestinationType: pulumi.String("Dedicated"),
			Logs: monitor.LogSettingsArray{
				&monitor.LogSettingsArgs{
					CategoryGroup: pulumi.String("allLogs"),
					Enabled:       pulumi.Bool(true),
					RetentionPolicy: &monitor.RetentionPolicyArgs{
						Days:    pulumi.Int(0),
						Enabled: pulumi.Bool(false),
					},
				},
			},
			MarketplacePartnerId: pulumi.String("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1"),
			Metrics: monitor.MetricSettingsArray{
				&monitor.MetricSettingsArgs{
					Category: pulumi.String("WorkflowMetrics"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitor.RetentionPolicyArgs{
						Days:    pulumi.Int(0),
						Enabled: pulumi.Bool(false),
					},
				},
			},
			Name:             pulumi.String("mysetting"),
			ResourceUri:      pulumi.String("subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"),
			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.monitor.DiagnosticSetting;
import com.pulumi.azurenative.monitor.DiagnosticSettingArgs;
import com.pulumi.azurenative.monitor.inputs.LogSettingsArgs;
import com.pulumi.azurenative.monitor.inputs.RetentionPolicyArgs;
import com.pulumi.azurenative.monitor.inputs.MetricSettingsArgs;
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/authorizationrules/myrule")
            .eventHubName("myeventhub")
            .logAnalyticsDestinationType("Dedicated")
            .logs(LogSettingsArgs.builder()
                .categoryGroup("allLogs")
                .enabled(true)
                .retentionPolicy(RetentionPolicyArgs.builder()
                    .days(0)
                    .enabled(false)
                    .build())
                .build())
            .marketplacePartnerId("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1")
            .metrics(MetricSettingsArgs.builder()
                .category("WorkflowMetrics")
                .enabled(true)
                .retentionPolicy(RetentionPolicyArgs.builder()
                    .days(0)
                    .enabled(false)
                    .build())
                .build())
            .name("mysetting")
            .resourceUri("subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6")
            .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.monitor.DiagnosticSetting("diagnosticSetting", {
    eventHubAuthorizationRuleId: "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    eventHubName: "myeventhub",
    logAnalyticsDestinationType: "Dedicated",
    logs: [{
        categoryGroup: "allLogs",
        enabled: true,
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    marketplacePartnerId: "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    metrics: [{
        category: "WorkflowMetrics",
        enabled: true,
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    name: "mysetting",
    resourceUri: "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
    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.monitor.DiagnosticSetting("diagnosticSetting",
    event_hub_authorization_rule_id="/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    event_hub_name="myeventhub",
    log_analytics_destination_type="Dedicated",
    logs=[{
        "category_group": "allLogs",
        "enabled": True,
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
    }],
    marketplace_partner_id="/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    metrics=[{
        "category": "WorkflowMetrics",
        "enabled": True,
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
    }],
    name="mysetting",
    resource_uri="subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
    storage_account_id="/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
    workspace_id="")
Copy
resources:
  diagnosticSetting:
    type: azure-native:monitor:DiagnosticSetting
    properties:
      eventHubAuthorizationRuleId: /subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule
      eventHubName: myeventhub
      logAnalyticsDestinationType: Dedicated
      logs:
        - categoryGroup: allLogs
          enabled: true
          retentionPolicy:
            days: 0
            enabled: false
      marketplacePartnerId: /subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1
      metrics:
        - category: WorkflowMetrics
          enabled: true
          retentionPolicy:
            days: 0
            enabled: false
      name: mysetting
      resourceUri: subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6
      storageAccountId: /subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1
      workspaceId: ""
Copy

Creates or Updates the diagnostic setting for category

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

return await Deployment.RunAsync(() => 
{
    var diagnosticSetting = new AzureNative.Monitor.DiagnosticSetting("diagnosticSetting", new()
    {
        EventHubAuthorizationRuleId = "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
        EventHubName = "myeventhub",
        LogAnalyticsDestinationType = "Dedicated",
        Logs = new[]
        {
            new AzureNative.Monitor.Inputs.LogSettingsArgs
            {
                Category = "WorkflowRuntime",
                Enabled = true,
                RetentionPolicy = new AzureNative.Monitor.Inputs.RetentionPolicyArgs
                {
                    Days = 0,
                    Enabled = false,
                },
            },
        },
        MarketplacePartnerId = "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
        Metrics = new[]
        {
            new AzureNative.Monitor.Inputs.MetricSettingsArgs
            {
                Category = "WorkflowMetrics",
                Enabled = true,
                RetentionPolicy = new AzureNative.Monitor.Inputs.RetentionPolicyArgs
                {
                    Days = 0,
                    Enabled = false,
                },
            },
        },
        Name = "mysetting",
        ResourceUri = "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
        StorageAccountId = "/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
        WorkspaceId = "",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := monitor.NewDiagnosticSetting(ctx, "diagnosticSetting", &monitor.DiagnosticSettingArgs{
			EventHubAuthorizationRuleId: pulumi.String("/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule"),
			EventHubName:                pulumi.String("myeventhub"),
			LogAnalyticsDestinationType: pulumi.String("Dedicated"),
			Logs: monitor.LogSettingsArray{
				&monitor.LogSettingsArgs{
					Category: pulumi.String("WorkflowRuntime"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitor.RetentionPolicyArgs{
						Days:    pulumi.Int(0),
						Enabled: pulumi.Bool(false),
					},
				},
			},
			MarketplacePartnerId: pulumi.String("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1"),
			Metrics: monitor.MetricSettingsArray{
				&monitor.MetricSettingsArgs{
					Category: pulumi.String("WorkflowMetrics"),
					Enabled:  pulumi.Bool(true),
					RetentionPolicy: &monitor.RetentionPolicyArgs{
						Days:    pulumi.Int(0),
						Enabled: pulumi.Bool(false),
					},
				},
			},
			Name:             pulumi.String("mysetting"),
			ResourceUri:      pulumi.String("subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6"),
			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.monitor.DiagnosticSetting;
import com.pulumi.azurenative.monitor.DiagnosticSettingArgs;
import com.pulumi.azurenative.monitor.inputs.LogSettingsArgs;
import com.pulumi.azurenative.monitor.inputs.RetentionPolicyArgs;
import com.pulumi.azurenative.monitor.inputs.MetricSettingsArgs;
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/authorizationrules/myrule")
            .eventHubName("myeventhub")
            .logAnalyticsDestinationType("Dedicated")
            .logs(LogSettingsArgs.builder()
                .category("WorkflowRuntime")
                .enabled(true)
                .retentionPolicy(RetentionPolicyArgs.builder()
                    .days(0)
                    .enabled(false)
                    .build())
                .build())
            .marketplacePartnerId("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1")
            .metrics(MetricSettingsArgs.builder()
                .category("WorkflowMetrics")
                .enabled(true)
                .retentionPolicy(RetentionPolicyArgs.builder()
                    .days(0)
                    .enabled(false)
                    .build())
                .build())
            .name("mysetting")
            .resourceUri("subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6")
            .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.monitor.DiagnosticSetting("diagnosticSetting", {
    eventHubAuthorizationRuleId: "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    eventHubName: "myeventhub",
    logAnalyticsDestinationType: "Dedicated",
    logs: [{
        category: "WorkflowRuntime",
        enabled: true,
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    marketplacePartnerId: "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    metrics: [{
        category: "WorkflowMetrics",
        enabled: true,
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    name: "mysetting",
    resourceUri: "subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
    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.monitor.DiagnosticSetting("diagnosticSetting",
    event_hub_authorization_rule_id="/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    event_hub_name="myeventhub",
    log_analytics_destination_type="Dedicated",
    logs=[{
        "category": "WorkflowRuntime",
        "enabled": True,
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
    }],
    marketplace_partner_id="/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    metrics=[{
        "category": "WorkflowMetrics",
        "enabled": True,
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
    }],
    name="mysetting",
    resource_uri="subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6",
    storage_account_id="/subscriptions/df602c9c-7aa0-407d-a6fb-eb20c8bd1192/resourceGroups/apptest/providers/Microsoft.Storage/storageAccounts/appteststorage1",
    workspace_id="")
Copy
resources:
  diagnosticSetting:
    type: azure-native:monitor:DiagnosticSetting
    properties:
      eventHubAuthorizationRuleId: /subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule
      eventHubName: myeventhub
      logAnalyticsDestinationType: Dedicated
      logs:
        - category: WorkflowRuntime
          enabled: true
          retentionPolicy:
            days: 0
            enabled: false
      marketplacePartnerId: /subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1
      metrics:
        - category: WorkflowMetrics
          enabled: true
          retentionPolicy:
            days: 0
            enabled: false
      name: mysetting
      resourceUri: subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/viruela1/providers/microsoft.logic/workflows/viruela6
      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: DiagnosticSettingArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def DiagnosticSetting(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      resource_uri: Optional[str] = None,
                      event_hub_authorization_rule_id: Optional[str] = None,
                      event_hub_name: Optional[str] = None,
                      log_analytics_destination_type: Optional[str] = None,
                      logs: Optional[Sequence[LogSettingsArgs]] = None,
                      marketplace_partner_id: Optional[str] = None,
                      metrics: Optional[Sequence[MetricSettingsArgs]] = 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, CustomResourceOptions? opts = null)
public DiagnosticSetting(String name, DiagnosticSettingArgs args)
public DiagnosticSetting(String name, DiagnosticSettingArgs args, CustomResourceOptions options)
type: azure-native:monitor: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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 azure_nativeDiagnosticSettingResource = new AzureNative.Monitor.DiagnosticSetting("azure-nativeDiagnosticSettingResource", new()
{
    ResourceUri = "string",
    EventHubAuthorizationRuleId = "string",
    EventHubName = "string",
    LogAnalyticsDestinationType = "string",
    Logs = new[]
    {
        new AzureNative.Monitor.Inputs.LogSettingsArgs
        {
            Enabled = false,
            Category = "string",
            CategoryGroup = "string",
            RetentionPolicy = new AzureNative.Monitor.Inputs.RetentionPolicyArgs
            {
                Days = 0,
                Enabled = false,
            },
        },
    },
    MarketplacePartnerId = "string",
    Metrics = new[]
    {
        new AzureNative.Monitor.Inputs.MetricSettingsArgs
        {
            Enabled = false,
            Category = "string",
            RetentionPolicy = new AzureNative.Monitor.Inputs.RetentionPolicyArgs
            {
                Days = 0,
                Enabled = false,
            },
            TimeGrain = "string",
        },
    },
    Name = "string",
    ServiceBusRuleId = "string",
    StorageAccountId = "string",
    WorkspaceId = "string",
});
Copy
example, err := monitor.NewDiagnosticSetting(ctx, "azure-nativeDiagnosticSettingResource", &monitor.DiagnosticSettingArgs{
	ResourceUri:                 pulumi.String("string"),
	EventHubAuthorizationRuleId: pulumi.String("string"),
	EventHubName:                pulumi.String("string"),
	LogAnalyticsDestinationType: pulumi.String("string"),
	Logs: monitor.LogSettingsArray{
		&monitor.LogSettingsArgs{
			Enabled:       pulumi.Bool(false),
			Category:      pulumi.String("string"),
			CategoryGroup: pulumi.String("string"),
			RetentionPolicy: &monitor.RetentionPolicyArgs{
				Days:    pulumi.Int(0),
				Enabled: pulumi.Bool(false),
			},
		},
	},
	MarketplacePartnerId: pulumi.String("string"),
	Metrics: monitor.MetricSettingsArray{
		&monitor.MetricSettingsArgs{
			Enabled:  pulumi.Bool(false),
			Category: pulumi.String("string"),
			RetentionPolicy: &monitor.RetentionPolicyArgs{
				Days:    pulumi.Int(0),
				Enabled: pulumi.Bool(false),
			},
			TimeGrain: pulumi.String("string"),
		},
	},
	Name:             pulumi.String("string"),
	ServiceBusRuleId: pulumi.String("string"),
	StorageAccountId: pulumi.String("string"),
	WorkspaceId:      pulumi.String("string"),
})
Copy
var azure_nativeDiagnosticSettingResource = new DiagnosticSetting("azure-nativeDiagnosticSettingResource", DiagnosticSettingArgs.builder()
    .resourceUri("string")
    .eventHubAuthorizationRuleId("string")
    .eventHubName("string")
    .logAnalyticsDestinationType("string")
    .logs(LogSettingsArgs.builder()
        .enabled(false)
        .category("string")
        .categoryGroup("string")
        .retentionPolicy(RetentionPolicyArgs.builder()
            .days(0)
            .enabled(false)
            .build())
        .build())
    .marketplacePartnerId("string")
    .metrics(MetricSettingsArgs.builder()
        .enabled(false)
        .category("string")
        .retentionPolicy(RetentionPolicyArgs.builder()
            .days(0)
            .enabled(false)
            .build())
        .timeGrain("string")
        .build())
    .name("string")
    .serviceBusRuleId("string")
    .storageAccountId("string")
    .workspaceId("string")
    .build());
Copy
azure_native_diagnostic_setting_resource = azure_native.monitor.DiagnosticSetting("azure-nativeDiagnosticSettingResource",
    resource_uri="string",
    event_hub_authorization_rule_id="string",
    event_hub_name="string",
    log_analytics_destination_type="string",
    logs=[{
        "enabled": False,
        "category": "string",
        "category_group": "string",
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
    }],
    marketplace_partner_id="string",
    metrics=[{
        "enabled": False,
        "category": "string",
        "retention_policy": {
            "days": 0,
            "enabled": False,
        },
        "time_grain": "string",
    }],
    name="string",
    service_bus_rule_id="string",
    storage_account_id="string",
    workspace_id="string")
Copy
const azure_nativeDiagnosticSettingResource = new azure_native.monitor.DiagnosticSetting("azure-nativeDiagnosticSettingResource", {
    resourceUri: "string",
    eventHubAuthorizationRuleId: "string",
    eventHubName: "string",
    logAnalyticsDestinationType: "string",
    logs: [{
        enabled: false,
        category: "string",
        categoryGroup: "string",
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
    }],
    marketplacePartnerId: "string",
    metrics: [{
        enabled: false,
        category: "string",
        retentionPolicy: {
            days: 0,
            enabled: false,
        },
        timeGrain: "string",
    }],
    name: "string",
    serviceBusRuleId: "string",
    storageAccountId: "string",
    workspaceId: "string",
});
Copy
type: azure-native:monitor:DiagnosticSetting
properties:
    eventHubAuthorizationRuleId: string
    eventHubName: string
    logAnalyticsDestinationType: string
    logs:
        - category: string
          categoryGroup: string
          enabled: false
          retentionPolicy:
            days: 0
            enabled: false
    marketplacePartnerId: string
    metrics:
        - category: string
          enabled: false
          retentionPolicy:
            days: 0
            enabled: false
          timeGrain: string
    name: string
    resourceUri: 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:

ResourceUri
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the resource.
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.
LogAnalyticsDestinationType string
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
Logs List<Pulumi.AzureNative.Monitor.Inputs.LogSettings>
The list of logs settings.
MarketplacePartnerId string
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
Metrics List<Pulumi.AzureNative.Monitor.Inputs.MetricSettings>
The list of metric 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 full ARM resource ID of the 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
ResourceUri
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the resource.
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.
LogAnalyticsDestinationType string
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
Logs []LogSettingsArgs
The list of logs settings.
MarketplacePartnerId string
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
Metrics []MetricSettingsArgs
The list of metric 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 full ARM resource ID of the 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
resourceUri
This property is required.
Changes to this property will trigger replacement.
String
The identifier of the resource.
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.
logAnalyticsDestinationType String
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
logs List<LogSettings>
The list of logs settings.
marketplacePartnerId String
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
metrics List<MetricSettings>
The list of metric 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 full ARM resource ID of the 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
resourceUri
This property is required.
Changes to this property will trigger replacement.
string
The identifier of the resource.
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.
logAnalyticsDestinationType string
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
logs LogSettings[]
The list of logs settings.
marketplacePartnerId string
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
metrics MetricSettings[]
The list of metric 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 full ARM resource ID of the 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
resource_uri
This property is required.
Changes to this property will trigger replacement.
str
The identifier of the resource.
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.
log_analytics_destination_type str
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
logs Sequence[LogSettingsArgs]
The list of logs settings.
marketplace_partner_id str
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
metrics Sequence[MetricSettingsArgs]
The list of metric 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 full ARM resource ID of the 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
resourceUri
This property is required.
Changes to this property will trigger replacement.
String
The identifier of the resource.
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.
logAnalyticsDestinationType String
A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type constructed as follows: _. Possible values are: Dedicated and null (null is default.)
logs List<Property Map>
The list of logs settings.
marketplacePartnerId String
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
metrics List<Property Map>
The list of metric 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 full ARM resource ID of the 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:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
SystemData Pulumi.AzureNative.Monitor.Outputs.SystemDataResponse
The system metadata related to this resource.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
SystemData SystemDataResponse
The system metadata related to this resource.
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
systemData SystemDataResponse
The system metadata related to this resource.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
systemData SystemDataResponse
The system metadata related to this resource.
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
system_data SystemDataResponse
The system metadata related to this resource.
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
systemData Property Map
The system metadata related to this resource.
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Supporting Types

LogSettings
, LogSettingsArgs

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.
CategoryGroup string
Name of a Diagnostic Log category group 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.Monitor.Inputs.RetentionPolicy
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.
CategoryGroup string
Name of a Diagnostic Log category group 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
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.
categoryGroup String
Name of a Diagnostic Log category group 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
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.
categoryGroup string
Name of a Diagnostic Log category group 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
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.
category_group str
Name of a Diagnostic Log category group 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
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.
categoryGroup String
Name of a Diagnostic Log category group 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.
CategoryGroup string
Name of a Diagnostic Log category group 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.Monitor.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.
CategoryGroup string
Name of a Diagnostic Log category group 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.
categoryGroup String
Name of a Diagnostic Log category group 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.
categoryGroup string
Name of a Diagnostic Log category group 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.
category_group str
Name of a Diagnostic Log category group 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.
categoryGroup String
Name of a Diagnostic Log category group 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.

MetricSettings
, MetricSettingsArgs

Enabled This property is required. bool
a value indicating whether this category is enabled.
Category string
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy Pulumi.AzureNative.Monitor.Inputs.RetentionPolicy
the retention policy for this category.
TimeGrain string
the timegrain of the metric in ISO8601 format.
Enabled This property is required. bool
a value indicating whether this category is enabled.
Category string
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy RetentionPolicy
the retention policy for this category.
TimeGrain string
the timegrain of the metric in ISO8601 format.
enabled This property is required. Boolean
a value indicating whether this category is enabled.
category String
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicy
the retention policy for this category.
timeGrain String
the timegrain of the metric in ISO8601 format.
enabled This property is required. boolean
a value indicating whether this category is enabled.
category string
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicy
the retention policy for this category.
timeGrain string
the timegrain of the metric in ISO8601 format.
enabled This property is required. bool
a value indicating whether this category is enabled.
category str
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retention_policy RetentionPolicy
the retention policy for this category.
time_grain str
the timegrain of the metric in ISO8601 format.
enabled This property is required. Boolean
a value indicating whether this category is enabled.
category String
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy Property Map
the retention policy for this category.
timeGrain String
the timegrain of the metric in ISO8601 format.

MetricSettingsResponse
, MetricSettingsResponseArgs

Enabled This property is required. bool
a value indicating whether this category is enabled.
Category string
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy Pulumi.AzureNative.Monitor.Inputs.RetentionPolicyResponse
the retention policy for this category.
TimeGrain string
the timegrain of the metric in ISO8601 format.
Enabled This property is required. bool
a value indicating whether this category is enabled.
Category string
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
RetentionPolicy RetentionPolicyResponse
the retention policy for this category.
TimeGrain string
the timegrain of the metric in ISO8601 format.
enabled This property is required. Boolean
a value indicating whether this category is enabled.
category String
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicyResponse
the retention policy for this category.
timeGrain String
the timegrain of the metric in ISO8601 format.
enabled This property is required. boolean
a value indicating whether this category is enabled.
category string
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy RetentionPolicyResponse
the retention policy for this category.
timeGrain string
the timegrain of the metric in ISO8601 format.
enabled This property is required. bool
a value indicating whether this category is enabled.
category str
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retention_policy RetentionPolicyResponse
the retention policy for this category.
time_grain str
the timegrain of the metric in ISO8601 format.
enabled This property is required. Boolean
a value indicating whether this category is enabled.
category String
Name of a Diagnostic Metric category for a resource type this setting is applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a GET diagnostic settings operation.
retentionPolicy Property Map
the retention policy for this category.
timeGrain String
the timegrain of the metric in ISO8601 format.

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.

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource last modification (UTC)
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource last modification (UTC)
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource last modification (UTC)
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource last modification (UTC)
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

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

$ pulumi import azure-native:monitor:DiagnosticSetting mysetting /{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name} 
Copy

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

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0