com.pulumi.azure.appservice.outputs.WindowsFunctionAppBackupSchedule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
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.
// *** 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.outputs;
import com.pulumi.core.annotations.CustomType;
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;
@CustomType
public final class WindowsFunctionAppBackupSchedule {
/**
* @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 Windows Function App SKUs. Please refer to the official documentation for appropriate values.
*
*/
private Integer frequencyInterval;
/**
* @return The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`.
*
*/
private String frequencyUnit;
/**
* @return Should the service keep at least one backup, regardless of age of backup. Defaults to `false`.
*
*/
private @Nullable Boolean keepAtLeastOneBackup;
/**
* @return The time the backup was last attempted.
*
*/
private @Nullable String lastExecutionTime;
/**
* @return After how many days backups should be deleted. Defaults to `30`.
*
*/
private @Nullable Integer retentionPeriodDays;
/**
* @return When the schedule should start working in RFC-3339 format.
*
*/
private @Nullable String startTime;
private WindowsFunctionAppBackupSchedule() {}
/**
* @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 Windows Function App SKUs. Please refer to the official documentation for appropriate values.
*
*/
public Integer frequencyInterval() {
return this.frequencyInterval;
}
/**
* @return The unit of time for how often the backup should take place. Possible values include: `Day` and `Hour`.
*
*/
public String frequencyUnit() {
return this.frequencyUnit;
}
/**
* @return Should the service keep at least one backup, regardless of age of backup. Defaults to `false`.
*
*/
public Optional keepAtLeastOneBackup() {
return Optional.ofNullable(this.keepAtLeastOneBackup);
}
/**
* @return The time the backup was last attempted.
*
*/
public Optional lastExecutionTime() {
return Optional.ofNullable(this.lastExecutionTime);
}
/**
* @return After how many days backups should be deleted. Defaults to `30`.
*
*/
public Optional retentionPeriodDays() {
return Optional.ofNullable(this.retentionPeriodDays);
}
/**
* @return When the schedule should start working in RFC-3339 format.
*
*/
public Optional startTime() {
return Optional.ofNullable(this.startTime);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WindowsFunctionAppBackupSchedule defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private Integer frequencyInterval;
private String frequencyUnit;
private @Nullable Boolean keepAtLeastOneBackup;
private @Nullable String lastExecutionTime;
private @Nullable Integer retentionPeriodDays;
private @Nullable String startTime;
public Builder() {}
public Builder(WindowsFunctionAppBackupSchedule defaults) {
Objects.requireNonNull(defaults);
this.frequencyInterval = defaults.frequencyInterval;
this.frequencyUnit = defaults.frequencyUnit;
this.keepAtLeastOneBackup = defaults.keepAtLeastOneBackup;
this.lastExecutionTime = defaults.lastExecutionTime;
this.retentionPeriodDays = defaults.retentionPeriodDays;
this.startTime = defaults.startTime;
}
@CustomType.Setter
public Builder frequencyInterval(Integer frequencyInterval) {
if (frequencyInterval == null) {
throw new MissingRequiredPropertyException("WindowsFunctionAppBackupSchedule", "frequencyInterval");
}
this.frequencyInterval = frequencyInterval;
return this;
}
@CustomType.Setter
public Builder frequencyUnit(String frequencyUnit) {
if (frequencyUnit == null) {
throw new MissingRequiredPropertyException("WindowsFunctionAppBackupSchedule", "frequencyUnit");
}
this.frequencyUnit = frequencyUnit;
return this;
}
@CustomType.Setter
public Builder keepAtLeastOneBackup(@Nullable Boolean keepAtLeastOneBackup) {
this.keepAtLeastOneBackup = keepAtLeastOneBackup;
return this;
}
@CustomType.Setter
public Builder lastExecutionTime(@Nullable String lastExecutionTime) {
this.lastExecutionTime = lastExecutionTime;
return this;
}
@CustomType.Setter
public Builder retentionPeriodDays(@Nullable Integer retentionPeriodDays) {
this.retentionPeriodDays = retentionPeriodDays;
return this;
}
@CustomType.Setter
public Builder startTime(@Nullable String startTime) {
this.startTime = startTime;
return this;
}
public WindowsFunctionAppBackupSchedule build() {
final var _resultValue = new WindowsFunctionAppBackupSchedule();
_resultValue.frequencyInterval = frequencyInterval;
_resultValue.frequencyUnit = frequencyUnit;
_resultValue.keepAtLeastOneBackup = keepAtLeastOneBackup;
_resultValue.lastExecutionTime = lastExecutionTime;
_resultValue.retentionPeriodDays = retentionPeriodDays;
_resultValue.startTime = startTime;
return _resultValue;
}
}
}