1. Packages
  2. Event Store Cloud
  3. API Docs
  4. ScheduledBackup
Event Store Cloud v0.2.17 published on Tuesday, Jan 21, 2025 by EventStore

eventstorecloud.ScheduledBackup

Explore with Pulumi AI

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,
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
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,
});
Copy
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)
Copy
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
Copy

Create ScheduledBackup Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ScheduledBackup(name: string, args: ScheduledBackupArgs, opts?: CustomResourceOptions);
@overload
def ScheduledBackup(resource_name: str,
                    args: ScheduledBackupArgs,
                    opts: Optional[ResourceOptions] = None)

@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)
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.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScheduledBackupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ScheduledBackupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduledBackupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScheduledBackupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var scheduledBackupResource = new EventStoreCloud.ScheduledBackup("scheduledBackupResource", new()
{
    BackupDescription = "string",
    Description = "string",
    MaxBackupCount = 0,
    ProjectId = "string",
    Schedule = "string",
    SourceClusterId = "string",
});
Copy
example, err := eventstorecloud.NewScheduledBackup(ctx, "scheduledBackupResource", &eventstorecloud.ScheduledBackupArgs{
	BackupDescription: pulumi.String("string"),
	Description:       pulumi.String("string"),
	MaxBackupCount:    pulumi.Int(0),
	ProjectId:         pulumi.String("string"),
	Schedule:          pulumi.String("string"),
	SourceClusterId:   pulumi.String("string"),
})
Copy
var scheduledBackupResource = new ScheduledBackup("scheduledBackupResource", ScheduledBackupArgs.builder()
    .backupDescription("string")
    .description("string")
    .maxBackupCount(0)
    .projectId("string")
    .schedule("string")
    .sourceClusterId("string")
    .build());
Copy
scheduled_backup_resource = eventstorecloud.ScheduledBackup("scheduledBackupResource",
    backup_description="string",
    description="string",
    max_backup_count=0,
    project_id="string",
    schedule="string",
    source_cluster_id="string")
Copy
const scheduledBackupResource = new eventstorecloud.ScheduledBackup("scheduledBackupResource", {
    backupDescription: "string",
    description: "string",
    maxBackupCount: 0,
    projectId: "string",
    schedule: "string",
    sourceClusterId: "string",
});
Copy
type: eventstorecloud:ScheduledBackup
properties:
    backupDescription: string
    description: string
    maxBackupCount: 0
    projectId: string
    schedule: string
    sourceClusterId: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ScheduledBackup resource accepts the following input properties:

BackupDescription
This property is required.
Changes to this property will trigger replacement.
string
backup_description
Description
This property is required.
Changes to this property will trigger replacement.
string
Human readable description of the job
MaxBackupCount
This property is required.
Changes to this property will trigger replacement.
int
The maximum number of backups to keep for this job
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project in which the backup exists
Schedule
This property is required.
Changes to this property will trigger replacement.
string
Schedule for the backup, defined using restricted subset of cron
SourceClusterId
This property is required.
Changes to this property will trigger replacement.
string
the ID of the cluster to back up
BackupDescription
This property is required.
Changes to this property will trigger replacement.
string
backup_description
Description
This property is required.
Changes to this property will trigger replacement.
string
Human readable description of the job
MaxBackupCount
This property is required.
Changes to this property will trigger replacement.
int
The maximum number of backups to keep for this job
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project in which the backup exists
Schedule
This property is required.
Changes to this property will trigger replacement.
string
Schedule for the backup, defined using restricted subset of cron
SourceClusterId
This property is required.
Changes to this property will trigger replacement.
string
the ID of the cluster to back up
backupDescription
This property is required.
Changes to this property will trigger replacement.
String
backup_description
description
This property is required.
Changes to this property will trigger replacement.
String
Human readable description of the job
maxBackupCount
This property is required.
Changes to this property will trigger replacement.
Integer
The maximum number of backups to keep for this job
projectId
This property is required.
Changes to this property will trigger replacement.
String
ID of the project in which the backup exists
schedule
This property is required.
Changes to this property will trigger replacement.
String
Schedule for the backup, defined using restricted subset of cron
sourceClusterId
This property is required.
Changes to this property will trigger replacement.
String
the ID of the cluster to back up
backupDescription
This property is required.
Changes to this property will trigger replacement.
string
backup_description
description
This property is required.
Changes to this property will trigger replacement.
string
Human readable description of the job
maxBackupCount
This property is required.
Changes to this property will trigger replacement.
number
The maximum number of backups to keep for this job
projectId
This property is required.
Changes to this property will trigger replacement.
string
ID of the project in which the backup exists
schedule
This property is required.
Changes to this property will trigger replacement.
string
Schedule for the backup, defined using restricted subset of cron
sourceClusterId
This property is required.
Changes to this property will trigger replacement.
string
the ID of the cluster to back up
backup_description
This property is required.
Changes to this property will trigger replacement.
str
backup_description
description
This property is required.
Changes to this property will trigger replacement.
str
Human readable description of the job
max_backup_count
This property is required.
Changes to this property will trigger replacement.
int
The maximum number of backups to keep for this job
project_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the project in which the backup exists
schedule
This property is required.
Changes to this property will trigger replacement.
str
Schedule for the backup, defined using restricted subset of cron
source_cluster_id
This property is required.
Changes to this property will trigger replacement.
str
the ID of the cluster to back up
backupDescription
This property is required.
Changes to this property will trigger replacement.
String
backup_description
description
This property is required.
Changes to this property will trigger replacement.
String
Human readable description of the job
maxBackupCount
This property is required.
Changes to this property will trigger replacement.
Number
The maximum number of backups to keep for this job
projectId
This property is required.
Changes to this property will trigger replacement.
String
ID of the project in which the backup exists
schedule
This property is required.
Changes to this property will trigger replacement.
String
Schedule for the backup, defined using restricted subset of cron
sourceClusterId
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: eventstorecloud:ScheduledBackup    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
backup_description
Description Changes to this property will trigger replacement. string
Human readable description of the job
MaxBackupCount Changes to this property will trigger replacement. int
The maximum number of backups to keep for this job
ProjectId Changes to this property will trigger replacement. string
ID of the project in which the backup exists
Schedule Changes to this property will trigger replacement. string
Schedule for the backup, defined using restricted subset of cron
SourceClusterId Changes to this property will trigger replacement. string
the ID of the cluster to back up
BackupDescription Changes to this property will trigger replacement. string
backup_description
Description Changes to this property will trigger replacement. string
Human readable description of the job
MaxBackupCount Changes to this property will trigger replacement. int
The maximum number of backups to keep for this job
ProjectId Changes to this property will trigger replacement. string
ID of the project in which the backup exists
Schedule Changes to this property will trigger replacement. string
Schedule for the backup, defined using restricted subset of cron
SourceClusterId Changes to this property will trigger replacement. string
the ID of the cluster to back up
backupDescription Changes to this property will trigger replacement. String
backup_description
description Changes to this property will trigger replacement. String
Human readable description of the job
maxBackupCount Changes to this property will trigger replacement. Integer
The maximum number of backups to keep for this job
projectId Changes to this property will trigger replacement. String
ID of the project in which the backup exists
schedule Changes to this property will trigger replacement. String
Schedule for the backup, defined using restricted subset of cron
sourceClusterId Changes to this property will trigger replacement. String
the ID of the cluster to back up
backupDescription Changes to this property will trigger replacement. string
backup_description
description Changes to this property will trigger replacement. string
Human readable description of the job
maxBackupCount Changes to this property will trigger replacement. number
The maximum number of backups to keep for this job
projectId Changes to this property will trigger replacement. string
ID of the project in which the backup exists
schedule Changes to this property will trigger replacement. string
Schedule for the backup, defined using restricted subset of cron
sourceClusterId Changes to this property will trigger replacement. string
the ID of the cluster to back up
backup_description Changes to this property will trigger replacement. str
backup_description
description Changes to this property will trigger replacement. str
Human readable description of the job
max_backup_count Changes to this property will trigger replacement. int
The maximum number of backups to keep for this job
project_id Changes to this property will trigger replacement. str
ID of the project in which the backup exists
schedule Changes to this property will trigger replacement. str
Schedule for the backup, defined using restricted subset of cron
source_cluster_id Changes to this property will trigger replacement. str
the ID of the cluster to back up
backupDescription Changes to this property will trigger replacement. String
backup_description
description Changes to this property will trigger replacement. String
Human readable description of the job
maxBackupCount Changes to this property will trigger replacement. Number
The maximum number of backups to keep for this job
projectId Changes to this property will trigger replacement. String
ID of the project in which the backup exists
schedule Changes to this property will trigger replacement. String
Schedule for the backup, defined using restricted subset of cron
sourceClusterId Changes to this property will trigger replacement. String
the ID of the cluster to back up

Import

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

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
eventstorecloud EventStore/pulumi-eventstorecloud
License
Apache-2.0
Notes
This Pulumi package is based on the eventstorecloud Terraform Provider.