Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

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:

AutonomousDatabaseId string

The database OCID.

CompartmentId string

The compartment OCID.

DisplayName string

A filter to return only resources that match the entire display name given. The match is not case sensitive.

Filters List<GetAutonomousDatabaseBackupsFilter>
State string

A filter to return only resources that match the given lifecycle state exactly.

AutonomousDatabaseId string

The database OCID.

CompartmentId string

The compartment OCID.

DisplayName string

A filter to return only resources that match the entire display name given. The match is not case sensitive.

Filters []GetAutonomousDatabaseBackupsFilter
State string

A filter to return only resources that match the given lifecycle state exactly.

autonomousDatabaseId String

The database OCID.

compartmentId String

The compartment OCID.

displayName String

A filter to return only resources that match the entire display name given. The match is not case sensitive.

filters List<GetAutonomousBackupsFilter>
state String

A filter to return only resources that match the given lifecycle state exactly.

autonomousDatabaseId string

The database OCID.

compartmentId string

The compartment OCID.

displayName string

A filter to return only resources that match the entire display name given. The match is not case sensitive.

filters GetAutonomousDatabaseBackupsFilter[]
state string

A filter to return only resources that match the given lifecycle state exactly.

autonomous_database_id str

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 GetAutonomousDatabaseBackupsFilter]
state str

A filter to return only resources that match the given lifecycle state exactly.

autonomousDatabaseId String

The database OCID.

compartmentId String

The compartment OCID.

displayName 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:

AutonomousDatabaseBackups List<GetAutonomousDatabaseBackupsAutonomousDatabaseBackup>

The list of autonomous_database_backups.

Id string

The provider-assigned unique ID for this managed resource.

AutonomousDatabaseId string

The OCID of the Autonomous Database.

CompartmentId string

The OCID of the compartment.

DisplayName string

The user-friendly name for the backup. The name does not have to be unique.

Filters List<GetAutonomousDatabaseBackupsFilter>
State string

The current state of the backup.

AutonomousDatabaseBackups []GetAutonomousDatabaseBackupsAutonomousDatabaseBackup

The list of autonomous_database_backups.

Id string

The provider-assigned unique ID for this managed resource.

AutonomousDatabaseId string

The OCID of the Autonomous Database.

CompartmentId string

The OCID of the compartment.

DisplayName string

The user-friendly name for the backup. The name does not have to be unique.

Filters []GetAutonomousDatabaseBackupsFilter
State string

The current state of the backup.

autonomousDatabaseBackups List<GetAutonomousBackupsAutonomousBackup>

The list of autonomous_database_backups.

id String

The provider-assigned unique ID for this managed resource.

autonomousDatabaseId String

The OCID of the Autonomous Database.

compartmentId String

The OCID of the compartment.

displayName String

The user-friendly name for the backup. The name does not have to be unique.

filters List<GetAutonomousBackupsFilter>
state String

The current state of the backup.

autonomousDatabaseBackups GetAutonomousDatabaseBackupsAutonomousDatabaseBackup[]

The list of autonomous_database_backups.

id string

The provider-assigned unique ID for this managed resource.

autonomousDatabaseId string

The OCID of the Autonomous Database.

compartmentId string

The OCID of the compartment.

displayName string

The user-friendly name for the backup. The name does not have to be unique.

filters GetAutonomousDatabaseBackupsFilter[]
state string

The current state of the backup.

autonomous_database_backups GetAutonomousDatabaseBackupsAutonomousDatabaseBackup]

The list of autonomous_database_backups.

id str

The provider-assigned unique ID for this managed resource.

autonomous_database_id str

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 GetAutonomousDatabaseBackupsFilter]
state str

The current state of the backup.

autonomousDatabaseBackups List<Property Map>

The list of autonomous_database_backups.

id String

The provider-assigned unique ID for this managed resource.

autonomousDatabaseId String

The OCID of the Autonomous Database.

compartmentId String

The OCID of the compartment.

displayName 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

AutonomousDatabaseId string

The database OCID.

CompartmentId string

The compartment OCID.

DatabaseSizeInTbs double

The size of the database in terabytes at the time the backup was taken.

DisplayName 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.

IsAutomatic bool

Indicates whether the backup is user-initiated or automatic.

IsRestorable bool

Indicates whether the backup can be used to restore the associated Autonomous Database.

KeyStoreId string

The OCID of the key store.

KeyStoreWalletName string

The wallet name for Oracle Key Vault.

KmsKeyId string

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

