1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Psql
  5. getBackup
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Psql.getBackup

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 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,
    });
    
    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/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Psql/getBackup:getBackup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BackupId string
    A unique identifier for the backup.
    BackupId string
    A unique identifier for the backup.
    backupId String
    A unique identifier for the backup.
    backupId string
    A unique identifier for the backup.
    backup_id str
    A unique identifier for the backup.
    backupId String
    A unique identifier for the backup.

    getBackup Result

    The following output properties are available:

    BackupId string
    BackupSize int
    The size of the backup, in gigabytes.
    CompartmentId string
    The OCID of the compartment that contains the backup.
    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, object>
    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, object>
    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.
    SourceType string
    Specifies whether the backup was created manually, or by a management policy.
    State string
    The current state of the backup.
    SystemTags Dictionary<string, object>
    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 was created, 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
    BackupSize int
    The size of the backup, in gigabytes.
    CompartmentId string
    The OCID of the compartment that contains the backup.
    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]interface{}
    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]interface{}
    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.
    SourceType string
    Specifies whether the backup was created manually, or by a management policy.
    State string
    The current state of the backup.
    SystemTags map[string]interface{}
    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 was created, 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
    backupSize Integer
    The size of the backup, in gigabytes.
    compartmentId String
    The OCID of the compartment that contains the backup.
    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,Object>
    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,Object>
    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.
    sourceType String
    Specifies whether the backup was created manually, or by a management policy.
    state String
    The current state of the backup.
    systemTags Map<String,Object>
    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 was created, 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
    backupSize number
    The size of the backup, in gigabytes.
    compartmentId string
    The OCID of the compartment that contains the backup.
    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]: any}
    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]: any}
    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.
    sourceType string
    Specifies whether the backup was created manually, or by a management policy.
    state string
    The current state of the backup.
    systemTags {[key: string]: any}
    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 was created, 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
    backup_size int
    The size of the backup, in gigabytes.
    compartment_id str
    The OCID of the compartment that contains the backup.
    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, Any]
    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, Any]
    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_type str
    Specifies whether the backup was created manually, or by a management policy.
    state str
    The current state of the backup.
    system_tags Mapping[str, Any]
    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 was created, 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
    backupSize Number
    The size of the backup, in gigabytes.
    compartmentId String
    The OCID of the compartment that contains the backup.
    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<Any>
    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<Any>
    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.
    sourceType String
    Specifies whether the backup was created manually, or by a management policy.
    state String
    The current state of the backup.
    systemTags Map<Any>
    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 was created, 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

    GetBackupDbSystemDetail

    DbVersion string
    The major and minor versions of the database system software.
    SystemType string
    Type of the database system.
    DbVersion string
    The major and minor versions of the database system software.
    SystemType string
    Type of the database system.
    dbVersion String
    The major and minor versions of the database system software.
    systemType String
    Type of the database system.
    dbVersion string
    The major and minor versions of the database system software.
    systemType string
    Type of the database system.
    db_version str
    The major and minor versions of the database system software.
    system_type str
    Type of the database system.
    dbVersion String
    The major and minor versions of the database system software.
    systemType String
    Type of the database system.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi