"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.MountTarget = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Mount Target resource in Oracle Cloud Infrastructure File Storage service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/filestorage/latest/MountTarget
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/
 *
 * Creates a new mount target in the specified compartment and
 * subnet. You can associate a file system with a mount
 * target only when they exist in the same availability domain. Instances
 * can connect to mount targets in another availablity domain, but
 * you might see higher latency than with instances in the same
 * availability domain as the mount target.
 *
 * Mount targets have one or more private IP addresses that you can
 * provide as the host portion of remote target parameters in
 * client mount commands. These private IP addresses are listed
 * in the privateIpIds property of the mount target and are highly available. Mount
 * targets also consume additional IP addresses in their subnet.
 * Do not use /30 or smaller subnets for mount target creation because they
 * do not have sufficient available IP addresses.
 * Allow at least three IP addresses for each mount target.
 *
 * For information about access control and compartments, see
 * [Overview of the IAM
 * Service](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm).
 *
 * For information about availability domains, see [Regions and
 * Availability Domains](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/regions.htm).
 * To get a list of availability domains, use the
 * `ListAvailabilityDomains` operation in the Identity and Access
 * Management Service API.
 *
 * All Oracle Cloud Infrastructure Services resources, including
 * mount targets, get an Oracle-assigned, unique ID called an
 * Oracle Cloud Identifier ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)).
 * When you create a resource, you can find its OCID in the response.
 * You can also retrieve a resource's OCID by using a List API operation on that resource
 * type, or by viewing the resource in the Console.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testMountTarget = new oci.filestorage.MountTarget("test_mount_target", {
 *     availabilityDomain: mountTargetAvailabilityDomain,
 *     compartmentId: compartmentId,
 *     subnetId: testSubnet.id,
 *     definedTags: {
 *         "Operations.CostCenter": "42",
 *     },
 *     displayName: mountTargetDisplayName,
 *     freeformTags: {
 *         Department: "Finance",
 *     },
 *     hostnameLabel: mountTargetHostnameLabel,
 *     idmapType: mountTargetIdmapType,
 *     ipAddress: mountTargetIpAddress,
 *     isLockOverride: mountTargetIsLockOverride === "true",
 *     kerberos: {
 *         kerberosRealm: mountTargetKerberosKerberosRealm,
 *         backupKeyTabSecretVersion: Number(mountTargetKerberosBackupKeyTabSecretVersion),
 *         currentKeyTabSecretVersion: Number(mountTargetKerberosCurrentKeyTabSecretVersion),
 *         isKerberosEnabled: mountTargetKerberosIsKerberosEnabled === "true",
 *         keyTabSecretId: testSecret.id,
 *     },
 *     ldapIdmap: {
 *         cacheLifetimeSeconds: Number(mountTargetLdapIdmapCacheLifetimeSeconds),
 *         cacheRefreshIntervalSeconds: Number(mountTargetLdapIdmapCacheRefreshIntervalSeconds),
 *         groupSearchBase: mountTargetLdapIdmapGroupSearchBase,
 *         negativeCacheLifetimeSeconds: Number(mountTargetLdapIdmapNegativeCacheLifetimeSeconds),
 *         outboundConnector1id: testOutboundConnector1.id,
 *         outboundConnector2id: testOutboundConnector2.id,
 *         schemaType: mountTargetLdapIdmapSchemaType,
 *         userSearchBase: mountTargetLdapIdmapUserSearchBase,
 *     },
 *     locks: [{
 *         type: mountTargetLocksType,
 *         message: mountTargetLocksMessage,
 *         relatedResourceId: testResource.id,
 *         timeCreated: mountTargetLocksTimeCreated,
 *     }],
 *     nsgIds: mountTargetNsgIds,
 *     requestedThroughput: mountTargetRequestedThroughput,
 *     securityAttributes: mountTargetSecurityAttributes,
 * });
 * ```
 *
 * ## Import
 *
 * MountTargets can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:FileStorage/mountTarget:MountTarget test_mount_target "id"
 * ```
 */
