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

com.pulumi.azure.appservice.inputs.LinuxWebAppBackupScheduleArgs Maven / Gradle / Ivy

// *** 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.appservice.inputs;

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


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

    public static final LinuxWebAppBackupScheduleArgs Empty = new LinuxWebAppBackupScheduleArgs();

    /**
     * How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`).
     * 
     * > **NOTE:** Not all intervals are supported on all Linux Web App SKUs. Please refer to the official documentation for appropriate values.
     * 
     */
    @Import(name="frequencyInterval", required=true)
    private Output frequencyInterval;

    /**
     * @return How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`).
     * 
     * > **NOTE:** Not all intervals are supported on all Linux Web App SKUs. Please refer to the official documentation for appropriate values.
     * 
     */
    public Output frequencyInterval() {
        return this.frequencyInterval;
    }

    /**
     * The unit of time for how often the backup should take place. Possible values include: `Day`, `Hour`
     * 
     */
    @Import(name="frequencyUnit", required=true)
    private Output frequencyUnit;

    /**
     * @return The unit of time for how often the backup should take place. Possible values include: `Day`, `Hour`
     * 
     */
    public Output frequencyUnit() {
        return this.frequencyUnit;
    }

    /**
     * Should the service keep at least one backup, regardless of the age of backup? Defaults to `false`.
     * 
     */
    @Import(name="keepAtLeastOneBackup")
    private @Nullable Output keepAtLeastOneBackup;

    /**
     * @return Should the service keep at least one backup, regardless of the age of backup? Defaults to `false`.
     * 
     */
    public Optional> keepAtLeastOneBackup() {
        return Optional.ofNullable(this.keepAtLeastOneBackup);
    }

    /**
     * The time the backup was last attempted.
     * 
     */
    @Import(name="lastExecutionTime")
    private @Nullable Output lastExecutionTime;

    /**
     * @return The time the backup was last attempted.
     * 
     */
    public Optional> lastExecutionTime() {
        return Optional.ofNullable(this.lastExecutionTime);
    }

    /**
     * After how many days backups should be deleted. Defaults to `30`.
     * 
     */
    @Import(name="retentionPeriodDays")
    private @Nullable Output retentionPeriodDays;

    /**
     * @return After how many days backups should be deleted. Defaults to `30`.
     * 
     */
    public Optional> retentionPeriodDays() {
        return Optional.ofNullable(this.retentionPeriodDays);
    }

    /**
     * When the schedule should start working in RFC-3339 format.
     * 
     */
    @Import(name="startTime")
    private @Nullable Output startTime;

    /**
     * @return When the schedule should start working in RFC-3339 format.
     * 
     */
    public Optional> startTime() {
        return Optional.ofNullable(this.startTime);
    }

    private LinuxWebAppBackupScheduleArgs() {}

    private LinuxWebAppBackupScheduleArgs(LinuxWebAppBackupScheduleArgs $) {
        this.frequencyInterval = $.frequencyInterval;
        this.frequencyUnit = $.frequencyUnit;
        this.keepAtLeastOneBackup = $.keepAtLeastOneBackup;
        this.lastExecutionTime = $.lastExecutionTime;
        this.retentionPeriodDays = $.retentionPeriodDays;
        this.startTime = $.startTime;
    }

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

    public static final class Builder {
        private LinuxWebAppBackupScheduleArgs $;

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

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

        /**
         * @param frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`).
         * 
         * > **NOTE:** Not all intervals are supported on all Linux Web App SKUs. Please refer to the official documentation for appropriate values.
         * 
         * @return builder
         * 
         */
        public Builder frequencyInterval(Output frequencyInterval) {
            $.frequencyInterval = frequencyInterval;
            return this;
        }

        /**
         * @param frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to `7` and `frequency_unit` should be set to `Day`).
         * 
         * > **NOTE:** Not all intervals are supported on all Linux Web App SKUs. Please refer to the official documentation for appropriate values.
         * 
         * @return builder
         * 
         */
        public Builder frequencyInterval(Integer frequencyInterval) {
            return frequencyInterval(Output.of(frequencyInterval));
        }

        /**
         * @param frequencyUnit The unit of time for how often the backup should take place. Possible values include: `Day`, `Hour`
         * 
         * @return builder
         * 
         */
        public Builder frequencyUnit(Output frequencyUnit) {
            $.frequencyUnit = frequencyUnit;
            return this;
        }

        /**
         * @param frequencyUnit The unit of time for how often the backup should take place. Possible values include: `Day`, `Hour`
         * 
         * @return builder
         * 
         */
        public Builder frequencyUnit(String frequencyUnit) {
            return frequencyUnit(Output.of(frequencyUnit));
        }

        /**
         * @param keepAtLeastOneBackup Should the service keep at least one backup, regardless of the age of backup? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder keepAtLeastOneBackup(@Nullable Output keepAtLeastOneBackup) {
            $.keepAtLeastOneBackup = keepAtLeastOneBackup;
            return this;
        }

        /**
         * @param keepAtLeastOneBackup Should the service keep at least one backup, regardless of the age of backup? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder keepAtLeastOneBackup(Boolean keepAtLeastOneBackup) {
            return keepAtLeastOneBackup(Output.of(keepAtLeastOneBackup));
        }

        /**
         * @param lastExecutionTime The time the backup was last attempted.
         * 
         * @return builder
         * 
         */
        public Builder lastExecutionTime(@Nullable Output lastExecutionTime) {
            $.lastExecutionTime = lastExecutionTime;
            return this;
        }

        /**
         * @param lastExecutionTime The time the backup was last attempted.
         * 
         * @return builder
         * 
         */
        public Builder lastExecutionTime(String lastExecutionTime) {
            return lastExecutionTime(Output.of(lastExecutionTime));
        }

        /**
         * @param retentionPeriodDays After how many days backups should be deleted. Defaults to `30`.
         * 
         * @return builder
         * 
         */
        public Builder retentionPeriodDays(@Nullable Output retentionPeriodDays) {
            $.retentionPeriodDays = retentionPeriodDays;
            return this;
        }

        /**
         * @param retentionPeriodDays After how many days backups should be deleted. Defaults to `30`.
         * 
         * @return builder
         * 
         */
        public Builder retentionPeriodDays(Integer retentionPeriodDays) {
            return retentionPeriodDays(Output.of(retentionPeriodDays));
        }

        /**
         * @param startTime When the schedule should start working in RFC-3339 format.
         * 
         * @return builder
         * 
         */
        public Builder startTime(@Nullable Output startTime) {
            $.startTime = startTime;
            return this;
        }

        /**
         * @param startTime When the schedule should start working in RFC-3339 format.
         * 
         * @return builder
         * 
         */
        public Builder startTime(String startTime) {
            return startTime(Output.of(startTime));
        }

        public LinuxWebAppBackupScheduleArgs build() {
            if ($.frequencyInterval == null) {
                throw new MissingRequiredPropertyException("LinuxWebAppBackupScheduleArgs", "frequencyInterval");
            }
            if ($.frequencyUnit == null) {
                throw new MissingRequiredPropertyException("LinuxWebAppBackupScheduleArgs", "frequencyUnit");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy