scaleway.getDatabaseBackup
Explore with Pulumi AI
Gets information about an RDB backup.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const findByName = scaleway.getDatabaseBackup({
name: "mybackup",
});
const findByNameAndInstance = scaleway.getDatabaseBackup({
name: "mybackup",
instanceId: "11111111-1111-1111-1111-111111111111",
});
const findById = scaleway.getDatabaseBackup({
backupId: "11111111-1111-1111-1111-111111111111",
});
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(name="mybackup",
instance_id="11111111-1111-1111-1111-111111111111")
find_by_id = scaleway.get_database_backup(backup_id="11111111-1111-1111-1111-111111111111")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := scaleway.LookupDatabaseBackup(ctx, &scaleway.LookupDatabaseBackupArgs{
Name: pulumi.StringRef("mybackup"),
}, nil)
if err != nil {
return err
}
_, err = scaleway.LookupDatabaseBackup(ctx, &scaleway.LookupDatabaseBackupArgs{
Name: pulumi.StringRef("mybackup"),
InstanceId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
_, err = scaleway.LookupDatabaseBackup(ctx, &scaleway.LookupDatabaseBackupArgs{
BackupId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
return await Deployment.RunAsync(() =>
{
var findByName = Scaleway.GetDatabaseBackup.Invoke(new()
{
Name = "mybackup",
});
var findByNameAndInstance = Scaleway.GetDatabaseBackup.Invoke(new()
{
Name = "mybackup",
InstanceId = "11111111-1111-1111-1111-111111111111",
});
var findById = Scaleway.GetDatabaseBackup.Invoke(new()
{
BackupId = "11111111-1111-1111-1111-111111111111",
});
});
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()
.name("mybackup")
.instanceId("11111111-1111-1111-1111-111111111111")
.build());
final var findById = ScalewayFunctions.getDatabaseBackup(GetDatabaseBackupArgs.builder()
.backupId("11111111-1111-1111-1111-111111111111")
.build());
}
}
variables:
findByName:
fn::invoke:
Function: scaleway:getDatabaseBackup
Arguments:
name: mybackup
findByNameAndInstance:
fn::invoke:
Function: scaleway:getDatabaseBackup
Arguments:
name: mybackup
instanceId: 11111111-1111-1111-1111-111111111111
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,
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]
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:
- Backup
Id string - The backup ID.
- Instance
Id string - The Database Instance ID.
- Name string
The name of the RDB instance.
Note You must specify at least one:
name
and/orbackup_id
.- Project
Id 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 string - The backup ID.
- Instance
Id string - The Database Instance ID.
- Name string
The name of the RDB instance.
Note You must specify at least one:
name
and/orbackup_id
.- Project
Id 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 String - The backup ID.
- instance
Id String - The Database Instance ID.
- name String
The name of the RDB instance.
Note You must specify at least one:
name
and/orbackup_id
.- project
Id 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 string - The backup ID.
- instance
Id string - The Database Instance ID.
- name string
The name of the RDB instance.
Note You must specify at least one:
name
and/orbackup_id
.- project
Id 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/orbackup_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.
- backup
Id String - The backup ID.
- instance
Id String - The Database Instance ID.
- name String
The name of the RDB instance.
Note You must specify at least one:
name
and/orbackup_id
.- project
Id 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:
- Created
At string - Database
Name string - Expires
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Name string - Size int
- Updated
At string - Backup
Id string - Instance
Id string - Name string
- Project
Id string - Region string
- Created
At string - Database
Name string - Expires
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Name string - Size int
- Updated
At string - Backup
Id string - Instance
Id string - Name string
- Project
Id string - Region string
- created
At String - database
Name String - expires
At String - id String
- The provider-assigned unique ID for this managed resource.
- instance
Name String - size Integer
- updated
At String - backup
Id String - instance
Id String - name String
- project
Id String - region String
- created
At string - database
Name string - expires
At string - id string
- The provider-assigned unique ID for this managed resource.
- instance
Name string - size number
- updated
At string - backup
Id string - instance
Id string - name string
- project
Id 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
- created
At String - database
Name String - expires
At String - id String
- The provider-assigned unique ID for this managed resource.
- instance
Name String - size Number
- updated
At String - backup
Id String - instance
Id String - name String
- project
Id 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.