com.pulumi.azurenative.securityinsights.ContentTemplate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.ContentTemplateArgs;
import com.pulumi.azurenative.securityinsights.outputs.MetadataAuthorResponse;
import com.pulumi.azurenative.securityinsights.outputs.MetadataCategoriesResponse;
import com.pulumi.azurenative.securityinsights.outputs.MetadataDependenciesResponse;
import com.pulumi.azurenative.securityinsights.outputs.MetadataSourceResponse;
import com.pulumi.azurenative.securityinsights.outputs.MetadataSupportResponse;
import com.pulumi.azurenative.securityinsights.outputs.SystemDataResponse;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Template resource definition.
* Azure REST API version: 2023-06-01-preview.
*
* Other available API versions: 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
* ### Get a template.
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.securityinsights.ContentTemplate;
* import com.pulumi.azurenative.securityinsights.ContentTemplateArgs;
* import com.pulumi.azurenative.securityinsights.inputs.MetadataAuthorArgs;
* import com.pulumi.azurenative.securityinsights.inputs.MetadataSourceArgs;
* import com.pulumi.azurenative.securityinsights.inputs.MetadataSupportArgs;
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* var contentTemplate = new ContentTemplate("contentTemplate", ContentTemplateArgs.builder()
* .author(MetadataAuthorArgs.builder()
* .email("support}{@literal @}{@code microsoft.com")
* .name("Microsoft")
* .build())
* .contentId("8365ebfe-a381-45b7-ad08-7d818070e11f")
* .contentKind("AnalyticsRule")
* .displayName("API Protection workbook template")
* .mainTemplate(Map.ofEntries(
* Map.entry("$schema", "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#"),
* Map.entry("contentVersion", "1.0.1"),
* Map.entry("resources",
* Map.ofEntries(
* Map.entry("apiVersion", "2022-04-01-preview"),
* Map.entry("kind", "Scheduled"),
* Map.entry("location", "[parameters('workspace-location')]"),
* Map.entry("name", "8365ebfe-a381-45b7-ad08-7d818070e11f"),
* Map.entry("properties", Map.ofEntries(
* Map.entry("description", "Creates an incident when a large number of Critical/High severity CrowdStrike Falcon sensor detections is triggered by a single user"),
* Map.entry("displayName", "Critical or High Severity Detections by User"),
* Map.entry("enabled", false),
* Map.entry("query", "..."),
* Map.entry("queryFrequency", "PT1H"),
* Map.entry("queryPeriod", "PT1H"),
* Map.entry("severity", "High"),
* Map.entry("status", "Available"),
* Map.entry("suppressionDuration", "PT1H"),
* Map.entry("suppressionEnabled", false),
* Map.entry("triggerOperator", "GreaterThan"),
* Map.entry("triggerThreshold", 0)
* )),
* Map.entry("type", "Microsoft.SecurityInsights/AlertRuleTemplates")
* ),
* Map.ofEntries(
* Map.entry("apiVersion", "2022-01-01-preview"),
* Map.entry("name", "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/',concat('AnalyticsRule-', last(split([resourceId('Microsoft.SecurityInsights/AlertRuleTemplates', 8365ebfe-a381-45b7-ad08-7d818070e11f)],'/'))))]"),
* Map.entry("properties", Map.ofEntries(
* Map.entry("author", Map.ofEntries(
* Map.entry("email", "support}{@literal @}{@code microsoft.com"),
* Map.entry("name", "Microsoft")
* )),
* Map.entry("contentId", "4465ebde-b381-45f7-ad08-7d818070a11c"),
* Map.entry("description", "CrowdStrike Falcon Endpoint Protection Analytics Rule 1"),
* Map.entry("kind", "AnalyticsRule"),
* Map.entry("parentId", "[resourceId('Microsoft.SecurityInsights/AlertRuleTemplates', 8365ebfe-a381-45b7-ad08-7d818070e11f)]"),
* Map.entry("source", Map.ofEntries(
* Map.entry("kind", "Solution"),
* Map.entry("name", "str"),
* Map.entry("sourceId", "str.azure-sentinel-solution-str")
* )),
* Map.entry("support", Map.ofEntries(
* Map.entry("email", "support}{@literal @}{@code microsoft.com"),
* Map.entry("link", "https://support.microsoft.com/"),
* Map.entry("name", "Microsoft Corporation"),
* Map.entry("tier", "Microsoft")
* )),
* Map.entry("version", "1.0.0")
* )),
* Map.entry("type", "Microsoft.OperationalInsights/workspaces/providers/metadata")
* ))
* ))
* .packageId("str.azure-sentinel-solution-str")
* .packageKind("Solution")
* .packageName("str")
* .resourceGroupName("myRg")
* .source(MetadataSourceArgs.builder()
* .kind("Solution")
* .name("str")
* .sourceId("str.azure-sentinel-solution-str")
* .build())
* .support(MetadataSupportArgs.builder()
* .email("support}{@literal @}{@code microsoft.com")
* .link("https://support.microsoft.com/")
* .name("Microsoft Corporation")
* .tier("Microsoft")
* .build())
* .templateId("str.azure-sentinel-solution-str")
* .version("1.0.1")
* .workspaceName("myWorkspace")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:securityinsights:ContentTemplate azuresentinel.azure-sentinel-solution-ciscoumbrella /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/providers/Microsoft.SecurityInsights/contentTemplates/{templateId}
* ```
*
*/
@ResourceType(type="azure-native:securityinsights:ContentTemplate")
public class ContentTemplate extends com.pulumi.resources.CustomResource {
/**
* The creator of the content item.
*
*/
@Export(name="author", refs={MetadataAuthorResponse.class}, tree="[0]")
private Output* @Nullable */ MetadataAuthorResponse> author;
/**
* @return The creator of the content item.
*
*/
public Output> author() {
return Codegen.optional(this.author);
}
/**
* Categories for the item
*
*/
@Export(name="categories", refs={MetadataCategoriesResponse.class}, tree="[0]")
private Output* @Nullable */ MetadataCategoriesResponse> categories;
/**
* @return Categories for the item
*
*/
public Output> categories() {
return Codegen.optional(this.categories);
}
/**
* Static ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name
*
*/
@Export(name="contentId", refs={String.class}, tree="[0]")
private Output contentId;
/**
* @return Static ID for the content. Used to identify dependencies and content from solutions or community. Hard-coded/static for out of the box content and solutions. Dynamic for user-created. This is the resource name
*
*/
public Output contentId() {
return this.contentId;
}
/**
* The kind of content the template is for.
*
*/
@Export(name="contentKind", refs={String.class}, tree="[0]")
private Output contentKind;
/**
* @return The kind of content the template is for.
*
*/
public Output contentKind() {
return this.contentKind;
}
/**
* Schema version of the content. Can be used to distinguish between different flow based on the schema version
*
*/
@Export(name="contentSchemaVersion", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> contentSchemaVersion;
/**
* @return Schema version of the content. Can be used to distinguish between different flow based on the schema version
*
*/
public Output> contentSchemaVersion() {
return Codegen.optional(this.contentSchemaVersion);
}
/**
* The custom version of the content. A optional free text
*
*/
@Export(name="customVersion", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> customVersion;
/**
* @return The custom version of the content. A optional free text
*
*/
public Output> customVersion() {
return Codegen.optional(this.customVersion);
}
/**
* Dependencies for the content item, what other content items it requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or operator/criteria for complex formats.
*
*/
@Export(name="dependencies", refs={MetadataDependenciesResponse.class}, tree="[0]")
private Output* @Nullable */ MetadataDependenciesResponse> dependencies;
/**
* @return Dependencies for the content item, what other content items it requires to work. Can describe more complex dependencies using a recursive/nested structure. For a single dependency an id/kind/version can be supplied or operator/criteria for complex formats.
*
*/
public Output> dependencies() {
return Codegen.optional(this.dependencies);
}
/**
* The display name of the template
*
*/
@Export(name="displayName", refs={String.class}, tree="[0]")
private Output displayName;
/**
* @return The display name of the template
*
*/
public Output displayName() {
return this.displayName;
}
/**
* Etag of the azure resource
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> etag;
/**
* @return Etag of the azure resource
*
*/
public Output> etag() {
return Codegen.optional(this.etag);
}
/**
* first publish date content item
*
*/
@Export(name="firstPublishDate", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> firstPublishDate;
/**
* @return first publish date content item
*
*/
public Output> firstPublishDate() {
return Codegen.optional(this.firstPublishDate);
}
/**
* the icon identifier. this id can later be fetched from the content metadata
*
*/
@Export(name="icon", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> icon;
/**
* @return the icon identifier. this id can later be fetched from the content metadata
*
*/
public Output> icon() {
return Codegen.optional(this.icon);
}
/**
* last publish date for the content item
*
*/
@Export(name="lastPublishDate", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> lastPublishDate;
/**
* @return last publish date for the content item
*
*/
public Output> lastPublishDate() {
return Codegen.optional(this.lastPublishDate);
}
/**
* The JSON of the ARM template to deploy active content
*
*/
@Export(name="mainTemplate", refs={Object.class}, tree="[0]")
private Output* @Nullable */ Object> mainTemplate;
/**
* @return The JSON of the ARM template to deploy active content
*
*/
public Output> mainTemplate() {
return Codegen.optional(this.mainTemplate);
}
/**
* 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 package Id contains this template
*
*/
@Export(name="packageId", refs={String.class}, tree="[0]")
private Output packageId;
/**
* @return the package Id contains this template
*
*/
public Output packageId() {
return this.packageId;
}
/**
* the packageKind of the package contains this template
*
*/
@Export(name="packageKind", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> packageKind;
/**
* @return the packageKind of the package contains this template
*
*/
public Output> packageKind() {
return Codegen.optional(this.packageKind);
}
/**
* the name of the package contains this template
*
*/
@Export(name="packageName", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> packageName;
/**
* @return the name of the package contains this template
*
*/
public Output> packageName() {
return Codegen.optional(this.packageName);
}
/**
* preview image file names. These will be taken from the solution artifacts
*
*/
@Export(name="previewImages", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> previewImages;
/**
* @return preview image file names. These will be taken from the solution artifacts
*
*/
public Output>> previewImages() {
return Codegen.optional(this.previewImages);
}
/**
* preview image file names. These will be taken from the solution artifacts. used for dark theme support
*
*/
@Export(name="previewImagesDark", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> previewImagesDark;
/**
* @return preview image file names. These will be taken from the solution artifacts. used for dark theme support
*
*/
public Output>> previewImagesDark() {
return Codegen.optional(this.previewImagesDark);
}
/**
* Providers for the content item
*
*/
@Export(name="providers", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> providers;
/**
* @return Providers for the content item
*
*/
public Output>> providers() {
return Codegen.optional(this.providers);
}
/**
* Source of the content. This is where/how it was created.
*
*/
@Export(name="source", refs={MetadataSourceResponse.class}, tree="[0]")
private Output source;
/**
* @return Source of the content. This is where/how it was created.
*
*/
public Output source() {
return this.source;
}
/**
* Support information for the template - type, name, contact information
*
*/
@Export(name="support", refs={MetadataSupportResponse.class}, tree="[0]")
private Output* @Nullable */ MetadataSupportResponse> support;
/**
* @return Support information for the template - type, name, contact information
*
*/
public Output> support() {
return Codegen.optional(this.support);
}
/**
* 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 tactics the resource covers
*
*/
@Export(name="threatAnalysisTactics", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> threatAnalysisTactics;
/**
* @return the tactics the resource covers
*
*/
public Output>> threatAnalysisTactics() {
return Codegen.optional(this.threatAnalysisTactics);
}
/**
* the techniques the resource covers, these have to be aligned with the tactics being used
*
*/
@Export(name="threatAnalysisTechniques", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> threatAnalysisTechniques;
/**
* @return the techniques the resource covers, these have to be aligned with the tactics being used
*
*/
public Output>> threatAnalysisTechniques() {
return Codegen.optional(this.threatAnalysisTechniques);
}
/**
* 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;
}
/**
* Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version checks
*
*/
@Export(name="version", refs={String.class}, tree="[0]")
private Output version;
/**
* @return Version of the content. Default and recommended format is numeric (e.g. 1, 1.0, 1.0.0, 1.0.0.0), following ARM metadata best practices. Can also be any string, but then we cannot guarantee any version checks
*
*/
public Output version() {
return this.version;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ContentTemplate(java.lang.String name) {
this(name, ContentTemplateArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ContentTemplate(java.lang.String name, ContentTemplateArgs 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 ContentTemplate(java.lang.String name, ContentTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:securityinsights:ContentTemplate", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ContentTemplate(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:securityinsights:ContentTemplate", name, null, makeResourceOptions(options, id), false);
}
private static ContentTemplateArgs makeArgs(ContentTemplateArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ContentTemplateArgs.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/v20230401preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20230501preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20230601preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20230701preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20230801preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20230901preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20231001preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20231101:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20231201preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20240101preview:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20240301:ContentTemplate").build()),
Output.of(Alias.builder().type("azure-native:securityinsights/v20240401preview:ContentTemplate").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 ContentTemplate get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ContentTemplate(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy