1. Packages
  2. Scaleway
  3. API Docs
  4. getDatabaseBackup
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.getDatabaseBackup

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse
Deprecated: scaleway.index/getdatabasebackup.getDatabaseBackup has been deprecated in favor of scaleway.databases/getdatabasebackup.getDatabaseBackup

Gets information about an RDB backup.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

const findByName = scaleway.databases.getDatabaseBackup({
    name: "mybackup",
});
const findByNameAndInstance = scaleway.databases.getDatabaseBackup({
    name: "mybackup",
    instanceId: "11111111-1111-1111-1111-111111111111",
});
const findById = scaleway.databases.getDatabaseBackup({
    backupId: "11111111-1111-1111-1111-111111111111",
});
Copy
import pulumi
import pulumi_scaleway as scaleway

find_by_name = scaleway.databases.get_database_backup(name="mybackup")
find_by_name_and_instance = scaleway.databases.get_database_backup(name="mybackup",
    instance_id="11111111-1111-1111-1111-111111111111")
find_by_id = scaleway.databases.get_database_backup(backup_id="11111111-1111-1111-1111-111111111111")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/databases"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := databases.LookupDatabaseBackup(ctx, &databases.LookupDatabaseBackupArgs{
			Name: pulumi.StringRef("mybackup"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = databases.LookupDatabaseBackup(ctx, &databases.LookupDatabaseBackupArgs{
			Name:       pulumi.StringRef("mybackup"),
			InstanceId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = databases.LookupDatabaseBackup(ctx, &databases.LookupDatabaseBackupArgs{
			BackupId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

return await Deployment.RunAsync(() => 
{
    var findByName = Scaleway.Databases.GetDatabaseBackup.Invoke(new()
    {
        Name = "mybackup",
    });

    var findByNameAndInstance = Scaleway.Databases.GetDatabaseBackup.Invoke(new()
    {
        Name = "mybackup",
        InstanceId = "11111111-1111-1111-1111-111111111111",
    });

    var findById = Scaleway.Databases.GetDatabaseBackup.Invoke(new()
    {
        BackupId = "11111111-1111-1111-1111-111111111111",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.databases.DatabasesFunctions;
import com.pulumi.scaleway.databases.inputs.GetDatabaseBackupArgs;
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) {
        final var findByName = DatabasesFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
            .name("mybackup")
            .build());

        final var findByNameAndInstance = DatabasesFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
            .name("mybackup")
            .instanceId("11111111-1111-1111-1111-111111111111")
            .build());

        final var findById = DatabasesFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
            .backupId("11111111-1111-1111-1111-111111111111")
            .build());

    }
}
Copy
variables:
  findByName:
    fn::invoke:
      function: scaleway:databases:getDatabaseBackup
      arguments:
        name: mybackup
  findByNameAndInstance:
    fn::invoke:
      function: scaleway:databases:getDatabaseBackup
      arguments:
        name: mybackup
        instanceId: 11111111-1111-1111-1111-111111111111
  findById:
    fn::invoke:
      function: scaleway:databases:getDatabaseBackup
      arguments:
        backupId: 11111111-1111-1111-1111-111111111111
Copy

Using getDatabaseBackup

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getDatabaseBackup(args: GetDatabaseBackupArgs, opts?: InvokeOptions): Promise<GetDatabaseBackupResult>
function getDatabaseBackupOutput(args: GetDatabaseBackupOutputArgs, opts?: InvokeOptions): Output<GetDatabaseBackupResult>
Copy
def get_database_backup(backup_id: Optional[str] = None,
                        instance_id: Optional[str] = None,
                        name: Optional[str] = None,
                        project_id: Optional[str] = None,
                        region: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDatabaseBackupResult
def get_database_backup_output(backup_id: Optional[pulumi.Input[str]] = None,
                        instance_id: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        project_id: Optional[pulumi.Input[str]] = None,
                        region: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseBackupResult]
Copy
func LookupDatabaseBackup(ctx *Context, args *LookupDatabaseBackupArgs, opts ...InvokeOption) (*LookupDatabaseBackupResult, error)
func LookupDatabaseBackupOutput(ctx *Context, args *LookupDatabaseBackupOutputArgs, opts ...InvokeOption) LookupDatabaseBackupResultOutput
Copy

> Note: This function is named LookupDatabaseBackup in the Go SDK.

public static class GetDatabaseBackup 
{
    public static Task<GetDatabaseBackupResult> InvokeAsync(GetDatabaseBackupArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseBackupResult> Invoke(GetDatabaseBackupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDatabaseBackupResult> getDatabaseBackup(GetDatabaseBackupArgs args, InvokeOptions options)
public static Output<GetDatabaseBackupResult> getDatabaseBackup(GetDatabaseBackupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getDatabaseBackup:getDatabaseBackup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BackupId string
The backup ID.
InstanceId string
The Database Instance ID.
Name string

The name of the RDB instance.

Note You must specify at least one: name and/or backup_id.

ProjectId string
The ID of the project the Database Backup is associated with.
Region string
region) The region in which the Database Backup is associated with.
BackupId string
The backup ID.
InstanceId string
The Database Instance ID.
Name string

The name of the RDB instance.

Note You must specify at least one: name and/or backup_id.

ProjectId string
The ID of the project the Database Backup is associated with.
Region string
region) The region in which the Database Backup is associated with.
backupId String
The backup ID.
instanceId String
The Database Instance ID.
name String

The name of the RDB instance.

Note You must specify at least one: name and/or backup_id.

projectId String
The ID of the project the Database Backup is associated with.
region String
region) The region in which the Database Backup is associated with.
backupId string
The backup ID.
instanceId string
The Database Instance ID.
name string

The name of the RDB instance.

Note You must specify at least one: name and/or backup_id.

projectId string
The ID of the project the Database Backup is associated with.
region string
region) The region in which the Database Backup is associated with.
backup_id str
The backup ID.
instance_id str
The Database Instance ID.
name str

The name of the RDB instance.

Note You must specify at least one: name and/or backup_id.

project_id str
The ID of the project the Database Backup is associated with.
region str
region) The region in which the Database Backup is associated with.
backupId String
The backup ID.
instanceId String
The Database Instance ID.
name String

The name of the RDB instance.

Note You must specify at least one: name and/or backup_id.

projectId String
The ID of the project the Database Backup is associated with.
region String
region) The region in which the Database Backup is associated with.

getDatabaseBackup Result

The following output properties are available:

CreatedAt string
DatabaseName string
ExpiresAt string
Id string
The provider-assigned unique ID for this managed resource.
InstanceName string
Size int
UpdatedAt string
BackupId string
InstanceId string
Name string
ProjectId string
Region string
CreatedAt string
DatabaseName string
ExpiresAt string
Id string
The provider-assigned unique ID for this managed resource.
InstanceName string
Size int
UpdatedAt string
BackupId string
InstanceId string
Name string
ProjectId string
Region string
createdAt String
databaseName String
expiresAt String
id String
The provider-assigned unique ID for this managed resource.
instanceName String
size Integer
updatedAt String
backupId String
instanceId String
name String
projectId String
region String
createdAt string
databaseName string
expiresAt string
id string
The provider-assigned unique ID for this managed resource.
instanceName string
size number
updatedAt string
backupId string
instanceId string
name string
projectId string
region string
created_at str
database_name str
expires_at str
id str
The provider-assigned unique ID for this managed resource.
instance_name str
size int
updated_at str
backup_id str
instance_id str
name str
project_id str
region str
createdAt String
databaseName String
expiresAt String
id String
The provider-assigned unique ID for this managed resource.
instanceName String
size Number
updatedAt String
backupId String
instanceId String
name String
projectId String
region String

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse