com.pulumi.azurenative.security.GovernanceAssignment 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.security;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.security.GovernanceAssignmentArgs;
import com.pulumi.azurenative.security.outputs.GovernanceAssignmentAdditionalDataResponse;
import com.pulumi.azurenative.security.outputs.GovernanceEmailNotificationResponse;
import com.pulumi.azurenative.security.outputs.RemediationEtaResponse;
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.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Governance assignment over a given scope
* Azure REST API version: 2022-01-01-preview.
*
* ## Example Usage
* ### Create Governance assignment
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.security.GovernanceAssignment;
* import com.pulumi.azurenative.security.GovernanceAssignmentArgs;
* import com.pulumi.azurenative.security.inputs.GovernanceAssignmentAdditionalDataArgs;
* import com.pulumi.azurenative.security.inputs.GovernanceEmailNotificationArgs;
* import com.pulumi.azurenative.security.inputs.RemediationEtaArgs;
* 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 governanceAssignment = new GovernanceAssignment("governanceAssignment", GovernanceAssignmentArgs.builder()
* .additionalData(GovernanceAssignmentAdditionalDataArgs.builder()
* .ticketLink("https://snow.com")
* .ticketNumber(123123)
* .ticketStatus("Active")
* .build())
* .assessmentName("6b9421dd-5555-2251-9b3d-2be58e2f82cd")
* .assignmentKey("6634ff9f-127b-4bf2-8e6e-b1737f5e789c")
* .governanceEmailNotification(GovernanceEmailNotificationArgs.builder()
* .disableManagerEmailNotification(false)
* .disableOwnerEmailNotification(false)
* .build())
* .isGracePeriod(true)
* .owner("user}{@literal @}{@code contoso.com")
* .remediationDueDate("2022-01-07T13:00:00.0000000Z")
* .remediationEta(RemediationEtaArgs.builder()
* .eta("2022-01-08T13:00:00.0000000Z")
* .justification("Justification of ETA")
* .build())
* .scope("subscriptions/c32e05d9-7207-4e22-bdf4-4f7d9c72e5fd/resourceGroups/compute_servers/providers/Microsoft.Compute/virtualMachines/win2012")
* .build());
*
* }}{@code
* }}{@code
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:security:GovernanceAssignment 6634ff9f-127b-4bf2-8e6e-b1737f5e789c /{scope}/providers/Microsoft.Security/assessments/{assessmentName}/governanceAssignments/{assignmentKey}
* ```
*
*/
@ResourceType(type="azure-native:security:GovernanceAssignment")
public class GovernanceAssignment extends com.pulumi.resources.CustomResource {
/**
* The additional data for the governance assignment - e.g. links to ticket (optional), see example
*
*/
@Export(name="additionalData", refs={GovernanceAssignmentAdditionalDataResponse.class}, tree="[0]")
private Output* @Nullable */ GovernanceAssignmentAdditionalDataResponse> additionalData;
/**
* @return The additional data for the governance assignment - e.g. links to ticket (optional), see example
*
*/
public Output> additionalData() {
return Codegen.optional(this.additionalData);
}
/**
* The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
*
*/
@Export(name="governanceEmailNotification", refs={GovernanceEmailNotificationResponse.class}, tree="[0]")
private Output* @Nullable */ GovernanceEmailNotificationResponse> governanceEmailNotification;
/**
* @return The email notifications settings for the governance rule, states whether to disable notifications for mangers and owners
*
*/
public Output> governanceEmailNotification() {
return Codegen.optional(this.governanceEmailNotification);
}
/**
* Defines whether there is a grace period on the governance assignment
*
*/
@Export(name="isGracePeriod", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> isGracePeriod;
/**
* @return Defines whether there is a grace period on the governance assignment
*
*/
public Output> isGracePeriod() {
return Codegen.optional(this.isGracePeriod);
}
/**
* Resource name
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name
*
*/
public Output name() {
return this.name;
}
/**
* The Owner for the governance assignment - e.g. user{@literal @}contoso.com - see example
*
*/
@Export(name="owner", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> owner;
/**
* @return The Owner for the governance assignment - e.g. user{@literal @}contoso.com - see example
*
*/
public Output> owner() {
return Codegen.optional(this.owner);
}
/**
* The remediation due-date - after this date Secure Score will be affected (in case of active grace-period)
*
*/
@Export(name="remediationDueDate", refs={String.class}, tree="[0]")
private Output remediationDueDate;
/**
* @return The remediation due-date - after this date Secure Score will be affected (in case of active grace-period)
*
*/
public Output remediationDueDate() {
return this.remediationDueDate;
}
/**
* The ETA (estimated time of arrival) for remediation (optional), see example
*
*/
@Export(name="remediationEta", refs={RemediationEtaResponse.class}, tree="[0]")
private Output* @Nullable */ RemediationEtaResponse> remediationEta;
/**
* @return The ETA (estimated time of arrival) for remediation (optional), see example
*
*/
public Output> remediationEta() {
return Codegen.optional(this.remediationEta);
}
/**
* 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 GovernanceAssignment(java.lang.String name) {
this(name, GovernanceAssignmentArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public GovernanceAssignment(java.lang.String name, GovernanceAssignmentArgs 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 GovernanceAssignment(java.lang.String name, GovernanceAssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:security:GovernanceAssignment", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private GovernanceAssignment(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:security:GovernanceAssignment", name, null, makeResourceOptions(options, id), false);
}
private static GovernanceAssignmentArgs makeArgs(GovernanceAssignmentArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? GovernanceAssignmentArgs.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/v20220101preview:GovernanceAssignment").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 GovernanceAssignment get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new GovernanceAssignment(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy