Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

Backup

This resource provides the Backup resource in Oracle Cloud Infrastructure Database service.

Creates a new backup in the specified database based on the request parameters you provide. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testBackup = new Oci.Database.Backup("testBackup", new Oci.Database.BackupArgs
        {
            DatabaseId = oci_database_database.Test_database.Id,
            DisplayName = @var.Backup_display_name,
        });
    }

}
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.NewBackup(ctx, "testBackup", &Database.BackupArgs{
			DatabaseId:  pulumi.Any(oci_database_database.Test_database.Id),
			DisplayName: pulumi.Any(_var.Backup_display_name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_backup = oci.database.Backup("testBackup",
    database_id=oci_database_database["test_database"]["id"],
    display_name=var["backup_display_name"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testBackup = new oci.database.Backup("testBackup", {
    databaseId: oci_database_database.test_database.id,
    displayName: _var.backup_display_name,
});

Coming soon!

Create a Backup Resource

new Backup(name: string, args: BackupArgs, opts?: CustomResourceOptions);
@overload
def Backup(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           database_id: Optional[str] = None,
           display_name: Optional[str] = None)
@overload
def Backup(resource_name: str,
           args: BackupArgs,
           opts: Optional[ResourceOptions] = None)
func NewBackup(ctx *Context, name string, args BackupArgs, opts ...ResourceOption) (*Backup, error)
public Backup(string name, BackupArgs args, CustomResourceOptions? opts = null)
public Backup(String name, BackupArgs args)
public Backup(String name, BackupArgs args, CustomResourceOptions options)
type: oci:Database:Backup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BackupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args BackupArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args BackupArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BackupArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BackupArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Backup Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Backup resource accepts the following input properties:

DatabaseId string

The OCID of the database.

DisplayName string

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

DatabaseId string

The OCID of the database.

DisplayName string

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

databaseId String

The OCID of the database.

displayName String

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

databaseId string

The OCID of the database.

displayName string

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

database_id str

The OCID of the database.

display_name str

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

databaseId String

The OCID of the database.

displayName String

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

Outputs

All input properties are implicitly available as output properties. Additionally, the Backup resource produces the following output properties:

AvailabilityDomain string

The name of the availability domain where the database backup is stored.

CompartmentId string

The OCID of the compartment.

DatabaseEdition string

The Oracle Database edition of the DB system from which the database backup was taken.

DatabaseSizeInGbs double

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

Id string

The provider-assigned unique ID for this managed resource.

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.

Shape string

Shape of the backup's source database.

State string

The current state of the backup.

TimeEnded string

The date and time the backup was 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.

Version string

Version of the backup's source database

AvailabilityDomain string

The name of the availability domain where the database backup is stored.

CompartmentId string

The OCID of the compartment.

DatabaseEdition string

The Oracle Database edition of the DB system from which the database backup was taken.

DatabaseSizeInGbs float64

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

Id string

The provider-assigned unique ID for this managed resource.

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.

Shape string

Shape of the backup's source database.

State string

The current state of the backup.

TimeEnded string

The date and time the backup was 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.

Version string

Version of the backup's source database

availabilityDomain String

The name of the availability domain where the database backup is stored.

compartmentId String

The OCID of the compartment.

databaseEdition String

The Oracle Database edition of the DB system from which the database backup was taken.

databaseSizeInGbs Double

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

id String

The provider-assigned unique ID for this managed resource.

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.

shape String

Shape of the backup's source database.

state String

The current state of the backup.

timeEnded String

The date and time the backup was 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.

version String

Version of the backup's source database

availabilityDomain string

The name of the availability domain where the database backup is stored.

compartmentId string

The OCID of the compartment.

databaseEdition string

The Oracle Database edition of the DB system from which the database backup was taken.

databaseSizeInGbs number

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

id string

The provider-assigned unique ID for this managed resource.

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.

shape string

Shape of the backup's source database.

state string

The current state of the backup.

timeEnded string

The date and time the backup was 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.

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 OCID of the compartment.

database_edition str

The Oracle Database edition of the DB system from which the database backup was taken.

database_size_in_gbs float

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

id str

The provider-assigned unique ID for this managed resource.

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.

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.

version str

Version of the backup's source database

availabilityDomain String

The name of the availability domain where the database backup is stored.

compartmentId String

The OCID of the compartment.

databaseEdition String

The Oracle Database edition of the DB system from which the database backup was taken.

databaseSizeInGbs Number

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

id String

The provider-assigned unique ID for this managed resource.

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.

shape String

Shape of the backup's source database.

state String

The current state of the backup.

timeEnded String

The date and time the backup was 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.

version String

Version of the backup's source database

Look up an Existing Backup Resource

Get an existing Backup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: BackupState, opts?: CustomResourceOptions): Backup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        availability_domain: Optional[str] = None,
        compartment_id: Optional[str] = None,
        database_edition: Optional[str] = None,
        database_id: Optional[str] = None,
        database_size_in_gbs: Optional[float] = None,
        display_name: Optional[str] = None,
        kms_key_id: Optional[str] = None,
        kms_key_version_id: Optional[str] = None,
        lifecycle_details: Optional[str] = None,
        shape: Optional[str] = None,
        state: Optional[str] = None,
        time_ended: Optional[str] = None,
        time_started: Optional[str] = None,
        type: Optional[str] = None,
        vault_id: Optional[str] = None,
        version: Optional[str] = None) -> Backup
func GetBackup(ctx *Context, name string, id IDInput, state *BackupState, opts ...ResourceOption) (*Backup, error)
public static Backup Get(string name, Input<string> id, BackupState? state, CustomResourceOptions? opts = null)
public static Backup get(String name, Output<String> id, BackupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AvailabilityDomain string

The name of the availability domain where the database backup is stored.

CompartmentId string

The OCID of the compartment.

DatabaseEdition string

The Oracle Database edition of the DB system from which the database backup was taken.

DatabaseId string

The OCID of the database.

DatabaseSizeInGbs double

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

DisplayName string

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

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.

Shape string

Shape of the backup's source database.

State string

The current state of the backup.

TimeEnded string

The date and time the backup was 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.

Version string

Version of the backup's source database

AvailabilityDomain string

The name of the availability domain where the database backup is stored.

CompartmentId string

The OCID of the compartment.

DatabaseEdition string

The Oracle Database edition of the DB system from which the database backup was taken.

DatabaseId string

The OCID of the database.

DatabaseSizeInGbs float64

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

DisplayName string

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

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.

Shape string

Shape of the backup's source database.

State string

The current state of the backup.

TimeEnded string

The date and time the backup was 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.

Version string

Version of the backup's source database

availabilityDomain String

The name of the availability domain where the database backup is stored.

compartmentId String

The OCID of the compartment.

databaseEdition String

The Oracle Database edition of the DB system from which the database backup was taken.

databaseId String

The OCID of the database.

databaseSizeInGbs Double

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

displayName String

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

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.

shape String

Shape of the backup's source database.

state String

The current state of the backup.

timeEnded String

The date and time the backup was 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.

version String

Version of the backup's source database

availabilityDomain string

The name of the availability domain where the database backup is stored.

compartmentId string

The OCID of the compartment.

databaseEdition string

The Oracle Database edition of the DB system from which the database backup was taken.

databaseId string

The OCID of the database.

databaseSizeInGbs number

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

displayName string

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

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.

shape string

Shape of the backup's source database.

state string

The current state of the backup.

timeEnded string

The date and time the backup was 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.

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 OCID of the compartment.

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_in_gbs float

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.

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.

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.

version str

Version of the backup's source database

availabilityDomain String

The name of the availability domain where the database backup is stored.

compartmentId String

The OCID of the compartment.

databaseEdition String

The Oracle Database edition of the DB system from which the database backup was taken.

databaseId String

The OCID of the database.

databaseSizeInGbs Number

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

displayName String

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

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.

shape String

Shape of the backup's source database.

state String

The current state of the backup.

timeEnded String

The date and time the backup was 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.

version String

Version of the backup's source database

Import

Backups can be imported using the id, e.g.

 $ pulumi import oci:Database/backup:Backup test_backup "id"

Package Details

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

This Pulumi package is based on the oci Terraform Provider.