1. Packages
  2. Event Store Cloud
  3. API Docs
  4. ScheduledBackup
Event Store Cloud v0.2.10 published on Thursday, Aug 31, 2023 by EventStore

eventstorecloud.ScheduledBackup

Explore with Pulumi AI

eventstorecloud logo
Event Store Cloud v0.2.10 published on Thursday, Aug 31, 2023 by EventStore

    Creates a new scheduled backup.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using EventStoreCloud = Pulumi.EventStoreCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var daily = new EventStoreCloud.ScheduledBackup("daily", new()
        {
            ProjectId = eventstorecloud_project.Example.Id,
            Schedule = "0 12 * * */1",
            Description = "Creates a backup once a day at 12:00",
            SourceClusterId = eventstorecloud_managed_cluster.Example.Id,
            BackupDescription = "{cluster} Daily Backup {datetime:RFC3339}",
            MaxBackupCount = 3,
        });
    
    });
    
    package main
    
    import (
    	"github.com/EventStore/pulumi-eventstorecloud/sdk/go/eventstorecloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eventstorecloud.NewScheduledBackup(ctx, "daily", &eventstorecloud.ScheduledBackupArgs{
    			ProjectId:         pulumi.Any(eventstorecloud_project.Example.Id),
    			Schedule:          pulumi.String("0 12 * * */1"),
    			Description:       pulumi.String("Creates a backup once a day at 12:00"),
    			SourceClusterId:   pulumi.Any(eventstorecloud_managed_cluster.Example.Id),
    			BackupDescription: pulumi.String("{cluster} Daily Backup {datetime:RFC3339}"),
    			MaxBackupCount:    pulumi.Int(3),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.eventstorecloud.ScheduledBackup;
    import com.pulumi.eventstorecloud.ScheduledBackupArgs;
    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 = new ScheduledBackup("daily", ScheduledBackupArgs.builder()        
                .projectId(eventstorecloud_project.example().id())
                .schedule("0 12 * * */1")
                .description("Creates a backup once a day at 12:00")
                .sourceClusterId(eventstorecloud_managed_cluster.example().id())
                .backupDescription("{cluster} Daily Backup {datetime:RFC3339}")
                .maxBackupCount(3)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_eventstorecloud as eventstorecloud
    
    daily = eventstorecloud.ScheduledBackup("daily",
        project_id=eventstorecloud_project["example"]["id"],
        schedule="0 12 * * */1",
        description="Creates a backup once a day at 12:00",
        source_cluster_id=eventstorecloud_managed_cluster["example"]["id"],
        backup_description="{cluster} Daily Backup {datetime:RFC3339}",
        max_backup_count=3)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as eventstorecloud from "@eventstore/pulumi-eventstorecloud";
    
    const daily = new eventstorecloud.ScheduledBackup("daily", {
        projectId: eventstorecloud_project.example.id,
        schedule: "0 12 * * */1",
        description: "Creates a backup once a day at 12:00",
        sourceClusterId: eventstorecloud_managed_cluster.example.id,
        backupDescription: "{cluster} Daily Backup {datetime:RFC3339}",
        maxBackupCount: 3,
    });
    
    resources:
      daily:
        type: eventstorecloud:ScheduledBackup
        properties:
          projectId: ${eventstorecloud_project.example.id}
          schedule: 0 12 * * */1
          description: Creates a backup once a day at 12:00
          sourceClusterId: ${eventstorecloud_managed_cluster.example.id}
          backupDescription: '{cluster} Daily Backup {datetime:RFC3339}'
          maxBackupCount: 3
    

    Create ScheduledBackup Resource

    new ScheduledBackup(name: string, args: ScheduledBackupArgs, opts?: CustomResourceOptions);
    @overload
    def ScheduledBackup(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        backup_description: Optional[str] = None,
                        description: Optional[str] = None,
                        max_backup_count: Optional[int] = None,
                        project_id: Optional[str] = None,
                        schedule: Optional[str] = None,
                        source_cluster_id: Optional[str] = None)
    @overload
    def ScheduledBackup(resource_name: str,
                        args: ScheduledBackupArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewScheduledBackup(ctx *Context, name string, args ScheduledBackupArgs, opts ...ResourceOption) (*ScheduledBackup, error)
    public ScheduledBackup(string name, ScheduledBackupArgs args, CustomResourceOptions? opts = null)
    public ScheduledBackup(String name, ScheduledBackupArgs args)
    public ScheduledBackup(String name, ScheduledBackupArgs args, CustomResourceOptions options)
    
    type: eventstorecloud:ScheduledBackup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ScheduledBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ScheduledBackupArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ScheduledBackupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduledBackupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduledBackupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ScheduledBackup Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ScheduledBackup resource accepts the following input properties:

    BackupDescription string
    backup_description
    Description string
    Human readable description of the job
    MaxBackupCount int
    The maximum number of backups to keep for this job
    ProjectId string
    ID of the project in which the backup exists
    Schedule string
    Schedule for the backup, defined using restricted subset of cron
    SourceClusterId string
    the ID of the cluster to back up
    BackupDescription string
    backup_description
    Description string
    Human readable description of the job
    MaxBackupCount int
    The maximum number of backups to keep for this job
    ProjectId string
    ID of the project in which the backup exists
    Schedule string
    Schedule for the backup, defined using restricted subset of cron
    SourceClusterId string
    the ID of the cluster to back up
    backupDescription String
    backup_description
    description String
    Human readable description of the job
    maxBackupCount Integer
    The maximum number of backups to keep for this job
    projectId String
    ID of the project in which the backup exists
    schedule String
    Schedule for the backup, defined using restricted subset of cron
    sourceClusterId String
    the ID of the cluster to back up
    backupDescription string
    backup_description
    description string
    Human readable description of the job
    maxBackupCount number
    The maximum number of backups to keep for this job
    projectId string
    ID of the project in which the backup exists
    schedule string
    Schedule for the backup, defined using restricted subset of cron
    sourceClusterId string
    the ID of the cluster to back up
    backup_description str
    backup_description
    description str
    Human readable description of the job
    max_backup_count int
    The maximum number of backups to keep for this job
    project_id str
    ID of the project in which the backup exists
    schedule str
    Schedule for the backup, defined using restricted subset of cron
    source_cluster_id str
    the ID of the cluster to back up
    backupDescription String
    backup_description
    description String
    Human readable description of the job
    maxBackupCount Number
    The maximum number of backups to keep for this job
    projectId String
    ID of the project in which the backup exists
    schedule String
    Schedule for the backup, defined using restricted subset of cron
    sourceClusterId String
    the ID of the cluster to back up

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ScheduledBackup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ScheduledBackup Resource

    Get an existing ScheduledBackup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ScheduledBackupState, opts?: CustomResourceOptions): ScheduledBackup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_description: Optional[str] = None,
            description: Optional[str] = None,
            max_backup_count: Optional[int] = None,
            project_id: Optional[str] = None,
            schedule: Optional[str] = None,
            source_cluster_id: Optional[str] = None) -> ScheduledBackup
    func GetScheduledBackup(ctx *Context, name string, id IDInput, state *ScheduledBackupState, opts ...ResourceOption) (*ScheduledBackup, error)
    public static ScheduledBackup Get(string name, Input<string> id, ScheduledBackupState? state, CustomResourceOptions? opts = null)
    public static ScheduledBackup get(String name, Output<String> id, ScheduledBackupState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BackupDescription string
    backup_description
    Description string
    Human readable description of the job
    MaxBackupCount int
    The maximum number of backups to keep for this job
    ProjectId string
    ID of the project in which the backup exists
    Schedule string
    Schedule for the backup, defined using restricted subset of cron
    SourceClusterId string
    the ID of the cluster to back up
    BackupDescription string
    backup_description
    Description string
    Human readable description of the job
    MaxBackupCount int
    The maximum number of backups to keep for this job
    ProjectId string
    ID of the project in which the backup exists
    Schedule string
    Schedule for the backup, defined using restricted subset of cron
    SourceClusterId string
    the ID of the cluster to back up
    backupDescription String
    backup_description
    description String
    Human readable description of the job
    maxBackupCount Integer
    The maximum number of backups to keep for this job
    projectId String
    ID of the project in which the backup exists
    schedule String
    Schedule for the backup, defined using restricted subset of cron
    sourceClusterId String
    the ID of the cluster to back up
    backupDescription string
    backup_description
    description string
    Human readable description of the job
    maxBackupCount number
    The maximum number of backups to keep for this job
    projectId string
    ID of the project in which the backup exists
    schedule string
    Schedule for the backup, defined using restricted subset of cron
    sourceClusterId string
    the ID of the cluster to back up
    backup_description str
    backup_description
    description str
    Human readable description of the job
    max_backup_count int
    The maximum number of backups to keep for this job
    project_id str
    ID of the project in which the backup exists
    schedule str
    Schedule for the backup, defined using restricted subset of cron
    source_cluster_id str
    the ID of the cluster to back up
    backupDescription String
    backup_description
    description String
    Human readable description of the job
    maxBackupCount Number
    The maximum number of backups to keep for this job
    projectId String
    ID of the project in which the backup exists
    schedule String
    Schedule for the backup, defined using restricted subset of cron
    sourceClusterId String
    the ID of the cluster to back up

    Import

     $ pulumi import eventstorecloud:index/scheduledBackup:ScheduledBackup daily project_id:backup_id
    

    Package Details

    Repository
    eventstorecloud EventStore/pulumi-eventstorecloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the eventstorecloud Terraform Provider.
    eventstorecloud logo
    Event Store Cloud v0.2.10 published on Thursday, Aug 31, 2023 by EventStore