We recommend using Azure Native.
azure.core.SubscriptionPolicyRemediation
Explore with Pulumi AI
Manages an Azure Subscription Policy Remediation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.core.getSubscription({});
const exampleGetPolicyDefintion = azure.policy.getPolicyDefintion({
    displayName: "Allowed resource types",
});
const exampleSubscriptionPolicyAssignment = new azure.core.SubscriptionPolicyAssignment("example", {
    name: "exampleAssignment",
    subscriptionId: example.then(example => example.id),
    policyDefinitionId: exampleGetPolicyDefintion.then(exampleGetPolicyDefintion => exampleGetPolicyDefintion.id),
    parameters: JSON.stringify({
        listOfAllowedLocations: {
            value: [
                "West Europe",
                "East US",
            ],
        },
    }),
});
const exampleSubscriptionPolicyRemediation = new azure.core.SubscriptionPolicyRemediation("example", {
    name: "example",
    subscriptionId: example.then(example => example.id),
    policyAssignmentId: exampleSubscriptionPolicyAssignment.id,
});
import pulumi
import json
import pulumi_azure as azure
example = azure.core.get_subscription()
example_get_policy_defintion = azure.policy.get_policy_defintion(display_name="Allowed resource types")
example_subscription_policy_assignment = azure.core.SubscriptionPolicyAssignment("example",
    name="exampleAssignment",
    subscription_id=example.id,
    policy_definition_id=example_get_policy_defintion.id,
    parameters=json.dumps({
        "listOfAllowedLocations": {
            "value": [
                "West Europe",
                "East US",
            ],
        },
    }))
example_subscription_policy_remediation = azure.core.SubscriptionPolicyRemediation("example",
    name="example",
    subscription_id=example.id,
    policy_assignment_id=example_subscription_policy_assignment.id)
