import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * This resource provides the Protected Database resource in Oracle Cloud Infrastructure Recovery service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/recovery-service/latest/ProtectedDatabase * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/recovery * * Creates a new Protected Database. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testProtectedDatabase = new oci.recoverymod.ProtectedDatabase("test_protected_database", { * compartmentId: compartmentId, * dbUniqueName: protectedDatabaseDbUniqueName, * displayName: protectedDatabaseDisplayName, * password: protectedDatabasePassword, * protectionPolicyId: testProtectionPolicy.id, * recoveryServiceSubnets: [{ * recoveryServiceSubnetId: testRecoveryServiceSubnet.id, * }], * databaseId: testDatabase.id, * databaseSize: protectedDatabaseDatabaseSize, * definedTags: { * "foo-namespace.bar-key": "value", * }, * deletionSchedule: "DELETE_AFTER_72_HOURS", * freeformTags: { * "bar-key": "value", * }, * isRedoLogsShipped: protectedDatabaseIsRedoLogsShipped === "true", * subscriptionId: testSubscription.id, * }); * ``` * * ## Import * * ProtectedDatabases can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:RecoveryMod/protectedDatabase:ProtectedDatabase test_protected_database "id" * ``` */ export declare class ProtectedDatabase extends pulumi.CustomResource { /** * Get an existing ProtectedDatabase resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ProtectedDatabaseState, opts?: pulumi.CustomResourceOptions): ProtectedDatabase; /** * Returns true if the given object is an instance of ProtectedDatabase. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ProtectedDatabase; /** * (Updatable) The OCID of the compartment that contains the protected database. */ readonly compartmentId: pulumi.Output; /** * The OCID of the protected database. */ readonly databaseId: pulumi.Output; /** * (Updatable) The size of the protected database. XS - Less than 5GB, S - 5GB to 50GB, M - 50GB to 500GB, L - 500GB to 1TB, XL - 1TB to 5TB, XXL - Greater than 5TB. */ readonly databaseSize: pulumi.Output; /** * The dbUniqueName of the protected database in Recovery Service. You cannot change the unique name. */ readonly dbUniqueName: pulumi.Output; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`. For more information, see [Resource Tags](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) Defines a preferred schedule to delete a protected database after you terminate the source database. * * The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated. * * The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires. */ readonly deletionSchedule: pulumi.Output; /** * (Updatable) The protected database name. You can change the displayName. Avoid entering confidential information. */ readonly displayName: pulumi.Output; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * Indicates the protection status of the database. */ readonly health: pulumi.Output; /** * A message describing the current health of the protected database. */ readonly healthDetails: pulumi.Output; /** * Indicates whether the protected database is created by Recovery Service or created manually. Set to TRUE for a service-defined protected database. When you enable the OCI-managed automatic backups option for a database and set Recovery Service as the backup destination, then Recovery Service creates the associated protected database resource. Set to FALSE for a user-defined protected database. */ readonly isReadOnlyResource: pulumi.Output; /** * (Updatable) The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service. Real-time data protection substantially reduces the window of potential data loss that exists between successive archived redo log backups. */ readonly isRedoLogsShipped: pulumi.Output; /** * Detailed description about the current lifecycle state of the protected database. For example, it can be used to provide actionable information for a resource in a Failed state. */ readonly lifecycleDetails: pulumi.Output; /** * Backup performance and storage utilization metrics for the protected database. */ readonly metrics: pulumi.Output; /** * (Updatable) Password credential which can be used to connect to Protected Database. It must contain at least 2 uppercase, 2 lowercase, 2 numeric and 2 special characters. The special characters must be underscore (_), number sign (https://docs.cloud.oracle.com/iaas/api/#) or hyphen (-). The password must not contain the username "admin", regardless of casing. */ readonly password: pulumi.Output; /** * An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy. */ readonly policyLockedDateTime: pulumi.Output; /** * (Updatable) The OCID of the protection policy associated with the protected database. */ readonly protectionPolicyId: pulumi.Output; /** * (Updatable) List of recovery service subnet resources associated with the protected database. */ readonly recoveryServiceSubnets: pulumi.Output; /** * The current state of the Protected Database. */ readonly state: pulumi.Output; /** * (Updatable) The OCID of the cloud service subscription to which you want to link the protected database. For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ readonly subscriptionId: pulumi.Output; /** * Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`. For more information, see [Resource Tags](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ readonly systemTags: pulumi.Output<{ [key: string]: string; }>; /** * An RFC3339 formatted datetime string that indicates the created time for a protected database. For example: '2020-05-22T21:10:29.600Z' */ readonly timeCreated: pulumi.Output; /** * An RFC3339 formatted datetime string that indicates the last updated time for a protected database. For example: '2020-05-22T21:10:29.600Z' */ readonly timeUpdated: pulumi.Output; /** * The virtual private catalog (VPC) user credentials that authenticates the protected database to access Recovery Service. */ readonly vpcUserName: pulumi.Output; /** * Create a ProtectedDatabase resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ProtectedDatabaseArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ProtectedDatabase resources. */ export interface ProtectedDatabaseState { /** * (Updatable) The OCID of the compartment that contains the protected database. */ compartmentId?: pulumi.Input; /** * The OCID of the protected database. */ databaseId?: pulumi.Input; /** * (Updatable) The size of the protected database. XS - Less than 5GB, S - 5GB to 50GB, M - 50GB to 500GB, L - 500GB to 1TB, XL - 1TB to 5TB, XXL - Greater than 5TB. */ databaseSize?: pulumi.Input; /** * The dbUniqueName of the protected database in Recovery Service. You cannot change the unique name. */ dbUniqueName?: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`. For more information, see [Resource Tags](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Defines a preferred schedule to delete a protected database after you terminate the source database. * * The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated. * * The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires. */ deletionSchedule?: pulumi.Input; /** * (Updatable) The protected database name. You can change the displayName. Avoid entering confidential information. */ displayName?: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Indicates the protection status of the database. */ health?: pulumi.Input; /** * A message describing the current health of the protected database. */ healthDetails?: pulumi.Input; /** * Indicates whether the protected database is created by Recovery Service or created manually. Set to TRUE for a service-defined protected database. When you enable the OCI-managed automatic backups option for a database and set Recovery Service as the backup destination, then Recovery Service creates the associated protected database resource. Set to FALSE for a user-defined protected database. */ isReadOnlyResource?: pulumi.Input; /** * (Updatable) The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service. Real-time data protection substantially reduces the window of potential data loss that exists between successive archived redo log backups. */ isRedoLogsShipped?: pulumi.Input; /** * Detailed description about the current lifecycle state of the protected database. For example, it can be used to provide actionable information for a resource in a Failed state. */ lifecycleDetails?: pulumi.Input; /** * Backup performance and storage utilization metrics for the protected database. */ metrics?: pulumi.Input[] | undefined>; /** * (Updatable) Password credential which can be used to connect to Protected Database. It must contain at least 2 uppercase, 2 lowercase, 2 numeric and 2 special characters. The special characters must be underscore (_), number sign (https://docs.cloud.oracle.com/iaas/api/#) or hyphen (-). The password must not contain the username "admin", regardless of casing. */ password?: pulumi.Input; /** * An RFC3339 formatted datetime string that specifies the exact date and time for the retention lock to take effect and permanently lock the retention period defined in the policy. */ policyLockedDateTime?: pulumi.Input; /** * (Updatable) The OCID of the protection policy associated with the protected database. */ protectionPolicyId?: pulumi.Input; /** * (Updatable) List of recovery service subnet resources associated with the protected database. */ recoveryServiceSubnets?: pulumi.Input[] | undefined>; /** * The current state of the Protected Database. */ state?: pulumi.Input; /** * (Updatable) The OCID of the cloud service subscription to which you want to link the protected database. For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ subscriptionId?: pulumi.Input; /** * Usage of system tag keys. These predefined keys are scoped to namespaces. Example: `{"orcl-cloud.free-tier-retained": "true"}`. For more information, see [Resource Tags](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ systemTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * An RFC3339 formatted datetime string that indicates the created time for a protected database. For example: '2020-05-22T21:10:29.600Z' */ timeCreated?: pulumi.Input; /** * An RFC3339 formatted datetime string that indicates the last updated time for a protected database. For example: '2020-05-22T21:10:29.600Z' */ timeUpdated?: pulumi.Input; /** * The virtual private catalog (VPC) user credentials that authenticates the protected database to access Recovery Service. */ vpcUserName?: pulumi.Input; } /** * The set of arguments for constructing a ProtectedDatabase resource. */ export interface ProtectedDatabaseArgs { /** * (Updatable) The OCID of the compartment that contains the protected database. */ compartmentId: pulumi.Input; /** * The OCID of the protected database. */ databaseId?: pulumi.Input; /** * (Updatable) The size of the protected database. XS - Less than 5GB, S - 5GB to 50GB, M - 50GB to 500GB, L - 500GB to 1TB, XL - 1TB to 5TB, XXL - Greater than 5TB. */ databaseSize?: pulumi.Input; /** * The dbUniqueName of the protected database in Recovery Service. You cannot change the unique name. */ dbUniqueName: pulumi.Input; /** * (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace.bar-key": "value"}`. For more information, see [Resource Tags](https://docs.oracle.com/en-us/iaas/Content/General/Concepts/resourcetags.htm) */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) Defines a preferred schedule to delete a protected database after you terminate the source database. * * The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated. * * The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires. */ deletionSchedule?: pulumi.Input; /** * (Updatable) The protected database name. You can change the displayName. Avoid entering confidential information. */ displayName: pulumi.Input; /** * (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The value TRUE indicates that the protected database is configured to use Real-time data protection, and redo-data is sent from the protected database to Recovery Service. Real-time data protection substantially reduces the window of potential data loss that exists between successive archived redo log backups. */ isRedoLogsShipped?: pulumi.Input; /** * (Updatable) Password credential which can be used to connect to Protected Database. It must contain at least 2 uppercase, 2 lowercase, 2 numeric and 2 special characters. The special characters must be underscore (_), number sign (https://docs.cloud.oracle.com/iaas/api/#) or hyphen (-). The password must not contain the username "admin", regardless of casing. */ password: pulumi.Input; /** * (Updatable) The OCID of the protection policy associated with the protected database. */ protectionPolicyId: pulumi.Input; /** * (Updatable) List of recovery service subnet resources associated with the protected database. */ recoveryServiceSubnets: pulumi.Input[]>; /** * (Updatable) The OCID of the cloud service subscription to which you want to link the protected database. For example, specify the Microsoft Azure subscription ID if you want to provision the protected database in Azure. * * ** IMPORTANT ** * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values */ subscriptionId?: pulumi.Input; } //# sourceMappingURL=protectedDatabase.d.ts.map