1. Packages
  2. Azure Native
  3. API Docs
  4. monitor
  5. ManagementGroupDiagnosticSetting
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.ManagementGroupDiagnosticSetting

Explore with Pulumi AI

The management group diagnostic setting resource.

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

Example Usage

Creates or Updates the management group diagnostic setting

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

return await Deployment.RunAsync(() => 
{
    var managementGroupDiagnosticSetting = new AzureNative.Monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting", new()
    {
        EventHubAuthorizationRuleId = "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
        EventHubName = "myeventhub",
        Logs = new[]
        {
            new AzureNative.Monitor.Inputs.ManagementGroupLogSettingsArgs
            {
                CategoryGroup = "allLogs",
                Enabled = true,
            },
        },
        ManagementGroupId = "testChildMG7",
        MarketplacePartnerId = "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
        Name = "setting1",
        StorageAccountId = "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
        WorkspaceId = "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
    });

});
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.NewManagementGroupDiagnosticSetting(ctx, "managementGroupDiagnosticSetting", &monitor.ManagementGroupDiagnosticSettingArgs{
			EventHubAuthorizationRuleId: pulumi.String("/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule"),
			EventHubName:                pulumi.String("myeventhub"),
			Logs: monitor.ManagementGroupLogSettingsArray{
				&monitor.ManagementGroupLogSettingsArgs{
					CategoryGroup: pulumi.String("allLogs"),
					Enabled:       pulumi.Bool(true),
				},
			},
			ManagementGroupId:    pulumi.String("testChildMG7"),
			MarketplacePartnerId: pulumi.String("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1"),
			Name:                 pulumi.String("setting1"),
			StorageAccountId:     pulumi.String("/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5"),
			WorkspaceId:          pulumi.String("/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace"),
		})
		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.ManagementGroupDiagnosticSetting;
import com.pulumi.azurenative.monitor.ManagementGroupDiagnosticSettingArgs;
import com.pulumi.azurenative.monitor.inputs.ManagementGroupLogSettingsArgs;
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 managementGroupDiagnosticSetting = new ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting", ManagementGroupDiagnosticSettingArgs.builder()
            .eventHubAuthorizationRuleId("/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule")
            .eventHubName("myeventhub")
            .logs(ManagementGroupLogSettingsArgs.builder()
                .categoryGroup("allLogs")
                .enabled(true)
                .build())
            .managementGroupId("testChildMG7")
            .marketplacePartnerId("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1")
            .name("setting1")
            .storageAccountId("/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5")
            .workspaceId("/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace")
            .build());

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

const managementGroupDiagnosticSetting = new azure_native.monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting", {
    eventHubAuthorizationRuleId: "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    eventHubName: "myeventhub",
    logs: [{
        categoryGroup: "allLogs",
        enabled: true,
    }],
    managementGroupId: "testChildMG7",
    marketplacePartnerId: "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    name: "setting1",
    storageAccountId: "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
    workspaceId: "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

management_group_diagnostic_setting = azure_native.monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting",
    event_hub_authorization_rule_id="/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    event_hub_name="myeventhub",
    logs=[{
        "category_group": "allLogs",
        "enabled": True,
    }],
    management_group_id="testChildMG7",
    marketplace_partner_id="/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    name="setting1",
    storage_account_id="/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
    workspace_id="/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace")
Copy
resources:
  managementGroupDiagnosticSetting:
    type: azure-native:monitor:ManagementGroupDiagnosticSetting
    properties:
      eventHubAuthorizationRuleId: /subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule
      eventHubName: myeventhub
      logs:
        - categoryGroup: allLogs
          enabled: true
      managementGroupId: testChildMG7
      marketplacePartnerId: /subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1
      name: setting1
      storageAccountId: /subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5
      workspaceId: /subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace
Copy

Creates or Updates the management group diagnostic setting for category

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

