"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.ManagedCluster = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Resource Group.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.servicefabric.ManagedCluster("example", {
 *     name: "example",
 *     resourceGroupName: "example",
 *     location: "West Europe",
 *     httpGatewayPort: 4567,
 *     lbRules: [{
 *         backendPort: 38080,
 *         frontendPort: 80,
 *         probeProtocol: "http",
 *         probeRequestPath: "/test",
 *         protocol: "tcp",
 *     }],
 *     clientConnectionPort: 12345,
 *     nodeTypes: [{
 *         dataDiskSizeGb: 130,
 *         name: "test1",
 *         primary: true,
 *         applicationPortRange: "30000-49000",
 *         ephemeralPortRange: "10000-20000",
 *         vmSize: "Standard_DS1_v2",
 *         vmImagePublisher: "MicrosoftWindowsServer",
 *         vmImageSku: "2019-Datacenter-with-Containers",
 *         vmImageOffer: "WindowsServer",
 *         vmImageVersion: "latest",
 *         vmInstanceCount: 5,
 *     }],
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.ServiceFabric` - 2024-04-01
 *
 * ## Import
 *
 * Resource Groups can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:servicefabric/managedCluster:ManagedCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.ServiceFabric/managedClusters/clusterName1
 * ```
 */
class ManagedCluster extends pulumi.CustomResource {
    /**
     * Get an existing ManagedCluster 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 ManagedCluster(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:servicefabric/managedCluster:ManagedCluster';
    /**
     * Returns true if the given object is an instance of ManagedCluster.  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'] === ManagedCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["authentication"] = state?.authentication;
            resourceInputs["backupServiceEnabled"] = state?.backupServiceEnabled;
            resourceInputs["clientConnectionPort"] = state?.clientConnectionPort;
            resourceInputs["customFabricSettings"] = state?.customFabricSettings;
            resourceInputs["dnsName"] = state?.dnsName;
            resourceInputs["dnsServiceEnabled"] = state?.dnsServiceEnabled;
            resourceInputs["httpGatewayPort"] = state?.httpGatewayPort;
            resourceInputs["lbRules"] = state?.lbRules;
            resourceInputs["location"] = state?.location;
            resourceInputs["name"] = state?.name;
            resourceInputs["nodeTypes"] = state?.nodeTypes;
            resourceInputs["password"] = state?.password;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["sku"] = state?.sku;
            resourceInputs["subnetId"] = state?.subnetId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["upgradeWave"] = state?.upgradeWave;
            resourceInputs["username"] = state?.username;
        }
        else {
            const args = argsOrState;
            if (args?.clientConnectionPort === undefined && !opts.urn) {
                throw new Error("Missing required property 'clientConnectionPort'");
            }
            if (args?.httpGatewayPort === undefined && !opts.urn) {
                throw new Error("Missing required property 'httpGatewayPort'");
            }
            if (args?.lbRules === undefined && !opts.urn) {
                throw new Error("Missing required property 'lbRules'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            resourceInputs["authentication"] = args?.authentication;
            resourceInputs["backupServiceEnabled"] = args?.backupServiceEnabled;
            resourceInputs["clientConnectionPort"] = args?.clientConnectionPort;
            resourceInputs["customFabricSettings"] = args?.customFabricSettings;
            resourceInputs["dnsName"] = args?.dnsName;
            resourceInputs["dnsServiceEnabled"] = args?.dnsServiceEnabled;
            resourceInputs["httpGatewayPort"] = args?.httpGatewayPort;
            resourceInputs["lbRules"] = args?.lbRules;
            resourceInputs["location"] = args?.location;
            resourceInputs["name"] = args?.name;
            resourceInputs["nodeTypes"] = args?.nodeTypes;
            resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["sku"] = args?.sku;
            resourceInputs["subnetId"] = args?.subnetId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["upgradeWave"] = args?.upgradeWave;
            resourceInputs["username"] = args?.username;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["password"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(ManagedCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ManagedCluster = ManagedCluster;
//# sourceMappingURL=managedCluster.js.map