package main
import (
	"encoding/json"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/policy"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.LookupSubscription(ctx, &core.LookupSubscriptionArgs{}, nil)
		if err != nil {
			return err
		}
		exampleGetPolicyDefintion, err := policy.GetPolicyDefintion(ctx, &policy.GetPolicyDefintionArgs{
			DisplayName: pulumi.StringRef("Allowed resource types"),
		}, nil)
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"listOfAllowedLocations": map[string]interface{}{
				"value": []string{
					"West Europe",
					"East US",
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		exampleSubscriptionPolicyAssignment, err := core.NewSubscriptionPolicyAssignment(ctx, "example", &core.SubscriptionPolicyAssignmentArgs{
			Name:               pulumi.String("exampleAssignment"),
			SubscriptionId:     pulumi.String(example.Id),
			PolicyDefinitionId: pulumi.String(exampleGetPolicyDefintion.Id),
			Parameters:         pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		_, err = core.NewSubscriptionPolicyRemediation(ctx, "example", &core.SubscriptionPolicyRemediationArgs{
			Name:               pulumi.String("example"),
			SubscriptionId:     pulumi.String(example.Id),
			PolicyAssignmentId: exampleSubscriptionPolicyAssignment.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.Core.GetSubscription.Invoke();
    var exampleGetPolicyDefintion = Azure.Policy.GetPolicyDefintion.Invoke(new()
    {
        DisplayName = "Allowed resource types",
    });
    var exampleSubscriptionPolicyAssignment = new Azure.Core.SubscriptionPolicyAssignment("example", new()
    {
        Name = "exampleAssignment",
        SubscriptionId = example.Apply(getSubscriptionResult => getSubscriptionResult.Id),
        PolicyDefinitionId = exampleGetPolicyDefintion.Apply(getPolicyDefintionResult => getPolicyDefintionResult.Id),
        Parameters = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["listOfAllowedLocations"] = new Dictionary<string, object?>
            {
                ["value"] = new[]
                {
                    "West Europe",
                    "East US",
                },
            },
        }),
    });
    var exampleSubscriptionPolicyRemediation = new Azure.Core.SubscriptionPolicyRemediation("example", new()
    {
        Name = "example",
        SubscriptionId = example.Apply(getSubscriptionResult => getSubscriptionResult.Id),
        PolicyAssignmentId = exampleSubscriptionPolicyAssignment.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.core.inputs.GetSubscriptionArgs;
import com.pulumi.azure.policy.PolicyFunctions;
import com.pulumi.azure.policy.inputs.GetPolicyDefintionArgs;
import com.pulumi.azure.core.SubscriptionPolicyAssignment;
import com.pulumi.azure.core.SubscriptionPolicyAssignmentArgs;
import com.pulumi.azure.core.SubscriptionPolicyRemediation;
import com.pulumi.azure.core.SubscriptionPolicyRemediationArgs;
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) {
        final var example = CoreFunctions.getSubscription();
        final var exampleGetPolicyDefintion = PolicyFunctions.getPolicyDefintion(GetPolicyDefintionArgs.builder()
            .displayName("Allowed resource types")
            .build());
        var exampleSubscriptionPolicyAssignment = new SubscriptionPolicyAssignment("exampleSubscriptionPolicyAssignment", SubscriptionPolicyAssignmentArgs.builder()
            .name("exampleAssignment")
            .subscriptionId(example.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
            .policyDefinitionId(exampleGetPolicyDefintion.applyValue(getPolicyDefintionResult -> getPolicyDefintionResult.id()))
            .parameters(serializeJson(
                jsonObject(
                    jsonProperty("listOfAllowedLocations", jsonObject(
                        jsonProperty("value", jsonArray(
                            "West Europe", 
                            "East US"
                        ))
                    ))
                )))
            .build());
        var exampleSubscriptionPolicyRemediation = new SubscriptionPolicyRemediation("exampleSubscriptionPolicyRemediation", SubscriptionPolicyRemediationArgs.builder()
            .name("example")
            .subscriptionId(example.applyValue(getSubscriptionResult -> getSubscriptionResult.id()))
            .policyAssignmentId(exampleSubscriptionPolicyAssignment.id())
            .build());
    }
}
resources:
  exampleSubscriptionPolicyAssignment:
    type: azure:core:SubscriptionPolicyAssignment
    name: example
    properties:
      name: exampleAssignment
      subscriptionId: ${example.id}
      policyDefinitionId: ${exampleGetPolicyDefintion.id}
      parameters:
        fn::toJSON:
          listOfAllowedLocations:
            value:
              - West Europe
              - East US
  exampleSubscriptionPolicyRemediation:
    type: azure:core:SubscriptionPolicyRemediation
    name: example
    properties:
      name: example
      subscriptionId: ${example.id}
      policyAssignmentId: ${exampleSubscriptionPolicyAssignment.id}
variables:
  example:
    fn::invoke:
      function: azure:core:getSubscription
      arguments: {}
  exampleGetPolicyDefintion:
    fn::invoke:
      function: azure:policy:getPolicyDefintion
      arguments:
        displayName: Allowed resource types
Create SubscriptionPolicyRemediation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubscriptionPolicyRemediation(name: string, args: SubscriptionPolicyRemediationArgs, opts?: CustomResourceOptions);@overload
def SubscriptionPolicyRemediation(resource_name: str,
                                  args: SubscriptionPolicyRemediationArgs,
                                  opts: Optional[ResourceOptions] = None)
@overload
def SubscriptionPolicyRemediation(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  policy_assignment_id: Optional[str] = None,
                                  subscription_id: Optional[str] = None,
                                  failure_percentage: Optional[float] = None,
                                  location_filters: Optional[Sequence[str]] = None,
                                  name: Optional[str] = None,
                                  parallel_deployments: Optional[int] = None,
                                  policy_definition_reference_id: Optional[str] = None,
                                  resource_count: Optional[int] = None,
                                  resource_discovery_mode: Optional[str] = None)func NewSubscriptionPolicyRemediation(ctx *Context, name string, args SubscriptionPolicyRemediationArgs, opts ...ResourceOption) (*SubscriptionPolicyRemediation, error)public SubscriptionPolicyRemediation(string name, SubscriptionPolicyRemediationArgs args, CustomResourceOptions? opts = null)
public SubscriptionPolicyRemediation(String name, SubscriptionPolicyRemediationArgs args)
public SubscriptionPolicyRemediation(String name, SubscriptionPolicyRemediationArgs args, CustomResourceOptions options)
type: azure:core:SubscriptionPolicyRemediation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SubscriptionPolicyRemediationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SubscriptionPolicyRemediationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SubscriptionPolicyRemediationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubscriptionPolicyRemediationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubscriptionPolicyRemediationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var subscriptionPolicyRemediationResource = new Azure.Core.SubscriptionPolicyRemediation("subscriptionPolicyRemediationResource", new()
{
    PolicyAssignmentId = "string",
    SubscriptionId = "string",
    FailurePercentage = 0,
    LocationFilters = new[]
    {
        "string",
    },
    Name = "string",
    ParallelDeployments = 0,
    PolicyDefinitionReferenceId = "string",
    ResourceCount = 0,
    ResourceDiscoveryMode = "string",
});
example, err := core.NewSubscriptionPolicyRemediation(ctx, "subscriptionPolicyRemediationResource", &core.SubscriptionPolicyRemediationArgs{
	PolicyAssignmentId: pulumi.String("string"),
	SubscriptionId:     pulumi.String("string"),
	FailurePercentage:  pulumi.Float64(0),
	LocationFilters: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name:                        pulumi.String("string"),
	ParallelDeployments:         pulumi.Int(0),
	PolicyDefinitionReferenceId: pulumi.String("string"),
	ResourceCount:               pulumi.Int(0),
	ResourceDiscoveryMode:       pulumi.String("string"),
})
var subscriptionPolicyRemediationResource = new SubscriptionPolicyRemediation("subscriptionPolicyRemediationResource", SubscriptionPolicyRemediationArgs.builder()
    .policyAssignmentId("string")
    .subscriptionId("string")
    .failurePercentage(0)
    .locationFilters("string")
    .name("string")
    .parallelDeployments(0)
    .policyDefinitionReferenceId("string")
    .resourceCount(0)
    .resourceDiscoveryMode("string")
    .build());
subscription_policy_remediation_resource = azure.core.SubscriptionPolicyRemediation("subscriptionPolicyRemediationResource",
    policy_assignment_id="string",
    subscription_id="string",
    failure_percentage=0,
    location_filters=["string"],
    name="string",
    parallel_deployments=0,
    policy_definition_reference_id="string",
    resource_count=0,
    resource_discovery_mode="string")
const subscriptionPolicyRemediationResource = new azure.core.SubscriptionPolicyRemediation("subscriptionPolicyRemediationResource", {
    policyAssignmentId: "string",
    subscriptionId: "string",
    failurePercentage: 0,
    locationFilters: ["string"],
    name: "string",
    parallelDeployments: 0,
    policyDefinitionReferenceId: "string",
    resourceCount: 0,
    resourceDiscoveryMode: "string",
});
type: azure:core:SubscriptionPolicyRemediation
properties:
    failurePercentage: 0
    locationFilters:
        - string
    name: string
    parallelDeployments: 0
    policyAssignmentId: string
    policyDefinitionReferenceId: string
    resourceCount: 0
    resourceDiscoveryMode: string
    subscriptionId: string
SubscriptionPolicyRemediation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The SubscriptionPolicyRemediation resource accepts the following input properties:
- PolicyAssignment stringId 
- The ID of the Policy Assignment that should be remediated.
- SubscriptionId string
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- FailurePercentage double
- 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.
- LocationFilters List<string>
- A list of the resource locations that will be remediated.
- Name string
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- ParallelDeployments int
- 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.
- PolicyDefinition stringReference Id 
- 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.
- ResourceCount int
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- ResourceDiscovery stringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- PolicyAssignment stringId 
- The ID of the Policy Assignment that should be remediated.
- SubscriptionId string
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- FailurePercentage float64
- 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.
- LocationFilters []string
- A list of the resource locations that will be remediated.
- Name string
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- ParallelDeployments int
- 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.
- PolicyDefinition stringReference Id 
- 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.
- ResourceCount int
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- ResourceDiscovery stringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- policyAssignment StringId 
- The ID of the Policy Assignment that should be remediated.
- subscriptionId String
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failurePercentage Double
- 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.
- locationFilters List<String>
- A list of the resource locations that will be remediated.
- name String
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallelDeployments Integer
- 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.
- policyDefinition StringReference Id 
- 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.
- resourceCount Integer
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resourceDiscovery StringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- policyAssignment stringId 
- The ID of the Policy Assignment that should be remediated.
- subscriptionId string
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failurePercentage number
- 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.
- locationFilters string[]
- A list of the resource locations that will be remediated.
- name string
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallelDeployments number
- 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.
- policyDefinition stringReference Id 
- 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.
- resourceCount number
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resourceDiscovery stringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- policy_assignment_ strid 
- The ID of the Policy Assignment that should be remediated.
- subscription_id str
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failure_percentage float
- 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.
- location_filters Sequence[str]
- A list of the resource locations that will be remediated.
- name str
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallel_deployments int
- 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.
- policy_definition_ strreference_ id 
- 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.
- resource_count int
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resource_discovery_ strmode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- policyAssignment StringId 
- The ID of the Policy Assignment that should be remediated.
- subscriptionId String
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failurePercentage Number
- 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.
- locationFilters List<String>
- A list of the resource locations that will be remediated.
- name String
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallelDeployments Number
- 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.
- policyDefinition StringReference Id 
- 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.
- resourceCount Number
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resourceDiscovery StringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
Outputs
All input properties are implicitly available as output properties. Additionally, the SubscriptionPolicyRemediation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SubscriptionPolicyRemediation Resource
Get an existing SubscriptionPolicyRemediation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SubscriptionPolicyRemediationState, opts?: CustomResourceOptions): SubscriptionPolicyRemediation@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        failure_percentage: Optional[float] = None,
        location_filters: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        parallel_deployments: Optional[int] = None,
        policy_assignment_id: Optional[str] = None,
        policy_definition_reference_id: Optional[str] = None,
        resource_count: Optional[int] = None,
        resource_discovery_mode: Optional[str] = None,
        subscription_id: Optional[str] = None) -> SubscriptionPolicyRemediationfunc GetSubscriptionPolicyRemediation(ctx *Context, name string, id IDInput, state *SubscriptionPolicyRemediationState, opts ...ResourceOption) (*SubscriptionPolicyRemediation, error)public static SubscriptionPolicyRemediation Get(string name, Input<string> id, SubscriptionPolicyRemediationState? state, CustomResourceOptions? opts = null)public static SubscriptionPolicyRemediation get(String name, Output<String> id, SubscriptionPolicyRemediationState state, CustomResourceOptions options)resources:  _:    type: azure:core:SubscriptionPolicyRemediation    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- FailurePercentage double
- 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.
- LocationFilters List<string>
- A list of the resource locations that will be remediated.
- Name string
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- ParallelDeployments int
- 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.
- PolicyAssignment stringId 
- The ID of the Policy Assignment that should be remediated.
- PolicyDefinition stringReference Id 
- 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.
- ResourceCount int
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- ResourceDiscovery stringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- SubscriptionId string
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- FailurePercentage float64
- 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.
- LocationFilters []string
- A list of the resource locations that will be remediated.
- Name string
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- ParallelDeployments int
- 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.
- PolicyAssignment stringId 
- The ID of the Policy Assignment that should be remediated.
- PolicyDefinition stringReference Id 
- 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.
- ResourceCount int
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- ResourceDiscovery stringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- SubscriptionId string
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failurePercentage Double
- 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.
- locationFilters List<String>
- A list of the resource locations that will be remediated.
- name String
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallelDeployments Integer
- 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.
- policyAssignment StringId 
- The ID of the Policy Assignment that should be remediated.
- policyDefinition StringReference Id 
- 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.
- resourceCount Integer
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resourceDiscovery StringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- subscriptionId String
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failurePercentage number
- 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.
- locationFilters string[]
- A list of the resource locations that will be remediated.
- name string
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallelDeployments number
- 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.
- policyAssignment stringId 
- The ID of the Policy Assignment that should be remediated.
- policyDefinition stringReference Id 
- 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.
- resourceCount number
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resourceDiscovery stringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- subscriptionId string
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failure_percentage float
- 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.
- location_filters Sequence[str]
- A list of the resource locations that will be remediated.
- name str
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallel_deployments int
- 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.
- policy_assignment_ strid 
- The ID of the Policy Assignment that should be remediated.
- policy_definition_ strreference_ id 
- 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.
- resource_count int
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resource_discovery_ strmode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- subscription_id str
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
- failurePercentage Number
- 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.
- locationFilters List<String>
- A list of the resource locations that will be remediated.
- name String
- The name of the Policy Remediation. Changing this forces a new resource to be created.
- parallelDeployments Number
- 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.
- policyAssignment StringId 
- The ID of the Policy Assignment that should be remediated.
- policyDefinition StringReference Id 
- 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.
- resourceCount Number
- Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
- resourceDiscovery StringMode 
- The way that resources to remediate are discovered. Possible values are ExistingNonCompliant,ReEvaluateCompliance. Defaults toExistingNonCompliant.
- subscriptionId String
- The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
Import
Policy Remediations can be imported using the resource id, e.g.
$ pulumi import azure:core/subscriptionPolicyRemediation:SubscriptionPolicyRemediation example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/remediations/remediation1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.