KmsKeyVersionId string

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.

LifecycleDetails string

Additional information about the current lifecycle state.

State string

A filter to return only resources that match the given lifecycle state exactly.

TimeEnded string

The date and time the backup completed.

TimeStarted string

The date and time the backup started.

Type string

The type of backup.

VaultId string

The OCID of the Oracle Cloud Infrastructure vault.

AutonomousDatabaseId string

The database OCID.

CompartmentId string

The compartment OCID.

DatabaseSizeInTbs float64

The size of the database in terabytes at the time the backup was taken.

DisplayName 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.

IsAutomatic bool

Indicates whether the backup is user-initiated or automatic.

IsRestorable bool

Indicates whether the backup can be used to restore the associated Autonomous Database.

KeyStoreId string

The OCID of the key store.

KeyStoreWalletName string

The wallet name for Oracle Key Vault.

KmsKeyId string

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

KmsKeyVersionId string

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.

LifecycleDetails string

Additional information about the current lifecycle state.

State string

A filter to return only resources that match the given lifecycle state exactly.

TimeEnded string

The date and time the backup completed.

TimeStarted string

The date and time the backup started.

Type string

The type of backup.

VaultId string

The OCID of the Oracle Cloud Infrastructure vault.

autonomousDatabaseId String

The database OCID.

compartmentId String

The compartment OCID.

databaseSizeInTbs Double

The size of the database in terabytes at the time the backup was taken.

displayName 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.

isAutomatic Boolean

Indicates whether the backup is user-initiated or automatic.

isRestorable Boolean

Indicates whether the backup can be used to restore the associated Autonomous Database.

keyStoreId String

The OCID of the key store.

keyStoreWalletName String

The wallet name for Oracle Key Vault.

kmsKeyId String

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

kmsKeyVersionId String

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.

lifecycleDetails String

Additional information about the current lifecycle state.

state String

A filter to return only resources that match the given lifecycle state exactly.

timeEnded String

The date and time the backup completed.

timeStarted String

The date and time the backup started.

type String

The type of backup.

vaultId String

The OCID of the Oracle Cloud Infrastructure vault.

autonomousDatabaseId string

The database OCID.

compartmentId string

The compartment OCID.

databaseSizeInTbs number

The size of the database in terabytes at the time the backup was taken.

displayName 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.

isAutomatic boolean

Indicates whether the backup is user-initiated or automatic.

isRestorable boolean

Indicates whether the backup can be used to restore the associated Autonomous Database.

keyStoreId string

The OCID of the key store.

keyStoreWalletName string

The wallet name for Oracle Key Vault.

kmsKeyId string

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

kmsKeyVersionId string

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.

lifecycleDetails string

Additional information about the current lifecycle state.

state string

A filter to return only resources that match the given lifecycle state exactly.

timeEnded string

The date and time the backup completed.

timeStarted string

The date and time the backup started.

type string

The type of backup.

vaultId string

The OCID of the Oracle Cloud Infrastructure vault.

autonomous_database_id str

The database OCID.

compartment_id str

The compartment OCID.

database_size_in_tbs float

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_id str

The OCID of the key store.

key_store_wallet_name str

The wallet name for Oracle Key Vault.

kms_key_id str

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

kms_key_version_id str

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

The OCID of the Oracle Cloud Infrastructure vault.

autonomousDatabaseId String

The database OCID.

compartmentId String

The compartment OCID.

databaseSizeInTbs Number

The size of the database in terabytes at the time the backup was taken.

displayName 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.

isAutomatic Boolean

Indicates whether the backup is user-initiated or automatic.

isRestorable Boolean

Indicates whether the backup can be used to restore the associated Autonomous Database.

keyStoreId String

The OCID of the key store.

keyStoreWalletName String

The wallet name for Oracle Key Vault.

kmsKeyId String

The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.

kmsKeyVersionId String

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.

lifecycleDetails String

Additional information about the current lifecycle state.

state String

A filter to return only resources that match the given lifecycle state exactly.

timeEnded String

The date and time the backup completed.

timeStarted String

The date and time the backup started.

type String

The type of backup.

vaultId String

The OCID of the Oracle Cloud Infrastructure vault.

GetAutonomousDatabaseBackupsFilter

Name string
Values List<string>
Regex bool
Name string
Values []string
Regex bool
name String
values List<String>
regex Boolean
name string
values string[]
regex boolean
name str
values Sequence[str]
regex bool
name String
values List<String>
regex Boolean

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.