"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.ComputeInstance = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a Machine Learning Compute Instance.
 *
 * ## 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 config = new pulumi.Config();
 * const sshKey = config.get("sshKey") || "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqaZoyiz1qbdOQ8xEf6uEu1cCwYowo5FHtsBhqLoDnnp7KUTEBN+L2NxRIfQ781rxV6Iq5jSav6b2Q8z5KiseOlvKA/RF2wqU0UPYqQviQhLmW6THTpmrv/YkUCuzxDpsH7DUDhZcwySLKVVe0Qm3+5N2Ta6UYH3lsDf9R9wTP2K/+vAnflKebuypNlmocIvakFWoZda18FOmsOoIVXQ8HWFNCuw9ZCunMSN62QGamCe3dL5cXlkgHYv7ekJE15IA9aOJcM7e90oeTqo+7HTcWfdu0qQqPWY5ujyMw/llas8tsXY85LFqRnr3gJ02bAscjc477+X+j/gkpFoN1QEmt terraform@demo.tld";
 * const exampleComputeInstance = new azure.machinelearning.ComputeInstance("example", {
 *     name: "example",
 *     machineLearningWorkspaceId: exampleWorkspace.id,
 *     virtualMachineSize: "STANDARD_DS2_V2",
 *     authorizationType: "personal",
 *     ssh: {
 *         publicKey: sshKey,
 *     },
 *     subnetResourceId: exampleSubnet.id,
 *     description: "foo",
 *     tags: {
 *         foo: "bar",
 *     },
 * });
 * ```
 *
 * ## 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 Instances can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:machinelearning/computeInstance:ComputeInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/compute1
 * ```
 */
class ComputeInstance extends pulumi.CustomResource {
    /**
     * Get an existing ComputeInstance 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 ComputeInstance(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:machinelearning/computeInstance:ComputeInstance';
    /**
     * Returns true if the given object is an instance of ComputeInstance.  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'] === ComputeInstance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["assignToUser"] = state?.assignToUser;
            resourceInputs["authorizationType"] = state?.authorizationType;
            resourceInputs["description"] = state?.description;
            resourceInputs["identity"] = state?.identity;
            resourceInputs["localAuthEnabled"] = state?.localAuthEnabled;
            resourceInputs["machineLearningWorkspaceId"] = state?.machineLearningWorkspaceId;
            resourceInputs["name"] = state?.name;
            resourceInputs["nodePublicIpEnabled"] = state?.nodePublicIpEnabled;
            resourceInputs["ssh"] = state?.ssh;
            resourceInputs["subnetResourceId"] = state?.subnetResourceId;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["virtualMachineSize"] = state?.virtualMachineSize;
        }
        else {
            const args = argsOrState;
            if (args?.machineLearningWorkspaceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'machineLearningWorkspaceId'");
            }
            if (args?.virtualMachineSize === undefined && !opts.urn) {
                throw new Error("Missing required property 'virtualMachineSize'");
            }
            resourceInputs["assignToUser"] = args?.assignToUser;
            resourceInputs["authorizationType"] = args?.authorizationType;
            resourceInputs["description"] = args?.description;
            resourceInputs["identity"] = args?.identity;
            resourceInputs["localAuthEnabled"] = args?.localAuthEnabled;
            resourceInputs["machineLearningWorkspaceId"] = args?.machineLearningWorkspaceId;
            resourceInputs["name"] = args?.name;
            resourceInputs["nodePublicIpEnabled"] = args?.nodePublicIpEnabled;
            resourceInputs["ssh"] = args?.ssh;
            resourceInputs["subnetResourceId"] = args?.subnetResourceId;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["virtualMachineSize"] = args?.virtualMachineSize;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ComputeInstance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ComputeInstance = ComputeInstance;
//# sourceMappingURL=computeInstance.js.map