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

com.pulumi.azurenative.security.StandardAssignment 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.StandardAssignmentArgs;
import com.pulumi.azurenative.security.outputs.AssignedStandardItemResponse;
import com.pulumi.azurenative.security.outputs.StandardAssignmentMetadataResponse;
import com.pulumi.azurenative.security.outputs.StandardAssignmentPropertiesResponseAttestationData;
import com.pulumi.azurenative.security.outputs.StandardAssignmentPropertiesResponseExemptionData;
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 Assignment on a resource group over a given scope
 * Azure REST API version: 2024-08-01.
 * 
 * ## Example Usage
 * ### Put an audit standard assignment
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.StandardAssignment;
 * import com.pulumi.azurenative.security.StandardAssignmentArgs;
 * import com.pulumi.azurenative.security.inputs.AssignedStandardItemArgs;
 * 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 standardAssignment = new StandardAssignment("standardAssignment", StandardAssignmentArgs.builder()
 *             .assignedStandard(AssignedStandardItemArgs.builder()
 *                 .id("/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *                 .build())
 *             .description("Set of policies monitored by Azure Security Center for cross cloud")
 *             .displayName("ASC Default")
 *             .effect("Audit")
 *             .excludedScopes()
 *             .resourceId("subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23")
 *             .standardAssignmentName("1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Put exemption standard assignment * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.StandardAssignment;
 * import com.pulumi.azurenative.security.StandardAssignmentArgs;
 * import com.pulumi.azurenative.security.inputs.AssignedStandardItemArgs;
 * import com.pulumi.azurenative.security.inputs.StandardAssignmentPropertiesExemptionDataArgs;
 * import com.pulumi.azurenative.security.inputs.AssignedAssessmentItemArgs;
 * 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 standardAssignment = new StandardAssignment("standardAssignment", StandardAssignmentArgs.builder()
 *             .assignedStandard(AssignedStandardItemArgs.builder()
 *                 .id("/providers/Microsoft.Security/securityStandards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *                 .build())
 *             .description("Exemption description")
 *             .displayName("Test exemption")
 *             .effect("Exempt")
 *             .exemptionData(StandardAssignmentPropertiesExemptionDataArgs.builder()
 *                 .assignedAssessment(AssignedAssessmentItemArgs.builder()
 *                     .assessmentKey("1195afff-c881-495e-9bc5-1486211ae03f")
 *                     .build())
 *                 .exemptionCategory("waiver")
 *                 .build())
 *             .expiresOn("2022-05-01T19:50:47.083633Z")
 *             .resourceId("subscriptions/212f9889-769e-45ae-ab43-6da33674bd26/resourceGroups/ANAT_TEST_RG/providers/Microsoft.Compute/virtualMachines/anatTestE2LA")
 *             .standardAssignmentName("1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:security:StandardAssignment 1f3afdf9-d0c9-4c3d-847f-89da613e70a8 /{resourceId}/providers/Microsoft.Security/standardAssignments/{standardAssignmentName} * ``` * */ @ResourceType(type="azure-native:security:StandardAssignment") public class StandardAssignment extends com.pulumi.resources.CustomResource { /** * Standard item with key as applied to this standard assignment over the given scope * */ @Export(name="assignedStandard", refs={AssignedStandardItemResponse.class}, tree="[0]") private Output assignedStandard; /** * @return Standard item with key as applied to this standard assignment over the given scope * */ public Output> assignedStandard() { return Codegen.optional(this.assignedStandard); } /** * Additional data about assignment that has Attest effect * */ @Export(name="attestationData", refs={StandardAssignmentPropertiesResponseAttestationData.class}, tree="[0]") private Output attestationData; /** * @return Additional data about assignment that has Attest effect * */ public Output> attestationData() { return Codegen.optional(this.attestationData); } /** * Description of the standardAssignment * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Description of the standardAssignment * */ public Output> description() { return Codegen.optional(this.description); } /** * Display name of the standardAssignment * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Display name of the standardAssignment * */ public Output> displayName() { return Codegen.optional(this.displayName); } /** * Expected effect of this assignment (Audit/Exempt/Attest) * */ @Export(name="effect", refs={String.class}, tree="[0]") private Output effect; /** * @return Expected effect of this assignment (Audit/Exempt/Attest) * */ public Output> effect() { return Codegen.optional(this.effect); } /** * Excluded scopes, filter out the descendants of the scope (on management scopes) * */ @Export(name="excludedScopes", refs={List.class,String.class}, tree="[0,1]") private Output> excludedScopes; /** * @return Excluded scopes, filter out the descendants of the scope (on management scopes) * */ public Output>> excludedScopes() { return Codegen.optional(this.excludedScopes); } /** * Additional data about assignment that has Exempt effect * */ @Export(name="exemptionData", refs={StandardAssignmentPropertiesResponseExemptionData.class}, tree="[0]") private Output exemptionData; /** * @return Additional data about assignment that has Exempt effect * */ public Output> exemptionData() { return Codegen.optional(this.exemptionData); } /** * Expiration date of this assignment as a full ISO date * */ @Export(name="expiresOn", refs={String.class}, tree="[0]") private Output expiresOn; /** * @return Expiration date of this assignment as a full ISO date * */ public Output> expiresOn() { return Codegen.optional(this.expiresOn); } /** * The standard assignment metadata. * */ @Export(name="metadata", refs={StandardAssignmentMetadataResponse.class}, tree="[0]") private Output metadata; /** * @return The standard assignment 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; } /** * 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 StandardAssignment(java.lang.String name) { this(name, StandardAssignmentArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public StandardAssignment(java.lang.String name, StandardAssignmentArgs 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 StandardAssignment(java.lang.String name, StandardAssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:StandardAssignment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private StandardAssignment(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:StandardAssignment", name, null, makeResourceOptions(options, id), false); } private static StandardAssignmentArgs makeArgs(StandardAssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? StandardAssignmentArgs.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:StandardAssignment").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 StandardAssignment get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new StandardAssignment(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy