Watchlist

class Watchlist : KotlinCustomResource

Represents a Watchlist in Azure Security Insights. Uses Azure REST API version 2023-02-01. In version 1.x of the Azure Native provider, it used API version 2021-03-01-preview. Other available API versions: 2019-01-01-preview, 2021-03-01-preview, 2021-04-01, 2021-10-01-preview, 2022-01-01-preview, 2023-06-01-preview, 2023-07-01-preview, 2023-08-01-preview, 2023-09-01-preview, 2023-10-01-preview, 2023-11-01, 2023-12-01-preview, 2024-01-01-preview, 2024-03-01, 2024-04-01-preview, 2024-09-01, 2024-10-01-preview, 2025-01-01-preview, 2025-03-01.

Example Usage

Create or update a watchlist and bulk creates watchlist items.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var watchlist = new AzureNative.SecurityInsights.Watchlist("watchlist", new()
{
ContentType = "text/csv",
Description = "Watchlist from CSV content",
DisplayName = "High Value Assets Watchlist",
ItemsSearchKey = "header1",
NumberOfLinesToSkip = 1,
Provider = "Microsoft",
RawContent = @"This line will be skipped
header1,header2
value1,value2",
ResourceGroupName = "myRg",
Source = AzureNative.SecurityInsights.Source.Local_file,
WatchlistAlias = "highValueAsset",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewWatchlist(ctx, "watchlist", &securityinsights.WatchlistArgs{
ContentType: pulumi.String("text/csv"),
Description: pulumi.String("Watchlist from CSV content"),
DisplayName: pulumi.String("High Value Assets Watchlist"),
ItemsSearchKey: pulumi.String("header1"),
NumberOfLinesToSkip: pulumi.Int(1),
Provider: pulumi.String("Microsoft"),
RawContent: pulumi.String("This line will be skipped\nheader1,header2\nvalue1,value2"),
ResourceGroupName: pulumi.String("myRg"),
Source: pulumi.String(securityinsights.Source_Local_file),
WatchlistAlias: pulumi.String("highValueAsset"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.securityinsights.Watchlist;
import com.pulumi.azurenative.securityinsights.WatchlistArgs;
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 watchlist = new Watchlist("watchlist", WatchlistArgs.builder()
.contentType("text/csv")
.description("Watchlist from CSV content")
.displayName("High Value Assets Watchlist")
.itemsSearchKey("header1")
.numberOfLinesToSkip(1)
.provider("Microsoft")
.rawContent("""
This line will be skipped
header1,header2
value1,value2 """)
.resourceGroupName("myRg")
.source("Local file")
.watchlistAlias("highValueAsset")
.workspaceName("myWorkspace")
.build());
}
}

Create or update a watchlist.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var watchlist = new AzureNative.SecurityInsights.Watchlist("watchlist", new()
{
Description = "Watchlist from CSV content",
DisplayName = "High Value Assets Watchlist",
ItemsSearchKey = "header1",
Provider = "Microsoft",
ResourceGroupName = "myRg",
Source = AzureNative.SecurityInsights.Source.Local_file,
WatchlistAlias = "highValueAsset",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := securityinsights.NewWatchlist(ctx, "watchlist", &securityinsights.WatchlistArgs{
Description: pulumi.String("Watchlist from CSV content"),
DisplayName: pulumi.String("High Value Assets Watchlist"),
ItemsSearchKey: pulumi.String("header1"),
Provider: pulumi.String("Microsoft"),
ResourceGroupName: pulumi.String("myRg"),
Source: pulumi.String(securityinsights.Source_Local_file),
WatchlistAlias: pulumi.String("highValueAsset"),
WorkspaceName: pulumi.String("myWorkspace"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.securityinsights.Watchlist;
import com.pulumi.azurenative.securityinsights.WatchlistArgs;
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 watchlist = new Watchlist("watchlist", WatchlistArgs.builder()
.description("Watchlist from CSV content")
.displayName("High Value Assets Watchlist")
.itemsSearchKey("header1")
.provider("Microsoft")
.resourceGroupName("myRg")
.source("Local file")
.watchlistAlias("highValueAsset")
.workspaceName("myWorkspace")
.build());
}
}

Import

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

$ pulumi import azure-native:securityinsights:Watchlist highValueAsset /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias}

Properties

Link copied to clipboard
val contentType: Output<String>?

The content type of the raw content. For now, only text/csv is valid

Link copied to clipboard
val created: Output<String>?

The time the watchlist was created

Link copied to clipboard

Describes a user that created the watchlist

Link copied to clipboard
val defaultDuration: Output<String>?

The default duration of a watchlist (in ISO 8601 duration format)

Link copied to clipboard
val description: Output<String>?

A description of the watchlist

Link copied to clipboard
val displayName: Output<String>

The display name of the watchlist

Link copied to clipboard
val etag: Output<String>?

Etag of the azure resource

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val isDeleted: Output<Boolean>?

A flag that indicates if the watchlist is deleted or not

Link copied to clipboard
val itemsSearchKey: Output<String>

The search key is used to optimize query performance when using watchlists for joins with other data. For example, enable a column with IP addresses to be the designated SearchKey field, then use this field as the key field when joining to other event data by IP address.

Link copied to clipboard
val labels: Output<List<String>>?

List of labels relevant to this watchlist

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val numberOfLinesToSkip: Output<Int>?

The number of lines in a csv content to skip before the header

Link copied to clipboard
val provider: Output<String>

The provider of the watchlist

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val rawContent: Output<String>?

The raw content that represents to watchlist items to create. Example : This line will be skipped header1,header2 value1,value2

Link copied to clipboard
val source: Output<String>

The source of the watchlist

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val tenantId: Output<String>?

The tenantId where the watchlist belongs to

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val updated: Output<String>?

The last time the watchlist was updated

Link copied to clipboard

Describes a user that updated the watchlist

Link copied to clipboard
val uploadStatus: Output<String>?

The status of the Watchlist upload : New, InProgress or Complete. Note : When a Watchlist upload status is InProgress, the Watchlist cannot be deleted

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val watchlistAlias: Output<String>?

The alias of the watchlist

Link copied to clipboard
val watchlistId: Output<String>?

The id (a Guid) of the watchlist

Link copied to clipboard
val watchlistType: Output<String>?

The type of the watchlist