Scaleway

v1.1.0 published on Saturday, Sep 17, 2022 by lbrlabs

getDatabaseBackup

Gets information about an RDB backup.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Scaleway = Pulumi.Scaleway;

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

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

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

});
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.LookupDatabaseBackup(ctx, &GetDatabaseBackupArgs{
			Name: pulumi.StringRef("mybackup"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = scaleway.LookupDatabaseBackup(ctx, &GetDatabaseBackupArgs{
			InstanceId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
			Name:       pulumi.StringRef("mybackup"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = scaleway.LookupDatabaseBackup(ctx, &GetDatabaseBackupArgs{
			BackupId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		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.ScalewayFunctions;
import com.pulumi.scaleway.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 = ScalewayFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
            .name("mybackup")
            .build());

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

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

    }
}
import pulumi
import pulumi_scaleway as scaleway

find_by_name = scaleway.get_database_backup(name="mybackup")
find_by_name_and_instance = scaleway.get_database_backup(instance_id="11111111-1111-1111-1111-111111111111",
    name="mybackup")
find_by_id = scaleway.get_database_backup(backup_id="11111111-1111-1111-1111-111111111111")
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";

const findByName = pulumi.output(scaleway.getDatabaseBackup({
    name: "mybackup",
}));
const findByNameAndInstance = pulumi.output(scaleway.getDatabaseBackup({
    instanceId: "11111111-1111-1111-1111-111111111111",
    name: "mybackup",
}));
const findById = pulumi.output(scaleway.getDatabaseBackup({
    backupId: "11111111-1111-1111-1111-111111111111",
}));
variables:
  findByName:
    Fn::Invoke:
      Function: scaleway:getDatabaseBackup
      Arguments:
        name: mybackup
  findByNameAndInstance:
    Fn::Invoke:
      Function: scaleway:getDatabaseBackup
      Arguments:
        instanceId: 11111111-1111-1111-1111-111111111111
        name: mybackup
  findById:
    Fn::Invoke:
      Function: scaleway:getDatabaseBackup
      Arguments:
        backupId: 11111111-1111-1111-1111-111111111111

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>
def get_database_backup(backup_id: Optional[str] = None,
                        instance_id: Optional[str] = None,
                        name: 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,
                        region: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseBackupResult]
func LookupDatabaseBackup(ctx *Context, args *LookupDatabaseBackupArgs, opts ...InvokeOption) (*LookupDatabaseBackupResult, error)
func LookupDatabaseBackupOutput(ctx *Context, args *LookupDatabaseBackupOutputArgs, opts ...InvokeOption) LookupDatabaseBackupResultOutput

> 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)
}
public static CompletableFuture<GetDatabaseBackupResult> getDatabaseBackup(GetDatabaseBackupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: scaleway:index/getDatabaseBackup:getDatabaseBackup
  Arguments:
    # Arguments dictionary

The following arguments are supported:

BackupId string

The RDB backup ID. Only one of the name and backup_id should be specified.

InstanceId string

The RDB instance ID.

Name string

The name of the RDB instance. Only one of the name and backup_id should be specified.

Region string
BackupId string

The RDB backup ID. Only one of the name and backup_id should be specified.

InstanceId string

The RDB instance ID.

Name string

The name of the RDB instance. Only one of the name and backup_id should be specified.

Region string
backupId String

The RDB backup ID. Only one of the name and backup_id should be specified.

instanceId String

The RDB instance ID.

name String

The name of the RDB instance. Only one of the name and backup_id should be specified.

region String
backupId string

The RDB backup ID. Only one of the name and backup_id should be specified.

instanceId string

The RDB instance ID.

name string

The name of the RDB instance. Only one of the name and backup_id should be specified.

region string
backup_id str

The RDB backup ID. Only one of the name and backup_id should be specified.

instance_id str

The RDB instance ID.

name str

The name of the RDB instance. Only one of the name and backup_id should be specified.

region str
backupId String

The RDB backup ID. Only one of the name and backup_id should be specified.

instanceId String

The RDB instance ID.

name String

The name of the RDB instance. Only one of the name and backup_id should be specified.

region String

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
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
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
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
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
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
region String

Package Details

Repository
https://github.com/lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.