"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.ClusterManagedPrivateEndpoint = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Managed Private Endpoint for a Kusto Cluster.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const current = azure.core.getClientConfig({});
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleCluster = new azure.kusto.Cluster("example", {
 *     name: "examplekc",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     sku: {
 *         name: "Dev(No SLA)_Standard_D11_v2",
 *         capacity: 1,
 *     },
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplesa",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleClusterManagedPrivateEndpoint = new azure.kusto.ClusterManagedPrivateEndpoint("example", {
 *     name: "examplempe",
 *     resourceGroupName: example.name,
 *     clusterName: exampleCluster.name,
 *     privateLinkResourceId: exampleAccount.id,
 *     privateLinkResourceRegion: exampleAccount.location,
 *     groupId: "blob",
 *     requestMessage: "Please Approve",
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Kusto` - 2024-04-13
 *
 * ## Import
 *
 * Managed Private Endpoint for a Kusto Cluster can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:kusto/clusterManagedPrivateEndpoint:ClusterManagedPrivateEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/managedPrivateEndpoints/managedPrivateEndpoint1
 * ```
 */
class ClusterManagedPrivateEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing ClusterManagedPrivateEndpoint 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 ClusterManagedPrivateEndpoint(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:kusto/clusterManagedPrivateEndpoint:ClusterManagedPrivateEndpoint';
    /**
     * Returns true if the given object is an instance of ClusterManagedPrivateEndpoint.  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'] === ClusterManagedPrivateEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["clusterName"] = state?.clusterName;
            resourceInputs["groupId"] = state?.groupId;
            resourceInputs["name"] = state?.name;
            resourceInputs["privateLinkResourceId"] = state?.privateLinkResourceId;
            resourceInputs["privateLinkResourceRegion"] = state?.privateLinkResourceRegion;
            resourceInputs["requestMessage"] = state?.requestMessage;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
        }
        else {
            const args = argsOrState;
            if (args?.clusterName === undefined && !opts.urn) {
                throw new Error("Missing required property 'clusterName'");
            }
            if (args?.groupId === undefined && !opts.urn) {
                throw new Error("Missing required property 'groupId'");
            }
            if (args?.privateLinkResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'privateLinkResourceId'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            resourceInputs["clusterName"] = args?.clusterName;
            resourceInputs["groupId"] = args?.groupId;
            resourceInputs["name"] = args?.name;
            resourceInputs["privateLinkResourceId"] = args?.privateLinkResourceId;
            resourceInputs["privateLinkResourceRegion"] = args?.privateLinkResourceRegion;
            resourceInputs["requestMessage"] = args?.requestMessage;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ClusterManagedPrivateEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ClusterManagedPrivateEndpoint = ClusterManagedPrivateEndpoint;
//# sourceMappingURL=clusterManagedPrivateEndpoint.js.map