oci.Database.getAutonomousDatabaseBackups
This data source provides the list of Autonomous Database Backups in Oracle Cloud Infrastructure Database service.
Gets a list of Autonomous Database backups based on either the autonomousDatabaseId
or compartmentId
specified as a query parameter.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testAutonomousDatabaseBackups = Oci.Database.GetAutonomousDatabaseBackups.Invoke(new()
{
AutonomousDatabaseId = oci_database_autonomous_database.Test_autonomous_database.Id,
CompartmentId = @var.Compartment_id,
DisplayName = @var.Autonomous_database_backup_display_name,
State = @var.Autonomous_database_backup_state,
});
});
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Database.GetAutonomousDatabaseBackups(ctx, &database.GetAutonomousDatabaseBackupsArgs{
AutonomousDatabaseId: pulumi.StringRef(oci_database_autonomous_database.Test_autonomous_database.Id),
CompartmentId: pulumi.StringRef(_var.Compartment_id),
DisplayName: pulumi.StringRef(_var.Autonomous_database_backup_display_name),
State: pulumi.StringRef(_var.Autonomous_database_backup_state),
}, nil)
if err != nil {
return err
}
return nil
})
}
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.GetAutonomousDatabaseBackupsArgs;
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 testAutonomousDatabaseBackups = DatabaseFunctions.getAutonomousDatabaseBackups(GetAutonomousDatabaseBackupsArgs.builder()
.autonomousDatabaseId(oci_database_autonomous_database.test_autonomous_database().id())
.compartmentId(var_.compartment_id())
.displayName(var_.autonomous_database_backup_display_name())
.state(var_.autonomous_database_backup_state())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_autonomous_database_backups = oci.Database.get_autonomous_database_backups(autonomous_database_id=oci_database_autonomous_database["test_autonomous_database"]["id"],
compartment_id=var["compartment_id"],
display_name=var["autonomous_database_backup_display_name"],
state=var["autonomous_database_backup_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAutonomousDatabaseBackups = oci.Database.getAutonomousDatabaseBackups({
autonomousDatabaseId: oci_database_autonomous_database.test_autonomous_database.id,
compartmentId: _var.compartment_id,
displayName: _var.autonomous_database_backup_display_name,
state: _var.autonomous_database_backup_state,
});
variables:
testAutonomousDatabaseBackups:
fn::invoke:
Function: oci:Database:getAutonomousDatabaseBackups
Arguments:
autonomousDatabaseId: ${oci_database_autonomous_database.test_autonomous_database.id}
compartmentId: ${var.compartment_id}
displayName: ${var.autonomous_database_backup_display_name}
state: ${var.autonomous_database_backup_state}
Using getAutonomousDatabaseBackups
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 getAutonomousDatabaseBackups(args: GetAutonomousDatabaseBackupsArgs, opts?: InvokeOptions): Promise<GetAutonomousDatabaseBackupsResult>
function getAutonomousDatabaseBackupsOutput(args: GetAutonomousDatabaseBackupsOutputArgs, opts?: InvokeOptions): Output<GetAutonomousDatabaseBackupsResult>
def get_autonomous_database_backups(autonomous_database_id: Optional[str] = None,
compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_database.GetAutonomousDatabaseBackupsFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAutonomousDatabaseBackupsResult
def get_autonomous_database_backups_output(autonomous_database_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[_database.GetAutonomousDatabaseBackupsFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAutonomousDatabaseBackupsResult]
func GetAutonomousDatabaseBackups(ctx *Context, args *GetAutonomousDatabaseBackupsArgs, opts ...InvokeOption) (*GetAutonomousDatabaseBackupsResult, error)
func GetAutonomousDatabaseBackupsOutput(ctx *Context, args *GetAutonomousDatabaseBackupsOutputArgs, opts ...InvokeOption) GetAutonomousDatabaseBackupsResultOutput
> Note: This function is named GetAutonomousDatabaseBackups
in the Go SDK.
public static class GetAutonomousDatabaseBackups
{
public static Task<GetAutonomousDatabaseBackupsResult> InvokeAsync(GetAutonomousDatabaseBackupsArgs args, InvokeOptions? opts = null)
public static Output<GetAutonomousDatabaseBackupsResult> Invoke(GetAutonomousDatabaseBackupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAutonomousDatabaseBackupsResult> getAutonomousDatabaseBackups(GetAutonomousDatabaseBackupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Database/getAutonomousDatabaseBackups:getAutonomousDatabaseBackups
arguments:
# arguments dictionary
The following arguments are supported:
- Autonomous
Database stringId The database OCID.
- Compartment
Id string The compartment OCID.
- Display
Name string A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Filters
List<Get
Autonomous Database Backups Filter> - State string
A filter to return only resources that match the given lifecycle state exactly.
- Autonomous
Database stringId The database OCID.
- Compartment
Id string The compartment OCID.
- Display
Name string A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Filters
[]Get
Autonomous Database Backups Filter - State string
A filter to return only resources that match the given lifecycle state exactly.
- autonomous
Database StringId The database OCID.
- compartment
Id String The compartment OCID.
- display
Name String A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
List<Get
Autonomous Backups Filter> - state String
A filter to return only resources that match the given lifecycle state exactly.
- autonomous
Database stringId The database OCID.
- compartment
Id string The compartment OCID.
- display
Name string A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
Get
Autonomous Database Backups Filter[] - state string
A filter to return only resources that match the given lifecycle state exactly.
- autonomous_
database_ strid The database OCID.
- compartment_
id str The compartment OCID.
- display_
name str A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
Get
Autonomous Database Backups Filter] - state str
A filter to return only resources that match the given lifecycle state exactly.
- autonomous
Database StringId The database OCID.
- compartment
Id String The compartment OCID.
- display
Name String A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters List<Property Map>
- state String
A filter to return only resources that match the given lifecycle state exactly.
getAutonomousDatabaseBackups Result
The following output properties are available:
- Autonomous
Database List<GetBackups Autonomous Database Backups Autonomous Database Backup> The list of autonomous_database_backups.
- Id string
The provider-assigned unique ID for this managed resource.
- Autonomous
Database stringId The OCID of the Autonomous Database.
- Compartment
Id string The OCID of the compartment.
- Display
Name string The user-friendly name for the backup. The name does not have to be unique.
- Filters
List<Get
Autonomous Database Backups Filter> - State string
The current state of the backup.
- Autonomous
Database []GetBackups Autonomous Database Backups Autonomous Database Backup The list of autonomous_database_backups.
- Id string
The provider-assigned unique ID for this managed resource.
- Autonomous
Database stringId The OCID of the Autonomous Database.
- Compartment
Id string The OCID of the compartment.
- Display
Name string The user-friendly name for the backup. The name does not have to be unique.
- Filters
[]Get
Autonomous Database Backups Filter - State string
The current state of the backup.
- autonomous
Database List<GetBackups Autonomous Backups Autonomous Backup> The list of autonomous_database_backups.
- id String
The provider-assigned unique ID for this managed resource.
- autonomous
Database StringId The OCID of the Autonomous Database.
- compartment
Id String The OCID of the compartment.
- display
Name String The user-friendly name for the backup. The name does not have to be unique.
- filters
List<Get
Autonomous Backups Filter> - state String
The current state of the backup.
- autonomous
Database GetBackups Autonomous Database Backups Autonomous Database Backup[] The list of autonomous_database_backups.
- id string
The provider-assigned unique ID for this managed resource.
- autonomous
Database stringId The OCID of the Autonomous Database.
- compartment
Id string The OCID of the compartment.
- display
Name string The user-friendly name for the backup. The name does not have to be unique.
- filters
Get
Autonomous Database Backups Filter[] - state string
The current state of the backup.
- autonomous_
database_ Getbackups Autonomous Database Backups Autonomous Database Backup] The list of autonomous_database_backups.
- id str
The provider-assigned unique ID for this managed resource.
- autonomous_
database_ strid The OCID of the Autonomous Database.
- compartment_
id str The OCID of the compartment.
- display_
name str The user-friendly name for the backup. The name does not have to be unique.
- filters
Get
Autonomous Database Backups Filter] - state str
The current state of the backup.
- autonomous
Database List<Property Map>Backups The list of autonomous_database_backups.
- id String
The provider-assigned unique ID for this managed resource.
- autonomous
Database StringId The OCID of the Autonomous Database.
- compartment
Id String The OCID of the compartment.
- display
Name String The user-friendly name for the backup. The name does not have to be unique.
- filters List<Property Map>
- state String
The current state of the backup.
Supporting Types
GetAutonomousDatabaseBackupsAutonomousDatabaseBackup
- Autonomous
Database stringId The database OCID.
- Compartment
Id string The compartment OCID.
- Database
Size doubleIn Tbs The size of the database in terabytes at the time the backup was taken.
- Display
Name string A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Id string
The OCID of the Autonomous Database backup.
- Is
Automatic bool Indicates whether the backup is user-initiated or automatic.
- Is
Restorable bool Indicates whether the backup can be used to restore the associated Autonomous Database.
- Key
Store stringId The OCID of the key store.
- 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.
- Lifecycle
Details string Additional information about the current lifecycle state.
- State string
A filter to return only resources that match the given lifecycle state exactly.
- Time
Ended string The date and time the backup completed.
- Time
Started string The date and time the backup started.
- Type string
The type of backup.
- Vault
Id string
- Autonomous
Database stringId The database OCID.
- Compartment
Id string The compartment OCID.
- Database
Size float64In Tbs The size of the database in terabytes at the time the backup was taken.
- Display
Name string A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Id string
The OCID of the Autonomous Database backup.
- Is
Automatic bool Indicates whether the backup is user-initiated or automatic.
- Is
Restorable bool Indicates whether the backup can be used to restore the associated Autonomous Database.
- Key
Store stringId The OCID of the key store.
- 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.
- Lifecycle
Details string Additional information about the current lifecycle state.
- State string
A filter to return only resources that match the given lifecycle state exactly.
- Time
Ended string The date and time the backup completed.
- Time
Started string The date and time the backup started.
- Type string
The type of backup.
- Vault
Id string
- autonomous
Database StringId The database OCID.
- compartment
Id String The compartment OCID.
- database
Size DoubleIn Tbs The size of the database in terabytes at the time the backup was taken.
- display
Name String A filter to return only resources that match the entire display name given. The match is not case sensitive.
- id String
The OCID of the Autonomous Database backup.
- is
Automatic Boolean Indicates whether the backup is user-initiated or automatic.
- is
Restorable Boolean Indicates whether the backup can be used to restore the associated Autonomous Database.
- key
Store StringId The OCID of the key store.
- 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.
- lifecycle
Details String Additional information about the current lifecycle state.
- state String
A filter to return only resources that match the given lifecycle state exactly.
- time
Ended String The date and time the backup completed.
- time
Started String The date and time the backup started.
- type String
The type of backup.
- vault
Id String
- autonomous
Database stringId The database OCID.
- compartment
Id string The compartment OCID.
- database
Size numberIn Tbs The size of the database in terabytes at the time the backup was taken.
- display
Name string A filter to return only resources that match the entire display name given. The match is not case sensitive.
- id string
The OCID of the Autonomous Database backup.
- is
Automatic boolean Indicates whether the backup is user-initiated or automatic.
- is
Restorable boolean Indicates whether the backup can be used to restore the associated Autonomous Database.
- key
Store stringId The OCID of the key store.
- 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.
- lifecycle
Details string Additional information about the current lifecycle state.
- state string
A filter to return only resources that match the given lifecycle state exactly.
- time
Ended string The date and time the backup completed.
- time
Started string The date and time the backup started.
- type string
The type of backup.
- vault
Id string
- autonomous_
database_ strid The database OCID.
- compartment_
id str The compartment OCID.
- database_
size_ floatin_ tbs The size of the database in terabytes at the time the backup was taken.
- display_
name str A filter to return only resources that match the entire display name given. The match is not case sensitive.
- id str
The OCID of the Autonomous Database backup.
- is_
automatic bool Indicates whether the backup is user-initiated or automatic.
- is_
restorable bool Indicates whether the backup can be used to restore the associated Autonomous Database.
- key_
store_ strid The OCID of the key store.
- 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.
- lifecycle_
details str Additional information about the current lifecycle state.
- state str
A filter to return only resources that match the given lifecycle state exactly.
- time_
ended str The date and time the backup completed.
- time_
started str The date and time the backup started.
- type str
The type of backup.
- vault_
id str
- autonomous
Database StringId The database OCID.
- compartment
Id String The compartment OCID.
- database
Size NumberIn Tbs The size of the database in terabytes at the time the backup was taken.
- display
Name String A filter to return only resources that match the entire display name given. The match is not case sensitive.
- id String
The OCID of the Autonomous Database backup.
- is
Automatic Boolean Indicates whether the backup is user-initiated or automatic.
- is
Restorable Boolean Indicates whether the backup can be used to restore the associated Autonomous Database.
- key
Store StringId The OCID of the key store.
- 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.
- lifecycle
Details String Additional information about the current lifecycle state.
- state String
A filter to return only resources that match the given lifecycle state exactly.
- time
Ended String The date and time the backup completed.
- time
Started String The date and time the backup started.
- type String
The type of backup.
- vault
Id String
GetAutonomousDatabaseBackupsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.