import * as pulumi from "@pulumi/pulumi"; /** * Manages an Azure Subscription Policy Remediation. * * ## Example Usage * * ```typescript * 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, * }); * ``` * * ## 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/subscriptionPolicyRemediation:SubscriptionPolicyRemediation example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.PolicyInsights/remediations/remediation1 * ``` */ export declare class SubscriptionPolicyRemediation extends pulumi.CustomResource { /** * Get an existing SubscriptionPolicyRemediation 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?: SubscriptionPolicyRemediationState, opts?: pulumi.CustomResourceOptions): SubscriptionPolicyRemediation; /** * Returns true if the given object is an instance of SubscriptionPolicyRemediation. 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 SubscriptionPolicyRemediation; /** * 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 Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. */ readonly subscriptionId: pulumi.Output; /** * Create a SubscriptionPolicyRemediation 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: SubscriptionPolicyRemediationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SubscriptionPolicyRemediation resources. */ export interface SubscriptionPolicyRemediationState { /** * 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 Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. */ subscriptionId?: pulumi.Input; } /** * The set of arguments for constructing a SubscriptionPolicyRemediation resource. */ export interface SubscriptionPolicyRemediationArgs { /** * 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 Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created. */ subscriptionId: pulumi.Input; }