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

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

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

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.security.SecurityStandardArgs;
import com.pulumi.azurenative.security.outputs.PartialAssessmentPropertiesResponse;
import com.pulumi.azurenative.security.outputs.StandardMetadataResponse;
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;

/**
 * Security Standard on a resource
 * Azure REST API version: 2024-08-01.
 * 
 * ## Example Usage
 * ### Create or update security standard 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.SecurityStandard;
 * import com.pulumi.azurenative.security.SecurityStandardArgs;
 * import com.pulumi.azurenative.security.inputs.PartialAssessmentPropertiesArgs;
 * 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 securityStandard = new SecurityStandard("securityStandard", SecurityStandardArgs.builder()
 *             .assessments(            
 *                 PartialAssessmentPropertiesArgs.builder()
 *                     .assessmentKey("1195afff-c881-495e-9bc5-1486211ae03f")
 *                     .build(),
 *                 PartialAssessmentPropertiesArgs.builder()
 *                     .assessmentKey("dbd0cb49-b563-45e7-9724-889e799fa648")
 *                     .build())
 *             .cloudProviders("GCP")
 *             .description("description of Azure Test Security Standard 1")
 *             .displayName("Azure Test Security Standard 1")
 *             .policySetDefinitionId("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions")
 *             .scope("providers/Microsoft.Management/managementGroups/contoso")
 *             .standardId("8bb8be0a-6010-4789-812f-e4d661c4ed0e")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update security standard 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.SecurityStandard;
 * import com.pulumi.azurenative.security.SecurityStandardArgs;
 * import com.pulumi.azurenative.security.inputs.PartialAssessmentPropertiesArgs;
 * 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 securityStandard = new SecurityStandard("securityStandard", SecurityStandardArgs.builder()
 *             .assessments(            
 *                 PartialAssessmentPropertiesArgs.builder()
 *                     .assessmentKey("1195afff-c881-495e-9bc5-1486211ae03f")
 *                     .build(),
 *                 PartialAssessmentPropertiesArgs.builder()
 *                     .assessmentKey("dbd0cb49-b563-45e7-9724-889e799fa648")
 *                     .build())
 *             .cloudProviders("GCP")
 *             .description("description of Azure Test Security Standard 1")
 *             .displayName("Azure Test Security Standard 1")
 *             .scope("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector")
 *             .standardId("8bb8be0a-6010-4789-812f-e4d661c4ed0e")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Create or update security standard 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.SecurityStandard;
 * import com.pulumi.azurenative.security.SecurityStandardArgs;
 * import com.pulumi.azurenative.security.inputs.PartialAssessmentPropertiesArgs;
 * 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 securityStandard = new SecurityStandard("securityStandard", SecurityStandardArgs.builder()
 *             .assessments(            
 *                 PartialAssessmentPropertiesArgs.builder()
 *                     .assessmentKey("1195afff-c881-495e-9bc5-1486211ae03f")
 *                     .build(),
 *                 PartialAssessmentPropertiesArgs.builder()
 *                     .assessmentKey("dbd0cb49-b563-45e7-9724-889e799fa648")
 *                     .build())
 *             .cloudProviders("GCP")
 *             .description("description of Azure Test Security Standard 1")
 *             .displayName("Azure Test Security Standard 1")
 *             .policySetDefinitionId("/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Authorization/policySetDefinitions/patchorchestration-applicationversions")
 *             .scope("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")
 *             .standardId("8bb8be0a-6010-4789-812f-e4d661c4ed0e")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:security:SecurityStandard 8bb8be0a-6010-4789-812f-e4d661c4ed0e /{scope}/providers/Microsoft.Security/securityStandards/{standardId} * ``` * */ @ResourceType(type="azure-native:security:SecurityStandard") public class SecurityStandard extends com.pulumi.resources.CustomResource { /** * List of assessment keys to apply to standard scope. * */ @Export(name="assessments", refs={List.class,PartialAssessmentPropertiesResponse.class}, tree="[0,1]") private Output> assessments; /** * @return List of assessment keys to apply to standard scope. * */ public Output>> assessments() { return Codegen.optional(this.assessments); } /** * 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); } /** * Description of the standard * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Description of the standard * */ public Output> description() { return Codegen.optional(this.description); } /** * Display name of the standard, equivalent to the standardId * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Display name of the standard, equivalent to the standardId * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * The security standard metadata. * */ @Export(name="metadata", refs={StandardMetadataResponse.class}, tree="[0]") private Output metadata; /** * @return The security standard metadata. * */ public Output> metadata() { return Codegen.optional(this.metadata); } /** * Resource name * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource name * */ public Output name() { return this.name; } /** * The policy set definition id associated with the standard. * */ @Export(name="policySetDefinitionId", refs={String.class}, tree="[0]") private Output policySetDefinitionId; /** * @return The policy set definition id associated with the standard. * */ public Output> policySetDefinitionId() { return Codegen.optional(this.policySetDefinitionId); } /** * Standard type (Custom or Default or Compliance only currently) * */ @Export(name="standardType", refs={String.class}, tree="[0]") private Output standardType; /** * @return Standard type (Custom or Default or Compliance only currently) * */ public Output standardType() { return this.standardType; } /** * 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 SecurityStandard(java.lang.String name) { this(name, SecurityStandardArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public SecurityStandard(java.lang.String name, SecurityStandardArgs 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 SecurityStandard(java.lang.String name, SecurityStandardArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:SecurityStandard", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private SecurityStandard(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:SecurityStandard", name, null, makeResourceOptions(options, id), false); } private static SecurityStandardArgs makeArgs(SecurityStandardArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? SecurityStandardArgs.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:SecurityStandard").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 SecurityStandard get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new SecurityStandard(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy