Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.Psql.getBackup
Explore with Pulumi AI
This data source provides details about a specific Backup resource in Oracle Cloud Infrastructure Psql service.
Gets a backup by identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBackup = oci.Psql.getBackup({
    backupId: testBackupOciPsqlBackup.id,
});
import pulumi
import pulumi_oci as oci
test_backup = oci.Psql.get_backup(backup_id=test_backup_oci_psql_backup["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/psql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := psql.GetBackup(ctx, &psql.GetBackupArgs{
			BackupId: testBackupOciPsqlBackup.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testBackup = Oci.Psql.GetBackup.Invoke(new()
    {
        BackupId = testBackupOciPsqlBackup.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Psql.PsqlFunctions;
import com.pulumi.oci.Psql.inputs.GetBackupArgs;
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 testBackup = PsqlFunctions.getBackup(GetBackupArgs.builder()
            .backupId(testBackupOciPsqlBackup.id())
            .build());
    }
}
variables:
  testBackup:
    fn::invoke:
      function: oci:Psql:getBackup
      arguments:
        backupId: ${testBackupOciPsqlBackup.id}
Using getBackup
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 getBackup(args: GetBackupArgs, opts?: InvokeOptions): Promise<GetBackupResult>
function getBackupOutput(args: GetBackupOutputArgs, opts?: InvokeOptions): Output<GetBackupResult>def get_backup(backup_id: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetBackupResult
def get_backup_output(backup_id: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetBackupResult]func GetBackup(ctx *Context, args *GetBackupArgs, opts ...InvokeOption) (*GetBackupResult, error)
func GetBackupOutput(ctx *Context, args *GetBackupOutputArgs, opts ...InvokeOption) GetBackupResultOutput> Note: This function is named GetBackup in the Go SDK.
public static class GetBackup 
{
    public static Task<GetBackupResult> InvokeAsync(GetBackupArgs args, InvokeOptions? opts = null)
    public static Output<GetBackupResult> Invoke(GetBackupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
public static Output<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Psql/getBackup:getBackup
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Backup
Id string - A unique identifier for the backup.
 
- Backup
Id string - A unique identifier for the backup.
 
- backup
Id String - A unique identifier for the backup.
 
- backup
Id string - A unique identifier for the backup.
 
- backup_
id str - A unique identifier for the backup.
 
- backup
Id String - A unique identifier for the backup.
 
getBackup Result
The following output properties are available:
- Backup
Id string - The OCID of the backup in the source region
 - Backup
Size int - The size of the backup, in gigabytes.
 - Compartment
Id string - The OCID of the compartment that contains the backup.
 - Copy
Statuses List<GetBackup Copy Status>  - List of status for Backup Copy
 - Db
System List<GetDetails Backup Db System Detail>  - Information about the database system associated with a backup.
 - Db
System stringId  - The OCID of the backup's source database system.
 - Dictionary<string, string>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - Description string
 - A description for the backup.
 - Display
Name string - A user-friendly display name for the backup. Avoid entering confidential information.
 - Dictionary<string, string>
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: 
{"bar-key": "value"} - Id string
 - The OCID of the backup.
 - Last
Accepted stringRequest Token  - lastAcceptedRequestToken from MP.
 - Last
Completed stringRequest Token  - lastCompletedRequestToken from MP.
 - Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - Retention
Period int - Backup retention period in days.
 - Source
Backup List<GetDetails Backup Source Backup Detail>  - Information about the Source Backup associated with a backup.
 - Source
Type string - Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location.
 - State string
 - The current state of the backup.
 - Dictionary<string, string>
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - Time
Created stringPrecise  - The date and time the backup was created. This is the time the actual point-in-time data snapshot was taken, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z 
- Backup
Id string - The OCID of the backup in the source region
 - Backup
Size int - The size of the backup, in gigabytes.
 - Compartment
Id string - The OCID of the compartment that contains the backup.
 - Copy
Statuses []GetBackup Copy Status  - List of status for Backup Copy
 - Db
System []GetDetails Backup Db System Detail  - Information about the database system associated with a backup.
 - Db
System stringId  - The OCID of the backup's source database system.
 - map[string]string
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - Description string
 - A description for the backup.
 - Display
Name string - A user-friendly display name for the backup. Avoid entering confidential information.
 - map[string]string
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: 
{"bar-key": "value"} - Id string
 - The OCID of the backup.
 - Last
Accepted stringRequest Token  - lastAcceptedRequestToken from MP.
 - Last
Completed stringRequest Token  - lastCompletedRequestToken from MP.
 - Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - Retention
Period int - Backup retention period in days.
 - Source
Backup []GetDetails Backup Source Backup Detail  - Information about the Source Backup associated with a backup.
 - Source
Type string - Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location.
 - State string
 - The current state of the backup.
 - map[string]string
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - Time
Created stringPrecise  - The date and time the backup was created. This is the time the actual point-in-time data snapshot was taken, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z 
- backup
Id String - The OCID of the backup in the source region
 - backup
Size Integer - The size of the backup, in gigabytes.
 - compartment
Id String - The OCID of the compartment that contains the backup.
 - copy
Statuses List<GetBackup Copy Status>  - List of status for Backup Copy
 - db
System List<GetDetails Backup Db System Detail>  - Information about the database system associated with a backup.
 - db
System StringId  - The OCID of the backup's source database system.
 - Map<String,String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - description String
 - A description for the backup.
 - display
Name String - A user-friendly display name for the backup. Avoid entering confidential information.
 - Map<String,String>
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: 
{"bar-key": "value"} - id String
 - The OCID of the backup.
 - last
Accepted StringRequest Token  - lastAcceptedRequestToken from MP.
 - last
Completed StringRequest Token  - lastCompletedRequestToken from MP.
 - lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - retention
Period Integer - Backup retention period in days.
 - source
Backup List<GetDetails Backup Source Backup Detail>  - Information about the Source Backup associated with a backup.
 - source
Type String - Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location.
 - state String
 - The current state of the backup.
 - Map<String,String>
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time
Created StringPrecise  - The date and time the backup was created. This is the time the actual point-in-time data snapshot was taken, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z 
- backup
Id string - The OCID of the backup in the source region
 - backup
Size number - The size of the backup, in gigabytes.
 - compartment
Id string - The OCID of the compartment that contains the backup.
 - copy
Statuses GetBackup Copy Status[]  - List of status for Backup Copy
 - db
System GetDetails Backup Db System Detail[]  - Information about the database system associated with a backup.
 - db
System stringId  - The OCID of the backup's source database system.
 - {[key: string]: string}
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - description string
 - A description for the backup.
 - display
Name string - A user-friendly display name for the backup. Avoid entering confidential information.
 - {[key: string]: string}
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: 
{"bar-key": "value"} - id string
 - The OCID of the backup.
 - last
Accepted stringRequest Token  - lastAcceptedRequestToken from MP.
 - last
Completed stringRequest Token  - lastCompletedRequestToken from MP.
 - lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - retention
Period number - Backup retention period in days.
 - source
Backup GetDetails Backup Source Backup Detail[]  - Information about the Source Backup associated with a backup.
 - source
Type string - Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location.
 - state string
 - The current state of the backup.
 - {[key: string]: string}
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created string - The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time
Created stringPrecise  - The date and time the backup was created. This is the time the actual point-in-time data snapshot was taken, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time
Updated string - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z 
- backup_
id str - The OCID of the backup in the source region
 - backup_
size int - The size of the backup, in gigabytes.
 - compartment_
id str - The OCID of the compartment that contains the backup.
 - copy_
statuses Sequence[psql.Get Backup Copy Status]  - List of status for Backup Copy
 - db_
system_ Sequence[psql.details Get Backup Db System Detail]  - Information about the database system associated with a backup.
 - db_
system_ strid  - The OCID of the backup's source database system.
 - Mapping[str, str]
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - description str
 - A description for the backup.
 - display_
name str - A user-friendly display name for the backup. Avoid entering confidential information.
 - Mapping[str, str]
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: 
{"bar-key": "value"} - id str
 - The OCID of the backup.
 - last_
accepted_ strrequest_ token  - lastAcceptedRequestToken from MP.
 - last_
completed_ strrequest_ token  - lastCompletedRequestToken from MP.
 - lifecycle_
details str - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - retention_
period int - Backup retention period in days.
 - source_
backup_ Sequence[psql.details Get Backup Source Backup Detail]  - Information about the Source Backup associated with a backup.
 - source_
type str - Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location.
 - state str
 - The current state of the backup.
 - Mapping[str, str]
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time_
created str - The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time_
created_ strprecise  - The date and time the backup was created. This is the time the actual point-in-time data snapshot was taken, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time_
updated str - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z 
- backup
Id String - The OCID of the backup in the source region
 - backup
Size Number - The size of the backup, in gigabytes.
 - compartment
Id String - The OCID of the compartment that contains the backup.
 - copy
Statuses List<Property Map> - List of status for Backup Copy
 - db
System List<Property Map>Details  - Information about the database system associated with a backup.
 - db
System StringId  - The OCID of the backup's source database system.
 - Map<String>
 - Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"foo-namespace.bar-key": "value"} - description String
 - A description for the backup.
 - display
Name String - A user-friendly display name for the backup. Avoid entering confidential information.
 - Map<String>
 - Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: 
{"bar-key": "value"} - id String
 - The OCID of the backup.
 - last
Accepted StringRequest Token  - lastAcceptedRequestToken from MP.
 - last
Completed StringRequest Token  - lastCompletedRequestToken from MP.
 - lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
 - retention
Period Number - Backup retention period in days.
 - source
Backup List<Property Map>Details  - Information about the Source Backup associated with a backup.
 - source
Type String - Specifies whether the backup was created manually, taken on schedule defined in the a backup policy, or copied from the remote location.
 - state String
 - The current state of the backup.
 - Map<String>
 - System tags for this resource. Each key is predefined and scoped to a namespace. Example: 
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time
Created StringPrecise  - The date and time the backup was created. This is the time the actual point-in-time data snapshot was taken, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 
2016-08-25T21:10:29.600Z 
Supporting Types
GetBackupCopyStatus   
- Backup
Id string - A unique identifier for the backup.
 - Region string
 - Region name of the remote region
 - State string
 - The current state of the backup.
 - State
Details string - A message describing the current state of copy in more detail
 
- Backup
Id string - A unique identifier for the backup.
 - Region string
 - Region name of the remote region
 - State string
 - The current state of the backup.
 - State
Details string - A message describing the current state of copy in more detail
 
- backup
Id String - A unique identifier for the backup.
 - region String
 - Region name of the remote region
 - state String
 - The current state of the backup.
 - state
Details String - A message describing the current state of copy in more detail
 
- backup
Id string - A unique identifier for the backup.
 - region string
 - Region name of the remote region
 - state string
 - The current state of the backup.
 - state
Details string - A message describing the current state of copy in more detail
 
- backup_
id str - A unique identifier for the backup.
 - region str
 - Region name of the remote region
 - state str
 - The current state of the backup.
 - state_
details str - A message describing the current state of copy in more detail
 
- backup
Id String - A unique identifier for the backup.
 - region String
 - Region name of the remote region
 - state String
 - The current state of the backup.
 - state
Details String - A message describing the current state of copy in more detail
 
GetBackupDbSystemDetail    
- Config
Id string - OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
 - Db
Version string - The major and minor versions of the database system software.
 - System
Type string - Type of the database system.
 
- Config
Id string - OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
 - Db
Version string - The major and minor versions of the database system software.
 - System
Type string - Type of the database system.
 
- config
Id String - OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
 - db
Version String - The major and minor versions of the database system software.
 - system
Type String - Type of the database system.
 
- config
Id string - OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
 - db
Version string - The major and minor versions of the database system software.
 - system
Type string - Type of the database system.
 
- config_
id str - OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
 - db_
version str - The major and minor versions of the database system software.
 - system_
type str - Type of the database system.
 
- config
Id String - OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
 - db
Version String - The major and minor versions of the database system software.
 - system
Type String - Type of the database system.
 
GetBackupSourceBackupDetail    
- Source
Backup stringId  - Backup ID of the COPY source type.
 - Source
Region string - Backup Region of the COPY source type.
 
- Source
Backup stringId  - Backup ID of the COPY source type.
 - Source
Region string - Backup Region of the COPY source type.
 
- source
Backup StringId  - Backup ID of the COPY source type.
 - source
Region String - Backup Region of the COPY source type.
 
- source
Backup stringId  - Backup ID of the COPY source type.
 - source
Region string - Backup Region of the COPY source type.
 
- source_
backup_ strid  - Backup ID of the COPY source type.
 - source_
region str - Backup Region of the COPY source type.
 
- source
Backup StringId  - Backup ID of the COPY source type.
 - source
Region String - Backup Region of the COPY source type.
 
Package Details
- Repository
 - oci pulumi/pulumi-oci
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
ociTerraform Provider.