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,
});
});
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
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 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.
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",
});
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"),
})
var scheduledBackupResource = new ScheduledBackup("scheduledBackupResource", ScheduledBackupArgs.builder()
.backupDescription("string")
.description("string")
.maxBackupCount(0)
.projectId("string")
.schedule("string")
.sourceClusterId("string")
.build());
scheduled_backup_resource = eventstorecloud.ScheduledBackup("scheduledBackupResource",
backup_description="string",
description="string",
max_backup_count=0,
project_id="string",
schedule="string",
source_cluster_id="string")
const scheduledBackupResource = new eventstorecloud.ScheduledBackup("scheduledBackupResource", {
backupDescription: "string",
description: "string",
maxBackupCount: 0,
projectId: "string",
schedule: "string",
sourceClusterId: "string",
});
type: eventstorecloud:ScheduledBackup
properties:
backupDescription: string
description: string
maxBackupCount: 0
projectId: string
schedule: string
sourceClusterId: string
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:
- Backup
Description string - backup_description
- Description string
- Human readable description of the job
- Max
Backup intCount - The maximum number of backups to keep for this job
- Project
Id string - ID of the project in which the backup exists
- Schedule string
- Schedule for the backup, defined using restricted subset of cron
- Source
Cluster stringId - the ID of the cluster to back up
- Backup
Description string - backup_description
- Description string
- Human readable description of the job
- Max
Backup intCount - The maximum number of backups to keep for this job
- Project
Id string - ID of the project in which the backup exists
- Schedule string
- Schedule for the backup, defined using restricted subset of cron
- Source
Cluster stringId - the ID of the cluster to back up
- backup
Description String - backup_description
- description String
- Human readable description of the job
- max
Backup IntegerCount - The maximum number of backups to keep for this job
- project
Id String - ID of the project in which the backup exists
- schedule String
- Schedule for the backup, defined using restricted subset of cron
- source
Cluster StringId - the ID of the cluster to back up
- backup
Description string - backup_description
- description string
- Human readable description of the job
- max
Backup numberCount - The maximum number of backups to keep for this job
- project
Id string - ID of the project in which the backup exists
- schedule string
- Schedule for the backup, defined using restricted subset of cron
- source
Cluster stringId - the ID of the cluster to back up
- backup_
description str - backup_description
- description str
- Human readable description of the job
- max_
backup_ intcount - 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_ strid - the ID of the cluster to back up
- backup
Description String - backup_description
- description String
- Human readable description of the job
- max
Backup NumberCount - The maximum number of backups to keep for this job
- project
Id String - ID of the project in which the backup exists
- schedule String
- Schedule for the backup, defined using restricted subset of cron
- source
Cluster StringId - 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.
- Backup
Description string - backup_description
- Description string
- Human readable description of the job
- Max
Backup intCount - The maximum number of backups to keep for this job
- Project
Id string - ID of the project in which the backup exists
- Schedule string
- Schedule for the backup, defined using restricted subset of cron
- Source
Cluster stringId - the ID of the cluster to back up
- Backup
Description string - backup_description
- Description string
- Human readable description of the job
- Max
Backup intCount - The maximum number of backups to keep for this job
- Project
Id string - ID of the project in which the backup exists
- Schedule string
- Schedule for the backup, defined using restricted subset of cron
- Source
Cluster stringId - the ID of the cluster to back up
- backup
Description String - backup_description
- description String
- Human readable description of the job
- max
Backup IntegerCount - The maximum number of backups to keep for this job
- project
Id String - ID of the project in which the backup exists
- schedule String
- Schedule for the backup, defined using restricted subset of cron
- source
Cluster StringId - the ID of the cluster to back up
- backup
Description string - backup_description
- description string
- Human readable description of the job
- max
Backup numberCount - The maximum number of backups to keep for this job
- project
Id string - ID of the project in which the backup exists
- schedule string
- Schedule for the backup, defined using restricted subset of cron
- source
Cluster stringId - the ID of the cluster to back up
- backup_
description str - backup_description
- description str
- Human readable description of the job
- max_
backup_ intcount - 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_ strid - the ID of the cluster to back up
- backup
Description String - backup_description
- description String
- Human readable description of the job
- max
Backup NumberCount - The maximum number of backups to keep for this job
- project
Id String - ID of the project in which the backup exists
- schedule String
- Schedule for the backup, defined using restricted subset of cron
- source
Cluster StringId - the ID of the cluster to back up
Import
$ pulumi import eventstorecloud:index/scheduledBackup:ScheduledBackup daily project_id:backup_id
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.