All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.securityinsights.Watchlist Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** 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.azurenative.securityinsights;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.securityinsights.WatchlistArgs;
import com.pulumi.azurenative.securityinsights.outputs.SystemDataResponse;
import com.pulumi.azurenative.securityinsights.outputs.WatchlistUserInfoResponse;
import com.pulumi.core.Alias;
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.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Represents a Watchlist in Azure Security Insights.
 * Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 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.
 * 
 * ## Example Usage
 * ### Create or update a watchlist and bulk creates watchlist items.
 * 
 * 
 * {@code
 * 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. * *
 * {@code
 * 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. * * ```sh * $ pulumi import azure-native:securityinsights:Watchlist highValueAsset /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/watchlists/{watchlistAlias} * ``` * */ @ResourceType(type="azure-native:securityinsights:Watchlist") public class Watchlist extends com.pulumi.resources.CustomResource { /** * The content type of the raw content. For now, only text/csv is valid * */ @Export(name="contentType", refs={String.class}, tree="[0]") private Output contentType; /** * @return The content type of the raw content. For now, only text/csv is valid * */ public Output> contentType() { return Codegen.optional(this.contentType); } /** * The time the watchlist was created * */ @Export(name="created", refs={String.class}, tree="[0]") private Output created; /** * @return The time the watchlist was created * */ public Output> created() { return Codegen.optional(this.created); } /** * Describes a user that created the watchlist * */ @Export(name="createdBy", refs={WatchlistUserInfoResponse.class}, tree="[0]") private Output createdBy; /** * @return Describes a user that created the watchlist * */ public Output> createdBy() { return Codegen.optional(this.createdBy); } /** * The default duration of a watchlist (in ISO 8601 duration format) * */ @Export(name="defaultDuration", refs={String.class}, tree="[0]") private Output defaultDuration; /** * @return The default duration of a watchlist (in ISO 8601 duration format) * */ public Output> defaultDuration() { return Codegen.optional(this.defaultDuration); } /** * A description of the watchlist * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return A description of the watchlist * */ public Output> description() { return Codegen.optional(this.description); } /** * The display name of the watchlist * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return The display name of the watchlist * */ public Output displayName() { return this.displayName; } /** * Etag of the azure resource * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return Etag of the azure resource * */ public Output> etag() { return Codegen.optional(this.etag); } /** * A flag that indicates if the watchlist is deleted or not * */ @Export(name="isDeleted", refs={Boolean.class}, tree="[0]") private Output isDeleted; /** * @return A flag that indicates if the watchlist is deleted or not * */ public Output> isDeleted() { return Codegen.optional(this.isDeleted); } /** * 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. * */ @Export(name="itemsSearchKey", refs={String.class}, tree="[0]") private Output itemsSearchKey; /** * @return 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. * */ public Output itemsSearchKey() { return this.itemsSearchKey; } /** * List of labels relevant to this watchlist * */ @Export(name="labels", refs={List.class,String.class}, tree="[0,1]") private Output> labels; /** * @return List of labels relevant to this watchlist * */ public Output>> labels() { return Codegen.optional(this.labels); } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * The number of lines in a csv content to skip before the header * */ @Export(name="numberOfLinesToSkip", refs={Integer.class}, tree="[0]") private Output numberOfLinesToSkip; /** * @return The number of lines in a csv content to skip before the header * */ public Output> numberOfLinesToSkip() { return Codegen.optional(this.numberOfLinesToSkip); } /** * The provider of the watchlist * */ @Export(name="provider", refs={String.class}, tree="[0]") private Output provider; /** * @return The provider of the watchlist * */ public Output provider() { return this.provider; } /** * The raw content that represents to watchlist items to create. Example : This line will be skipped * header1,header2 * value1,value2 * */ @Export(name="rawContent", refs={String.class}, tree="[0]") private Output rawContent; /** * @return The raw content that represents to watchlist items to create. Example : This line will be skipped * header1,header2 * value1,value2 * */ public Output> rawContent() { return Codegen.optional(this.rawContent); } /** * The source of the watchlist * */ @Export(name="source", refs={String.class}, tree="[0]") private Output source; /** * @return The source of the watchlist * */ public Output source() { return this.source; } /** * Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ public Output systemData() { return this.systemData; } /** * The tenantId where the watchlist belongs to * */ @Export(name="tenantId", refs={String.class}, tree="[0]") private Output tenantId; /** * @return The tenantId where the watchlist belongs to * */ public Output> tenantId() { return Codegen.optional(this.tenantId); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * The last time the watchlist was updated * */ @Export(name="updated", refs={String.class}, tree="[0]") private Output updated; /** * @return The last time the watchlist was updated * */ public Output> updated() { return Codegen.optional(this.updated); } /** * Describes a user that updated the watchlist * */ @Export(name="updatedBy", refs={WatchlistUserInfoResponse.class}, tree="[0]") private Output updatedBy; /** * @return Describes a user that updated the watchlist * */ public Output> updatedBy() { return Codegen.optional(this.updatedBy); } /** * The status of the Watchlist upload : New, InProgress or Complete. **Note** : When a Watchlist upload status is InProgress, the Watchlist cannot be deleted * */ @Export(name="uploadStatus", refs={String.class}, tree="[0]") private Output uploadStatus; /** * @return The status of the Watchlist upload : New, InProgress or Complete. **Note** : When a Watchlist upload status is InProgress, the Watchlist cannot be deleted * */ public Output> uploadStatus() { return Codegen.optional(this.uploadStatus); } /** * The alias of the watchlist * */ @Export(name="watchlistAlias", refs={String.class}, tree="[0]") private Output watchlistAlias; /** * @return The alias of the watchlist * */ public Output> watchlistAlias() { return Codegen.optional(this.watchlistAlias); } /** * The id (a Guid) of the watchlist * */ @Export(name="watchlistId", refs={String.class}, tree="[0]") private Output watchlistId; /** * @return The id (a Guid) of the watchlist * */ public Output> watchlistId() { return Codegen.optional(this.watchlistId); } /** * The type of the watchlist * */ @Export(name="watchlistType", refs={String.class}, tree="[0]") private Output watchlistType; /** * @return The type of the watchlist * */ public Output> watchlistType() { return Codegen.optional(this.watchlistType); } /** * * @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-native:securityinsights:Watchlist", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Watchlist(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:securityinsights:Watchlist", name, null, 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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:securityinsights/v20190101preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20210301preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20210401:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20210901preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20211001:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20211001preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220101preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220401preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220501preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220601preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220701preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220801:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220801preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20220901preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20221001preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20221101:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20221101preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20221201preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230201:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230201preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230301preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230401preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230501preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230601preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230701preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230801preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20230901preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20231001preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20231101:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20231201preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20240101preview:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20240301:Watchlist").build()), Output.of(Alias.builder().type("azure-native:securityinsights/v20240401preview:Watchlist").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static Watchlist get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Watchlist(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy