1. Packages
  2. Ionoscloud
  3. API Docs
  4. dbaas
  5. getPSQLBackups
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.dbaas.getPSQLBackups

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    The DbaaS Postgres Backups data source can be used to search for and return existing DbaaS Postgres Backups for a specific Cluster. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.dbaas.getPSQLBackups({
        clusterId: "cluster_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.dbaas.get_psql_backups(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.GetPSQLBackups(ctx, &dbaas.GetPSQLBackupsArgs{
    			ClusterId: "cluster_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.Dbaas.GetPSQLBackups.Invoke(new()
        {
            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.GetPSQLBackupsArgs;
    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 example = DbaasFunctions.getPSQLBackups(GetPSQLBackupsArgs.builder()
                .clusterId("cluster_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:dbaas:getPSQLBackups
          arguments:
            clusterId: cluster_id
    

    Using getPSQLBackups

    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 getPSQLBackups(args: GetPSQLBackupsArgs, opts?: InvokeOptions): Promise<GetPSQLBackupsResult>
    function getPSQLBackupsOutput(args: GetPSQLBackupsOutputArgs, opts?: InvokeOptions): Output<GetPSQLBackupsResult>
    def get_psql_backups(cluster_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetPSQLBackupsResult
    def get_psql_backups_output(cluster_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetPSQLBackupsResult]
    func GetPSQLBackups(ctx *Context, args *GetPSQLBackupsArgs, opts ...InvokeOption) (*GetPSQLBackupsResult, error)
    func GetPSQLBackupsOutput(ctx *Context, args *GetPSQLBackupsOutputArgs, opts ...InvokeOption) GetPSQLBackupsResultOutput

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

    public static class GetPSQLBackups 
    {
        public static Task<GetPSQLBackupsResult> InvokeAsync(GetPSQLBackupsArgs args, InvokeOptions? opts = null)
        public static Output<GetPSQLBackupsResult> Invoke(GetPSQLBackupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPSQLBackupsResult> getPSQLBackups(GetPSQLBackupsArgs args, InvokeOptions options)
    public static Output<GetPSQLBackupsResult> getPSQLBackups(GetPSQLBackupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:dbaas/getPSQLBackups:getPSQLBackups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ClusterId string

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    ClusterId string

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    clusterId String

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    clusterId string

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    cluster_id str

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    clusterId String

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    getPSQLBackups Result

    The following output properties are available:

    ClusterBackups List<Ionoscloud.GetPSQLBackupsClusterBackup>
    List of backups.
    ClusterId string
    The unique ID of the cluster
    Id string
    The provider-assigned unique ID for this managed resource.
    ClusterBackups []GetPSQLBackupsClusterBackup
    List of backups.
    ClusterId string
    The unique ID of the cluster
    Id string
    The provider-assigned unique ID for this managed resource.
    clusterBackups List<GetPSQLBackupsClusterBackup>
    List of backups.
    clusterId String
    The unique ID of the cluster
    id String
    The provider-assigned unique ID for this managed resource.
    clusterBackups GetPSQLBackupsClusterBackup[]
    List of backups.
    clusterId string
    The unique ID of the cluster
    id string
    The provider-assigned unique ID for this managed resource.
    cluster_backups Sequence[GetPSQLBackupsClusterBackup]
    List of backups.
    cluster_id str
    The unique ID of the cluster
    id str
    The provider-assigned unique ID for this managed resource.
    clusterBackups List<Property Map>
    List of backups.
    clusterId String
    The unique ID of the cluster
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetPSQLBackupsClusterBackup

    ClusterId string

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    EarliestRecoveryTargetTime string
    The oldest available timestamp to which you can restore.
    Id string
    The unique ID of the resource.
    IsActive bool
    Whether a cluster currently backs up data to this backup.
    Location string
    The IONOS Object Storage location where the backups will be stored.
    Metadatas List<Ionoscloud.GetPSQLBackupsClusterBackupMetadata>
    Metadata of the resource.
    Size int
    The size of all base backups including the wal size in MB.
    Type string
    Version string
    The PostgreSQL version this backup was created from.
    ClusterId string

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    EarliestRecoveryTargetTime string
    The oldest available timestamp to which you can restore.
    Id string
    The unique ID of the resource.
    IsActive bool
    Whether a cluster currently backs up data to this backup.
    Location string
    The IONOS Object Storage location where the backups will be stored.
    Metadatas []GetPSQLBackupsClusterBackupMetadata
    Metadata of the resource.
    Size int
    The size of all base backups including the wal size in MB.
    Type string
    Version string
    The PostgreSQL version this backup was created from.
    clusterId String

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    earliestRecoveryTargetTime String
    The oldest available timestamp to which you can restore.
    id String
    The unique ID of the resource.
    isActive Boolean
    Whether a cluster currently backs up data to this backup.
    location String
    The IONOS Object Storage location where the backups will be stored.
    metadatas List<GetPSQLBackupsClusterBackupMetadata>
    Metadata of the resource.
    size Integer
    The size of all base backups including the wal size in MB.
    type String
    version String
    The PostgreSQL version this backup was created from.
    clusterId string

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    earliestRecoveryTargetTime string
    The oldest available timestamp to which you can restore.
    id string
    The unique ID of the resource.
    isActive boolean
    Whether a cluster currently backs up data to this backup.
    location string
    The IONOS Object Storage location where the backups will be stored.
    metadatas GetPSQLBackupsClusterBackupMetadata[]
    Metadata of the resource.
    size number
    The size of all base backups including the wal size in MB.
    type string
    version string
    The PostgreSQL version this backup was created from.
    cluster_id str

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    earliest_recovery_target_time str
    The oldest available timestamp to which you can restore.
    id str
    The unique ID of the resource.
    is_active bool
    Whether a cluster currently backs up data to this backup.
    location str
    The IONOS Object Storage location where the backups will be stored.
    metadatas Sequence[GetPSQLBackupsClusterBackupMetadata]
    Metadata of the resource.
    size int
    The size of all base backups including the wal size in MB.
    type str
    version str
    The PostgreSQL version this backup was created from.
    clusterId String

    The unique ID of the cluster.

    cluster_id must be provided. If it is not provided, the datasource will return an error.

    earliestRecoveryTargetTime String
    The oldest available timestamp to which you can restore.
    id String
    The unique ID of the resource.
    isActive Boolean
    Whether a cluster currently backs up data to this backup.
    location String
    The IONOS Object Storage location where the backups will be stored.
    metadatas List<Property Map>
    Metadata of the resource.
    size Number
    The size of all base backups including the wal size in MB.
    type String
    version String
    The PostgreSQL version this backup was created from.

    GetPSQLBackupsClusterBackupMetadata

    CreatedDate string
    The ISO 8601 creation timestamp.
    CreatedDate string
    The ISO 8601 creation timestamp.
    createdDate String
    The ISO 8601 creation timestamp.
    createdDate string
    The ISO 8601 creation timestamp.
    created_date str
    The ISO 8601 creation timestamp.
    createdDate String
    The ISO 8601 creation timestamp.

    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
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud