"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.GrafanaManagedPrivateEndpoint = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Dashboard Grafana Managed Private Endpoint.
 *
 * > **Note:** This resource will _not_ approve the managed private endpoint connection on the linked resource. This will need to be done manually via Azure CLI, PowerShell, or AzAPI resources. See here for an example that uses AzAPI.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "Canada Central",
 * });
 * const exampleWorkspace = new azure.monitoring.Workspace("example", {
 *     name: "example-mamw",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     publicNetworkAccessEnabled: false,
 * });
 * const exampleGrafana = new azure.dashboard.Grafana("example", {
 *     name: "example-dg",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     grafanaMajorVersion: "12",
 *     publicNetworkAccessEnabled: false,
 *     azureMonitorWorkspaceIntegrations: [{
 *         resourceId: exampleWorkspace.id,
 *     }],
 * });
 * const exampleGrafanaManagedPrivateEndpoint = new azure.dashboard.GrafanaManagedPrivateEndpoint("example", {
 *     grafanaId: exampleGrafana.id,
 *     name: "example-mpe",
 *     location: exampleGrafana.location,
 *     privateLinkResourceId: exampleWorkspace.id,
 *     groupIds: ["prometheusMetrics"],
 *     privateLinkResourceRegion: exampleGrafana.location,
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Dashboard` - 2025-08-01
 *
 * ## Import
 *
 * Dashboard Grafana Managed Private Endpoint Examples can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:dashboard/grafanaManagedPrivateEndpoint:GrafanaManagedPrivateEndpoint example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Dashboard/grafana/workspace1/managedPrivateEndpoints/endpoint1
 * ```
 */
class GrafanaManagedPrivateEndpoint extends pulumi.CustomResource {
    /**
     * Get an existing GrafanaManagedPrivateEndpoint 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 GrafanaManagedPrivateEndpoint(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:dashboard/grafanaManagedPrivateEndpoint:GrafanaManagedPrivateEndpoint';
    /**
     * Returns true if the given object is an instance of GrafanaManagedPrivateEndpoint.  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'] === GrafanaManagedPrivateEndpoint.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["grafanaId"] = state?.grafanaId;
            resourceInputs["groupIds"] = state?.groupIds;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["privateLinkResourceId"] = state?.privateLinkResourceId;
            resourceInputs["privateLinkResourceRegion"] = state?.privateLinkResourceRegion;
            resourceInputs["privateLinkServiceUrl"] = state?.privateLinkServiceUrl;
            resourceInputs["requestMessage"] = state?.requestMessage;
            resourceInputs["tags"] = state?.tags;
        }
        else {
            const args = argsOrState;
            if (args?.grafanaId === undefined && !opts.urn) {
                throw new Error("Missing required property 'grafanaId'");
            }
            if (args?.privateLinkResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'privateLinkResourceId'");
            }
            resourceInputs["grafanaId"] = args?.grafanaId;
            resourceInputs["groupIds"] = args?.groupIds;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["privateLinkResourceId"] = args?.privateLinkResourceId;
            resourceInputs["privateLinkResourceRegion"] = args?.privateLinkResourceRegion;
            resourceInputs["privateLinkServiceUrl"] = args?.privateLinkServiceUrl;
            resourceInputs["requestMessage"] = args?.requestMessage;
            resourceInputs["tags"] = args?.tags;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(GrafanaManagedPrivateEndpoint.__pulumiType, name, resourceInputs, opts);
    }
}
exports.GrafanaManagedPrivateEndpoint = GrafanaManagedPrivateEndpoint;
//# sourceMappingURL=grafanaManagedPrivateEndpoint.js.map