return await Deployment.RunAsync(() => 
{
    var managementGroupDiagnosticSetting = new AzureNative.Monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting", new()
    {
        EventHubAuthorizationRuleId = "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
        EventHubName = "myeventhub",
        Logs = new[]
        {
            new AzureNative.Monitor.Inputs.ManagementGroupLogSettingsArgs
            {
                Category = "Administrative",
                Enabled = true,
            },
            new AzureNative.Monitor.Inputs.ManagementGroupLogSettingsArgs
            {
                Category = "Policy",
                Enabled = true,
            },
        },
        ManagementGroupId = "testChildMG7",
        MarketplacePartnerId = "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
        Name = "setting1",
        StorageAccountId = "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
        WorkspaceId = "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
    });

});
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.NewManagementGroupDiagnosticSetting(ctx, "managementGroupDiagnosticSetting", &monitor.ManagementGroupDiagnosticSettingArgs{
			EventHubAuthorizationRuleId: pulumi.String("/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule"),
			EventHubName:                pulumi.String("myeventhub"),
			Logs: monitor.ManagementGroupLogSettingsArray{
				&monitor.ManagementGroupLogSettingsArgs{
					Category: pulumi.String("Administrative"),
					Enabled:  pulumi.Bool(true),
				},
				&monitor.ManagementGroupLogSettingsArgs{
					Category: pulumi.String("Policy"),
					Enabled:  pulumi.Bool(true),
				},
			},
			ManagementGroupId:    pulumi.String("testChildMG7"),
			MarketplacePartnerId: pulumi.String("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1"),
			Name:                 pulumi.String("setting1"),
			StorageAccountId:     pulumi.String("/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5"),
			WorkspaceId:          pulumi.String("/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace"),
		})
		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.ManagementGroupDiagnosticSetting;
import com.pulumi.azurenative.monitor.ManagementGroupDiagnosticSettingArgs;
import com.pulumi.azurenative.monitor.inputs.ManagementGroupLogSettingsArgs;
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 managementGroupDiagnosticSetting = new ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting", ManagementGroupDiagnosticSettingArgs.builder()
            .eventHubAuthorizationRuleId("/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule")
            .eventHubName("myeventhub")
            .logs(            
                ManagementGroupLogSettingsArgs.builder()
                    .category("Administrative")
                    .enabled(true)
                    .build(),
                ManagementGroupLogSettingsArgs.builder()
                    .category("Policy")
                    .enabled(true)
                    .build())
            .managementGroupId("testChildMG7")
            .marketplacePartnerId("/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1")
            .name("setting1")
            .storageAccountId("/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5")
            .workspaceId("/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace")
            .build());

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

const managementGroupDiagnosticSetting = new azure_native.monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting", {
    eventHubAuthorizationRuleId: "/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    eventHubName: "myeventhub",
    logs: [
        {
            category: "Administrative",
            enabled: true,
        },
        {
            category: "Policy",
            enabled: true,
        },
    ],
    managementGroupId: "testChildMG7",
    marketplacePartnerId: "/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    name: "setting1",
    storageAccountId: "/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
    workspaceId: "/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

management_group_diagnostic_setting = azure_native.monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSetting",
    event_hub_authorization_rule_id="/subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule",
    event_hub_name="myeventhub",
    logs=[
        {
            "category": "Administrative",
            "enabled": True,
        },
        {
            "category": "Policy",
            "enabled": True,
        },
    ],
    management_group_id="testChildMG7",
    marketplace_partner_id="/subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1",
    name="setting1",
    storage_account_id="/subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5",
    workspace_id="/subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace")
Copy
resources:
  managementGroupDiagnosticSetting:
    type: azure-native:monitor:ManagementGroupDiagnosticSetting
    properties:
      eventHubAuthorizationRuleId: /subscriptions/fb9f25f9-5785-4510-a38f-a62f188eb9f8/resourceGroups/montest/providers/microsoft.eventhub/namespaces/mynamespace/authorizationrules/myrule
      eventHubName: myeventhub
      logs:
        - category: Administrative
          enabled: true
        - category: Policy
          enabled: true
      managementGroupId: testChildMG7
      marketplacePartnerId: /subscriptions/abcdeabc-1234-1234-ab12-123a1234567a/resourceGroups/test-rg/providers/Microsoft.Datadog/monitors/dd1
      name: setting1
      storageAccountId: /subscriptions/bfaef57f-297e-4210-bfe5-27c18cc671f7/resourceGroups/FuncAppRunners/providers/Microsoft.Storage/storageAccounts/testpersonalb6a5
      workspaceId: /subscriptions/9cf7cc0a-0ba1-4624-bc82-97e1ee25dc45/resourceGroups/mgTest/providers/Microsoft.OperationalInsights/workspaces/mgTestWorkspace
