1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Psql
  5. getBackup
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.Psql.getBackup

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

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,
});
Copy
import pulumi
import pulumi_oci as oci

test_backup = oci.Psql.get_backup(backup_id=test_backup_oci_psql_backup["id"])
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
variables:
  testBackup:
    fn::invoke:
      function: oci:Psql:getBackup
      arguments:
        backupId: ${testBackupOciPsqlBackup.id}
Copy

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>
Copy
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]
Copy
func GetBackup(ctx *Context, args *GetBackupArgs, opts ...InvokeOption) (*GetBackupResult, error)
func GetBackupOutput(ctx *Context, args *GetBackupOutputArgs, opts ...InvokeOption) GetBackupResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
public static Output<GetBackupResult> getBackup(GetBackupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Psql/getBackup:getBackup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BackupId This property is required. string
A unique identifier for the backup.
BackupId This property is required. string
A unique identifier for the backup.
backupId This property is required. String
A unique identifier for the backup.
backupId This property is required. string
A unique identifier for the backup.
backup_id This property is required. str
A unique identifier for the backup.
backupId This property is required. String
A unique identifier for the backup.

getBackup Result

The following output properties are available:

BackupId string
The OCID of the backup in the source region
BackupSize int
The size of the backup, in gigabytes.
CompartmentId string
The OCID of the compartment that contains the backup.
CopyStatuses List<GetBackupCopyStatus>
List of status for Backup Copy
DbSystemDetails List<GetBackupDbSystemDetail>
Information about the database system associated with a backup.
DbSystemId string
The OCID of the backup's source database system.
DefinedTags 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.
DisplayName string
A user-friendly display name for the backup. Avoid entering confidential information.
FreeformTags 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.
LastAcceptedRequestToken string
lastAcceptedRequestToken from MP.
LastCompletedRequestToken string
lastCompletedRequestToken from MP.
LifecycleDetails 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.
RetentionPeriod int
Backup retention period in days.
SourceBackupDetails List<GetBackupSourceBackupDetail>
Information about the Source Backup associated with a backup.
SourceType 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.
SystemTags Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
TimeCreatedPrecise string
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
TimeUpdated string
The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
BackupId string
The OCID of the backup in the source region
BackupSize int
The size of the backup, in gigabytes.
CompartmentId string
The OCID of the compartment that contains the backup.
CopyStatuses []GetBackupCopyStatus
List of status for Backup Copy
DbSystemDetails []GetBackupDbSystemDetail
Information about the database system associated with a backup.
DbSystemId string
The OCID of the backup's source database system.
DefinedTags 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.
DisplayName string
A user-friendly display name for the backup. Avoid entering confidential information.
FreeformTags 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.
LastAcceptedRequestToken string
lastAcceptedRequestToken from MP.
LastCompletedRequestToken string
lastCompletedRequestToken from MP.
LifecycleDetails 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.
RetentionPeriod int
Backup retention period in days.
SourceBackupDetails []GetBackupSourceBackupDetail
Information about the Source Backup associated with a backup.
SourceType 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.
SystemTags map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
TimeCreatedPrecise string
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
TimeUpdated string
The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
backupId String
The OCID of the backup in the source region
backupSize Integer
The size of the backup, in gigabytes.
compartmentId String
The OCID of the compartment that contains the backup.
copyStatuses List<GetBackupCopyStatus>
List of status for Backup Copy
dbSystemDetails List<GetBackupDbSystemDetail>
Information about the database system associated with a backup.
dbSystemId String
The OCID of the backup's source database system.
definedTags 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.
displayName String
A user-friendly display name for the backup. Avoid entering confidential information.
freeformTags 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.
lastAcceptedRequestToken String
lastAcceptedRequestToken from MP.
lastCompletedRequestToken String
lastCompletedRequestToken from MP.
lifecycleDetails 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.
retentionPeriod Integer
Backup retention period in days.
sourceBackupDetails List<GetBackupSourceBackupDetail>
Information about the Source Backup associated with a backup.
sourceType 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.
systemTags Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
timeCreatedPrecise String
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
timeUpdated String
The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
backupId string
The OCID of the backup in the source region
backupSize number
The size of the backup, in gigabytes.
compartmentId string
The OCID of the compartment that contains the backup.
copyStatuses GetBackupCopyStatus[]
List of status for Backup Copy
dbSystemDetails GetBackupDbSystemDetail[]
Information about the database system associated with a backup.
dbSystemId string
The OCID of the backup's source database system.
definedTags {[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.
displayName string
A user-friendly display name for the backup. Avoid entering confidential information.
freeformTags {[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.
lastAcceptedRequestToken string
lastAcceptedRequestToken from MP.
lastCompletedRequestToken string
lastCompletedRequestToken from MP.
lifecycleDetails 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.
retentionPeriod number
Backup retention period in days.
sourceBackupDetails GetBackupSourceBackupDetail[]
Information about the Source Backup associated with a backup.
sourceType 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.
systemTags {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated string
The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
timeCreatedPrecise string
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
timeUpdated 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.GetBackupCopyStatus]
List of status for Backup Copy
db_system_details Sequence[psql.GetBackupDbSystemDetail]
Information about the database system associated with a backup.
db_system_id str
The OCID of the backup's source database system.
defined_tags 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.
freeform_tags 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_request_token str
lastAcceptedRequestToken from MP.
last_completed_request_token str
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_details Sequence[psql.GetBackupSourceBackupDetail]
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.
system_tags 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_precise str
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
backupId String
The OCID of the backup in the source region
backupSize Number
The size of the backup, in gigabytes.
compartmentId String
The OCID of the compartment that contains the backup.
copyStatuses List<Property Map>
List of status for Backup Copy
dbSystemDetails List<Property Map>
Information about the database system associated with a backup.
dbSystemId String
The OCID of the backup's source database system.
definedTags 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.
displayName String
A user-friendly display name for the backup. Avoid entering confidential information.
freeformTags 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.
lastAcceptedRequestToken String
lastAcceptedRequestToken from MP.
lastCompletedRequestToken String
lastCompletedRequestToken from MP.
lifecycleDetails 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.
retentionPeriod Number
Backup retention period in days.
sourceBackupDetails List<Property Map>
Information about the Source Backup associated with a backup.
sourceType 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.
systemTags Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time the backup request was received, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
timeCreatedPrecise String
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
timeUpdated 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

BackupId This property is required. string
A unique identifier for the backup.
Region This property is required. string
Region name of the remote region
State This property is required. string
The current state of the backup.
StateDetails This property is required. string
A message describing the current state of copy in more detail
BackupId This property is required. string
A unique identifier for the backup.
Region This property is required. string
Region name of the remote region
State This property is required. string
The current state of the backup.
StateDetails This property is required. string
A message describing the current state of copy in more detail
backupId This property is required. String
A unique identifier for the backup.
region This property is required. String
Region name of the remote region
state This property is required. String
The current state of the backup.
stateDetails This property is required. String
A message describing the current state of copy in more detail
backupId This property is required. string
A unique identifier for the backup.
region This property is required. string
Region name of the remote region
state This property is required. string
The current state of the backup.
stateDetails This property is required. string
A message describing the current state of copy in more detail
backup_id This property is required. str
A unique identifier for the backup.
region This property is required. str
Region name of the remote region
state This property is required. str
The current state of the backup.
state_details This property is required. str
A message describing the current state of copy in more detail
backupId This property is required. String
A unique identifier for the backup.
region This property is required. String
Region name of the remote region
state This property is required. String
The current state of the backup.
stateDetails This property is required. String
A message describing the current state of copy in more detail

GetBackupDbSystemDetail

ConfigId This property is required. string
OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
DbVersion This property is required. string
The major and minor versions of the database system software.
SystemType This property is required. string
Type of the database system.
ConfigId This property is required. string
OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
DbVersion This property is required. string
The major and minor versions of the database system software.
SystemType This property is required. string
Type of the database system.
configId This property is required. String
OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
dbVersion This property is required. String
The major and minor versions of the database system software.
systemType This property is required. String
Type of the database system.
configId This property is required. string
OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
dbVersion This property is required. string
The major and minor versions of the database system software.
systemType This property is required. string
Type of the database system.
config_id This property is required. str
OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
db_version This property is required. str
The major and minor versions of the database system software.
system_type This property is required. str
Type of the database system.
configId This property is required. String
OCID of the configuration that was applied on the source dbSystem at the time when backup was taken.
dbVersion This property is required. String
The major and minor versions of the database system software.
systemType This property is required. String
Type of the database system.

GetBackupSourceBackupDetail

SourceBackupId This property is required. string
Backup ID of the COPY source type.
SourceRegion This property is required. string
Backup Region of the COPY source type.
SourceBackupId This property is required. string
Backup ID of the COPY source type.
SourceRegion This property is required. string
Backup Region of the COPY source type.
sourceBackupId This property is required. String
Backup ID of the COPY source type.
sourceRegion This property is required. String
Backup Region of the COPY source type.
sourceBackupId This property is required. string
Backup ID of the COPY source type.
sourceRegion This property is required. string
Backup Region of the COPY source type.
source_backup_id This property is required. str
Backup ID of the COPY source type.
source_region This property is required. str
Backup Region of the COPY source type.
sourceBackupId This property is required. String
Backup ID of the COPY source type.
sourceRegion This property is required. 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 oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi