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

com.pulumi.azure.backup.PolicyVMArgs 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.backup;

import com.pulumi.azure.backup.inputs.PolicyVMBackupArgs;
import com.pulumi.azure.backup.inputs.PolicyVMInstantRestoreResourceGroupArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionDailyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionMonthlyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionWeeklyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionYearlyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMTieringPolicyArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final PolicyVMArgs Empty = new PolicyVMArgs();

    /**
     * Configures the Policy backup frequency, times & days as documented in the `backup` block below.
     * 
     */
    @Import(name="backup", required=true)
    private Output backup;

    /**
     * @return Configures the Policy backup frequency, times & days as documented in the `backup` block below.
     * 
     */
    public Output backup() {
        return this.backup;
    }

    /**
     * Specifies the instant restore resource group name as documented in the `instant_restore_resource_group` block below.
     * 
     */
    @Import(name="instantRestoreResourceGroup")
    private @Nullable Output instantRestoreResourceGroup;

    /**
     * @return Specifies the instant restore resource group name as documented in the `instant_restore_resource_group` block below.
     * 
     */
    public Optional> instantRestoreResourceGroup() {
        return Optional.ofNullable(this.instantRestoreResourceGroup);
    }

    /**
     * Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policy_type` is `V1`, and `1` to `30` when `policy_type` is `V2`.
     * 
     * > **NOTE:** `instant_restore_retention_days` **must** be set to `5` if the backup frequency is set to `Weekly`.
     * 
     */
    @Import(name="instantRestoreRetentionDays")
    private @Nullable Output instantRestoreRetentionDays;

    /**
     * @return Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policy_type` is `V1`, and `1` to `30` when `policy_type` is `V2`.
     * 
     * > **NOTE:** `instant_restore_retention_days` **must** be set to `5` if the backup frequency is set to `Weekly`.
     * 
     */
    public Optional> instantRestoreRetentionDays() {
        return Optional.ofNullable(this.instantRestoreRetentionDays);
    }

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

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

    /**
     * Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="policyType")
    private @Nullable Output policyType;

    /**
     * @return Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created.
     * 
     */
    public Optional> policyType() {
        return Optional.ofNullable(this.policyType);
    }

    /**
     * Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="recoveryVaultName", required=true)
    private Output recoveryVaultName;

    /**
     * @return Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
     * 
     */
    public Output recoveryVaultName() {
        return this.recoveryVaultName;
    }

    /**
     * The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Configures the policy daily retention as documented in the `retention_daily` block below. Required when backup frequency is `Daily`.
     * 
     */
    @Import(name="retentionDaily")
    private @Nullable Output retentionDaily;

    /**
     * @return Configures the policy daily retention as documented in the `retention_daily` block below. Required when backup frequency is `Daily`.
     * 
     */
    public Optional> retentionDaily() {
        return Optional.ofNullable(this.retentionDaily);
    }

    /**
     * Configures the policy monthly retention as documented in the `retention_monthly` block below.
     * 
     */
    @Import(name="retentionMonthly")
    private @Nullable Output retentionMonthly;

    /**
     * @return Configures the policy monthly retention as documented in the `retention_monthly` block below.
     * 
     */
    public Optional> retentionMonthly() {
        return Optional.ofNullable(this.retentionMonthly);
    }

    /**
     * Configures the policy weekly retention as documented in the `retention_weekly` block below. Required when backup frequency is `Weekly`.
     * 
     */
    @Import(name="retentionWeekly")
    private @Nullable Output retentionWeekly;

    /**
     * @return Configures the policy weekly retention as documented in the `retention_weekly` block below. Required when backup frequency is `Weekly`.
     * 
     */
    public Optional> retentionWeekly() {
        return Optional.ofNullable(this.retentionWeekly);
    }

    /**
     * Configures the policy yearly retention as documented in the `retention_yearly` block below.
     * 
     */
    @Import(name="retentionYearly")
    private @Nullable Output retentionYearly;

    /**
     * @return Configures the policy yearly retention as documented in the `retention_yearly` block below.
     * 
     */
    public Optional> retentionYearly() {
        return Optional.ofNullable(this.retentionYearly);
    }

    /**
     * A `tiering_policy` block as defined below.
     * 
     */
    @Import(name="tieringPolicy")
    private @Nullable Output tieringPolicy;

    /**
     * @return A `tiering_policy` block as defined below.
     * 
     */
    public Optional> tieringPolicy() {
        return Optional.ofNullable(this.tieringPolicy);
    }

    /**
     * Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC`
     * 
     */
    @Import(name="timezone")
    private @Nullable Output timezone;

    /**
     * @return Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC`
     * 
     */
    public Optional> timezone() {
        return Optional.ofNullable(this.timezone);
    }

    private PolicyVMArgs() {}

    private PolicyVMArgs(PolicyVMArgs $) {
        this.backup = $.backup;
        this.instantRestoreResourceGroup = $.instantRestoreResourceGroup;
        this.instantRestoreRetentionDays = $.instantRestoreRetentionDays;
        this.name = $.name;
        this.policyType = $.policyType;
        this.recoveryVaultName = $.recoveryVaultName;
        this.resourceGroupName = $.resourceGroupName;
        this.retentionDaily = $.retentionDaily;
        this.retentionMonthly = $.retentionMonthly;
        this.retentionWeekly = $.retentionWeekly;
        this.retentionYearly = $.retentionYearly;
        this.tieringPolicy = $.tieringPolicy;
        this.timezone = $.timezone;
    }

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

    public static final class Builder {
        private PolicyVMArgs $;

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

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

        /**
         * @param backup Configures the Policy backup frequency, times & days as documented in the `backup` block below.
         * 
         * @return builder
         * 
         */
        public Builder backup(Output backup) {
            $.backup = backup;
            return this;
        }

        /**
         * @param backup Configures the Policy backup frequency, times & days as documented in the `backup` block below.
         * 
         * @return builder
         * 
         */
        public Builder backup(PolicyVMBackupArgs backup) {
            return backup(Output.of(backup));
        }

        /**
         * @param instantRestoreResourceGroup Specifies the instant restore resource group name as documented in the `instant_restore_resource_group` block below.
         * 
         * @return builder
         * 
         */
        public Builder instantRestoreResourceGroup(@Nullable Output instantRestoreResourceGroup) {
            $.instantRestoreResourceGroup = instantRestoreResourceGroup;
            return this;
        }

        /**
         * @param instantRestoreResourceGroup Specifies the instant restore resource group name as documented in the `instant_restore_resource_group` block below.
         * 
         * @return builder
         * 
         */
        public Builder instantRestoreResourceGroup(PolicyVMInstantRestoreResourceGroupArgs instantRestoreResourceGroup) {
            return instantRestoreResourceGroup(Output.of(instantRestoreResourceGroup));
        }

        /**
         * @param instantRestoreRetentionDays Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policy_type` is `V1`, and `1` to `30` when `policy_type` is `V2`.
         * 
         * > **NOTE:** `instant_restore_retention_days` **must** be set to `5` if the backup frequency is set to `Weekly`.
         * 
         * @return builder
         * 
         */
        public Builder instantRestoreRetentionDays(@Nullable Output instantRestoreRetentionDays) {
            $.instantRestoreRetentionDays = instantRestoreRetentionDays;
            return this;
        }

        /**
         * @param instantRestoreRetentionDays Specifies the instant restore retention range in days. Possible values are between `1` and `5` when `policy_type` is `V1`, and `1` to `30` when `policy_type` is `V2`.
         * 
         * > **NOTE:** `instant_restore_retention_days` **must** be set to `5` if the backup frequency is set to `Weekly`.
         * 
         * @return builder
         * 
         */
        public Builder instantRestoreRetentionDays(Integer instantRestoreRetentionDays) {
            return instantRestoreRetentionDays(Output.of(instantRestoreRetentionDays));
        }

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

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

        /**
         * @param policyType Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder policyType(@Nullable Output policyType) {
            $.policyType = policyType;
            return this;
        }

        /**
         * @param policyType Type of the Backup Policy. Possible values are `V1` and `V2` where `V2` stands for the Enhanced Policy. Defaults to `V1`. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder policyType(String policyType) {
            return policyType(Output.of(policyType));
        }

        /**
         * @param recoveryVaultName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder recoveryVaultName(Output recoveryVaultName) {
            $.recoveryVaultName = recoveryVaultName;
            return this;
        }

        /**
         * @param recoveryVaultName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder recoveryVaultName(String recoveryVaultName) {
            return recoveryVaultName(Output.of(recoveryVaultName));
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param retentionDaily Configures the policy daily retention as documented in the `retention_daily` block below. Required when backup frequency is `Daily`.
         * 
         * @return builder
         * 
         */
        public Builder retentionDaily(@Nullable Output retentionDaily) {
            $.retentionDaily = retentionDaily;
            return this;
        }

        /**
         * @param retentionDaily Configures the policy daily retention as documented in the `retention_daily` block below. Required when backup frequency is `Daily`.
         * 
         * @return builder
         * 
         */
        public Builder retentionDaily(PolicyVMRetentionDailyArgs retentionDaily) {
            return retentionDaily(Output.of(retentionDaily));
        }

        /**
         * @param retentionMonthly Configures the policy monthly retention as documented in the `retention_monthly` block below.
         * 
         * @return builder
         * 
         */
        public Builder retentionMonthly(@Nullable Output retentionMonthly) {
            $.retentionMonthly = retentionMonthly;
            return this;
        }

        /**
         * @param retentionMonthly Configures the policy monthly retention as documented in the `retention_monthly` block below.
         * 
         * @return builder
         * 
         */
        public Builder retentionMonthly(PolicyVMRetentionMonthlyArgs retentionMonthly) {
            return retentionMonthly(Output.of(retentionMonthly));
        }

        /**
         * @param retentionWeekly Configures the policy weekly retention as documented in the `retention_weekly` block below. Required when backup frequency is `Weekly`.
         * 
         * @return builder
         * 
         */
        public Builder retentionWeekly(@Nullable Output retentionWeekly) {
            $.retentionWeekly = retentionWeekly;
            return this;
        }

        /**
         * @param retentionWeekly Configures the policy weekly retention as documented in the `retention_weekly` block below. Required when backup frequency is `Weekly`.
         * 
         * @return builder
         * 
         */
        public Builder retentionWeekly(PolicyVMRetentionWeeklyArgs retentionWeekly) {
            return retentionWeekly(Output.of(retentionWeekly));
        }

        /**
         * @param retentionYearly Configures the policy yearly retention as documented in the `retention_yearly` block below.
         * 
         * @return builder
         * 
         */
        public Builder retentionYearly(@Nullable Output retentionYearly) {
            $.retentionYearly = retentionYearly;
            return this;
        }

        /**
         * @param retentionYearly Configures the policy yearly retention as documented in the `retention_yearly` block below.
         * 
         * @return builder
         * 
         */
        public Builder retentionYearly(PolicyVMRetentionYearlyArgs retentionYearly) {
            return retentionYearly(Output.of(retentionYearly));
        }

        /**
         * @param tieringPolicy A `tiering_policy` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder tieringPolicy(@Nullable Output tieringPolicy) {
            $.tieringPolicy = tieringPolicy;
            return this;
        }

        /**
         * @param tieringPolicy A `tiering_policy` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder tieringPolicy(PolicyVMTieringPolicyArgs tieringPolicy) {
            return tieringPolicy(Output.of(tieringPolicy));
        }

        /**
         * @param timezone Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC`
         * 
         * @return builder
         * 
         */
        public Builder timezone(@Nullable Output timezone) {
            $.timezone = timezone;
            return this;
        }

        /**
         * @param timezone Specifies the timezone. [the possible values are defined here](https://jackstromberg.com/2017/01/list-of-time-zones-consumed-by-azure/). Defaults to `UTC`
         * 
         * @return builder
         * 
         */
        public Builder timezone(String timezone) {
            return timezone(Output.of(timezone));
        }

        public PolicyVMArgs build() {
            if ($.backup == null) {
                throw new MissingRequiredPropertyException("PolicyVMArgs", "backup");
            }
            if ($.recoveryVaultName == null) {
                throw new MissingRequiredPropertyException("PolicyVMArgs", "recoveryVaultName");
            }
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("PolicyVMArgs", "resourceGroupName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy