"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.ComputeCluster = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Machine Learning Compute 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-rg",
 *     location: "west europe",
 *     tags: {
 *         stage: "example",
 *     },
 * });
 * const exampleInsights = new azure.appinsights.Insights("example", {
 *     name: "example-ai",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     applicationType: "web",
 * });
 * const exampleKeyVault = new azure.keyvault.KeyVault("example", {
 *     name: "example-kv",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     tenantId: current.then(current => current.tenantId),
 *     skuName: "standard",
 *     purgeProtectionEnabled: true,
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "examplesa",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleWorkspace = new azure.machinelearning.Workspace("example", {
 *     name: "example-mlw",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     applicationInsightsId: exampleInsights.id,
 *     keyVaultId: exampleKeyVault.id,
 *     storageAccountId: exampleAccount.id,
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-vnet",
 *     addressSpaces: ["10.1.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "example-subnet",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.1.0.0/24"],
 * });
 * const test = new azure.machinelearning.ComputeCluster("test", {
 *     name: "example",
 *     location: example.location,
 *     vmPriority: "LowPriority",
 *     vmSize: "Standard_DS2_v2",
 *     machineLearningWorkspaceId: exampleWorkspace.id,
 *     subnetResourceId: exampleSubnet.id,
 *     scaleSettings: {
 *         minNodeCount: 0,
 *         maxNodeCount: 1,
 *         scaleDownNodesAfterIdleDuration: "PT30S",
 *     },
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.MachineLearningServices` - 2025-06-01
 *
 * ## Import
 *
 * Machine Learning Compute Clusters can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:machinelearning/computeCluster:ComputeCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/cluster1
 * ```
 */
class ComputeCluster extends pulumi.CustomResource {
    /**
     * Get an existing ComputeCluster 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 ComputeCluster(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:machinelearning/computeCluster:ComputeCluster';
    /**
     * Returns true if the given object is an instance of ComputeCluster.  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'] === ComputeCluster.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["description"] = state?.description;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["localAuthEnabled"] = state?.localAuthEnabled;
            resourceInputs["location"] = state?.location;
            resourceInputs["machineLearningWorkspaceId"] = state?.machineLearningWorkspaceId;
            resourceInputs["name"] = state?.name;
            resourceInputs["nodePublicIpEnabled"] = state?.nodePublicIpEnabled;
            resourceInputs["scaleSettings"] = state?.scaleSettings;
            resourceInputs["ssh"] = state?.ssh;
            resourceInputs["sshPublicAccessEnabled"] = state?.sshPublicAccessEnabled;
            resourceInputs["subnetResourceId"] = state?.subnetResourceId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["vmPriority"] = state?.vmPriority;
            resourceInputs["vmSize"] = state?.vmSize;
        }
        else {
            const args = argsOrState;
            if (args?.machineLearningWorkspaceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'machineLearningWorkspaceId'");
            }
            if (args?.scaleSettings === undefined && !opts.urn) {
                throw new Error("Missing required property 'scaleSettings'");
            }
            if (args?.vmPriority === undefined && !opts.urn) {
                throw new Error("Missing required property 'vmPriority'");
            }
            if (args?.vmSize === undefined && !opts.urn) {
                throw new Error("Missing required property 'vmSize'");
            }
            resourceInputs["description"] = args?.description;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["localAuthEnabled"] = args?.localAuthEnabled;
            resourceInputs["location"] = args?.location;
            resourceInputs["machineLearningWorkspaceId"] = args?.machineLearningWorkspaceId;
            resourceInputs["name"] = args?.name;
            resourceInputs["nodePublicIpEnabled"] = args?.nodePublicIpEnabled;
            resourceInputs["scaleSettings"] = args?.scaleSettings;
            resourceInputs["ssh"] = args?.ssh;
            resourceInputs["sshPublicAccessEnabled"] = args?.sshPublicAccessEnabled;
            resourceInputs["subnetResourceId"] = args?.subnetResourceId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["vmPriority"] = args?.vmPriority;
            resourceInputs["vmSize"] = args?.vmSize;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ComputeCluster.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ComputeCluster = ComputeCluster;
//# sourceMappingURL=computeCluster.js.map