Watchlist Args
Represents a Watchlist in Azure Security Insights. API Version: 2021-03-01-preview.
Example Usage
Creates or updates 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,
OperationalInsightsResourceProvider = "Microsoft.OperationalInsights",
Provider = "Microsoft",
RawContent = @"This line will be skipped
header1,header2
value1,value2",
ResourceGroupName = "myRg",
Source = "Local file",
WatchlistAlias = "highValueAsset",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights"
"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),
OperationalInsightsResourceProvider: pulumi.String("Microsoft.OperationalInsights"),
Provider: pulumi.String("Microsoft"),
RawContent: pulumi.String("This line will be skipped\nheader1,header2\nvalue1,value2"),
ResourceGroupName: pulumi.String("myRg"),
Source: pulumi.String("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)
.operationalInsightsResourceProvider("Microsoft.OperationalInsights")
.provider("Microsoft")
.rawContent("""
This line will be skipped
header1,header2
value1,value2 """)
.resourceGroupName("myRg")
.source("Local file")
.watchlistAlias("highValueAsset")
.workspaceName("myWorkspace")
.build());
}
}
Creates or updates 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",
OperationalInsightsResourceProvider = "Microsoft.OperationalInsights",
Provider = "Microsoft",
ResourceGroupName = "myRg",
Source = "Local file",
WatchlistAlias = "highValueAsset",
WorkspaceName = "myWorkspace",
});
});
package main
import (
securityinsights "github.com/pulumi/pulumi-azure-native-sdk/securityinsights"
"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"),
OperationalInsightsResourceProvider: pulumi.String("Microsoft.OperationalInsights"),
Provider: pulumi.String("Microsoft"),
ResourceGroupName: pulumi.String("myRg"),
Source: pulumi.String("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")
.operationalInsightsResourceProvider("Microsoft.OperationalInsights")
.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/d0cfe6b2-9ac0-4464-9919-dccaee2e48c0/resourceGroups/myRg/providers/Microsoft.OperationalIinsights/workspaces/myWorkspace/providers/Microsoft.SecurityInsights/watchlists/highValueAsset
Constructors
Properties
The content type of the raw content. Example : text/csv or text/tsv
Describes a user that created the watchlist
The default duration of a watchlist (in ISO 8601 duration format)
A description of the watchlist
The display name of the watchlist
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.
The number of lines in a csv/tsv content to skip before the header
The namespace of workspaces resource provider- Microsoft.OperationalInsights.
The raw content that represents to watchlist items to create. In case of csv/tsv content type, it's the content of the file that will parsed by the endpoint
The name of the resource group. The name is case insensitive.
Describes a user that updated the watchlist
The status of the Watchlist upload : New, InProgress or Complete. Pls note : When a Watchlist upload status is equal to InProgress, the Watchlist cannot be deleted
The alias of the watchlist
The id (a Guid) of the watchlist
The number of Watchlist Items in the Watchlist
The type of the watchlist
The name of the workspace.