BackupScheduleArgs

data class BackupScheduleArgs(val dailyRecurrence: Output<BackupScheduleDailyRecurrenceArgs>? = null, val database: Output<String>? = null, val project: Output<String>? = null, val retention: Output<String>? = null, val weeklyRecurrence: Output<BackupScheduleWeeklyRecurrenceArgs>? = null) : ConvertibleToJava<BackupScheduleArgs>

A backup schedule for a Cloud Firestore Database. This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though. To get more information about BackupSchedule, see:

Warning: This resource creates a Firestore Backup Schedule on a project that already has a Firestore database. This resource is owned by the database it is backing up, and is deleted along with the database. The actual backups are not though.

Example Usage

Firestore Backup Schedule Daily

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.BackupSchedule;
import com.pulumi.gcp.firestore.BackupScheduleArgs;
import com.pulumi.gcp.firestore.inputs.BackupScheduleDailyRecurrenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var daily_backup = new BackupSchedule("daily-backup", BackupScheduleArgs.builder()
.dailyRecurrence()
.project("my-project-name")
.retention("604800s")
.build());
}
}

Firestore Backup Schedule Weekly

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.firestore.BackupSchedule;
import com.pulumi.gcp.firestore.BackupScheduleArgs;
import com.pulumi.gcp.firestore.inputs.BackupScheduleWeeklyRecurrenceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var weekly_backup = new BackupSchedule("weekly-backup", BackupScheduleArgs.builder()
.database("(default)")
.project("my-project-name")
.retention("8467200s")
.weeklyRecurrence(BackupScheduleWeeklyRecurrenceArgs.builder()
.day("SUNDAY")
.build())
.build());
}
}

Import

BackupSchedule can be imported using any of these accepted formats* projects/{{project}}/databases/{{database}}/backupSchedules/{{name}} * {{project}}/{{database}}/{{name}} * {{database}}/{{name}} In Terraform v1.5.0 and later, use an import block to import BackupSchedule using one of the formats above. For exampletf import { id = "projects/{{project}}/databases/{{database}}/backupSchedules/{{name}}" to = google_firestore_backup_schedule.default }

$ pulumi import gcp:firestore/backupSchedule:BackupSchedule When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), BackupSchedule can be imported using one of the formats above. For example
$ pulumi import gcp:firestore/backupSchedule:BackupSchedule default projects/{{project}}/databases/{{database}}/backupSchedules/{{name}}
$ pulumi import gcp:firestore/backupSchedule:BackupSchedule default {{project}}/{{database}}/{{name}}
$ pulumi import gcp:firestore/backupSchedule:BackupSchedule default {{database}}/{{name}}

Constructors

Link copied to clipboard
fun BackupScheduleArgs(dailyRecurrence: Output<BackupScheduleDailyRecurrenceArgs>? = null, database: Output<String>? = null, project: Output<String>? = null, retention: Output<String>? = null, weeklyRecurrence: Output<BackupScheduleWeeklyRecurrenceArgs>? = null)

Functions

Link copied to clipboard
open override fun toJava(): BackupScheduleArgs

Properties

Link copied to clipboard

For a schedule that runs daily at a specified time.

Link copied to clipboard
val database: Output<String>? = null

The Firestore database id. Defaults to "(default)".

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val retention: Output<String>? = null

At what relative time in the future, compared to its creation time, the backup should be deleted, e.g. keep backups for 7 days. A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". For a daily backup recurrence, set this to a value up to 7 days. If you set a weekly backup recurrence, set this to a value up to 14 weeks.

Link copied to clipboard

For a schedule that runs weekly on a specific day and time. Structure is documented below.