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

com.pulumi.azurenative.security.CustomRecommendation Maven / Gradle / Ivy

There is a newer version: 2.89.2
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.security;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.security.CustomRecommendationArgs;
import com.pulumi.azurenative.security.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.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Custom Recommendation
 * Azure REST API version: 2024-08-01.
 * 
 * ## Example Usage
 * ### Create or update custom recommendation over management group scope
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.CustomRecommendation;
 * import com.pulumi.azurenative.security.CustomRecommendationArgs;
 * 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 customRecommendation = new CustomRecommendation("customRecommendation", CustomRecommendationArgs.builder()
 *             .cloudProviders("AWS")
 *             .customRecommendationName("33e7cc6e-a139-4723-a0e5-76993aee0771")
 *             .description("organization passwords policy")
 *             .displayName("Password Policy")
 *             .query("RawEntityMetadata | where Environment == 'GCP' and Identifiers.Type == 'compute.firewalls' | extend IslogConfigEnabled = tobool(Record.logConfig.enable) | extend HealthStatus = iff(IslogConfigEnabled, 'HEALTHY', 'UNHEALTHY')")
 *             .remediationDescription("Change password policy to...")
 *             .scope("providers/Microsoft.Management/managementGroups/contoso")
 *             .securityIssue("Vulnerability")
 *             .severity("Medium")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update custom recommendation over security connector scope * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.CustomRecommendation;
 * import com.pulumi.azurenative.security.CustomRecommendationArgs;
 * 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 customRecommendation = new CustomRecommendation("customRecommendation", CustomRecommendationArgs.builder()
 *             .cloudProviders("AWS")
 *             .customRecommendationName("33e7cc6e-a139-4723-a0e5-76993aee0771")
 *             .description("organization passwords policy")
 *             .displayName("Password Policy")
 *             .query("RawEntityMetadata | where Environment == 'GCP' and Identifiers.Type == 'compute.firewalls' | extend IslogConfigEnabled = tobool(Record.logConfig.enable) | extend HealthStatus = iff(IslogConfigEnabled, 'HEALTHY', 'UNHEALTHY')")
 *             .remediationDescription("Change password policy to...")
 *             .scope("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector")
 *             .securityIssue("Vulnerability")
 *             .severity("Medium")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update custom recommendation over subscription scope * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.CustomRecommendation;
 * import com.pulumi.azurenative.security.CustomRecommendationArgs;
 * 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 customRecommendation = new CustomRecommendation("customRecommendation", CustomRecommendationArgs.builder()
 *             .cloudProviders("AWS")
 *             .customRecommendationName("33e7cc6e-a139-4723-a0e5-76993aee0771")
 *             .description("organization passwords policy")
 *             .displayName("Password Policy")
 *             .query("RawEntityMetadata | where Environment == 'GCP' and Identifiers.Type == 'compute.firewalls' | extend IslogConfigEnabled = tobool(Record.logConfig.enable) | extend HealthStatus = iff(IslogConfigEnabled, 'HEALTHY', 'UNHEALTHY')")
 *             .remediationDescription("Change password policy to...")
 *             .scope("subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b")
 *             .securityIssue("Vulnerability")
 *             .severity("Medium")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:security:CustomRecommendation 33e7cc6e-a139-4723-a0e5-76993aee0771 /{scope}/providers/Microsoft.Security/customRecommendations/{customRecommendationName} * ``` * */ @ResourceType(type="azure-native:security:CustomRecommendation") public class CustomRecommendation extends com.pulumi.resources.CustomResource { /** * The assessment metadata key used when an assessment is generated for this Recommendation. * */ @Export(name="assessmentKey", refs={String.class}, tree="[0]") private Output assessmentKey; /** * @return The assessment metadata key used when an assessment is generated for this Recommendation. * */ public Output assessmentKey() { return this.assessmentKey; } /** * List of all standard supported clouds. * */ @Export(name="cloudProviders", refs={List.class,String.class}, tree="[0,1]") private Output> cloudProviders; /** * @return List of all standard supported clouds. * */ public Output>> cloudProviders() { return Codegen.optional(this.cloudProviders); } /** * The description to relate to the assessments generated by this Recommendation. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description to relate to the assessments generated by this Recommendation. * */ public Output> description() { return Codegen.optional(this.description); } /** * The display name of the assessments generated by this Recommendation. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return The display name of the assessments generated by this Recommendation. * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * Resource name * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name * */ public Output name() { return this.name; } /** * KQL query representing the Recommendation results required. * */ @Export(name="query", refs={String.class}, tree="[0]") private Output query; /** * @return KQL query representing the Recommendation results required. * */ public Output> query() { return Codegen.optional(this.query); } /** * The remediation description to relate to the assessments generated by this Recommendation. * */ @Export(name="remediationDescription", refs={String.class}, tree="[0]") private Output remediationDescription; /** * @return The remediation description to relate to the assessments generated by this Recommendation. * */ public Output> remediationDescription() { return Codegen.optional(this.remediationDescription); } /** * The severity to relate to the assessments generated by this Recommendation. * */ @Export(name="securityIssue", refs={String.class}, tree="[0]") private Output securityIssue; /** * @return The severity to relate to the assessments generated by this Recommendation. * */ public Output> securityIssue() { return Codegen.optional(this.securityIssue); } /** * The severity to relate to the assessments generated by this Recommendation. * */ @Export(name="severity", refs={String.class}, tree="[0]") private Output severity; /** * @return The severity to relate to the assessments generated by this Recommendation. * */ public Output> severity() { return Codegen.optional(this.severity); } /** * 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; } /** * Resource type * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public CustomRecommendation(java.lang.String name) { this(name, CustomRecommendationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public CustomRecommendation(java.lang.String name, CustomRecommendationArgs 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 CustomRecommendation(java.lang.String name, CustomRecommendationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:CustomRecommendation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private CustomRecommendation(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:CustomRecommendation", name, null, makeResourceOptions(options, id), false); } private static CustomRecommendationArgs makeArgs(CustomRecommendationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? CustomRecommendationArgs.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:security/v20240801:CustomRecommendation").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 CustomRecommendation get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new CustomRecommendation(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy