"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutonomousContainerDatabaseDataguardAssociation = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Autonomous Container Database Dataguard Association resource in Oracle Cloud Infrastructure Database service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/database/latest/AutonomousContainerDatabaseDataguardAssociation
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/database
 *
 * **Deprecated.** Use the [AddStandbyAutonomousContainerDatabase](https://docs.cloud.oracle.com/iaas/api/#/en/database/latest/AutonomousContainerDatabase/AddStandbyAutonomousContainerDatabase) operation to create a new Autonomous Data Guard association. An Autonomous Data Guard association represents the replication relationship between the
 * specified Autonomous Container database and a peer Autonomous Container database. For more information, see [Using Oracle Data Guard](https://docs.oracle.com/en/cloud/paas/autonomous-database/dedicated/adbau/#articletitle.html).
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testAutonomousContainerDatabaseDataguardAssociation = new oci.database.AutonomousContainerDatabaseDataguardAssociation("test_autonomous_container_database_dataguard_association", {
 *     autonomousContainerDatabaseId: testAutonomousContainerDatabase.id,
 *     peerAutonomousContainerDatabaseDisplayName: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseDisplayName,
 *     protectionMode: autonomousContainerDatabaseDataguardAssociationProtectionMode,
 *     fastStartFailOverLagLimitInSeconds: Number(autonomousContainerDatabaseDataguardAssociationFastStartFailOverLagLimitInSeconds),
 *     isAutomaticFailoverEnabled: autonomousContainerDatabaseDataguardAssociationIsAutomaticFailoverEnabled === "true",
 *     peerAutonomousContainerDatabaseBackupConfig: {
 *         backupDestinationDetails: [{
 *             type: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsType,
 *             backupRetentionPolicyOnTerminate: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsBackupRetentionPolicyOnTerminate,
 *             dbrsPolicyId: testPolicy.id,
 *             id: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsId,
 *             internetProxy: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsInternetProxy,
 *             isRemote: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsIsRemote === "true",
 *             isRetentionLockEnabled: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsIsRetentionLockEnabled === "true",
 *             remoteRegion: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsRemoteRegion,
 *             vpcPassword: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsVpcPassword,
 *             vpcUser: autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigBackupDestinationDetailsVpcUser,
 *         }],
 *         recoveryWindowInDays: Number(autonomousContainerDatabaseDataguardAssociationPeerAutonomousContainerDatabaseBackupConfigRecoveryWindowInDays),
 *     },
 *     peerAutonomousContainerDatabaseCompartmentId: testCompartment.id,
 *     peerAutonomousVmClusterId: testAutonomousVmCluster.id,
 *     peerCloudAutonomousVmClusterId: testCloudAutonomousVmCluster.id,
 *     peerDbUniqueName: autonomousContainerDatabaseDataguardAssociationPeerDbUniqueName,
 *     standbyMaintenanceBufferInDays: Number(autonomousContainerDatabaseDataguardAssociationStandbyMaintenanceBufferInDays),
 * });
 * ```
 *
 * ## Import
 *
 * AutonomousContainerDatabaseDataguardAssociations can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Database/autonomousContainerDatabaseDataguardAssociation:AutonomousContainerDatabaseDataguardAssociation test_autonomous_container_database_dataguard_association "autonomousContainerDatabases/{autonomousContainerDatabaseId}/autonomousContainerDatabaseDataguardAssociations/{autonomousContainerDatabaseDataguardAssociationId}"
 * ```
 */
class AutonomousContainerDatabaseDataguardAssociation extends pulumi.CustomResource {
    /**
     * Get an existing AutonomousContainerDatabaseDataguardAssociation 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, id, state, opts) {
        return new AutonomousContainerDatabaseDataguardAssociation(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Database/autonomousContainerDatabaseDataguardAssociation:AutonomousContainerDatabaseDataguardAssociation';
    /**
     * Returns true if the given object is an instance of AutonomousContainerDatabaseDataguardAssociation.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj) {
        if (obj === undefined || obj === null) {
            return false;
        }
        return obj['__pulumiType'] === AutonomousContainerDatabaseDataguardAssociation.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["applyLag"] = state?.applyLag;
            resourceInputs["applyRate"] = state?.applyRate;
            resourceInputs["autonomousContainerDatabaseDataguardAssociationId"] = state?.autonomousContainerDatabaseDataguardAssociationId;
            resourceInputs["autonomousContainerDatabaseId"] = state?.autonomousContainerDatabaseId;
            resourceInputs["fastStartFailOverLagLimitInSeconds"] = state?.fastStartFailOverLagLimitInSeconds;
            resourceInputs["isAutomaticFailoverEnabled"] = state?.isAutomaticFailoverEnabled;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["migrateTrigger"] = state?.migrateTrigger;
            resourceInputs["peerAutonomousContainerDatabaseBackupConfig"] = state?.peerAutonomousContainerDatabaseBackupConfig;
            resourceInputs["peerAutonomousContainerDatabaseCompartmentId"] = state?.peerAutonomousContainerDatabaseCompartmentId;
            resourceInputs["peerAutonomousContainerDatabaseDataguardAssociationId"] = state?.peerAutonomousContainerDatabaseDataguardAssociationId;
            resourceInputs["peerAutonomousContainerDatabaseDisplayName"] = state?.peerAutonomousContainerDatabaseDisplayName;
            resourceInputs["peerAutonomousContainerDatabaseId"] = state?.peerAutonomousContainerDatabaseId;
            resourceInputs["peerAutonomousVmClusterId"] = state?.peerAutonomousVmClusterId;
            resourceInputs["peerCloudAutonomousVmClusterId"] = state?.peerCloudAutonomousVmClusterId;
            resourceInputs["peerDbUniqueName"] = state?.peerDbUniqueName;
            resourceInputs["peerLifecycleState"] = state?.peerLifecycleState;
            resourceInputs["peerRole"] = state?.peerRole;
            resourceInputs["protectionMode"] = state?.protectionMode;
            resourceInputs["role"] = state?.role;
            resourceInputs["standbyMaintenanceBufferInDays"] = state?.standbyMaintenanceBufferInDays;
            resourceInputs["state"] = state?.state;
            resourceInputs["timeCreated"] = state?.timeCreated;
            resourceInputs["timeLastRoleChanged"] = state?.timeLastRoleChanged;
            resourceInputs["timeLastSynced"] = state?.timeLastSynced;
            resourceInputs["transportLag"] = state?.transportLag;
        }
        else {
            const args = argsOrState;
            if (args?.autonomousContainerDatabaseId === undefined && !opts.urn) {
                throw new Error("Missing required property 'autonomousContainerDatabaseId'");
            }
            if (args?.peerAutonomousContainerDatabaseDisplayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'peerAutonomousContainerDatabaseDisplayName'");
            }
            if (args?.protectionMode === undefined && !opts.urn) {
                throw new Error("Missing required property 'protectionMode'");
            }
            resourceInputs["autonomousContainerDatabaseDataguardAssociationId"] = args?.autonomousContainerDatabaseDataguardAssociationId;
            resourceInputs["autonomousContainerDatabaseId"] = args?.autonomousContainerDatabaseId;
            resourceInputs["fastStartFailOverLagLimitInSeconds"] = args?.fastStartFailOverLagLimitInSeconds;
            resourceInputs["isAutomaticFailoverEnabled"] = args?.isAutomaticFailoverEnabled;
            resourceInputs["migrateTrigger"] = args?.migrateTrigger;
            resourceInputs["peerAutonomousContainerDatabaseBackupConfig"] = args?.peerAutonomousContainerDatabaseBackupConfig;
            resourceInputs["peerAutonomousContainerDatabaseCompartmentId"] = args?.peerAutonomousContainerDatabaseCompartmentId;
            resourceInputs["peerAutonomousContainerDatabaseDisplayName"] = args?.peerAutonomousContainerDatabaseDisplayName;
            resourceInputs["peerAutonomousVmClusterId"] = args?.peerAutonomousVmClusterId;
            resourceInputs["peerCloudAutonomousVmClusterId"] = args?.peerCloudAutonomousVmClusterId;
            resourceInputs["peerDbUniqueName"] = args?.peerDbUniqueName;
            resourceInputs["protectionMode"] = args?.protectionMode;
            resourceInputs["standbyMaintenanceBufferInDays"] = args?.standbyMaintenanceBufferInDays;
            resourceInputs["applyLag"] = undefined /*out*/;
            resourceInputs["applyRate"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["peerAutonomousContainerDatabaseDataguardAssociationId"] = undefined /*out*/;
            resourceInputs["peerAutonomousContainerDatabaseId"] = undefined /*out*/;
            resourceInputs["peerLifecycleState"] = undefined /*out*/;
            resourceInputs["peerRole"] = undefined /*out*/;
            resourceInputs["role"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
            resourceInputs["timeLastRoleChanged"] = undefined /*out*/;
            resourceInputs["timeLastSynced"] = undefined /*out*/;
            resourceInputs["transportLag"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AutonomousContainerDatabaseDataguardAssociation.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AutonomousContainerDatabaseDataguardAssociation = AutonomousContainerDatabaseDataguardAssociation;
//# sourceMappingURL=autonomousContainerDatabaseDataguardAssociation.js.map