Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse
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({
instanceId: "11111111-1111-1111-1111-111111111111",
name: "mybackup",
});
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(instance_id="11111111-1111-1111-1111-111111111111",
name="mybackup")
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{
InstanceId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
Name: pulumi.StringRef("mybackup"),
}, 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()
{
InstanceId = "11111111-1111-1111-1111-111111111111",
Name = "mybackup",
});
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()
.instanceId("11111111-1111-1111-1111-111111111111")
.name("mybackup")
.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:
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,
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 RDB backup ID.
Only one of the
name
andbackup_id
should be specified. - Instance
Id string - The RDB instance ID.
- Name string
- The name of the RDB instance.
Only one of the
name
andbackup_id
should be specified. - 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 RDB backup ID.
Only one of the
name
andbackup_id
should be specified. - Instance
Id string - The RDB instance ID.
- Name string
- The name of the RDB instance.
Only one of the
name
andbackup_id
should be specified. - 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 RDB backup ID.
Only one of the
name
andbackup_id
should be specified. - instance
Id String - The RDB instance ID.
- name String
- The name of the RDB instance.
Only one of the
name
andbackup_id
should be specified. - 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 RDB backup ID.
Only one of the
name
andbackup_id
should be specified. - instance
Id string - The RDB instance ID.
- name string
- The name of the RDB instance.
Only one of the
name
andbackup_id
should be specified. - 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 RDB backup ID.
Only one of the
name
andbackup_id
should be specified. - instance_
id str - The RDB instance ID.
- name str
- The name of the RDB instance.
Only one of the
name
andbackup_id
should be specified. - 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 RDB backup ID.
Only one of the
name
andbackup_id
should be specified. - instance
Id String - The RDB instance ID.
- name String
- The name of the RDB instance.
Only one of the
name
andbackup_id
should be specified. - 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.