GroupPolicyRemediationArgs

data class GroupPolicyRemediationArgs(val failurePercentage: Output<Double>? = null, val locationFilters: Output<List<String>>? = null, val managementGroupId: Output<String>? = null, val name: Output<String>? = null, val parallelDeployments: Output<Int>? = null, val policyAssignmentId: Output<String>? = null, val policyDefinitionId: Output<String>? = null, val policyDefinitionReferenceId: Output<String>? = null, val resourceCount: Output<Int>? = null, val resourceDiscoveryMode: Output<String>? = null) : ConvertibleToJava<GroupPolicyRemediationArgs>

Manages an Azure Management Group Policy Remediation.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.management.Group;
import com.pulumi.azure.management.GroupArgs;
import com.pulumi.azure.policy.PolicyFunctions;
import com.pulumi.azure.policy.inputs.GetPolicyDefintionArgs;
import com.pulumi.azure.management.GroupPolicyAssignment;
import com.pulumi.azure.management.GroupPolicyAssignmentArgs;
import com.pulumi.azure.management.GroupPolicyRemediation;
import com.pulumi.azure.management.GroupPolicyRemediationArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 exampleGroup = new Group("exampleGroup", GroupArgs.builder()
.displayName("Example Management Group")
.build());
final var example = PolicyFunctions.getPolicyDefintion(GetPolicyDefintionArgs.builder()
.displayName("Allowed locations")
.build());
var exampleGroupPolicyAssignment = new GroupPolicyAssignment("exampleGroupPolicyAssignment", GroupPolicyAssignmentArgs.builder()
.name("exampleAssignment")
.managementGroupId(exampleGroup.id())
.policyDefinitionId(example.applyValue(getPolicyDefintionResult -> getPolicyDefintionResult.id()))
.parameters(serializeJson(
jsonObject(
jsonProperty("listOfAllowedLocations", jsonObject(
jsonProperty("value", jsonArray("East US"))
))
)))
.build());
var exampleGroupPolicyRemediation = new GroupPolicyRemediation("exampleGroupPolicyRemediation", GroupPolicyRemediationArgs.builder()
.name("example")
.managementGroupId(exampleGroup.id())
.policyAssignmentId(exampleGroupPolicyAssignment.id())
.build());
}
}

Import

Policy Remediations can be imported using the resource id, e.g.

$ pulumi import azure:management/groupPolicyRemediation:GroupPolicyRemediation example /providers/Microsoft.Management/managementGroups/my-mgmt-group-id/providers/Microsoft.PolicyInsights/remediations/remediation1

Constructors

Link copied to clipboard
fun GroupPolicyRemediationArgs(failurePercentage: Output<Double>? = null, locationFilters: Output<List<String>>? = null, managementGroupId: Output<String>? = null, name: Output<String>? = null, parallelDeployments: Output<Int>? = null, policyAssignmentId: Output<String>? = null, policyDefinitionId: Output<String>? = null, policyDefinitionReferenceId: Output<String>? = null, resourceCount: Output<Int>? = null, resourceDiscoveryMode: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): GroupPolicyRemediationArgs

Properties

Link copied to clipboard
val failurePercentage: Output<Double>? = null

A number between 0.0 to 1.0 representing the percentage failure threshold. The remediation will fail if the percentage of failed remediation operations (i.e. failed deployments) exceeds this threshold.

Link copied to clipboard
val locationFilters: Output<List<String>>? = null

A list of the resource locations that will be remediated.

Link copied to clipboard
val managementGroupId: Output<String>? = null

The Management Group ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

The name of the Policy Remediation. Changing this forces a new resource to be created.

Link copied to clipboard
val parallelDeployments: Output<Int>? = null

Determines how many resources to remediate at any given time. Can be used to increase or reduce the pace of the remediation. If not provided, the default parallel deployments value is used.

Link copied to clipboard
val policyAssignmentId: Output<String>? = null

The ID of the Policy Assignment that should be remediated.

Link copied to clipboard
val policyDefinitionId: Output<String>? = null

The unique ID for the policy definition within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.

Link copied to clipboard
val policyDefinitionReferenceId: Output<String>? = null

The unique ID for the policy definition reference within the policy set definition that should be remediated. Required when the policy assignment being remediated assigns a policy set definition.

Link copied to clipboard
val resourceCount: Output<Int>? = null

Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.

Link copied to clipboard
val resourceDiscoveryMode: Output<String>? = null

The way that resources to remediate are discovered. Possible values are ExistingNonCompliant, ReEvaluateCompliance. Defaults to ExistingNonCompliant.