Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

DataCollectionRule

Manages a Data Collection Rule.

Example Usage

Coming soon!

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.operationalinsights.AnalyticsSolution;
import com.pulumi.azure.operationalinsights.AnalyticsSolutionArgs;
import com.pulumi.azure.operationalinsights.inputs.AnalyticsSolutionPlanArgs;
import com.pulumi.azure.monitoring.DataCollectionRule;
import com.pulumi.azure.monitoring.DataCollectionRuleArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDestinationsArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDestinationsAzureMonitorMetricsArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDataFlowArgs;
import com.pulumi.azure.monitoring.inputs.DataCollectionRuleDataSourcesArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .build());

        var exampleAnalyticsSolution = new AnalyticsSolution("exampleAnalyticsSolution", AnalyticsSolutionArgs.builder()        
            .solutionName("WindowsEventForwarding")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .workspaceResourceId(exampleAnalyticsWorkspace.id())
            .workspaceName(exampleAnalyticsWorkspace.name())
            .plan(AnalyticsSolutionPlanArgs.builder()
                .publisher("Microsoft")
                .product("OMSGallery/WindowsEventForwarding")
                .build())
            .build());

        var exampleDataCollectionRule = new DataCollectionRule("exampleDataCollectionRule", DataCollectionRuleArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .destinations(DataCollectionRuleDestinationsArgs.builder()
                .logAnalytics(DataCollectionRuleDestinationsLogAnalyticArgs.builder()
                    .workspaceResourceId(exampleAnalyticsWorkspace.id())
                    .name("test-destination-log")
                    .build())
                .azureMonitorMetrics(DataCollectionRuleDestinationsAzureMonitorMetricsArgs.builder()
                    .name("test-destination-metrics")
                    .build())
                .build())
            .dataFlows(            
                DataCollectionRuleDataFlowArgs.builder()
                    .streams("Microsoft-InsightsMetrics")
                    .destinations("test-destination-metrics")
                    .build(),
                DataCollectionRuleDataFlowArgs.builder()
                    .streams(                    
                        "Microsoft-InsightsMetrics",
                        "Microsoft-Syslog",
                        "Microsoft-Perf")
                    .destinations("test-destination-log")
                    .build())
            .dataSources(DataCollectionRuleDataSourcesArgs.builder()
                .syslogs(DataCollectionRuleDataSourcesSyslogArgs.builder()
                    .facilityNames("*")
                    .logLevels("*")
                    .name("test-datasource-syslog")
                    .build())
                .performanceCounters(DataCollectionRuleDataSourcesPerformanceCounterArgs.builder()
                    .streams(                    
                        "Microsoft-Perf",
                        "Microsoft-InsightsMetrics")
                    .samplingFrequencyInSeconds(10)
                    .counterSpecifiers("Processor(*)\\%% Processor Time")
                    .name("test-datasource-perfcounter")
                    .build())
                .windowsEventLogs(DataCollectionRuleDataSourcesWindowsEventLogArgs.builder()
                    .streams("Microsoft-WindowsEvent")
                    .xPathQueries("*[System/Level=1]")
                    .name("test-datasource-wineventlog")
                    .build())
                .extensions(DataCollectionRuleDataSourcesExtensionArgs.builder()
                    .streams("Microsoft-WindowsEvent")
                    .inputDataSources("test-datasource-wineventlog")
                    .extensionName("test-extension-name")
                    .extensionJson(serializeJson(
                        jsonObject(
                            jsonProperty("a", 1),
                            jsonProperty("b", "hello")
                        )))
                    .name("test-datasource-extension")
                    .build())
                .build())
            .description("data collection rule example")
            .tags(Map.of("foo", "bar"))
            .dependOn(exampleAnalyticsSolution)
            .build());

    }
}

Coming soon!

Coming soon!

resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAnalyticsWorkspace:
    type: azure:operationalinsights:AnalyticsWorkspace
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
  exampleAnalyticsSolution:
    type: azure:operationalinsights:AnalyticsSolution
    properties:
      solutionName: WindowsEventForwarding
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      workspaceResourceId: ${exampleAnalyticsWorkspace.id}
      workspaceName: ${exampleAnalyticsWorkspace.name}
      plan:
        publisher: Microsoft
        product: OMSGallery/WindowsEventForwarding
  exampleDataCollectionRule:
    type: azure:monitoring:DataCollectionRule
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      destinations:
        logAnalytics:
          - workspaceResourceId: ${exampleAnalyticsWorkspace.id}
            name: test-destination-log
        azureMonitorMetrics:
          name: test-destination-metrics
      dataFlows:
        - streams:
            - Microsoft-InsightsMetrics
          destinations:
            - test-destination-metrics
        - streams:
            - Microsoft-InsightsMetrics
            - Microsoft-Syslog
            - Microsoft-Perf
          destinations:
            - test-destination-log
      dataSources:
        syslogs:
          - facilityNames:
              - '*'
            logLevels:
              - '*'
            name: test-datasource-syslog
        performanceCounters:
          - streams:
              - Microsoft-Perf
              - Microsoft-InsightsMetrics
            samplingFrequencyInSeconds: 10
            counterSpecifiers:
              - Processor(*)\%% Processor Time
            name: test-datasource-perfcounter
        windowsEventLogs:
          - streams:
              - Microsoft-WindowsEvent
            xPathQueries:
              - '*[System/Level=1]'
            name: test-datasource-wineventlog
        extensions:
          - streams:
              - Microsoft-WindowsEvent
            inputDataSources:
              - test-datasource-wineventlog
            extensionName: test-extension-name
            extensionJson:
              Fn::ToJSON:
                a: 1
                b: hello
            name: test-datasource-extension
      description: data collection rule example
      tags:
        foo: bar
      dependOn:
        - ${exampleAnalyticsSolution}

Create a DataCollectionRule Resource

new DataCollectionRule(name: string, args: DataCollectionRuleArgs, opts?: CustomResourceOptions);
@overload
def DataCollectionRule(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       data_flows: Optional[Sequence[DataCollectionRuleDataFlowArgs]] = None,
                       data_sources: Optional[DataCollectionRuleDataSourcesArgs] = None,
                       description: Optional[str] = None,
                       destinations: Optional[DataCollectionRuleDestinationsArgs] = None,
                       kind: Optional[str] = None,
                       location: Optional[str] = None,
                       name: Optional[str] = None,
                       resource_group_name: Optional[str] = None,
                       tags: Optional[Mapping[str, str]] = None)
@overload
def DataCollectionRule(resource_name: str,
                       args: DataCollectionRuleArgs,
                       opts: Optional[ResourceOptions] = None)
func NewDataCollectionRule(ctx *Context, name string, args DataCollectionRuleArgs, opts ...ResourceOption) (*DataCollectionRule, error)
public DataCollectionRule(string name, DataCollectionRuleArgs args, CustomResourceOptions? opts = null)
public DataCollectionRule(String name, DataCollectionRuleArgs args)
public DataCollectionRule(String name, DataCollectionRuleArgs args, CustomResourceOptions options)
type: azure:monitoring:DataCollectionRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DataCollectionRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DataCollectionRuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DataCollectionRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataCollectionRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DataCollectionRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DataCollectionRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DataCollectionRule resource accepts the following input properties:

DataFlows List<DataCollectionRuleDataFlowArgs>

One or more data_flow blocks as defined below.

Destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

ResourceGroupName string

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

DataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

Description string

The description of the Data Collection Rule.

Kind string

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

Location string

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

Name string

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

Tags Dictionary<string, string>

A mapping of tags which should be assigned to the Data Collection Rule.

DataFlows []DataCollectionRuleDataFlowArgs

One or more data_flow blocks as defined below.

Destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

ResourceGroupName string

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

DataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

Description string

The description of the Data Collection Rule.

Kind string

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

Location string

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

Name string

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

Tags map[string]string

A mapping of tags which should be assigned to the Data Collection Rule.

dataFlows List<DataCollectionRuleDataFlowArgs>

One or more data_flow blocks as defined below.

destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

resourceGroupName String

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

dataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description String

The description of the Data Collection Rule.

kind String

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location String

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name String

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

tags Map<String,String>

A mapping of tags which should be assigned to the Data Collection Rule.

dataFlows DataCollectionRuleDataFlowArgs[]

One or more data_flow blocks as defined below.

destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

resourceGroupName string

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

dataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description string

The description of the Data Collection Rule.

kind string

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location string

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name string

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

tags {[key: string]: string}

A mapping of tags which should be assigned to the Data Collection Rule.