Copy

Create ManagementGroupDiagnosticSetting Resource

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

Constructor syntax

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

@overload
def ManagementGroupDiagnosticSetting(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     management_group_id: Optional[str] = None,
                                     event_hub_authorization_rule_id: Optional[str] = None,
                                     event_hub_name: Optional[str] = None,
                                     logs: Optional[Sequence[ManagementGroupLogSettingsArgs]] = None,
                                     marketplace_partner_id: Optional[str] = None,
                                     name: Optional[str] = None,
                                     service_bus_rule_id: Optional[str] = None,
                                     storage_account_id: Optional[str] = None,
                                     workspace_id: Optional[str] = None)
func NewManagementGroupDiagnosticSetting(ctx *Context, name string, args ManagementGroupDiagnosticSettingArgs, opts ...ResourceOption) (*ManagementGroupDiagnosticSetting, error)
public ManagementGroupDiagnosticSetting(string name, ManagementGroupDiagnosticSettingArgs args, CustomResourceOptions? opts = null)
public ManagementGroupDiagnosticSetting(String name, ManagementGroupDiagnosticSettingArgs args)
public ManagementGroupDiagnosticSetting(String name, ManagementGroupDiagnosticSettingArgs args, CustomResourceOptions options)
type: azure-native:monitor:ManagementGroupDiagnosticSetting
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. ManagementGroupDiagnosticSettingArgs
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. ManagementGroupDiagnosticSettingArgs
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. ManagementGroupDiagnosticSettingArgs
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. ManagementGroupDiagnosticSettingArgs
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. ManagementGroupDiagnosticSettingArgs
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 managementGroupDiagnosticSettingResource = new AzureNative.Monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSettingResource", new()
{
    ManagementGroupId = "string",
    EventHubAuthorizationRuleId = "string",
    EventHubName = "string",
    Logs = new[]
    {
        new AzureNative.Monitor.Inputs.ManagementGroupLogSettingsArgs
        {
            Enabled = false,
            Category = "string",
            CategoryGroup = "string",
        },
    },
    MarketplacePartnerId = "string",
    Name = "string",
    ServiceBusRuleId = "string",
    StorageAccountId = "string",
    WorkspaceId = "string",
});
Copy
example, err := monitor.NewManagementGroupDiagnosticSetting(ctx, "managementGroupDiagnosticSettingResource", &monitor.ManagementGroupDiagnosticSettingArgs{
	ManagementGroupId:           pulumi.String("string"),
	EventHubAuthorizationRuleId: pulumi.String("string"),
	EventHubName:                pulumi.String("string"),
	Logs: monitor.ManagementGroupLogSettingsArray{
		&monitor.ManagementGroupLogSettingsArgs{
			Enabled:       pulumi.Bool(false),
			Category:      pulumi.String("string"),
			CategoryGroup: pulumi.String("string"),
		},
	},
	MarketplacePartnerId: pulumi.String("string"),
	Name:                 pulumi.String("string"),
	ServiceBusRuleId:     pulumi.String("string"),
	StorageAccountId:     pulumi.String("string"),
	WorkspaceId:          pulumi.String("string"),
})
Copy
var managementGroupDiagnosticSettingResource = new ManagementGroupDiagnosticSetting("managementGroupDiagnosticSettingResource", ManagementGroupDiagnosticSettingArgs.builder()
    .managementGroupId("string")
    .eventHubAuthorizationRuleId("string")
    .eventHubName("string")
    .logs(ManagementGroupLogSettingsArgs.builder()
        .enabled(false)
        .category("string")
        .categoryGroup("string")
        .build())
    .marketplacePartnerId("string")
    .name("string")
    .serviceBusRuleId("string")
    .storageAccountId("string")
    .workspaceId("string")
    .build());
