1. Packages
  2. Ibm Provider
  3. API Docs
  4. getDb2Backup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getDb2Backup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source to retrieve information about a Backups of an existing IBM Db2 Instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const db2Backup = ibm.getDb2Backup({
        deploymentId: "crn%3Av1%3Astaging%3Apublic%3Adashdb-for-transactions%3Aus-south%3Aa%2Fe7e3e87b512f474381c0684a5ecbba03%3A39269573-e43f-43e8-8b93-09f44c2ff875%3A%3A",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    db2_backup = ibm.get_db2_backup(deployment_id="crn%3Av1%3Astaging%3Apublic%3Adashdb-for-transactions%3Aus-south%3Aa%2Fe7e3e87b512f474381c0684a5ecbba03%3A39269573-e43f-43e8-8b93-09f44c2ff875%3A%3A")
    
    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.GetDb2Backup(ctx, &ibm.GetDb2BackupArgs{
    			DeploymentId: "crn%3Av1%3Astaging%3Apublic%3Adashdb-for-transactions%3Aus-south%3Aa%2Fe7e3e87b512f474381c0684a5ecbba03%3A39269573-e43f-43e8-8b93-09f44c2ff875%3A%3A",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var db2Backup = Ibm.GetDb2Backup.Invoke(new()
        {
            DeploymentId = "crn%3Av1%3Astaging%3Apublic%3Adashdb-for-transactions%3Aus-south%3Aa%2Fe7e3e87b512f474381c0684a5ecbba03%3A39269573-e43f-43e8-8b93-09f44c2ff875%3A%3A",
        });
    
    });
    
    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.GetDb2BackupArgs;
    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 db2Backup = IbmFunctions.getDb2Backup(GetDb2BackupArgs.builder()
                .deploymentId("crn%3Av1%3Astaging%3Apublic%3Adashdb-for-transactions%3Aus-south%3Aa%2Fe7e3e87b512f474381c0684a5ecbba03%3A39269573-e43f-43e8-8b93-09f44c2ff875%3A%3A")
                .build());
    
        }
    }
    
    variables:
      db2Backup:
        fn::invoke:
          function: ibm:getDb2Backup
          arguments:
            deploymentId: crn%3Av1%3Astaging%3Apublic%3Adashdb-for-transactions%3Aus-south%3Aa%2Fe7e3e87b512f474381c0684a5ecbba03%3A39269573-e43f-43e8-8b93-09f44c2ff875%3A%3A
    

    Using getDb2Backup

    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 getDb2Backup(args: GetDb2BackupArgs, opts?: InvokeOptions): Promise<GetDb2BackupResult>
    function getDb2BackupOutput(args: GetDb2BackupOutputArgs, opts?: InvokeOptions): Output<GetDb2BackupResult>
    def get_db2_backup(deployment_id: Optional[str] = None,
                       id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDb2BackupResult
    def get_db2_backup_output(deployment_id: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetDb2BackupResult]
    func GetDb2Backup(ctx *Context, args *GetDb2BackupArgs, opts ...InvokeOption) (*GetDb2BackupResult, error)
    func GetDb2BackupOutput(ctx *Context, args *GetDb2BackupOutputArgs, opts ...InvokeOption) GetDb2BackupResultOutput

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

    public static class GetDb2Backup 
    {
        public static Task<GetDb2BackupResult> InvokeAsync(GetDb2BackupArgs args, InvokeOptions? opts = null)
        public static Output<GetDb2BackupResult> Invoke(GetDb2BackupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDb2BackupResult> getDb2Backup(GetDb2BackupArgs args, InvokeOptions options)
    public static Output<GetDb2BackupResult> getDb2Backup(GetDb2BackupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getDb2Backup:getDb2Backup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeploymentId string
    Encoded CRN of the instance this backup relates to.
    Id string
    (String) CRN of the db2 instance.
    DeploymentId string
    Encoded CRN of the instance this backup relates to.
    Id string
    (String) CRN of the db2 instance.
    deploymentId String
    Encoded CRN of the instance this backup relates to.
    id String
    (String) CRN of the db2 instance.
    deploymentId string
    Encoded CRN of the instance this backup relates to.
    id string
    (String) CRN of the db2 instance.
    deployment_id str
    Encoded CRN of the instance this backup relates to.
    id str
    (String) CRN of the db2 instance.
    deploymentId String
    Encoded CRN of the instance this backup relates to.
    id String
    (String) CRN of the db2 instance.

    getDb2Backup Result

    The following output properties are available:

    Backups List<GetDb2BackupBackup>
    (List) Nested schema for backups:
    DeploymentId string
    Id string
    (String) CRN of the db2 instance.
    Backups []GetDb2BackupBackup
    (List) Nested schema for backups:
    DeploymentId string
    Id string
    (String) CRN of the db2 instance.
    backups List<GetDb2BackupBackup>
    (List) Nested schema for backups:
    deploymentId String
    id String
    (String) CRN of the db2 instance.
    backups GetDb2BackupBackup[]
    (List) Nested schema for backups:
    deploymentId string
    id string
    (String) CRN of the db2 instance.
    backups Sequence[GetDb2BackupBackup]
    (List) Nested schema for backups:
    deployment_id str
    id str
    (String) CRN of the db2 instance.
    backups List<Property Map>
    (List) Nested schema for backups:
    deploymentId String
    id String
    (String) CRN of the db2 instance.

    Supporting Types

    GetDb2BackupBackup

    CreatedAt string
    (String) Timestamp of the backup created.
    Duration double
    (Integer) The duration of the backup operation in seconds.
    Id string
    (String) CRN of the db2 instance.
    Size double
    (Integer) Size of the backup or data set.
    Status string
    (String) Status of the backup.
    Type string
    (String) Defines the type of execution of backup.
    CreatedAt string
    (String) Timestamp of the backup created.
    Duration float64
    (Integer) The duration of the backup operation in seconds.
    Id string
    (String) CRN of the db2 instance.
    Size float64
    (Integer) Size of the backup or data set.
    Status string
    (String) Status of the backup.
    Type string
    (String) Defines the type of execution of backup.
    createdAt String
    (String) Timestamp of the backup created.
    duration Double
    (Integer) The duration of the backup operation in seconds.
    id String
    (String) CRN of the db2 instance.
    size Double
    (Integer) Size of the backup or data set.
    status String
    (String) Status of the backup.
    type String
    (String) Defines the type of execution of backup.
    createdAt string
    (String) Timestamp of the backup created.
    duration number
    (Integer) The duration of the backup operation in seconds.
    id string
    (String) CRN of the db2 instance.
    size number
    (Integer) Size of the backup or data set.
    status string
    (String) Status of the backup.
    type string
    (String) Defines the type of execution of backup.
    created_at str
    (String) Timestamp of the backup created.
    duration float
    (Integer) The duration of the backup operation in seconds.
    id str
    (String) CRN of the db2 instance.
    size float
    (Integer) Size of the backup or data set.
    status str
    (String) Status of the backup.
    type str
    (String) Defines the type of execution of backup.
    createdAt String
    (String) Timestamp of the backup created.
    duration Number
    (Integer) The duration of the backup operation in seconds.
    id String
    (String) CRN of the db2 instance.
    size Number
    (Integer) Size of the backup or data set.
    status String
    (String) Status of the backup.
    type String
    (String) Defines the type of execution of backup.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud