DataExportRuleArgs

data class DataExportRuleArgs(val destinationResourceId: Output<String>? = null, val enabled: Output<Boolean>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tableNames: Output<List<String>>? = null, val workspaceResourceId: Output<String>? = null) : ConvertibleToJava<DataExportRuleArgs>

Manages a Log Analytics Data Export Rule.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspace;
import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.loganalytics.DataExportRule;
import com.pulumi.azure.loganalytics.DataExportRuleArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
.name("exampleworkspace")
.location(example.location())
.resourceGroupName(example.name())
.sku("PerGB2018")
.retentionInDays(30)
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplestoracc")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleDataExportRule = new DataExportRule("exampleDataExportRule", DataExportRuleArgs.builder()
.name("dataExport1")
.resourceGroupName(example.name())
.workspaceResourceId(exampleAnalyticsWorkspace.id())
.destinationResourceId(exampleAccount.id())
.tableNames("Heartbeat")
.enabled(true)
.build());
}
}

Import

Log Analytics Data Export Rule can be imported using the resource id, e.g.

$ pulumi import azure:loganalytics/dataExportRule:DataExportRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataExports/dataExport1

Constructors

Link copied to clipboard
fun DataExportRuleArgs(destinationResourceId: Output<String>? = null, enabled: Output<Boolean>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, tableNames: Output<List<String>>? = null, workspaceResourceId: Output<String>? = null)

Functions

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

Properties

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

The destination resource ID. It should be a storage account, an event hub namespace or an event hub. If the destination is an event hub namespace, an event hub would be created for each table automatically.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Is this Log Analytics Data Export Rule enabled? Possible values include true or false. Defaults to false.

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

The name of the Log Analytics Data Export Rule. Changing this forces a new Log Analytics Data Export Rule to be created.

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

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

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

A list of table names to export to the destination resource, for example: ["Heartbeat", "SecurityEvent"].

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

The resource ID of the workspace. Changing this forces a new Log Analytics Data Export Rule to be created.