Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Database.getBackups
Explore with Pulumi AI
This data source provides the list of Backups in Oracle Cloud Infrastructure Database service.
Gets a list of backups based on the databaseId
or compartmentId
specified. Either one of these query parameters must be provided.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBackups = oci.Database.getBackups({
compartmentId: compartmentId,
databaseId: testDatabase.id,
shapeFamily: backupShapeFamily,
});
import pulumi
import pulumi_oci as oci
test_backups = oci.Database.get_backups(compartment_id=compartment_id,
database_id=test_database["id"],
shape_family=backup_shape_family)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Database"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Database.GetBackups(ctx, &database.GetBackupsArgs{
CompartmentId: pulumi.StringRef(compartmentId),
DatabaseId: pulumi.StringRef(testDatabase.Id),
ShapeFamily: pulumi.StringRef(backupShapeFamily),
}, 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.Database.GetBackups.Invoke(new()
{
CompartmentId = compartmentId,
DatabaseId = testDatabase.Id,
ShapeFamily = backupShapeFamily,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Database.DatabaseFunctions;
import com.pulumi.oci.Database.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 = DatabaseFunctions.getBackups(GetBackupsArgs.builder()
.compartmentId(compartmentId)
.databaseId(testDatabase.id())
.shapeFamily(backupShapeFamily)
.build());
}
}
variables:
testBackups:
fn::invoke:
Function: oci:Database:getBackups
Arguments:
compartmentId: ${compartmentId}
databaseId: ${testDatabase.id}
shapeFamily: ${backupShapeFamily}
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(compartment_id: Optional[str] = None,
database_id: Optional[str] = None,
filters: Optional[Sequence[_database.GetBackupsFilter]] = None,
shape_family: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBackupsResult
def get_backups_output(compartment_id: Optional[pulumi.Input[str]] = None,
database_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_database.GetBackupsFilterArgs]]]] = None,
shape_family: 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:Database/getBackups:getBackups
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The compartment OCID.
- Database
Id string - The OCID of the database.
- Filters
List<Get
Backups Filter> - Shape
Family string - If provided, filters the results to the set of database versions which are supported for the given shape family.
- Compartment
Id string - The compartment OCID.
- Database
Id string - The OCID of the database.
- Filters
[]Get
Backups Filter - Shape
Family string - If provided, filters the results to the set of database versions which are supported for the given shape family.
- compartment
Id String - The compartment OCID.
- database
Id String - The OCID of the database.
- filters
List<Get
Backups Filter> - shape
Family String - If provided, filters the results to the set of database versions which are supported for the given shape family.
- compartment
Id string - The compartment OCID.
- database
Id string - The OCID of the database.
- filters
Get
Backups Filter[] - shape
Family string - If provided, filters the results to the set of database versions which are supported for the given shape family.
- compartment_
id str - The compartment OCID.
- database_
id str - The OCID of the database.
- filters
Sequence[database.
Get Backups Filter] - shape_
family str - If provided, filters the results to the set of database versions which are supported for the given shape family.
- compartment
Id String - The compartment OCID.
- database
Id String - The OCID of the database.
- filters List<Property Map>
- shape
Family String - If provided, filters the results to the set of database versions which are supported for the given shape family.
getBackups Result
The following output properties are available:
- Backups
List<Get
Backups Backup> - The list of backups.
- Id string
- The provider-assigned unique ID for this managed resource.
- Compartment
Id string - The OCID of the compartment.
- Database
Id string - The OCID of the database.
- Filters
List<Get
Backups Filter> - Shape
Family string
- Backups
[]Get
Backups Backup - The list of backups.
- Id string
- The provider-assigned unique ID for this managed resource.
- Compartment
Id string - The OCID of the compartment.
- Database
Id string - The OCID of the database.
- Filters
[]Get
Backups Filter - Shape
Family string
- backups
List<Get
Backups Backup> - The list of backups.
- id String
- The provider-assigned unique ID for this managed resource.
- compartment
Id String - The OCID of the compartment.
- database
Id String - The OCID of the database.
- filters
List<Get
Backups Filter> - shape
Family String
- backups
Get
Backups Backup[] - The list of backups.
- id string
- The provider-assigned unique ID for this managed resource.
- compartment
Id string - The OCID of the compartment.
- database
Id string - The OCID of the database.
- filters
Get
Backups Filter[] - shape
Family string
- backups
Sequence[database.
Get Backups Backup] - The list of backups.
- id str
- The provider-assigned unique ID for this managed resource.
- compartment_
id str - The OCID of the compartment.
- database_
id str - The OCID of the database.
- filters
Sequence[database.
Get Backups Filter] - shape_
family str
- backups List<Property Map>
- The list of backups.
- id String
- The provider-assigned unique ID for this managed resource.
- compartment
Id String - The OCID of the compartment.
- database
Id String - The OCID of the database.
- filters List<Property Map>
- shape
Family String
Supporting Types
GetBackupsBackup
- Availability
Domain string - The name of the availability domain where the database backup is stored.
- Compartment
Id string - The compartment OCID.
- Database
Edition string - The Oracle Database edition of the DB system from which the database backup was taken.
- Database
Id string - The OCID of the database.
- Database
Size doubleIn Gbs - The size of the database in gigabytes at the time the backup was taken.
- Display
Name string - The user-friendly name for the backup. The name does not have to be unique.
- Id string
- The OCID of the backup.
- Key
Store stringId - The OCID of the key store of Oracle Vault.
- Key
Store stringWallet Name - The wallet name for Oracle Key Vault.
- Kms
Key stringId - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
- Kms
Key stringVersion Id - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.
- Lifecycle
Details string - Additional information about the current lifecycle state.
- Shape string
- Shape of the backup's source database.
- State string
- The current state of the backup.
- Time
Ended string - The date and time the backup was completed.
- Time
Started string - The date and time the backup started.
- Type string
- The type of backup.
- Vault
Id string - The OCID of the Oracle Cloud Infrastructure vault. This parameter and
secretId
are required for Customer Managed Keys. - Version string
- Version of the backup's source database
- Availability
Domain string - The name of the availability domain where the database backup is stored.
- Compartment
Id string - The compartment OCID.
- Database
Edition string - The Oracle Database edition of the DB system from which the database backup was taken.
- Database
Id string - The OCID of the database.
- Database
Size float64In Gbs - The size of the database in gigabytes at the time the backup was taken.
- Display
Name string - The user-friendly name for the backup. The name does not have to be unique.
- Id string
- The OCID of the backup.
- Key
Store stringId - The OCID of the key store of Oracle Vault.
- Key
Store stringWallet Name - The wallet name for Oracle Key Vault.
- Kms
Key stringId - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
- Kms
Key stringVersion Id - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.
- Lifecycle
Details string - Additional information about the current lifecycle state.
- Shape string
- Shape of the backup's source database.
- State string
- The current state of the backup.
- Time
Ended string - The date and time the backup was completed.
- Time
Started string - The date and time the backup started.
- Type string
- The type of backup.
- Vault
Id string - The OCID of the Oracle Cloud Infrastructure vault. This parameter and
secretId
are required for Customer Managed Keys. - Version string
- Version of the backup's source database
- availability
Domain String - The name of the availability domain where the database backup is stored.
- compartment
Id String - The compartment OCID.
- database
Edition String - The Oracle Database edition of the DB system from which the database backup was taken.
- database
Id String - The OCID of the database.
- database
Size DoubleIn Gbs - The size of the database in gigabytes at the time the backup was taken.
- display
Name String - The user-friendly name for the backup. The name does not have to be unique.
- id String
- The OCID of the backup.
- key
Store StringId - The OCID of the key store of Oracle Vault.
- key
Store StringWallet Name - The wallet name for Oracle Key Vault.
- kms
Key StringId - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
- kms
Key StringVersion Id - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.
- lifecycle
Details String - Additional information about the current lifecycle state.
- shape String
- Shape of the backup's source database.
- state String
- The current state of the backup.
- time
Ended String - The date and time the backup was completed.
- time
Started String - The date and time the backup started.
- type String
- The type of backup.
- vault
Id String - The OCID of the Oracle Cloud Infrastructure vault. This parameter and
secretId
are required for Customer Managed Keys. - version String
- Version of the backup's source database
- availability
Domain string - The name of the availability domain where the database backup is stored.
- compartment
Id string - The compartment OCID.
- database
Edition string - The Oracle Database edition of the DB system from which the database backup was taken.
- database
Id string - The OCID of the database.
- database
Size numberIn Gbs - The size of the database in gigabytes at the time the backup was taken.
- display
Name string - The user-friendly name for the backup. The name does not have to be unique.
- id string
- The OCID of the backup.
- key
Store stringId - The OCID of the key store of Oracle Vault.
- key
Store stringWallet Name - The wallet name for Oracle Key Vault.
- kms
Key stringId - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
- kms
Key stringVersion Id - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.
- lifecycle
Details string - Additional information about the current lifecycle state.
- shape string
- Shape of the backup's source database.
- state string
- The current state of the backup.
- time
Ended string - The date and time the backup was completed.
- time
Started string - The date and time the backup started.
- type string
- The type of backup.
- vault
Id string - The OCID of the Oracle Cloud Infrastructure vault. This parameter and
secretId
are required for Customer Managed Keys. - version string
- Version of the backup's source database
- availability_
domain str - The name of the availability domain where the database backup is stored.
- compartment_
id str - The compartment OCID.
- database_
edition str - The Oracle Database edition of the DB system from which the database backup was taken.
- database_
id str - The OCID of the database.
- database_
size_ floatin_ gbs - The size of the database in gigabytes at the time the backup was taken.
- display_
name str - The user-friendly name for the backup. The name does not have to be unique.
- id str
- The OCID of the backup.
- key_
store_ strid - The OCID of the key store of Oracle Vault.
- key_
store_ strwallet_ name - The wallet name for Oracle Key Vault.
- kms_
key_ strid - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
- kms_
key_ strversion_ id - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.
- lifecycle_
details str - Additional information about the current lifecycle state.
- shape str
- Shape of the backup's source database.
- state str
- The current state of the backup.
- time_
ended str - The date and time the backup was completed.
- time_
started str - The date and time the backup started.
- type str
- The type of backup.
- vault_
id str - The OCID of the Oracle Cloud Infrastructure vault. This parameter and
secretId
are required for Customer Managed Keys. - version str
- Version of the backup's source database
- availability
Domain String - The name of the availability domain where the database backup is stored.
- compartment
Id String - The compartment OCID.
- database
Edition String - The Oracle Database edition of the DB system from which the database backup was taken.
- database
Id String - The OCID of the database.
- database
Size NumberIn Gbs - The size of the database in gigabytes at the time the backup was taken.
- display
Name String - The user-friendly name for the backup. The name does not have to be unique.
- id String
- The OCID of the backup.
- key
Store StringId - The OCID of the key store of Oracle Vault.
- key
Store StringWallet Name - The wallet name for Oracle Key Vault.
- kms
Key StringId - The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.
- kms
Key StringVersion Id - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.
- lifecycle
Details String - Additional information about the current lifecycle state.
- shape String
- Shape of the backup's source database.
- state String
- The current state of the backup.
- time
Ended String - The date and time the backup was completed.
- time
Started String - The date and time the backup started.
- type String
- The type of backup.
- vault
Id String - The OCID of the Oracle Cloud Infrastructure vault. This parameter and
secretId
are required for Customer Managed Keys. - version String
- Version of the backup's source database
GetBackupsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.