// *** WARNING: this file was generated by pulumi-language-dotnet. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; using Pulumi; namespace Maxvojtkov.Dokploy { /// /// A scheduled backup of a Docker volume to a configured `dokploy.Destination`. /// /// This is the counterpart to a `dokploy.Mount` with `type = "volume"`: the mount gives the volume a stable name, and this resource copies its contents off the host on a schedule. /// /// Set exactly one of the `*_id` attributes to say which service owns the volume. /// [DokployResourceType("dokploy:index/volumeBackup:VolumeBackup")] public partial class VolumeBackup : global::Pulumi.CustomResource { /// /// Docker service name that owns the volume. Derived by Dokploy when omitted. /// [Output("appName")] public Output AppName { get; private set; } = null!; /// /// Application that owns the volume. /// [Output("applicationId")] public Output ApplicationId { get; private set; } = null!; /// /// Compose stack that owns the volume. /// [Output("composeId")] public Output ComposeId { get; private set; } = null!; /// /// RFC 3339 timestamp of when the backup job was created. /// [Output("createdAt")] public Output CreatedAt { get; private set; } = null!; /// /// Standard five-field cron expression, for example `0 4 * * *`. /// [Output("cronExpression")] public Output CronExpression { get; private set; } = null!; /// /// Backup destination (S3-compatible bucket) to upload to. /// [Output("destinationId")] public Output DestinationId { get; private set; } = null!; /// /// Whether the backup schedule is active. /// [Output("enabled")] public Output Enabled { get; private set; } = null!; /// /// Number of backups to retain. Older ones are pruned. /// [Output("keepLatestCount")] public Output KeepLatestCount { get; private set; } = null!; /// /// libSQL instance that owns the volume. /// [Output("libsqlId")] public Output LibsqlId { get; private set; } = null!; /// /// MariaDB instance that owns the volume. /// [Output("mariadbId")] public Output MariadbId { get; private set; } = null!; /// /// MongoDB instance that owns the volume. /// [Output("mongoId")] public Output MongoId { get; private set; } = null!; /// /// MySQL instance that owns the volume. /// [Output("mysqlId")] public Output MysqlId { get; private set; } = null!; /// /// Display name of the backup job. /// [Output("name")] public Output Name { get; private set; } = null!; /// /// PostgreSQL instance that owns the volume. /// [Output("postgresId")] public Output PostgresId { get; private set; } = null!; /// /// Path prefix inside the destination bucket, for example `backups/shop/`. /// [Output("prefix")] public Output Prefix { get; private set; } = null!; /// /// Redis instance that owns the volume. /// [Output("redisId")] public Output RedisId { get; private set; } = null!; /// /// Service inside a Compose stack that owns the volume. /// [Output("serviceName")] public Output ServiceName { get; private set; } = null!; /// /// The kind of service that owns the volume. Valid values: `Application`, `Postgres`, `Mysql`, `Mariadb`, `Mongo`, `Redis`, `Compose`, `Libsql`. Defaults to `Application`. /// [Output("serviceType")] public Output ServiceType { get; private set; } = null!; /// /// Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to. /// [Output("turnOff")] public Output TurnOff { get; private set; } = null!; /// /// Name of the Docker volume to back up. /// [Output("volumeName")] public Output VolumeName { get; private set; } = null!; /// /// Create a VolumeBackup resource with the given unique name, arguments, and options. /// /// /// The unique name of the resource /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public VolumeBackup(string name, VolumeBackupArgs args, CustomResourceOptions? options = null) : base("dokploy:index/volumeBackup:VolumeBackup", name, args ?? new VolumeBackupArgs(), MakeResourceOptions(options, "")) { } private VolumeBackup(string name, Input id, VolumeBackupState? state = null, CustomResourceOptions? options = null) : base("dokploy:index/volumeBackup:VolumeBackup", name, state, MakeResourceOptions(options, id)) { } private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) { var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, PluginDownloadURL = "https://gitea.coolify.vojtkov.dev/usr_unknown/pulumi-dokploy/releases/download/v${VERSION}", }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. merged.Id = id ?? merged.Id; return merged; } /// /// Get an existing VolumeBackup resource's state with the given name, ID, and optional extra /// properties used to qualify the lookup. /// /// /// The unique name of the resulting resource. /// The unique provider ID of the resource to lookup. /// Any extra arguments used during the lookup. /// A bag of options that control this resource's behavior public static VolumeBackup Get(string name, Input id, VolumeBackupState? state = null, CustomResourceOptions? options = null) { return new VolumeBackup(name, id, state, options); } } public sealed class VolumeBackupArgs : global::Pulumi.ResourceArgs { /// /// Docker service name that owns the volume. Derived by Dokploy when omitted. /// [Input("appName")] public Input? AppName { get; set; } /// /// Application that owns the volume. /// [Input("applicationId")] public Input? ApplicationId { get; set; } /// /// Compose stack that owns the volume. /// [Input("composeId")] public Input? ComposeId { get; set; } /// /// Standard five-field cron expression, for example `0 4 * * *`. /// [Input("cronExpression", required: true)] public Input CronExpression { get; set; } = null!; /// /// Backup destination (S3-compatible bucket) to upload to. /// [Input("destinationId", required: true)] public Input DestinationId { get; set; } = null!; /// /// Whether the backup schedule is active. /// [Input("enabled")] public Input? Enabled { get; set; } /// /// Number of backups to retain. Older ones are pruned. /// [Input("keepLatestCount")] public Input? KeepLatestCount { get; set; } /// /// libSQL instance that owns the volume. /// [Input("libsqlId")] public Input? LibsqlId { get; set; } /// /// MariaDB instance that owns the volume. /// [Input("mariadbId")] public Input? MariadbId { get; set; } /// /// MongoDB instance that owns the volume. /// [Input("mongoId")] public Input? MongoId { get; set; } /// /// MySQL instance that owns the volume. /// [Input("mysqlId")] public Input? MysqlId { get; set; } /// /// Display name of the backup job. /// [Input("name")] public Input? Name { get; set; } /// /// PostgreSQL instance that owns the volume. /// [Input("postgresId")] public Input? PostgresId { get; set; } /// /// Path prefix inside the destination bucket, for example `backups/shop/`. /// [Input("prefix", required: true)] public Input Prefix { get; set; } = null!; /// /// Redis instance that owns the volume. /// [Input("redisId")] public Input? RedisId { get; set; } /// /// Service inside a Compose stack that owns the volume. /// [Input("serviceName")] public Input? ServiceName { get; set; } /// /// The kind of service that owns the volume. Valid values: `Application`, `Postgres`, `Mysql`, `Mariadb`, `Mongo`, `Redis`, `Compose`, `Libsql`. Defaults to `Application`. /// [Input("serviceType")] public Input? ServiceType { get; set; } /// /// Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to. /// [Input("turnOff")] public Input? TurnOff { get; set; } /// /// Name of the Docker volume to back up. /// [Input("volumeName", required: true)] public Input VolumeName { get; set; } = null!; public VolumeBackupArgs() { } public static new VolumeBackupArgs Empty => new VolumeBackupArgs(); } public sealed class VolumeBackupState : global::Pulumi.ResourceArgs { /// /// Docker service name that owns the volume. Derived by Dokploy when omitted. /// [Input("appName")] public Input? AppName { get; set; } /// /// Application that owns the volume. /// [Input("applicationId")] public Input? ApplicationId { get; set; } /// /// Compose stack that owns the volume. /// [Input("composeId")] public Input? ComposeId { get; set; } /// /// RFC 3339 timestamp of when the backup job was created. /// [Input("createdAt")] public Input? CreatedAt { get; set; } /// /// Standard five-field cron expression, for example `0 4 * * *`. /// [Input("cronExpression")] public Input? CronExpression { get; set; } /// /// Backup destination (S3-compatible bucket) to upload to. /// [Input("destinationId")] public Input? DestinationId { get; set; } /// /// Whether the backup schedule is active. /// [Input("enabled")] public Input? Enabled { get; set; } /// /// Number of backups to retain. Older ones are pruned. /// [Input("keepLatestCount")] public Input? KeepLatestCount { get; set; } /// /// libSQL instance that owns the volume. /// [Input("libsqlId")] public Input? LibsqlId { get; set; } /// /// MariaDB instance that owns the volume. /// [Input("mariadbId")] public Input? MariadbId { get; set; } /// /// MongoDB instance that owns the volume. /// [Input("mongoId")] public Input? MongoId { get; set; } /// /// MySQL instance that owns the volume. /// [Input("mysqlId")] public Input? MysqlId { get; set; } /// /// Display name of the backup job. /// [Input("name")] public Input? Name { get; set; } /// /// PostgreSQL instance that owns the volume. /// [Input("postgresId")] public Input? PostgresId { get; set; } /// /// Path prefix inside the destination bucket, for example `backups/shop/`. /// [Input("prefix")] public Input? Prefix { get; set; } /// /// Redis instance that owns the volume. /// [Input("redisId")] public Input? RedisId { get; set; } /// /// Service inside a Compose stack that owns the volume. /// [Input("serviceName")] public Input? ServiceName { get; set; } /// /// The kind of service that owns the volume. Valid values: `Application`, `Postgres`, `Mysql`, `Mariadb`, `Mongo`, `Redis`, `Compose`, `Libsql`. Defaults to `Application`. /// [Input("serviceType")] public Input? ServiceType { get; set; } /// /// Stop the service while the backup runs. Slower, but guarantees a consistent copy of data that is being written to. /// [Input("turnOff")] public Input? TurnOff { get; set; } /// /// Name of the Docker volume to back up. /// [Input("volumeName")] public Input? VolumeName { get; set; } public VolumeBackupState() { } public static new VolumeBackupState Empty => new VolumeBackupState(); } }