import * as pulumi from "@pulumi/pulumi"; /** * Manages an Azure Resource Policy Remediation. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "resourcegroup1", * location: "West US", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "vnet1", * resourceGroupName: example.name, * location: example.location, * addressSpaces: ["10.0.0.0/16"], * }); * const exampleDefinition = new azure.policy.Definition("example", { * name: "only-deploy-in-westeurope", * policyType: "Custom", * mode: "All", * displayName: "my-policy-definition", * }); * const exampleResourcePolicyAssignment = new azure.core.ResourcePolicyAssignment("example", { * name: "assignment1", * resourceId: exampleVirtualNetwork.id, * policyDefinitionId: exampleDefinition.id, * parameters: pulumi.jsonStringify({ * listOfAllowedLocations: { * value: [ * example.location, * "East US", * ], * }, * }), * }); * const exampleResourceGroupPolicyAssignment = new azure.core.ResourceGroupPolicyAssignment("example", { * name: "example", * resourceGroupId: example.id, * policyDefinitionId: exampleDefinition.id, * }); * const exampleResourcePolicyRemediation = new azure.core.ResourcePolicyRemediation("example", { * name: "remediation1", * resourceId: exampleVirtualNetwork.id, * policyAssignmentId: exampleResourceGroupPolicyAssignment.id, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.PolicyInsights` - 2021-10-01 * * ## Import * * Policy Remediations can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:core/resourcePolicyRemediation:ResourcePolicyRemediation example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.PolicyInsights/remediations/remediation1 * ``` */ export declare class ResourcePolicyRemediation extends pulumi.CustomResource { /** * Get an existing ResourcePolicyRemediation 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 state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ResourcePolicyRemediationState, opts?: pulumi.CustomResourceOptions): ResourcePolicyRemediation; /** * Returns true if the given object is an instance of ResourcePolicyRemediation. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ResourcePolicyRemediation; /** * 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. */ readonly failurePercentage: pulumi.Output; /** * A list of the resource locations that will be remediated. */ readonly locationFilters: pulumi.Output; /** * The name of the Policy Remediation. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * 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. */ readonly parallelDeployments: pulumi.Output; /** * The ID of the Policy Assignment that should be remediated. */ readonly policyAssignmentId: pulumi.Output; /** * 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. */ readonly policyDefinitionReferenceId: pulumi.Output; /** * Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. */ readonly resourceCount: pulumi.Output; /** * The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. */ readonly resourceDiscoveryMode: pulumi.Output; /** * The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. */ readonly resourceId: pulumi.Output; /** * Create a ResourcePolicyRemediation resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ResourcePolicyRemediationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ResourcePolicyRemediation resources. */ export interface ResourcePolicyRemediationState { /** * 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. */ failurePercentage?: pulumi.Input; /** * A list of the resource locations that will be remediated. */ locationFilters?: pulumi.Input[]>; /** * The name of the Policy Remediation. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * 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. */ parallelDeployments?: pulumi.Input; /** * The ID of the Policy Assignment that should be remediated. */ policyAssignmentId?: pulumi.Input; /** * 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. */ policyDefinitionReferenceId?: pulumi.Input; /** * Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. */ resourceCount?: pulumi.Input; /** * The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. */ resourceDiscoveryMode?: pulumi.Input; /** * The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. */ resourceId?: pulumi.Input; } /** * The set of arguments for constructing a ResourcePolicyRemediation resource. */ export interface ResourcePolicyRemediationArgs { /** * 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. */ failurePercentage?: pulumi.Input; /** * A list of the resource locations that will be remediated. */ locationFilters?: pulumi.Input[]>; /** * The name of the Policy Remediation. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * 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. */ parallelDeployments?: pulumi.Input; /** * The ID of the Policy Assignment that should be remediated. */ policyAssignmentId: pulumi.Input; /** * 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. */ policyDefinitionReferenceId?: pulumi.Input; /** * Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used. */ resourceCount?: pulumi.Input; /** * The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`. */ resourceDiscoveryMode?: pulumi.Input; /** * The Resource ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. */ resourceId: pulumi.Input; }