Copy
management_group_diagnostic_setting_resource = azure_native.monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSettingResource",
    management_group_id="string",
    event_hub_authorization_rule_id="string",
    event_hub_name="string",
    logs=[{
        "enabled": False,
        "category": "string",
        "category_group": "string",
    }],
    marketplace_partner_id="string",
    name="string",
    service_bus_rule_id="string",
    storage_account_id="string",
    workspace_id="string")
Copy
const managementGroupDiagnosticSettingResource = new azure_native.monitor.ManagementGroupDiagnosticSetting("managementGroupDiagnosticSettingResource", {
    managementGroupId: "string",
    eventHubAuthorizationRuleId: "string",
    eventHubName: "string",
    logs: [{
        enabled: false,
        category: "string",
        categoryGroup: "string",
    }],
    marketplacePartnerId: "string",
    name: "string",
    serviceBusRuleId: "string",
    storageAccountId: "string",
    workspaceId: "string",
});
Copy
type: azure-native:monitor:ManagementGroupDiagnosticSetting
properties:
    eventHubAuthorizationRuleId: string
    eventHubName: string
    logs:
        - category: string
          categoryGroup: string
          enabled: false
    managementGroupId: string
    marketplacePartnerId: string
    name: string
    serviceBusRuleId: string
    storageAccountId: string
    workspaceId: string
Copy

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

ManagementGroupId
This property is required.
Changes to this property will trigger replacement.
string
The management group id.
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.Monitor.Inputs.ManagementGroupLogSettings>
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.
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
ManagementGroupId
This property is required.
Changes to this property will trigger replacement.
string
The management group id.
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 []ManagementGroupLogSettingsArgs
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.
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
managementGroupId
This property is required.
Changes to this property will trigger replacement.
String
The management group id.
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<ManagementGroupLogSettings>
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.
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
managementGroupId
This property is required.
Changes to this property will trigger replacement.
string
The management group id.
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 ManagementGroupLogSettings[]
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.
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
management_group_id
This property is required.
Changes to this property will trigger replacement.
str
The management group id.
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[ManagementGroupLogSettingsArgs]
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.
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
managementGroupId
This property is required.
Changes to this property will trigger replacement.
String
The management group id.
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.
marketplacePartnerId String
The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs.
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 ManagementGroupDiagnosticSetting 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

ManagementGroupLogSettings
, ManagementGroupLogSettingsArgs

Enabled This property is required. bool
a value indicating whether this log is enabled.
Category string
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
CategoryGroup string
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
Enabled This property is required. bool
a value indicating whether this log is enabled.
Category string
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
CategoryGroup string
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. Boolean
a value indicating whether this log is enabled.
category String
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
categoryGroup String
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. boolean
a value indicating whether this log is enabled.
category string
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
categoryGroup string
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. bool
a value indicating whether this log is enabled.
category str
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
category_group str
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. Boolean
a value indicating whether this log is enabled.
category String
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
categoryGroup String
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.

ManagementGroupLogSettingsResponse
, ManagementGroupLogSettingsResponseArgs

Enabled This property is required. bool
a value indicating whether this log is enabled.
Category string
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
CategoryGroup string
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
Enabled This property is required. bool
a value indicating whether this log is enabled.
Category string
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
CategoryGroup string
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. Boolean
a value indicating whether this log is enabled.
category String
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
categoryGroup String
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. boolean
a value indicating whether this log is enabled.
category string
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
categoryGroup string
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. bool
a value indicating whether this log is enabled.
category str
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
category_group str
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.
enabled This property is required. Boolean
a value indicating whether this log is enabled.
category String
Name of a Management Group Diagnostic Log category for a resource type this setting is applied to.
categoryGroup String
Name of a Management Group Diagnostic Log category group for a resource type this setting is applied to.

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:ManagementGroupDiagnosticSetting setting1 /providers/Microsoft.Management/managementGroups/{managementGroupId}/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