All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.core.SubscriptionPolicyRemediationArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** 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.azure.core;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class SubscriptionPolicyRemediationArgs extends com.pulumi.resources.ResourceArgs {

    public static final SubscriptionPolicyRemediationArgs Empty = new 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.
     * 
     */
    @Import(name="failurePercentage")
    private @Nullable Output failurePercentage;

    /**
     * @return 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.
     * 
     */
    public Optional> failurePercentage() {
        return Optional.ofNullable(this.failurePercentage);
    }

    /**
     * A list of the resource locations that will be remediated.
     * 
     */
    @Import(name="locationFilters")
    private @Nullable Output> locationFilters;

    /**
     * @return A list of the resource locations that will be remediated.
     * 
     */
    public Optional>> locationFilters() {
        return Optional.ofNullable(this.locationFilters);
    }

    /**
     * The name of the Policy Remediation. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the Policy Remediation. Changing this forces a new resource to be created.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * 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.
     * 
     */
    @Import(name="parallelDeployments")
    private @Nullable Output parallelDeployments;

    /**
     * @return 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.
     * 
     */
    public Optional> parallelDeployments() {
        return Optional.ofNullable(this.parallelDeployments);
    }

    /**
     * The ID of the Policy Assignment that should be remediated.
     * 
     */
    @Import(name="policyAssignmentId", required=true)
    private Output policyAssignmentId;

    /**
     * @return The ID of the Policy Assignment that should be remediated.
     * 
     */
    public Output policyAssignmentId() {
        return this.policyAssignmentId;
    }

    /**
     * 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.
     * 
     */
    @Import(name="policyDefinitionReferenceId")
    private @Nullable Output policyDefinitionReferenceId;

    /**
     * @return 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.
     * 
     */
    public Optional> policyDefinitionReferenceId() {
        return Optional.ofNullable(this.policyDefinitionReferenceId);
    }

    /**
     * Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
     * 
     */
    @Import(name="resourceCount")
    private @Nullable Output resourceCount;

    /**
     * @return Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
     * 
     */
    public Optional> resourceCount() {
        return Optional.ofNullable(this.resourceCount);
    }

    /**
     * The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
     * 
     */
    @Import(name="resourceDiscoveryMode")
    private @Nullable Output resourceDiscoveryMode;

    /**
     * @return The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
     * 
     */
    public Optional> resourceDiscoveryMode() {
        return Optional.ofNullable(this.resourceDiscoveryMode);
    }

    /**
     * The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="subscriptionId", required=true)
    private Output subscriptionId;

    /**
     * @return The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
     * 
     */
    public Output subscriptionId() {
        return this.subscriptionId;
    }

    private SubscriptionPolicyRemediationArgs() {}

    private SubscriptionPolicyRemediationArgs(SubscriptionPolicyRemediationArgs $) {
        this.failurePercentage = $.failurePercentage;
        this.locationFilters = $.locationFilters;
        this.name = $.name;
        this.parallelDeployments = $.parallelDeployments;
        this.policyAssignmentId = $.policyAssignmentId;
        this.policyDefinitionReferenceId = $.policyDefinitionReferenceId;
        this.resourceCount = $.resourceCount;
        this.resourceDiscoveryMode = $.resourceDiscoveryMode;
        this.subscriptionId = $.subscriptionId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(SubscriptionPolicyRemediationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private SubscriptionPolicyRemediationArgs $;

        public Builder() {
            $ = new SubscriptionPolicyRemediationArgs();
        }

        public Builder(SubscriptionPolicyRemediationArgs defaults) {
            $ = new SubscriptionPolicyRemediationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param failurePercentage 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.
         * 
         * @return builder
         * 
         */
        public Builder failurePercentage(@Nullable Output failurePercentage) {
            $.failurePercentage = failurePercentage;
            return this;
        }

        /**
         * @param failurePercentage 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.
         * 
         * @return builder
         * 
         */
        public Builder failurePercentage(Double failurePercentage) {
            return failurePercentage(Output.of(failurePercentage));
        }

        /**
         * @param locationFilters A list of the resource locations that will be remediated.
         * 
         * @return builder
         * 
         */
        public Builder locationFilters(@Nullable Output> locationFilters) {
            $.locationFilters = locationFilters;
            return this;
        }

        /**
         * @param locationFilters A list of the resource locations that will be remediated.
         * 
         * @return builder
         * 
         */
        public Builder locationFilters(List locationFilters) {
            return locationFilters(Output.of(locationFilters));
        }

        /**
         * @param locationFilters A list of the resource locations that will be remediated.
         * 
         * @return builder
         * 
         */
        public Builder locationFilters(String... locationFilters) {
            return locationFilters(List.of(locationFilters));
        }

        /**
         * @param name The name of the Policy Remediation. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the Policy Remediation. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param parallelDeployments 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.
         * 
         * @return builder
         * 
         */
        public Builder parallelDeployments(@Nullable Output parallelDeployments) {
            $.parallelDeployments = parallelDeployments;
            return this;
        }

        /**
         * @param parallelDeployments 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.
         * 
         * @return builder
         * 
         */
        public Builder parallelDeployments(Integer parallelDeployments) {
            return parallelDeployments(Output.of(parallelDeployments));
        }

        /**
         * @param policyAssignmentId The ID of the Policy Assignment that should be remediated.
         * 
         * @return builder
         * 
         */
        public Builder policyAssignmentId(Output policyAssignmentId) {
            $.policyAssignmentId = policyAssignmentId;
            return this;
        }

        /**
         * @param policyAssignmentId The ID of the Policy Assignment that should be remediated.
         * 
         * @return builder
         * 
         */
        public Builder policyAssignmentId(String policyAssignmentId) {
            return policyAssignmentId(Output.of(policyAssignmentId));
        }

        /**
         * @param policyDefinitionReferenceId 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.
         * 
         * @return builder
         * 
         */
        public Builder policyDefinitionReferenceId(@Nullable Output policyDefinitionReferenceId) {
            $.policyDefinitionReferenceId = policyDefinitionReferenceId;
            return this;
        }

        /**
         * @param policyDefinitionReferenceId 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.
         * 
         * @return builder
         * 
         */
        public Builder policyDefinitionReferenceId(String policyDefinitionReferenceId) {
            return policyDefinitionReferenceId(Output.of(policyDefinitionReferenceId));
        }

        /**
         * @param resourceCount Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
         * 
         * @return builder
         * 
         */
        public Builder resourceCount(@Nullable Output resourceCount) {
            $.resourceCount = resourceCount;
            return this;
        }

        /**
         * @param resourceCount Determines the max number of resources that can be remediated by the remediation job. If not provided, the default resource count is used.
         * 
         * @return builder
         * 
         */
        public Builder resourceCount(Integer resourceCount) {
            return resourceCount(Output.of(resourceCount));
        }

        /**
         * @param resourceDiscoveryMode The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
         * 
         * @return builder
         * 
         */
        public Builder resourceDiscoveryMode(@Nullable Output resourceDiscoveryMode) {
            $.resourceDiscoveryMode = resourceDiscoveryMode;
            return this;
        }

        /**
         * @param resourceDiscoveryMode The way that resources to remediate are discovered. Possible values are `ExistingNonCompliant`, `ReEvaluateCompliance`. Defaults to `ExistingNonCompliant`.
         * 
         * @return builder
         * 
         */
        public Builder resourceDiscoveryMode(String resourceDiscoveryMode) {
            return resourceDiscoveryMode(Output.of(resourceDiscoveryMode));
        }

        /**
         * @param subscriptionId The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(Output subscriptionId) {
            $.subscriptionId = subscriptionId;
            return this;
        }

        /**
         * @param subscriptionId The Subscription ID at which the Policy Remediation should be applied. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder subscriptionId(String subscriptionId) {
            return subscriptionId(Output.of(subscriptionId));
        }

        public SubscriptionPolicyRemediationArgs build() {
            if ($.policyAssignmentId == null) {
                throw new MissingRequiredPropertyException("SubscriptionPolicyRemediationArgs", "policyAssignmentId");
            }
            if ($.subscriptionId == null) {
                throw new MissingRequiredPropertyException("SubscriptionPolicyRemediationArgs", "subscriptionId");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy