Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Psql.getBackups
Explore with Pulumi AI
This data source provides the list of Backups in Oracle Cloud Infrastructure Psql service.
Returns a list of backups.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBackups = oci.Psql.getBackups({
backupId: testBackup.id,
compartmentId: compartmentId,
displayName: backupDisplayName,
id: backupId,
state: backupState,
timeEnded: backupTimeEnded,
timeStarted: backupTimeStarted,
});
import pulumi
import pulumi_oci as oci
test_backups = oci.Psql.get_backups(backup_id=test_backup["id"],
compartment_id=compartment_id,
display_name=backup_display_name,
id=backup_id,
state=backup_state,
time_ended=backup_time_ended,
time_started=backup_time_started)
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.GetBackups(ctx, &psql.GetBackupsArgs{
BackupId: pulumi.StringRef(testBackup.Id),
CompartmentId: pulumi.StringRef(compartmentId),
DisplayName: pulumi.StringRef(backupDisplayName),
Id: pulumi.StringRef(backupId),
State: pulumi.StringRef(backupState),
TimeEnded: pulumi.StringRef(backupTimeEnded),
TimeStarted: pulumi.StringRef(backupTimeStarted),
}, 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 testBackups = Oci.Psql.GetBackups.Invoke(new()
{
BackupId = testBackup.Id,
CompartmentId = compartmentId,
DisplayName = backupDisplayName,
Id = backupId,
State = backupState,
TimeEnded = backupTimeEnded,
TimeStarted = backupTimeStarted,
});
});
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.GetBackupsArgs;
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 testBackups = PsqlFunctions.getBackups(GetBackupsArgs.builder()
.backupId(testBackup.id())
.compartmentId(compartmentId)
.displayName(backupDisplayName)
.id(backupId)
.state(backupState)
.timeEnded(backupTimeEnded)
.timeStarted(backupTimeStarted)
.build());
}
}
variables:
testBackups:
fn::invoke:
Function: oci:Psql:getBackups
Arguments:
backupId: ${testBackup.id}
compartmentId: ${compartmentId}
displayName: ${backupDisplayName}
id: ${backupId}
state: ${backupState}
timeEnded: ${backupTimeEnded}
timeStarted: ${backupTimeStarted}
Using getBackups
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 getBackups(args: GetBackupsArgs, opts?: InvokeOptions): Promise<GetBackupsResult>
function getBackupsOutput(args: GetBackupsOutputArgs, opts?: InvokeOptions): Output<GetBackupsResult>
def get_backups(backup_id: Optional[str] = None,
compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_psql.GetBackupsFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
time_ended: Optional[str] = None,
time_started: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupsResult
def get_backups_output(backup_id: Optional[pulumi.Input[str]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_psql.GetBackupsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
time_ended: Optional[pulumi.Input[str]] = None,
time_started: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBackupsResult]
func GetBackups(ctx *Context, args *GetBackupsArgs, opts ...InvokeOption) (*GetBackupsResult, error)
func GetBackupsOutput(ctx *Context, args *GetBackupsOutputArgs, opts ...InvokeOption) GetBackupsResultOutput
> Note: This function is named GetBackups
in the Go SDK.
public static class GetBackups
{
public static Task<GetBackupsResult> InvokeAsync(GetBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetBackupsResult> Invoke(GetBackupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetBackupsResult> getBackups(GetBackupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Psql/getBackups:getBackups
arguments:
# arguments dictionary
The following arguments are supported:
- Backup
Id string - A unique identifier for the backup.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Filters
List<Get
Backups Filter> - Id string
- A unique identifier for the database system.
- State string
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - Time
Ended string - The end date for getting backups. An RFC 3339 formatted datetime string.
- Time
Started string - The start date for getting backups. An RFC 3339 formatted datetime string.
- Backup
Id string - A unique identifier for the backup.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Filters
[]Get
Backups Filter - Id string
- A unique identifier for the database system.
- State string
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - Time
Ended string - The end date for getting backups. An RFC 3339 formatted datetime string.
- Time
Started string - The start date for getting backups. An RFC 3339 formatted datetime string.
- backup
Id String - A unique identifier for the backup.
- compartment
Id String - The ID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the entire display name given.
- filters
List<Get
Backups Filter> - id String
- A unique identifier for the database system.
- state String
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - time
Ended String - The end date for getting backups. An RFC 3339 formatted datetime string.
- time
Started String - The start date for getting backups. An RFC 3339 formatted datetime string.
- backup
Id string - A unique identifier for the backup.
- compartment
Id string - The ID of the compartment in which to list resources.
- display
Name string - A filter to return only resources that match the entire display name given.
- filters
Get
Backups Filter[] - id string
- A unique identifier for the database system.
- state string
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - time
Ended string - The end date for getting backups. An RFC 3339 formatted datetime string.
- time
Started string - The start date for getting backups. An RFC 3339 formatted datetime string.
- backup_
id str - A unique identifier for the backup.
- compartment_
id str - The ID of the compartment in which to list resources.
- display_
name str - A filter to return only resources that match the entire display name given.
- filters
Sequence[psql.
Get Backups Filter] - id str
- A unique identifier for the database system.
- state str
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - time_
ended str - The end date for getting backups. An RFC 3339 formatted datetime string.
- time_
started str - The start date for getting backups. An RFC 3339 formatted datetime string.
- backup
Id String - A unique identifier for the backup.
- compartment
Id String - The ID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- A unique identifier for the database system.
- state String
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - time
Ended String - The end date for getting backups. An RFC 3339 formatted datetime string.
- time
Started String - The start date for getting backups. An RFC 3339 formatted datetime string.
getBackups Result
The following output properties are available:
- Backup
Collections List<GetBackups Backup Collection> - The list of backup_collection.
- Backup
Id string - Compartment
Id string - The OCID of the compartment that contains the backup.
- Display
Name string - A user-friendly display name for the backup. Avoid entering confidential information.
- Filters
List<Get
Backups Filter> - Id string
- The OCID of the backup.
- State string
- The current state of the backup.
- Time
Ended string - Time
Started string
- Backup
Collections []GetBackups Backup Collection - The list of backup_collection.
- Backup
Id string - Compartment
Id string - The OCID of the compartment that contains the backup.
- Display
Name string - A user-friendly display name for the backup. Avoid entering confidential information.
- Filters
[]Get
Backups Filter - Id string
- The OCID of the backup.
- State string
- The current state of the backup.
- Time
Ended string - Time
Started string
- backup
Collections List<GetBackups Backup Collection> - The list of backup_collection.
- backup
Id String - compartment
Id String - The OCID of the compartment that contains the backup.
- display
Name String - A user-friendly display name for the backup. Avoid entering confidential information.
- filters
List<Get
Backups Filter> - id String
- The OCID of the backup.
- state String
- The current state of the backup.
- time
Ended String - time
Started String
- backup
Collections GetBackups Backup Collection[] - The list of backup_collection.
- backup
Id string - compartment
Id string - The OCID of the compartment that contains the backup.
- display
Name string - A user-friendly display name for the backup. Avoid entering confidential information.
- filters
Get
Backups Filter[] - id string
- The OCID of the backup.
- state string
- The current state of the backup.
- time
Ended string - time
Started string
- backup_
collections Sequence[psql.Get Backups Backup Collection] - The list of backup_collection.
- backup_
id str - compartment_
id str - The OCID of the compartment that contains the backup.
- display_
name str - A user-friendly display name for the backup. Avoid entering confidential information.
- filters
Sequence[psql.
Get Backups Filter] - id str
- The OCID of the backup.
- state str
- The current state of the backup.
- time_
ended str - time_
started str
- backup
Collections List<Property Map> - The list of backup_collection.
- backup
Id String - compartment
Id String - The OCID of the compartment that contains the backup.
- display
Name String - A user-friendly display name for the backup. Avoid entering confidential information.
- filters List<Property Map>
- id String
- The OCID of the backup.
- state String
- The current state of the backup.
- time
Ended String - time
Started String
Supporting Types
GetBackupsBackupCollection
GetBackupsBackupCollectionItem
- Backup
Size int - The size of the backup, in gigabytes.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Db
System List<GetDetails Backups Backup Collection Item 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 filter to return only resources that match the entire display name given.
- 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
- A unique identifier for the database system.
- 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
Type string - Specifies whether the backup was created manually, or by a management policy.
- State string
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - 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
Updated string - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- Backup
Size int - The size of the backup, in gigabytes.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Db
System []GetDetails Backups Backup Collection Item 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 filter to return only resources that match the entire display name given.
- 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
- A unique identifier for the database system.
- 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
Type string - Specifies whether the backup was created manually, or by a management policy.
- State string
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - 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
Updated string - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- backup
Size Integer - The size of the backup, in gigabytes.
- compartment
Id String - The ID of the compartment in which to list resources.
- db
System List<GetDetails Backups Backup Collection Item 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 filter to return only resources that match the entire display name given.
- 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
- A unique identifier for the database system.
- 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
Type String - Specifies whether the backup was created manually, or by a management policy.
- state String
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - 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
Updated String - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- backup
Size number - The size of the backup, in gigabytes.
- compartment
Id string - The ID of the compartment in which to list resources.
- db
System GetDetails Backups Backup Collection Item 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 filter to return only resources that match the entire display name given.
- {[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
- A unique identifier for the database system.
- 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
Type string - Specifies whether the backup was created manually, or by a management policy.
- state string
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - {[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
Updated string - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- backup_
size int - The size of the backup, in gigabytes.
- compartment_
id str - The ID of the compartment in which to list resources.
- db_
system_ Sequence[psql.details Get Backups Backup Collection Item 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 filter to return only resources that match the entire display name given.
- 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
- A unique identifier for the database system.
- 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_
type str - Specifies whether the backup was created manually, or by a management policy.
- state str
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - 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_
updated str - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- backup
Size Number - The size of the backup, in gigabytes.
- compartment
Id String - The ID of the compartment in which to list resources.
- 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 filter to return only resources that match the entire display name given.
- 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
- A unique identifier for the database system.
- 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
Type String - Specifies whether the backup was created manually, or by a management policy.
- state String
- A filter to return only resources if their
lifecycleState
matches the givenlifecycleState
. - 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
Updated String - The date and time the backup was updated, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
GetBackupsBackupCollectionItemDbSystemDetail
- Db
Version string - The major and minor versions of the database system software.
- System
Type string - Type of the database system.
- Db
Version string - The major and minor versions of the database system software.
- System
Type string - Type of the database system.
- db
Version String - The major and minor versions of the database system software.
- system
Type String - Type of the database system.
- db
Version string - The major and minor versions of the database system software.
- system
Type 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.
- db
Version String - The major and minor versions of the database system software.
- system
Type String - Type of the database system.
GetBackupsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.