

scaleway.DatabaseBackup
Creates and manages Scaleway RDB database backup. For more information, see the documentation.
Examples
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";
const main = new scaleway.DatabaseBackup("main", {
instanceId: data.scaleway_rdb_instance.main.id,
databaseName: data.scaleway_rdb_database.main.name,
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway
main = scaleway.DatabaseBackup("main",
instance_id=data["scaleway_rdb_instance"]["main"]["id"],
database_name=data["scaleway_rdb_database"]["main"]["name"])
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.DatabaseBackup("main", new()
{
InstanceId = data.Scaleway_rdb_instance.Main.Id,
DatabaseName = data.Scaleway_rdb_database.Main.Name,
});
});
package main
import (
"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.NewDatabaseBackup(ctx, "main", &scaleway.DatabaseBackupArgs{
InstanceId: pulumi.Any(data.Scaleway_rdb_instance.Main.Id),
DatabaseName: pulumi.Any(data.Scaleway_rdb_database.Main.Name),
})
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.scaleway.DatabaseBackup;
import com.pulumi.scaleway.DatabaseBackupArgs;
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 main = new DatabaseBackup("main", DatabaseBackupArgs.builder()
.instanceId(data.scaleway_rdb_instance().main().id())
.databaseName(data.scaleway_rdb_database().main().name())
.build());
}
}
resources:
main:
type: scaleway:DatabaseBackup
properties:
instanceId: ${data.scaleway_rdb_instance.main.id}
databaseName: ${data.scaleway_rdb_database.main.name}
With expiration
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-scaleway";
const main = new scaleway.DatabaseBackup("main", {
instanceId: data.scaleway_rdb_instance.main.id,
databaseName: data.scaleway_rdb_database.main.name,
expiresAt: "2022-06-16T07:48:44Z",
});
import pulumi
import lbrlabs_pulumi_scaleway as scaleway
main = scaleway.DatabaseBackup("main",
instance_id=data["scaleway_rdb_instance"]["main"]["id"],
database_name=data["scaleway_rdb_database"]["main"]["name"],
expires_at="2022-06-16T07:48:44Z")
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.DatabaseBackup("main", new()
{
InstanceId = data.Scaleway_rdb_instance.Main.Id,
DatabaseName = data.Scaleway_rdb_database.Main.Name,
ExpiresAt = "2022-06-16T07:48:44Z",
});
});
package main
import (
"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.NewDatabaseBackup(ctx, "main", &scaleway.DatabaseBackupArgs{
InstanceId: pulumi.Any(data.Scaleway_rdb_instance.Main.Id),
DatabaseName: pulumi.Any(data.Scaleway_rdb_database.Main.Name),
ExpiresAt: pulumi.String("2022-06-16T07:48:44Z"),
})
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.scaleway.DatabaseBackup;
import com.pulumi.scaleway.DatabaseBackupArgs;
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 main = new DatabaseBackup("main", DatabaseBackupArgs.builder()
.instanceId(data.scaleway_rdb_instance().main().id())
.databaseName(data.scaleway_rdb_database().main().name())
.expiresAt("2022-06-16T07:48:44Z")
.build());
}
}
resources:
main:
type: scaleway:DatabaseBackup
properties:
instanceId: ${data.scaleway_rdb_instance.main.id}
databaseName: ${data.scaleway_rdb_database.main.name}
expiresAt: 2022-06-16T07:48:44Z
Create DatabaseBackup Resource
new DatabaseBackup(name: string, args: DatabaseBackupArgs, opts?: CustomResourceOptions);
@overload
def DatabaseBackup(resource_name: str,
opts: Optional[ResourceOptions] = None,
database_name: Optional[str] = None,
expires_at: Optional[str] = None,
instance_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None)
@overload
def DatabaseBackup(resource_name: str,
args: DatabaseBackupArgs,
opts: Optional[ResourceOptions] = None)
func NewDatabaseBackup(ctx *Context, name string, args DatabaseBackupArgs, opts ...ResourceOption) (*DatabaseBackup, error)
public DatabaseBackup(string name, DatabaseBackupArgs args, CustomResourceOptions? opts = null)
public DatabaseBackup(String name, DatabaseBackupArgs args)
public DatabaseBackup(String name, DatabaseBackupArgs args, CustomResourceOptions options)
type: scaleway:DatabaseBackup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseBackupArgs
- 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 DatabaseBackupArgs
- 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 DatabaseBackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseBackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseBackupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DatabaseBackup 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 DatabaseBackup resource accepts the following input properties:
- Database
Name string Name of the database of this backup.
- Instance
Id string UUID of the instance where the database to backup is.
- Expires
At string Expiration date (Format ISO 8601).
- Name string
Name of the database (e.g.
my-database
).- Region string
The region you want to attach the resource to
- Database
Name string Name of the database of this backup.
- Instance
Id string UUID of the instance where the database to backup is.
- Expires
At string Expiration date (Format ISO 8601).
- Name string
Name of the database (e.g.
my-database
).- Region string
The region you want to attach the resource to
- database
Name String Name of the database of this backup.
- instance
Id String UUID of the instance where the database to backup is.
- expires
At String Expiration date (Format ISO 8601).
- name String
Name of the database (e.g.
my-database
).- region String
The region you want to attach the resource to
- database
Name string Name of the database of this backup.
- instance
Id string UUID of the instance where the database to backup is.
- expires
At string Expiration date (Format ISO 8601).
- name string
Name of the database (e.g.
my-database
).- region string
The region you want to attach the resource to
- database_
name str Name of the database of this backup.
- instance_
id str UUID of the instance where the database to backup is.
- expires_
at str Expiration date (Format ISO 8601).
- name str
Name of the database (e.g.
my-database
).- region str
The region you want to attach the resource to
- database
Name String Name of the database of this backup.
- instance
Id String UUID of the instance where the database to backup is.
- expires
At String Expiration date (Format ISO 8601).
- name String
Name of the database (e.g.
my-database
).- region String
The region you want to attach the resource to
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseBackup resource produces the following output properties:
- Created
At string Creation date (Format ISO 8601).
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Name string Name of the instance of the backup.
- Size int
Size of the backup (in bytes).
- Updated
At string Updated date (Format ISO 8601).
- Created
At string Creation date (Format ISO 8601).
- Id string
The provider-assigned unique ID for this managed resource.
- Instance
Name string Name of the instance of the backup.
- Size int
Size of the backup (in bytes).
- Updated
At string Updated date (Format ISO 8601).
- created
At String Creation date (Format ISO 8601).
- id String
The provider-assigned unique ID for this managed resource.
- instance
Name String Name of the instance of the backup.
- size Integer
Size of the backup (in bytes).
- updated
At String Updated date (Format ISO 8601).
- created
At string Creation date (Format ISO 8601).
- id string
The provider-assigned unique ID for this managed resource.
- instance
Name string Name of the instance of the backup.
- size number
Size of the backup (in bytes).
- updated
At string Updated date (Format ISO 8601).
- created_
at str Creation date (Format ISO 8601).
- id str
The provider-assigned unique ID for this managed resource.
- instance_
name str Name of the instance of the backup.
- size int
Size of the backup (in bytes).
- updated_
at str Updated date (Format ISO 8601).
- created
At String Creation date (Format ISO 8601).
- id String
The provider-assigned unique ID for this managed resource.
- instance
Name String Name of the instance of the backup.
- size Number
Size of the backup (in bytes).
- updated
At String Updated date (Format ISO 8601).
Look up Existing DatabaseBackup Resource
Get an existing DatabaseBackup 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?: DatabaseBackupState, opts?: CustomResourceOptions): DatabaseBackup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
database_name: Optional[str] = None,
expires_at: Optional[str] = None,
instance_id: Optional[str] = None,
instance_name: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
size: Optional[int] = None,
updated_at: Optional[str] = None) -> DatabaseBackup
func GetDatabaseBackup(ctx *Context, name string, id IDInput, state *DatabaseBackupState, opts ...ResourceOption) (*DatabaseBackup, error)
public static DatabaseBackup Get(string name, Input<string> id, DatabaseBackupState? state, CustomResourceOptions? opts = null)
public static DatabaseBackup get(String name, Output<String> id, DatabaseBackupState 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.
- Created
At string Creation date (Format ISO 8601).
- Database
Name string Name of the database of this backup.
- Expires
At string Expiration date (Format ISO 8601).
- Instance
Id string UUID of the instance where the database to backup is.
- Instance
Name string Name of the instance of the backup.
- Name string
Name of the database (e.g.
my-database
).- Region string
The region you want to attach the resource to
- Size int
Size of the backup (in bytes).
- Updated
At string Updated date (Format ISO 8601).
- Created
At string Creation date (Format ISO 8601).
- Database
Name string Name of the database of this backup.
- Expires
At string Expiration date (Format ISO 8601).
- Instance
Id string UUID of the instance where the database to backup is.
- Instance
Name string Name of the instance of the backup.
- Name string
Name of the database (e.g.
my-database
).- Region string
The region you want to attach the resource to
- Size int
Size of the backup (in bytes).
- Updated
At string Updated date (Format ISO 8601).
- created
At String Creation date (Format ISO 8601).
- database
Name String Name of the database of this backup.
- expires
At String Expiration date (Format ISO 8601).
- instance
Id String UUID of the instance where the database to backup is.
- instance
Name String Name of the instance of the backup.
- name String
Name of the database (e.g.
my-database
).- region String
The region you want to attach the resource to
- size Integer
Size of the backup (in bytes).
- updated
At String Updated date (Format ISO 8601).
- created
At string Creation date (Format ISO 8601).
- database
Name string Name of the database of this backup.
- expires
At string Expiration date (Format ISO 8601).
- instance
Id string UUID of the instance where the database to backup is.
- instance
Name string Name of the instance of the backup.
- name string
Name of the database (e.g.
my-database
).- region string
The region you want to attach the resource to
- size number
Size of the backup (in bytes).
- updated
At string Updated date (Format ISO 8601).
- created_
at str Creation date (Format ISO 8601).
- database_
name str Name of the database of this backup.
- expires_
at str Expiration date (Format ISO 8601).
- instance_
id str UUID of the instance where the database to backup is.
- instance_
name str Name of the instance of the backup.
- name str
Name of the database (e.g.
my-database
).- region str
The region you want to attach the resource to
- size int
Size of the backup (in bytes).
- updated_
at str Updated date (Format ISO 8601).
- created
At String Creation date (Format ISO 8601).
- database
Name String Name of the database of this backup.
- expires
At String Expiration date (Format ISO 8601).
- instance
Id String UUID of the instance where the database to backup is.
- instance
Name String Name of the instance of the backup.
- name String
Name of the database (e.g.
my-database
).- region String
The region you want to attach the resource to
- size Number
Size of the backup (in bytes).
- updated
At String Updated date (Format ISO 8601).
Import
RDB Database can be imported using the {region}/{id}
, e.g. bash
$ pulumi import scaleway:index/databaseBackup:DatabaseBackup mybackup fr-par/11111111-1111-1111-1111-111111111111
Package Details
- Repository
- scaleway lbrlabs/pulumi-scaleway
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
scaleway
Terraform Provider.