class MountTarget extends pulumi.CustomResource {
    /**
     * Get an existing MountTarget 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 MountTarget(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:FileStorage/mountTarget:MountTarget';
    /**
     * Returns true if the given object is an instance of MountTarget.  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'] === MountTarget.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["availabilityDomain"] = state?.availabilityDomain;
            resourceInputs["compartmentId"] = state?.compartmentId;
            resourceInputs["definedTags"] = state?.definedTags;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["exportSetId"] = state?.exportSetId;
            resourceInputs["freeformTags"] = state?.freeformTags;
            resourceInputs["hostnameLabel"] = state?.hostnameLabel;
            resourceInputs["idmapType"] = state?.idmapType;
            resourceInputs["ipAddress"] = state?.ipAddress;
            resourceInputs["isLockOverride"] = state?.isLockOverride;
            resourceInputs["kerberos"] = state?.kerberos;
            resourceInputs["ldapIdmap"] = state?.ldapIdmap;
            resourceInputs["lifecycleDetails"] = state?.lifecycleDetails;
            resourceInputs["locks"] = state?.locks;
            resourceInputs["mountTargetIpv6ids"] = state?.mountTargetIpv6ids;
            resourceInputs["nsgIds"] = state?.nsgIds;
            resourceInputs["observedThroughput"] = state?.observedThroughput;
            resourceInputs["privateIpIds"] = state?.privateIpIds;
            resourceInputs["requestedThroughput"] = state?.requestedThroughput;
            resourceInputs["reservedStorageCapacity"] = state?.reservedStorageCapacity;
            resourceInputs["securityAttributes"] = state?.securityAttributes;
            resourceInputs["state"] = state?.state;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["systemTags"] = state?.systemTags;
            resourceInputs["timeBillingCycleEnd"] = state?.timeBillingCycleEnd;
            resourceInputs["timeCreated"] = state?.timeCreated;
        }
        else {
            const args = argsOrState;
            if (args?.availabilityDomain === undefined && !opts.urn) {
                throw new Error("Missing required property 'availabilityDomain'");
            }
            if (args?.compartmentId === undefined && !opts.urn) {
                throw new Error("Missing required property 'compartmentId'");
            }
            if (args?.subnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            resourceInputs["availabilityDomain"] = args?.availabilityDomain;
            resourceInputs["compartmentId"] = args?.compartmentId;
            resourceInputs["definedTags"] = args?.definedTags;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["freeformTags"] = args?.freeformTags;
            resourceInputs["hostnameLabel"] = args?.hostnameLabel;
            resourceInputs["idmapType"] = args?.idmapType;
            resourceInputs["ipAddress"] = args?.ipAddress;
            resourceInputs["isLockOverride"] = args?.isLockOverride;
            resourceInputs["kerberos"] = args?.kerberos;
            resourceInputs["ldapIdmap"] = args?.ldapIdmap;
            resourceInputs["locks"] = args?.locks;
            resourceInputs["nsgIds"] = args?.nsgIds;
            resourceInputs["requestedThroughput"] = args?.requestedThroughput;
            resourceInputs["securityAttributes"] = args?.securityAttributes;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["exportSetId"] = undefined /*out*/;
            resourceInputs["lifecycleDetails"] = undefined /*out*/;
            resourceInputs["mountTargetIpv6ids"] = undefined /*out*/;
            resourceInputs["observedThroughput"] = undefined /*out*/;
            resourceInputs["privateIpIds"] = undefined /*out*/;
            resourceInputs["reservedStorageCapacity"] = undefined /*out*/;
            resourceInputs["state"] = undefined /*out*/;
            resourceInputs["systemTags"] = undefined /*out*/;
            resourceInputs["timeBillingCycleEnd"] = undefined /*out*/;
            resourceInputs["timeCreated"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(MountTarget.__pulumiType, name, resourceInputs, opts);
    }
}
exports.MountTarget = MountTarget;
//# sourceMappingURL=mountTarget.js.map