"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.AnalyticsInstancePrivateAccessChannel = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This resource provides the Analytics Instance Private Access Channel resource in Oracle Cloud Infrastructure Analytics service.
 * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/analytics/latest/AnalyticsInstancePrivateAccessChannel
 *
 * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/analytics
 *
 * Create a Private access Channel for the Analytics instance. The operation is long-running
 * and creates a new WorkRequest.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testAnalyticsInstancePrivateAccessChannel = new oci.analytics.AnalyticsInstancePrivateAccessChannel("test_analytics_instance_private_access_channel", {
 *     analyticsInstanceId: testAnalyticsInstance.id,
 *     displayName: analyticsInstancePrivateAccessChannelDisplayName,
 *     privateSourceDnsZones: [{
 *         dnsZone: analyticsInstancePrivateAccessChannelPrivateSourceDnsZonesDnsZone,
 *         description: analyticsInstancePrivateAccessChannelPrivateSourceDnsZonesDescription,
 *     }],
 *     subnetId: testSubnet.id,
 *     vcnId: testVcn.id,
 *     networkSecurityGroupIds: analyticsInstancePrivateAccessChannelNetworkSecurityGroupIds,
 *     privateSourceScanHosts: [{
 *         scanHostname: analyticsInstancePrivateAccessChannelPrivateSourceScanHostsScanHostname,
 *         scanPort: Number(analyticsInstancePrivateAccessChannelPrivateSourceScanHostsScanPort),
 *         description: analyticsInstancePrivateAccessChannelPrivateSourceScanHostsDescription,
 *     }],
 * });
 * ```
 *
 * ## Import
 *
 * AnalyticsInstancePrivateAccessChannels can be imported using the `id`, e.g.
 *
 * ```sh
 * $ pulumi import oci:Analytics/analyticsInstancePrivateAccessChannel:AnalyticsInstancePrivateAccessChannel test_analytics_instance_private_access_channel "analyticsInstances/{analyticsInstanceId}/privateAccessChannels/{privateAccessChannelKey}"
 * ```
 */
class AnalyticsInstancePrivateAccessChannel extends pulumi.CustomResource {
    /**
     * Get an existing AnalyticsInstancePrivateAccessChannel 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 AnalyticsInstancePrivateAccessChannel(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'oci:Analytics/analyticsInstancePrivateAccessChannel:AnalyticsInstancePrivateAccessChannel';
    /**
     * Returns true if the given object is an instance of AnalyticsInstancePrivateAccessChannel.  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'] === AnalyticsInstancePrivateAccessChannel.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["analyticsInstanceId"] = state?.analyticsInstanceId;
            resourceInputs["displayName"] = state?.displayName;
            resourceInputs["egressSourceIpAddresses"] = state?.egressSourceIpAddresses;
            resourceInputs["ipAddress"] = state?.ipAddress;
            resourceInputs["key"] = state?.key;
            resourceInputs["networkSecurityGroupIds"] = state?.networkSecurityGroupIds;
            resourceInputs["privateSourceDnsZones"] = state?.privateSourceDnsZones;
            resourceInputs["privateSourceScanHosts"] = state?.privateSourceScanHosts;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["vcnId"] = state?.vcnId;
        }
        else {
            const args = argsOrState;
            if (args?.analyticsInstanceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'analyticsInstanceId'");
            }
            if (args?.displayName === undefined && !opts.urn) {
                throw new Error("Missing required property 'displayName'");
            }
            if (args?.privateSourceDnsZones === undefined && !opts.urn) {
                throw new Error("Missing required property 'privateSourceDnsZones'");
            }
            if (args?.subnetId === undefined && !opts.urn) {
                throw new Error("Missing required property 'subnetId'");
            }
            if (args?.vcnId === undefined && !opts.urn) {
                throw new Error("Missing required property 'vcnId'");
            }
            resourceInputs["analyticsInstanceId"] = args?.analyticsInstanceId;
            resourceInputs["displayName"] = args?.displayName;
            resourceInputs["networkSecurityGroupIds"] = args?.networkSecurityGroupIds;
            resourceInputs["privateSourceDnsZones"] = args?.privateSourceDnsZones;
            resourceInputs["privateSourceScanHosts"] = args?.privateSourceScanHosts;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["vcnId"] = args?.vcnId;
            resourceInputs["egressSourceIpAddresses"] = undefined /*out*/;
            resourceInputs["ipAddress"] = undefined /*out*/;
            resourceInputs["key"] = undefined /*out*/;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(AnalyticsInstancePrivateAccessChannel.__pulumiType, name, resourceInputs, opts);
    }
}
exports.AnalyticsInstancePrivateAccessChannel = AnalyticsInstancePrivateAccessChannel;
//# sourceMappingURL=analyticsInstancePrivateAccessChannel.js.map