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

com.pulumi.azurenative.security.Assignment 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.AssignmentArgs;
import com.pulumi.azurenative.security.outputs.AssignedComponentItemResponse;
import com.pulumi.azurenative.security.outputs.AssignedStandardItemResponse;
import com.pulumi.azurenative.security.outputs.AssignmentPropertiesResponseAdditionalData;
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.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Security Assignment on a resource group over a given scope
 * Azure REST API version: 2021-08-01-preview. Prior API version in Azure Native 1.x: 2021-08-01-preview.
 * 
 * ## Example Usage
 * ### Define a default standard assignment
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.Assignment;
 * import com.pulumi.azurenative.security.AssignmentArgs;
 * 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 assignment = new Assignment("assignment", AssignmentArgs.builder()
 *             .assignedStandard(AssignedStandardItemArgs.builder()
 *                 .id("/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *                 .build())
 *             .assignmentId("1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *             .description("Set of policies monitored by Azure Security Center for cross cloud")
 *             .displayName("ASC Default")
 *             .effect("audit")
 *             .resourceGroupName("myResourceGroup")
 *             .scope("/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Exempt Recommendation From standard and resource * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.security.Assignment;
 * import com.pulumi.azurenative.security.AssignmentArgs;
 * import com.pulumi.azurenative.security.inputs.AssignmentPropertiesAdditionalDataArgs;
 * import com.pulumi.azurenative.security.inputs.AssignedComponentItemArgs;
 * 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 assignment = new Assignment("assignment", AssignmentArgs.builder()
 *             .additionalData(AssignmentPropertiesAdditionalDataArgs.builder()
 *                 .exemptionCategory("waiver")
 *                 .build())
 *             .assignedComponent(AssignedComponentItemArgs.builder()
 *                 .key("1195afff-c881-495e-9bc5-1486211ae03f")
 *                 .build())
 *             .assignedStandard(AssignedStandardItemArgs.builder()
 *                 .id("/providers/Microsoft.Security/Standards/1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *                 .build())
 *             .assignmentId("1f3afdf9-d0c9-4c3d-847f-89da613e70a8")
 *             .description("Set of policies monitored by Azure Security Center for cross cloud")
 *             .displayName("ASC Default")
 *             .effect("Exempt")
 *             .expiresOn("2022-05-01T19:50:47.083633Z")
 *             .metadata(Map.of("ticketId", 12345))
 *             .resourceGroupName("myResourceGroup")
 *             .scope("/subscriptions/ae640e6b-ba3e-4256-9d62-2993eecfa6f2/ResourceGroup/rg")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:security:Assignment 1f3afdf9-d0c9-4c3d-847f-89da613e70a8 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/assignments/{assignmentId} * ``` * */ @ResourceType(type="azure-native:security:Assignment") public class Assignment extends com.pulumi.resources.CustomResource { /** * Additional data about the assignment * */ @Export(name="additionalData", refs={AssignmentPropertiesResponseAdditionalData.class}, tree="[0]") private Output additionalData; /** * @return Additional data about the assignment * */ public Output> additionalData() { return Codegen.optional(this.additionalData); } /** * Component item with key as applied to this standard assignment over the given scope * */ @Export(name="assignedComponent", refs={AssignedComponentItemResponse.class}, tree="[0]") private Output assignedComponent; /** * @return Component item with key as applied to this standard assignment over the given scope * */ public Output> assignedComponent() { return Codegen.optional(this.assignedComponent); } /** * 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); } /** * 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 (Disable/Exempt/etc) * */ @Export(name="effect", refs={String.class}, tree="[0]") private Output effect; /** * @return expected effect of this assignment (Disable/Exempt/etc) * */ public Output> effect() { return Codegen.optional(this.effect); } /** * Entity tag is used for comparing two or more entities from the same requested resource. * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return Entity tag is used for comparing two or more entities from the same requested resource. * */ public Output> etag() { return Codegen.optional(this.etag); } /** * 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); } /** * Kind of the resource * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of the resource * */ public Output> kind() { return Codegen.optional(this.kind); } /** * Location where the resource is stored * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Location where the resource is stored * */ public Output> location() { return Codegen.optional(this.location); } /** * The assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs. * */ @Export(name="metadata", refs={Object.class}, tree="[0]") private Output metadata; /** * @return The assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs. * */ 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; } /** * Scope to which the standardAssignment applies - can be a subscription path or a resource group under that subscription * */ @Export(name="scope", refs={String.class}, tree="[0]") private Output scope; /** * @return Scope to which the standardAssignment applies - can be a subscription path or a resource group under that subscription * */ public Output> scope() { return Codegen.optional(this.scope); } /** * 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; } /** * A list of key value pairs that describe the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A list of key value pairs that describe the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * 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 Assignment(java.lang.String name) { this(name, AssignmentArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Assignment(java.lang.String name, AssignmentArgs 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 Assignment(java.lang.String name, AssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:Assignment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Assignment(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:security:Assignment", name, null, makeResourceOptions(options, id), false); } private static AssignmentArgs makeArgs(AssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? AssignmentArgs.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/v20210801preview:Assignment").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 Assignment get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Assignment(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy