com.pulumi.azure.loganalytics.kotlin.DataSourceWindowsEventArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.loganalytics.kotlin
import com.pulumi.azure.loganalytics.DataSourceWindowsEventArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages a Log Analytics Windows Event DataSource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
* name: "example-law",
* location: example.location,
* resourceGroupName: example.name,
* sku: "PerGB2018",
* });
* const exampleDataSourceWindowsEvent = new azure.loganalytics.DataSourceWindowsEvent("example", {
* name: "example-lad-wpc",
* resourceGroupName: example.name,
* workspaceName: exampleAnalyticsWorkspace.name,
* eventLogName: "Application",
* eventTypes: ["Error"],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
* name="example-law",
* location=example.location,
* resource_group_name=example.name,
* sku="PerGB2018")
* example_data_source_windows_event = azure.loganalytics.DataSourceWindowsEvent("example",
* name="example-lad-wpc",
* resource_group_name=example.name,
* workspace_name=example_analytics_workspace.name,
* event_log_name="Application",
* event_types=["Error"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
* {
* Name = "example-law",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Sku = "PerGB2018",
* });
* var exampleDataSourceWindowsEvent = new Azure.LogAnalytics.DataSourceWindowsEvent("example", new()
* {
* Name = "example-lad-wpc",
* ResourceGroupName = example.Name,
* WorkspaceName = exampleAnalyticsWorkspace.Name,
* EventLogName = "Application",
* EventTypes = new[]
* {
* "Error",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/loganalytics"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
* Name: pulumi.String("example-law"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Sku: pulumi.String("PerGB2018"),
* })
* if err != nil {
* return err
* }
* _, err = loganalytics.NewDataSourceWindowsEvent(ctx, "example", &loganalytics.DataSourceWindowsEventArgs{
* Name: pulumi.String("example-lad-wpc"),
* ResourceGroupName: example.Name,
* WorkspaceName: exampleAnalyticsWorkspace.Name,
* EventLogName: pulumi.String("Application"),
* EventTypes: pulumi.StringArray{
* pulumi.String("Error"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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.loganalytics.DataSourceWindowsEvent;
* import com.pulumi.azure.loganalytics.DataSourceWindowsEventArgs;
* 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("example-law")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("PerGB2018")
* .build());
* var exampleDataSourceWindowsEvent = new DataSourceWindowsEvent("exampleDataSourceWindowsEvent", DataSourceWindowsEventArgs.builder()
* .name("example-lad-wpc")
* .resourceGroupName(example.name())
* .workspaceName(exampleAnalyticsWorkspace.name())
* .eventLogName("Application")
* .eventTypes("Error")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleAnalyticsWorkspace:
* type: azure:operationalinsights:AnalyticsWorkspace
* name: example
* properties:
* name: example-law
* location: ${example.location}
* resourceGroupName: ${example.name}
* sku: PerGB2018
* exampleDataSourceWindowsEvent:
* type: azure:loganalytics:DataSourceWindowsEvent
* name: example
* properties:
* name: example-lad-wpc
* resourceGroupName: ${example.name}
* workspaceName: ${exampleAnalyticsWorkspace.name}
* eventLogName: Application
* eventTypes:
* - Error
* ```
*
* ## Import
* Log Analytics Windows Event DataSources can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:loganalytics/dataSourceWindowsEvent:DataSourceWindowsEvent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.OperationalInsights/workspaces/workspace1/dataSources/datasource1
* ```
* @property eventLogName Specifies the name of the Windows Event Log to collect events from.
* @property eventTypes Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
* @property name The name which should be used for this Log Analytics Windows Event DataSource. Changing this forces a new Log Analytics Windows Event DataSource to be created.
* @property resourceGroupName The name of the Resource Group where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
* @property workspaceName The name of the Log Analytics Workspace where the Log Analytics Windows Event DataSource should exist. Changing this forces a new Log Analytics Windows Event DataSource to be created.
*/
public data class DataSourceWindowsEventArgs(
public val eventLogName: Output? = null,
public val eventTypes: Output>? = null,
public val name: Output? = null,
public val resourceGroupName: Output? = null,
public val workspaceName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.loganalytics.DataSourceWindowsEventArgs =
com.pulumi.azure.loganalytics.DataSourceWindowsEventArgs.builder()
.eventLogName(eventLogName?.applyValue({ args0 -> args0 }))
.eventTypes(eventTypes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.name(name?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DataSourceWindowsEventArgs].
*/
@PulumiTagMarker
public class DataSourceWindowsEventArgsBuilder internal constructor() {
private var eventLogName: Output? = null
private var eventTypes: Output>? = null
private var name: Output? = null
private var resourceGroupName: Output? = null
private var workspaceName: Output? = null
/**
* @param value Specifies the name of the Windows Event Log to collect events from.
*/
@JvmName("hmctulilavkptocq")
public suspend fun eventLogName(`value`: Output) {
this.eventLogName = value
}
/**
* @param value Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
*/
@JvmName("vltrugtesolryitd")
public suspend fun eventTypes(`value`: Output>) {
this.eventTypes = value
}
@JvmName("agoicgtryehexjdy")
public suspend fun eventTypes(vararg values: Output) {
this.eventTypes = Output.all(values.asList())
}
/**
* @param values Specifies an array of event types applied to the specified event log. Possible values include `Error`, `Warning` and `Information`.
*/
@JvmName("cmacjcfbdbirygjn")
public suspend fun eventTypes(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy