1. Packages
  2. Ibm Provider
  3. API Docs
  4. getDatabaseBackups
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.getDatabaseBackups

Explore with Pulumi AI

Provides a read-only data source for Backups. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

Example Usage

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

const databaseBackups = ibm.getDatabaseBackups({
    deploymentId: "<crn>",
});
Copy
import pulumi
import pulumi_ibm as ibm

database_backups = ibm.get_database_backups(deployment_id="<crn>")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ibm.GetDatabaseBackups(ctx, &ibm.GetDatabaseBackupsArgs{
			DeploymentId: pulumi.StringRef("<crn>"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var databaseBackups = Ibm.GetDatabaseBackups.Invoke(new()
    {
        DeploymentId = "<crn>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IbmFunctions;
import com.pulumi.ibm.inputs.GetDatabaseBackupsArgs;
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 databaseBackups = IbmFunctions.getDatabaseBackups(GetDatabaseBackupsArgs.builder()
            .deploymentId("<crn>")
            .build());

    }
}
Copy
variables:
  databaseBackups:
    fn::invoke:
      function: ibm:getDatabaseBackups
      arguments:
        deploymentId: <crn>
Copy

Using getDatabaseBackups

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 getDatabaseBackups(args: GetDatabaseBackupsArgs, opts?: InvokeOptions): Promise<GetDatabaseBackupsResult>
function getDatabaseBackupsOutput(args: GetDatabaseBackupsOutputArgs, opts?: InvokeOptions): Output<GetDatabaseBackupsResult>
Copy
def get_database_backups(deployment_id: Optional[str] = None,
                         id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetDatabaseBackupsResult
def get_database_backups_output(deployment_id: Optional[pulumi.Input[str]] = None,
                         id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseBackupsResult]
Copy
func GetDatabaseBackups(ctx *Context, args *GetDatabaseBackupsArgs, opts ...InvokeOption) (*GetDatabaseBackupsResult, error)
func GetDatabaseBackupsOutput(ctx *Context, args *GetDatabaseBackupsOutputArgs, opts ...InvokeOption) GetDatabaseBackupsResultOutput
Copy

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

public static class GetDatabaseBackups 
{
    public static Task<GetDatabaseBackupsResult> InvokeAsync(GetDatabaseBackupsArgs args, InvokeOptions? opts = null)
    public static Output<GetDatabaseBackupsResult> Invoke(GetDatabaseBackupsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDatabaseBackupsResult> getDatabaseBackups(GetDatabaseBackupsArgs args, InvokeOptions options)
public static Output<GetDatabaseBackupsResult> getDatabaseBackups(GetDatabaseBackupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ibm:index/getDatabaseBackups:getDatabaseBackups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DeploymentId string
ID of the deployment this backup relates to.
Id string
DeploymentId string
ID of the deployment this backup relates to.
Id string
deploymentId String
ID of the deployment this backup relates to.
id String
deploymentId string
ID of the deployment this backup relates to.
id string
deployment_id str
ID of the deployment this backup relates to.
id str
deploymentId String
ID of the deployment this backup relates to.
id String

getDatabaseBackups Result

The following output properties are available:

Backups List<GetDatabaseBackupsBackup>
(Optional, List) An array of backups. Nested scheme for backups:
Id string
DeploymentId string
(Optional, String) ID of the deployment this backup relates to.
Backups []GetDatabaseBackupsBackup
(Optional, List) An array of backups. Nested scheme for backups:
Id string
DeploymentId string
(Optional, String) ID of the deployment this backup relates to.
backups List<GetDatabaseBackupsBackup>
(Optional, List) An array of backups. Nested scheme for backups:
id String
deploymentId String
(Optional, String) ID of the deployment this backup relates to.
backups GetDatabaseBackupsBackup[]
(Optional, List) An array of backups. Nested scheme for backups:
id string
deploymentId string
(Optional, String) ID of the deployment this backup relates to.
backups Sequence[GetDatabaseBackupsBackup]
(Optional, List) An array of backups. Nested scheme for backups:
id str
deployment_id str
(Optional, String) ID of the deployment this backup relates to.
backups List<Property Map>
(Optional, List) An array of backups. Nested scheme for backups:
id String
deploymentId String
(Optional, String) ID of the deployment this backup relates to.

Supporting Types

GetDatabaseBackupsBackup

BackupId This property is required. string
(Optional, String) ID of this backup.
CreatedAt This property is required. string
(Optional, String) Date and time when this backup was created.
DeploymentId This property is required. string
ID of the deployment this backup relates to.
DownloadLink This property is required. string
(Optional, String) URI which is currently available for file downloading.
IsDownloadable This property is required. bool
(Optional, Boolean) Is this backup available to download?.
IsRestorable This property is required. bool
(Optional, Boolean) Can this backup be used to restore an instance?.
Status This property is required. string
(Optional, String) The status of this backup.

  • Constraints: Allowable values are: running, completed, failed.
Type This property is required. string
(Optional, String) The type of backup.

  • Constraints: Allowable values are: scheduled, on_demand.
BackupId This property is required. string
(Optional, String) ID of this backup.
CreatedAt This property is required. string
(Optional, String) Date and time when this backup was created.
DeploymentId This property is required. string
ID of the deployment this backup relates to.
DownloadLink This property is required. string
(Optional, String) URI which is currently available for file downloading.
IsDownloadable This property is required. bool
(Optional, Boolean) Is this backup available to download?.
IsRestorable This property is required. bool
(Optional, Boolean) Can this backup be used to restore an instance?.
Status This property is required. string
(Optional, String) The status of this backup.

  • Constraints: Allowable values are: running, completed, failed.
Type This property is required. string
(Optional, String) The type of backup.

  • Constraints: Allowable values are: scheduled, on_demand.
backupId This property is required. String
(Optional, String) ID of this backup.
createdAt This property is required. String
(Optional, String) Date and time when this backup was created.
deploymentId This property is required. String
ID of the deployment this backup relates to.
downloadLink This property is required. String
(Optional, String) URI which is currently available for file downloading.
isDownloadable This property is required. Boolean
(Optional, Boolean) Is this backup available to download?.
isRestorable This property is required. Boolean
(Optional, Boolean) Can this backup be used to restore an instance?.
status This property is required. String
(Optional, String) The status of this backup.

  • Constraints: Allowable values are: running, completed, failed.
type This property is required. String
(Optional, String) The type of backup.

  • Constraints: Allowable values are: scheduled, on_demand.
backupId This property is required. string
(Optional, String) ID of this backup.
createdAt This property is required. string
(Optional, String) Date and time when this backup was created.
deploymentId This property is required. string
ID of the deployment this backup relates to.
downloadLink This property is required. string
(Optional, String) URI which is currently available for file downloading.
isDownloadable This property is required. boolean
(Optional, Boolean) Is this backup available to download?.
isRestorable This property is required. boolean
(Optional, Boolean) Can this backup be used to restore an instance?.
status This property is required. string
(Optional, String) The status of this backup.

  • Constraints: Allowable values are: running, completed, failed.
type This property is required. string
(Optional, String) The type of backup.

  • Constraints: Allowable values are: scheduled, on_demand.
backup_id This property is required. str
(Optional, String) ID of this backup.
created_at This property is required. str
(Optional, String) Date and time when this backup was created.
deployment_id This property is required. str
ID of the deployment this backup relates to.
download_link This property is required. str
(Optional, String) URI which is currently available for file downloading.
is_downloadable This property is required. bool
(Optional, Boolean) Is this backup available to download?.
is_restorable This property is required. bool
(Optional, Boolean) Can this backup be used to restore an instance?.
status This property is required. str
(Optional, String) The status of this backup.

  • Constraints: Allowable values are: running, completed, failed.
type This property is required. str
(Optional, String) The type of backup.

  • Constraints: Allowable values are: scheduled, on_demand.
backupId This property is required. String
(Optional, String) ID of this backup.
createdAt This property is required. String
(Optional, String) Date and time when this backup was created.
deploymentId This property is required. String
ID of the deployment this backup relates to.
downloadLink This property is required. String
(Optional, String) URI which is currently available for file downloading.
isDownloadable This property is required. Boolean
(Optional, Boolean) Is this backup available to download?.
isRestorable This property is required. Boolean
(Optional, Boolean) Can this backup be used to restore an instance?.
status This property is required. String
(Optional, String) The status of this backup.

  • Constraints: Allowable values are: running, completed, failed.
type This property is required. String
(Optional, String) The type of backup.

  • Constraints: Allowable values are: scheduled, on_demand.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.