data_flows Sequence[DataCollectionRuleDataFlowArgs]

One or more data_flow blocks as defined below.

destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

resource_group_name str

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

data_sources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description str

The description of the Data Collection Rule.

kind str

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location str

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name str

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

tags Mapping[str, str]

A mapping of tags which should be assigned to the Data Collection Rule.

dataFlows List<Property Map>

One or more data_flow blocks as defined below.

destinations Property Map

A destinations block as defined below.

resourceGroupName String

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

dataSources Property Map

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description String

The description of the Data Collection Rule.

kind String

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location String

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name String

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

tags Map<String>

A mapping of tags which should be assigned to the Data Collection Rule.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataCollectionRule resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing DataCollectionRule Resource

Get an existing DataCollectionRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DataCollectionRuleState, opts?: CustomResourceOptions): DataCollectionRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        data_flows: Optional[Sequence[DataCollectionRuleDataFlowArgs]] = None,
        data_sources: Optional[DataCollectionRuleDataSourcesArgs] = None,
        description: Optional[str] = None,
        destinations: Optional[DataCollectionRuleDestinationsArgs] = None,
        kind: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> DataCollectionRule
func GetDataCollectionRule(ctx *Context, name string, id IDInput, state *DataCollectionRuleState, opts ...ResourceOption) (*DataCollectionRule, error)
public static DataCollectionRule Get(string name, Input<string> id, DataCollectionRuleState? state, CustomResourceOptions? opts = null)
public static DataCollectionRule get(String name, Output<String> id, DataCollectionRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DataFlows List<DataCollectionRuleDataFlowArgs>

One or more data_flow blocks as defined below.

DataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

Description string

The description of the Data Collection Rule.

Destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

Kind string

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

Location string

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

Name string

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

ResourceGroupName string

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

Tags Dictionary<string, string>

A mapping of tags which should be assigned to the Data Collection Rule.

DataFlows []DataCollectionRuleDataFlowArgs

One or more data_flow blocks as defined below.

DataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

Description string

The description of the Data Collection Rule.

Destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

Kind string

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

Location string

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

Name string

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

ResourceGroupName string

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

Tags map[string]string

A mapping of tags which should be assigned to the Data Collection Rule.

dataFlows List<DataCollectionRuleDataFlowArgs>

One or more data_flow blocks as defined below.

dataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description String

The description of the Data Collection Rule.

destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

kind String

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location String

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name String

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

resourceGroupName String

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

tags Map<String,String>

A mapping of tags which should be assigned to the Data Collection Rule.

dataFlows DataCollectionRuleDataFlowArgs[]

One or more data_flow blocks as defined below.

dataSources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description string

The description of the Data Collection Rule.

destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

kind string

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location string

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name string

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

resourceGroupName string

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

tags {[key: string]: string}

A mapping of tags which should be assigned to the Data Collection Rule.

data_flows Sequence[DataCollectionRuleDataFlowArgs]

One or more data_flow blocks as defined below.

data_sources DataCollectionRuleDataSourcesArgs

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description str

The description of the Data Collection Rule.

destinations DataCollectionRuleDestinationsArgs

A destinations block as defined below.

kind str

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location str

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name str

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

resource_group_name str

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

tags Mapping[str, str]

A mapping of tags which should be assigned to the Data Collection Rule.

dataFlows List<Property Map>

One or more data_flow blocks as defined below.

dataSources Property Map

A data_sources block as defined below. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint.

description String

The description of the Data Collection Rule.

destinations Property Map

A destinations block as defined below.

kind String

The kind of the Data Collection Rule. Possible values are Linux and Windows. A rule of kind Linux does not allow for windows_event_log data sources. And a rule of kind Windows does not allow for syslog data sources. If kind is not specified, all kinds of data sources are allowed.

location String

The Azure Region where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

name String

The name which should be used for this Data Collection Rule. Changing this forces a new Data Collection Rule to be created.

resourceGroupName String

The name of the Resource Group where the Data Collection Rule should exist. Changing this forces a new Data Collection Rule to be created.

tags Map<String>

A mapping of tags which should be assigned to the Data Collection Rule.

Supporting Types

DataCollectionRuleDataFlow

Destinations List<string>

Specifies a list of destination names. A azure_monitor_metrics data source only allows for stream of kind Microsoft-InsightsMetrics.

Streams List<string>

Specifies a list of streams. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

Destinations []string

Specifies a list of destination names. A azure_monitor_metrics data source only allows for stream of kind Microsoft-InsightsMetrics.

Streams []string

Specifies a list of streams. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

destinations List<String>

Specifies a list of destination names. A azure_monitor_metrics data source only allows for stream of kind Microsoft-InsightsMetrics.

streams List<String>

Specifies a list of streams. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

destinations string[]

Specifies a list of destination names. A azure_monitor_metrics data source only allows for stream of kind Microsoft-InsightsMetrics.

streams string[]

Specifies a list of streams. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

destinations Sequence[str]

Specifies a list of destination names. A azure_monitor_metrics data source only allows for stream of kind Microsoft-InsightsMetrics.

streams Sequence[str]

Specifies a list of streams. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

destinations List<String>

Specifies a list of destination names. A azure_monitor_metrics data source only allows for stream of kind Microsoft-InsightsMetrics.

streams List<String>

Specifies a list of streams. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

DataCollectionRuleDataSources

Extensions List<DataCollectionRuleDataSourcesExtension>

One or more extension blocks as defined below.

PerformanceCounters List<DataCollectionRuleDataSourcesPerformanceCounter>

One or more performance_counter blocks as defined below.

Syslogs List<DataCollectionRuleDataSourcesSyslog>

One or more syslog blocks as defined below.

WindowsEventLogs List<DataCollectionRuleDataSourcesWindowsEventLog>

One or more windows_event_log blocks as defined below.

Extensions []DataCollectionRuleDataSourcesExtension

One or more extension blocks as defined below.

PerformanceCounters []DataCollectionRuleDataSourcesPerformanceCounter

One or more performance_counter blocks as defined below.

Syslogs []DataCollectionRuleDataSourcesSyslog

One or more syslog blocks as defined below.

WindowsEventLogs []DataCollectionRuleDataSourcesWindowsEventLog

One or more windows_event_log blocks as defined below.

extensions List<DataCollectionRuleDataSourcesExtension>

One or more extension blocks as defined below.

performanceCounters List<DataCollectionRuleDataSourcesPerformanceCounter>

One or more performance_counter blocks as defined below.

syslogs List<DataCollectionRuleDataSourcesSyslog>

One or more syslog blocks as defined below.

windowsEventLogs List<DataCollectionRuleDataSourcesWindowsEventLog>

One or more windows_event_log blocks as defined below.

extensions DataCollectionRuleDataSourcesExtension[]

One or more extension blocks as defined below.

performanceCounters DataCollectionRuleDataSourcesPerformanceCounter[]

One or more performance_counter blocks as defined below.

syslogs DataCollectionRuleDataSourcesSyslog[]

One or more syslog blocks as defined below.

windowsEventLogs DataCollectionRuleDataSourcesWindowsEventLog[]

One or more windows_event_log blocks as defined below.

extensions Sequence[DataCollectionRuleDataSourcesExtension]

One or more extension blocks as defined below.

performance_counters Sequence[DataCollectionRuleDataSourcesPerformanceCounter]

One or more performance_counter blocks as defined below.

syslogs Sequence[DataCollectionRuleDataSourcesSyslog]

One or more syslog blocks as defined below.

windows_event_logs Sequence[DataCollectionRuleDataSourcesWindowsEventLog]

One or more windows_event_log blocks as defined below.

extensions List<Property Map>

One or more extension blocks as defined below.

performanceCounters List<Property Map>

One or more performance_counter blocks as defined below.

syslogs List<Property Map>

One or more syslog blocks as defined below.

windowsEventLogs List<Property Map>

One or more windows_event_log blocks as defined below.

DataCollectionRuleDataSourcesExtension

ExtensionName string

The name of the VM extension.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

Streams List<string>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

ExtensionJson string

A JSON String which specifies the extension setting.

InputDataSources List<string>

Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: performance_counter, windows_event_log,and syslog.

ExtensionName string

The name of the VM extension.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

Streams []string

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

ExtensionJson string

A JSON String which specifies the extension setting.

InputDataSources []string

Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: performance_counter, windows_event_log,and syslog.

extensionName String

The name of the VM extension.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams List<String>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

extensionJson String

A JSON String which specifies the extension setting.

inputDataSources List<String>

Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: performance_counter, windows_event_log,and syslog.

extensionName string

The name of the VM extension.

name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams string[]

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

extensionJson string

A JSON String which specifies the extension setting.

inputDataSources string[]

Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: performance_counter, windows_event_log,and syslog.

extension_name str

The name of the VM extension.

name str

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams Sequence[str]

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

extension_json str

A JSON String which specifies the extension setting.

input_data_sources Sequence[str]

Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: performance_counter, windows_event_log,and syslog.

extensionName String

The name of the VM extension.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams List<String>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event, Microsoft-InsightsMetrics, Microsoft-Perf, Microsoft-Syslog,and Microsoft-WindowsEvent.

extensionJson String

A JSON String which specifies the extension setting.

inputDataSources List<String>

Specifies a list of data sources this extension needs data from. An item should be a name of a supported data source which produces only one stream. Supported data sources type: performance_counter, windows_event_log,and syslog.

DataCollectionRuleDataSourcesPerformanceCounter

CounterSpecifiers List<string>

Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard * to collect counters for all instances. To get a list of performance counters on Windows, run the command typeperf.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

SamplingFrequencyInSeconds int

The number of seconds between consecutive counter measurements (samples). The value should be integer between 1 and 300 inclusive.

Streams List<string>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-InsightsMetrics,and Microsoft-Perf.

CounterSpecifiers []string

Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard * to collect counters for all instances. To get a list of performance counters on Windows, run the command typeperf.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

SamplingFrequencyInSeconds int

The number of seconds between consecutive counter measurements (samples). The value should be integer between 1 and 300 inclusive.

Streams []string

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-InsightsMetrics,and Microsoft-Perf.

counterSpecifiers List<String>

Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard * to collect counters for all instances. To get a list of performance counters on Windows, run the command typeperf.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

samplingFrequencyInSeconds Integer

The number of seconds between consecutive counter measurements (samples). The value should be integer between 1 and 300 inclusive.

streams List<String>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-InsightsMetrics,and Microsoft-Perf.

counterSpecifiers string[]

Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard * to collect counters for all instances. To get a list of performance counters on Windows, run the command typeperf.

name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

samplingFrequencyInSeconds number

The number of seconds between consecutive counter measurements (samples). The value should be integer between 1 and 300 inclusive.

streams string[]

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-InsightsMetrics,and Microsoft-Perf.

counter_specifiers Sequence[str]

Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard * to collect counters for all instances. To get a list of performance counters on Windows, run the command typeperf.

name str

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

sampling_frequency_in_seconds int

The number of seconds between consecutive counter measurements (samples). The value should be integer between 1 and 300 inclusive.

streams Sequence[str]

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-InsightsMetrics,and Microsoft-Perf.

counterSpecifiers List<String>

Specifies a list of specifier names of the performance counters you want to collect. Use a wildcard * to collect counters for all instances. To get a list of performance counters on Windows, run the command typeperf.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

samplingFrequencyInSeconds Number

The number of seconds between consecutive counter measurements (samples). The value should be integer between 1 and 300 inclusive.

streams List<String>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-InsightsMetrics,and Microsoft-Perf.

DataCollectionRuleDataSourcesSyslog

FacilityNames List<string>

Specifies a list of facility names. Use a wildcard * to collect logs for all facility names. Possible values are auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7,and *.

LogLevels List<string>

Specifies a list of log levels. Use a wildcard * to collect logs for all log levels. Possible values are Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency,and *.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

FacilityNames []string

Specifies a list of facility names. Use a wildcard * to collect logs for all facility names. Possible values are auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7,and *.

LogLevels []string

Specifies a list of log levels. Use a wildcard * to collect logs for all log levels. Possible values are Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency,and *.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

facilityNames List<String>

Specifies a list of facility names. Use a wildcard * to collect logs for all facility names. Possible values are auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7,and *.

logLevels List<String>

Specifies a list of log levels. Use a wildcard * to collect logs for all log levels. Possible values are Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency,and *.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

facilityNames string[]

Specifies a list of facility names. Use a wildcard * to collect logs for all facility names. Possible values are auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7,and *.

logLevels string[]

Specifies a list of log levels. Use a wildcard * to collect logs for all log levels. Possible values are Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency,and *.

name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

facility_names Sequence[str]

Specifies a list of facility names. Use a wildcard * to collect logs for all facility names. Possible values are auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7,and *.

log_levels Sequence[str]

Specifies a list of log levels. Use a wildcard * to collect logs for all log levels. Possible values are Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency,and *.

name str

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

facilityNames List<String>

Specifies a list of facility names. Use a wildcard * to collect logs for all facility names. Possible values are auth, authpriv, cron, daemon, kern, lpr, mail, mark, news, syslog, user, uucp, local0, local1, local2, local3, local4, local5, local6, local7,and *.

logLevels List<String>

Specifies a list of log levels. Use a wildcard * to collect logs for all log levels. Possible values are Debug, Info, Notice, Warning, Error, Critical, Alert, Emergency,and *.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

DataCollectionRuleDataSourcesWindowsEventLog

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

Streams List<string>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event,and Microsoft-WindowsEvent.

XPathQueries List<string>

Specifies a list of Windows Event Log queries in XPath expression.

Name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

Streams []string

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event,and Microsoft-WindowsEvent.

XPathQueries []string

Specifies a list of Windows Event Log queries in XPath expression.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams List<String>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event,and Microsoft-WindowsEvent.

xPathQueries List<String>

Specifies a list of Windows Event Log queries in XPath expression.

name string

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams string[]

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event,and Microsoft-WindowsEvent.

xPathQueries string[]

Specifies a list of Windows Event Log queries in XPath expression.

name str

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams Sequence[str]

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event,and Microsoft-WindowsEvent.

x_path_queries Sequence[str]

Specifies a list of Windows Event Log queries in XPath expression.

name String

The name which should be used for this data source. This name should be unique across all data sources regardless of type within the Data Collection Rule.

streams List<String>

Specifies a list of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. Possible values are Microsoft-Event,and Microsoft-WindowsEvent.

xPathQueries List<String>

Specifies a list of Windows Event Log queries in XPath expression.

DataCollectionRuleDestinations

AzureMonitorMetrics DataCollectionRuleDestinationsAzureMonitorMetrics

A azure_monitor_metrics block as defined above.

LogAnalytics List<DataCollectionRuleDestinationsLogAnalytic>

One or more log_analytics blocks as defined below.

AzureMonitorMetrics DataCollectionRuleDestinationsAzureMonitorMetrics

A azure_monitor_metrics block as defined above.

LogAnalytics []DataCollectionRuleDestinationsLogAnalytic

One or more log_analytics blocks as defined below.

azureMonitorMetrics DataCollectionRuleDestinationsAzureMonitorMetrics

A azure_monitor_metrics block as defined above.

logAnalytics List<DataCollectionRuleDestinationsLogAnalytic>

One or more log_analytics blocks as defined below.

azureMonitorMetrics DataCollectionRuleDestinationsAzureMonitorMetrics

A azure_monitor_metrics block as defined above.

logAnalytics DataCollectionRuleDestinationsLogAnalytic[]

One or more log_analytics blocks as defined below.

azure_monitor_metrics DataCollectionRuleDestinationsAzureMonitorMetrics

A azure_monitor_metrics block as defined above.

log_analytics Sequence[DataCollectionRuleDestinationsLogAnalytic]

One or more log_analytics blocks as defined below.

azureMonitorMetrics Property Map

A azure_monitor_metrics block as defined above.

logAnalytics List<Property Map>

One or more log_analytics blocks as defined below.

DataCollectionRuleDestinationsAzureMonitorMetrics

Name string

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

Name string

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

name String

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

name string

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

name str

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

name String

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

DataCollectionRuleDestinationsLogAnalytic

Name string

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

WorkspaceResourceId string

The ID of a Log Analytic Workspace resource.

Name string

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

WorkspaceResourceId string

The ID of a Log Analytic Workspace resource.

name String

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

workspaceResourceId String

The ID of a Log Analytic Workspace resource.

name string

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

workspaceResourceId string

The ID of a Log Analytic Workspace resource.

name str

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

workspace_resource_id str

The ID of a Log Analytic Workspace resource.

name String

The name which should be used for this destination. This name should be unique across all destinations regardless of type within the Data Collection Rule.

workspaceResourceId String

The ID of a Log Analytic Workspace resource.

Import

Data Collection Rules can be imported using the resource id, e.g.

 $ pulumi import azure:monitoring/dataCollectionRule:DataCollectionRule example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Insights/dataCollectionRules/rule1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.