com.pulumi.azure.sentinel.Watchlist Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azure.sentinel;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.sentinel.WatchlistArgs;
import com.pulumi.azure.sentinel.inputs.WatchlistState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Sentinel Watchlist.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* 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.sentinel.LogAnalyticsWorkspaceOnboarding;
* import com.pulumi.azure.sentinel.LogAnalyticsWorkspaceOnboardingArgs;
* import com.pulumi.azure.sentinel.Watchlist;
* import com.pulumi.azure.sentinel.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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-rg")
* .location("West Europe")
* .build());
*
* var exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
* .name("example-workspace")
* .location(example.location())
* .resourceGroupName(example.name())
* .sku("PerGB2018")
* .build());
*
* var exampleLogAnalyticsWorkspaceOnboarding = new LogAnalyticsWorkspaceOnboarding("exampleLogAnalyticsWorkspaceOnboarding", LogAnalyticsWorkspaceOnboardingArgs.builder()
* .workspaceId(exampleAnalyticsWorkspace.id())
* .build());
*
* var exampleWatchlist = new Watchlist("exampleWatchlist", WatchlistArgs.builder()
* .name("example-watchlist")
* .logAnalyticsWorkspaceId(exampleLogAnalyticsWorkspaceOnboarding.workspaceId())
* .displayName("example-wl")
* .itemSearchKey("Key")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Sentinel Watchlists can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:sentinel/watchlist:Watchlist example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.OperationalInsights/workspaces/workspace1/providers/Microsoft.SecurityInsights/watchlists/list1
* ```
*
*/
@ResourceType(type="azure:sentinel/watchlist:Watchlist")
public class Watchlist extends com.pulumi.resources.CustomResource {
/**
* The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="defaultDuration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> defaultDuration;
/**
* @return The default duration in ISO8601 duration form of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output> defaultDuration() {
return Codegen.optional(this.defaultDuration);
}
/**
* The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="displayName", refs={String.class}, tree="[0]")
private Output displayName;
/**
* @return The display name of this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output displayName() {
return this.displayName;
}
/**
* The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="itemSearchKey", refs={String.class}, tree="[0]")
private Output itemSearchKey;
/**
* @return The key used to optimize query performance when using Watchlist for joins with other data. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output itemSearchKey() {
return this.itemSearchKey;
}
/**
* Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="labels", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> labels;
/**
* @return Specifies a list of labels related to this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output>> labels() {
return Codegen.optional(this.labels);
}
/**
* The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="logAnalyticsWorkspaceId", refs={String.class}, tree="[0]")
private Output logAnalyticsWorkspaceId;
/**
* @return The ID of the Log Analytics Workspace where this Sentinel Watchlist resides in. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output logAnalyticsWorkspaceId() {
return this.logAnalyticsWorkspaceId;
}
/**
* The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Sentinel Watchlist. Changing this forces a new Sentinel Watchlist to be created.
*
*/
public Output name() {
return this.name;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Watchlist(java.lang.String name) {
this(name, WatchlistArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Watchlist(java.lang.String name, WatchlistArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Watchlist(java.lang.String name, WatchlistArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:sentinel/watchlist:Watchlist", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Watchlist(java.lang.String name, Output id, @Nullable WatchlistState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:sentinel/watchlist:Watchlist", name, state, makeResourceOptions(options, id), false);
}
private static WatchlistArgs makeArgs(WatchlistArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? WatchlistArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static Watchlist get(java.lang.String name, Output id, @Nullable WatchlistState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Watchlist(name, id, state, options);
}
}