1. Packages
  2. Packages
  3. Ionoscloud
  4. API Docs
  5. dbaas
  6. getPSQLBackupsV2
Viewing docs for IonosCloud v0.3.1
published on Wednesday, Jun 10, 2026 by ionos-cloud
ionoscloud logo
Viewing docs for IonosCloud v0.3.1
published on Wednesday, Jun 10, 2026 by ionos-cloud

    The DBaaS PostgreSQL v2 Backups data source can be used to list existing DBaaS PostgreSQL v2 Backups. An optional cluster ID filter can be used to narrow down results to backups of a specific cluster.

    Example Usage

    List all backups in a location

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.dbaas.getPSQLBackupsV2({
        location: "de/txl",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_backups_v2(location="de/txl")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbaas.GetPSQLBackupsV2(ctx, &dbaas.GetPSQLBackupsV2Args{
    			Location: "de/txl",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLBackupsV2.Invoke(new()
        {
            Location = "de/txl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
    import com.pulumi.ionoscloud.dbaas.inputs.GetPSQLBackupsV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = DbaasFunctions.getPSQLBackupsV2(GetPSQLBackupsV2Args.builder()
                .location("de/txl")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLBackupsV2
          arguments:
            location: de/txl
    
    pulumi {
      required_providers {
        ionoscloud = {
          source = "pulumi/ionoscloud"
        }
      }
    }
    
    data "ionoscloud_dbaas_getpsqlbackupsv2" "example" {
      location = "de/txl"
    }
    

    List backups for a specific cluster

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = ionoscloud.dbaas.getPSQLBackupsV2({
        location: "de/txl",
        clusterId: "cluster_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_backups_v2(location="de/txl",
        cluster_id="cluster_id")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/dbaas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dbaas.GetPSQLBackupsV2(ctx, &dbaas.GetPSQLBackupsV2Args{
    			Location:  "de/txl",
    			ClusterId: pulumi.StringRef("cluster_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLBackupsV2.Invoke(new()
        {
            Location = "de/txl",
            ClusterId = "cluster_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.dbaas.DbaasFunctions;
    import com.pulumi.ionoscloud.dbaas.inputs.GetPSQLBackupsV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 example = DbaasFunctions.getPSQLBackupsV2(GetPSQLBackupsV2Args.builder()
                .location("de/txl")
                .clusterId("cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLBackupsV2
          arguments:
            location: de/txl
            clusterId: cluster_id
    
    pulumi {
      required_providers {
        ionoscloud = {
          source = "pulumi/ionoscloud"
        }
      }
    }
    
    data "ionoscloud_dbaas_getpsqlbackupsv2" "example" {
      location   = "de/txl"
      cluster_id = "cluster_id"
    }
    

    Using getPSQLBackupsV2

    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 getPSQLBackupsV2(args: GetPSQLBackupsV2Args, opts?: InvokeOptions): Promise<GetPSQLBackupsV2Result>
    function getPSQLBackupsV2Output(args: GetPSQLBackupsV2OutputArgs, opts?: InvokeOptions): Output<GetPSQLBackupsV2Result>
    def get_psql_backups_v2(cluster_id: Optional[str] = None,
                            location: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPSQLBackupsV2Result
    def get_psql_backups_v2_output(cluster_id: pulumi.Input[Optional[str]] = None,
                            location: pulumi.Input[Optional[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPSQLBackupsV2Result]
    func GetPSQLBackupsV2(ctx *Context, args *GetPSQLBackupsV2Args, opts ...InvokeOption) (*GetPSQLBackupsV2Result, error)
    func GetPSQLBackupsV2Output(ctx *Context, args *GetPSQLBackupsV2OutputArgs, opts ...InvokeOption) GetPSQLBackupsV2ResultOutput

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

    public static class GetPSQLBackupsV2 
    {
        public static Task<GetPSQLBackupsV2Result> InvokeAsync(GetPSQLBackupsV2Args args, InvokeOptions? opts = null)
        public static Output<GetPSQLBackupsV2Result> Invoke(GetPSQLBackupsV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPSQLBackupsV2Result> getPSQLBackupsV2(GetPSQLBackupsV2Args args, InvokeOptions options)
    public static Output<GetPSQLBackupsV2Result> getPSQLBackupsV2(GetPSQLBackupsV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:dbaas/getPSQLBackupsV2:getPSQLBackupsV2
      arguments:
        # arguments dictionary
    data "ionoscloud_dbaas_getpsqlbackupsv2" "name" {
        # arguments
    }

    The following arguments are supported:

    Location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    ClusterId string
    [string] The ID (UUID) of the cluster to filter backups by.
    Location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    ClusterId string
    [string] The ID (UUID) of the cluster to filter backups by.
    location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    cluster_id string
    [string] The ID (UUID) of the cluster to filter backups by.
    location String
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    clusterId String
    [string] The ID (UUID) of the cluster to filter backups by.
    location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    clusterId string
    [string] The ID (UUID) of the cluster to filter backups by.
    location str
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    cluster_id str
    [string] The ID (UUID) of the cluster to filter backups by.
    location String
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    clusterId String
    [string] The ID (UUID) of the cluster to filter backups by.

    getPSQLBackupsV2 Result

    The following output properties are available:

    Backups List<Ionoscloud.GetPSQLBackupsV2Backup>
    The list of backups. Each backup has the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Object Storage location where the backup is stored.
    ClusterId string
    The ID (UUID) of the cluster the backup belongs to.
    Backups []GetPSQLBackupsV2Backup
    The list of backups. Each backup has the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    The Object Storage location where the backup is stored.
    ClusterId string
    The ID (UUID) of the cluster the backup belongs to.
    backups list(object)
    The list of backups. Each backup has the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Object Storage location where the backup is stored.
    cluster_id string
    The ID (UUID) of the cluster the backup belongs to.
    backups List<GetPSQLBackupsV2Backup>
    The list of backups. Each backup has the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Object Storage location where the backup is stored.
    clusterId String
    The ID (UUID) of the cluster the backup belongs to.
    backups GetPSQLBackupsV2Backup[]
    The list of backups. Each backup has the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    The Object Storage location where the backup is stored.
    clusterId string
    The ID (UUID) of the cluster the backup belongs to.
    backups Sequence[GetPSQLBackupsV2Backup]
    The list of backups. Each backup has the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    The Object Storage location where the backup is stored.
    cluster_id str
    The ID (UUID) of the cluster the backup belongs to.
    backups List<Property Map>
    The list of backups. Each backup has the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    The Object Storage location where the backup is stored.
    clusterId String
    The ID (UUID) of the cluster the backup belongs to.

    Supporting Types

    GetPSQLBackupsV2Backup

    ClusterId string
    [string] The ID (UUID) of the cluster to filter backups by.
    EarliestRecoveryTargetTime string
    The earliest point in time to which the cluster can be restored.
    Id string
    The ID (UUID) of the backup.
    IsActive bool
    Whether the backup is active.
    LatestRecoveryTargetTime string
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    Location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    PostgresClusterVersion string
    The PostgreSQL version of the cluster when the backup was created.
    ClusterId string
    [string] The ID (UUID) of the cluster to filter backups by.
    EarliestRecoveryTargetTime string
    The earliest point in time to which the cluster can be restored.
    Id string
    The ID (UUID) of the backup.
    IsActive bool
    Whether the backup is active.
    LatestRecoveryTargetTime string
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    Location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    PostgresClusterVersion string
    The PostgreSQL version of the cluster when the backup was created.
    cluster_id string
    [string] The ID (UUID) of the cluster to filter backups by.
    earliest_recovery_target_time string
    The earliest point in time to which the cluster can be restored.
    id string
    The ID (UUID) of the backup.
    is_active bool
    Whether the backup is active.
    latest_recovery_target_time string
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    postgres_cluster_version string
    The PostgreSQL version of the cluster when the backup was created.
    clusterId String
    [string] The ID (UUID) of the cluster to filter backups by.
    earliestRecoveryTargetTime String
    The earliest point in time to which the cluster can be restored.
    id String
    The ID (UUID) of the backup.
    isActive Boolean
    Whether the backup is active.
    latestRecoveryTargetTime String
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    location String
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    postgresClusterVersion String
    The PostgreSQL version of the cluster when the backup was created.
    clusterId string
    [string] The ID (UUID) of the cluster to filter backups by.
    earliestRecoveryTargetTime string
    The earliest point in time to which the cluster can be restored.
    id string
    The ID (UUID) of the backup.
    isActive boolean
    Whether the backup is active.
    latestRecoveryTargetTime string
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    location string
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    postgresClusterVersion string
    The PostgreSQL version of the cluster when the backup was created.
    cluster_id str
    [string] The ID (UUID) of the cluster to filter backups by.
    earliest_recovery_target_time str
    The earliest point in time to which the cluster can be restored.
    id str
    The ID (UUID) of the backup.
    is_active bool
    Whether the backup is active.
    latest_recovery_target_time str
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    location str
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    postgres_cluster_version str
    The PostgreSQL version of the cluster when the backup was created.
    clusterId String
    [string] The ID (UUID) of the cluster to filter backups by.
    earliestRecoveryTargetTime String
    The earliest point in time to which the cluster can be restored.
    id String
    The ID (UUID) of the backup.
    isActive Boolean
    Whether the backup is active.
    latestRecoveryTargetTime String
    The latest point in time to which the cluster can be restored. If the backup can be restored up to the current time, this field will be null.
    location String
    [string] The region in which to look up backups. Available locations: de/fra, de/fra/2, de/txl, es/vit, fr/par, gb/bhx, gb/lhr, us/ewr, us/las, us/mci.
    postgresClusterVersion String
    The PostgreSQL version of the cluster when the backup was created.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    Viewing docs for IonosCloud v0.3.1
    published on Wednesday, Jun 10, 2026 by ionos-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial