"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! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.AutonomousDatabase = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
 * An AutonomousDatabase resource.
 *
 * To get more information about AutonomousDatabase, see:
 *
 * * [API documentation](https://cloud.google.com/oracle/database/docs/reference/rest/v1/projects.locations.autonomousDatabases)
 * * How-to Guides
 *     * [Create Autonomous databases](https://cloud.google.com/oracle/database/docs/create-databases)
 *
 * ## Example Usage
 *
 * ### Oracledatabase Autonomous Database Basic
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = gcp.compute.getNetwork({
 *     name: "new",
 *     project: "my-project",
 * });
 * const myADB = new gcp.oracledatabase.AutonomousDatabase("myADB", {
 *     autonomousDatabaseId: "my-instance",
 *     location: "us-east4",
 *     project: "my-project",
 *     database: "mydatabase",
 *     adminPassword: "123Abpassword",
 *     network: _default.then(_default => _default.id),
 *     cidr: "10.5.0.0/24",
 *     properties: {
 *         computeCount: 2,
 *         dataStorageSizeTb: 1,
 *         dbVersion: "19c",
 *         dbWorkload: "OLTP",
 *         licenseType: "LICENSE_INCLUDED",
 *     },
 *     deletionProtection: true,
 * });
 * ```
 * ### Oracledatabase Autonomous Database Full
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const _default = gcp.compute.getNetwork({
 *     name: "new",
 *     project: "my-project",
 * });
 * const myADB = new gcp.oracledatabase.AutonomousDatabase("myADB", {
 *     autonomousDatabaseId: "my-instance",
 *     location: "us-east4",
 *     project: "my-project",
 *     displayName: "autonomousDatabase displayname",
 *     database: "mydatabase",
 *     adminPassword: "123Abpassword",
 *     network: _default.then(_default => _default.id),
 *     cidr: "10.5.0.0/24",
 *     labels: {
 *         "label-one": "value-one",
 *     },
 *     properties: {
 *         computeCount: 2,
 *         dataStorageSizeGb: 48,
 *         dbVersion: "19c",
 *         dbEdition: "STANDARD_EDITION",
 *         dbWorkload: "OLTP",
 *         isAutoScalingEnabled: true,
 *         licenseType: "BRING_YOUR_OWN_LICENSE",
 *         backupRetentionPeriodDays: 60,
 *         characterSet: "AL32UTF8",
 *         isStorageAutoScalingEnabled: false,
 *         maintenanceScheduleType: "REGULAR",
 *         mtlsConnectionRequired: false,
 *         nCharacterSet: "AL16UTF16",
 *         operationsInsightsState: "NOT_ENABLED",
 *         customerContacts: [{
 *             email: "xyz@example.com",
 *         }],
 *         privateEndpointIp: "10.5.0.11",
 *         privateEndpointLabel: "myendpoint",
 *     },
 *     deletionProtection: true,
 * });
 * ```
 * ### Oracledatabase Autonomous Database Odbnetwork
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const myADB = new gcp.oracledatabase.AutonomousDatabase("myADB", {
 *     autonomousDatabaseId: "my-instance",
 *     location: "europe-west2",
 *     project: "my-project",
 *     database: "mydatabase",
 *     adminPassword: "123Abpassword",
 *     odbNetwork: "projects/my-project/locations/europe-west2/odbNetworks/my-odbnetwork",
 *     odbSubnet: "projects/my-project/locations/europe-west2/odbNetworks/my-odbnetwork/odbSubnets/my-odbsubnet",
 *     properties: {
 *         computeCount: 2,
 *         dataStorageSizeTb: 1,
 *         dbVersion: "19c",
 *         dbWorkload: "OLTP",
 *         licenseType: "LICENSE_INCLUDED",
 *     },
 *     deletionProtection: true,
 * });
 * ```
 * ### Oracledatabase Autonomous Database Publicip
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 *
 * const myADB = new gcp.oracledatabase.AutonomousDatabase("myADB", {
 *     autonomousDatabaseId: "my-instance",
 *     location: "europe-west2",
 *     project: "my-project",
 *     database: "mydatabase",
 *     adminPassword: "123Abpassword",
 *     properties: {
 *         computeCount: 2,
 *         dataStorageSizeTb: 1,
 *         dbVersion: "19c",
 *         dbWorkload: "OLTP",
 *         licenseType: "LICENSE_INCLUDED",
 *         mtlsConnectionRequired: true,
 *     },
 *     deletionProtection: true,
 * });
 * ```
 *
 * ## Import
 *
 * AutonomousDatabase can be imported using any of these accepted formats:
 *
 * * `projects/{{project}}/locations/{{location}}/autonomousDatabases/{{autonomous_database_id}}`
 *
 * * `{{project}}/{{location}}/{{autonomous_database_id}}`
 *
 * * `{{location}}/{{autonomous_database_id}}`
 *
 * When using the `pulumi import` command, AutonomousDatabase can be imported using one of the formats above. For example:
 *
 * ```sh
 * $ pulumi import gcp:oracledatabase/autonomousDatabase:AutonomousDatabase default projects/{{project}}/locations/{{location}}/autonomousDatabases/{{autonomous_database_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:oracledatabase/autonomousDatabase:AutonomousDatabase default {{project}}/{{location}}/{{autonomous_database_id}}
 * ```
 *
 * ```sh
 * $ pulumi import gcp:oracledatabase/autonomousDatabase:AutonomousDatabase default {{location}}/{{autonomous_database_id}}
 * ```
 */
class AutonomousDatabase extends pulumi.CustomResource {
    /**
     * Get an existing AutonomousDatabase 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 AutonomousDatabase(name, state, { ...opts, id: id });
    }
    /**
     * Returns true if the given object is an instance of AutonomousDatabase.  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'] === AutonomousDatabase.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["adminPassword"] = state?.adminPassword;
            resourceInputs["autonomousDatabaseId"] = state?.autonomousDatabaseId;
            resourceInputs["cidr"] = state?.cidr;
            resourceInputs["createTime"] = state?.createTime;
            resourceInputs["database"] = state?.database;
            resourceInputs["deletionProtection"] = state?.deletionProtection;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["effectiveLabels"] = state?.effectiveLabels;
            resourceInputs["entitlementId"] = state?.entitlementId;
            resourceInputs["labels"] = state?.labels;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["network"] = state?.network;
            resourceInputs["odbNetwork"] = state?.odbNetwork;
            resourceInputs["odbSubnet"] = state?.odbSubnet;
            resourceInputs["project"] = state?.project;
            resourceInputs["properties"] = state?.properties;
            resourceInputs["pulumiLabels"] = state?.pulumiLabels;
        }
        else {
            const args = argsOrState;
            if (args?.autonomousDatabaseId === undefined && !opts.urn) {
                throw new Error("Missing required property 'autonomousDatabaseId'");
            }
            if (args?.database === undefined && !opts.urn) {
                throw new Error("Missing required property 'database'");
            }
            if (args?.location === undefined && !opts.urn) {
                throw new Error("Missing required property 'location'");
            }
            if (args?.properties === undefined && !opts.urn) {
                throw new Error("Missing required property 'properties'");
            }
            resourceInputs["adminPassword"] = args?.adminPassword;
            resourceInputs["autonomousDatabaseId"] = args?.autonomousDatabaseId;
            resourceInputs["cidr"] = args?.cidr;
            resourceInputs["database"] = args?.database;
            resourceInputs["deletionProtection"] = args?.deletionProtection;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["labels"] = args?.labels;
            resourceInputs["location"] = args?.location;
            resourceInputs["network"] = args?.network;
            resourceInputs["odbNetwork"] = args?.odbNetwork;
            resourceInputs["odbSubnet"] = args?.odbSubnet;
            resourceInputs["project"] = args?.project;
            resourceInputs["properties"] = args?.properties;
            resourceInputs["createTime"] = undefined /*out*/;
            resourceInputs["effectiveLabels"] = undefined /*out*/;
            resourceInputs["entitlementId"] = undefined /*out*/;
            resourceInputs["name"] = undefined /*out*/;
            resourceInputs["pulumiLabels"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(AutonomousDatabase.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AutonomousDatabase = AutonomousDatabase;
/** @internal */
AutonomousDatabase.__pulumiType = 'gcp:oracledatabase/autonomousDatabase:AutonomousDatabase';
//# sourceMappingURL=autonomousDatabase.js.map