"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.VirtualMachineManagerVirtualMachineInstance = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a System Center Virtual Machine Manager Virtual Machine Instance.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const exampleResourceGroup = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleArcMachine = new azure.arcmachine.ArcMachine("example", {
 *     name: "example-arcmachine",
 *     resourceGroupName: exampleResourceGroup.name,
 *     location: exampleResourceGroup.location,
 *     kind: "SCVMM",
 * });
 * const exampleVirtualMachineManagerServer = new azure.systemcenter.VirtualMachineManagerServer("example", {
 *     name: "example-scvmmms",
 *     resourceGroupName: exampleResourceGroup.name,
 *     location: exampleResourceGroup.location,
 *     customLocationId: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.ExtendedLocation/customLocations/customLocation1",
 *     fqdn: "example.labtest",
 *     username: "testUser",
 *     password: "H@Sh1CoR3!",
 * });
 * const example = azure.systemcenter.getVirtualMachineManagerInventoryItemsOutput({
 *     inventoryType: "Cloud",
 *     systemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.id,
 * });
 * const exampleVirtualMachineManagerCloud = new azure.systemcenter.VirtualMachineManagerCloud("example", {
 *     name: "example-scvmmc",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     customLocationId: exampleVirtualMachineManagerServer.customLocationId,
 *     systemCenterVirtualMachineManagerServerInventoryItemId: example.apply(example => example.inventoryItems?.[0]?.id),
 * });
 * const example2 = azure.systemcenter.getVirtualMachineManagerInventoryItemsOutput({
 *     inventoryType: "VirtualMachineTemplate",
 *     systemCenterVirtualMachineManagerServerId: exampleVirtualMachineManagerServer.id,
 * });
 * const exampleVirtualMachineManagerVirtualMachineTemplate = new azure.systemcenter.VirtualMachineManagerVirtualMachineTemplate("example", {
 *     name: "example-scvmmvmt",
 *     location: exampleResourceGroup.location,
 *     resourceGroupName: exampleResourceGroup.name,
 *     customLocationId: exampleVirtualMachineManagerServer.customLocationId,
 *     systemCenterVirtualMachineManagerServerInventoryItemId: example2.apply(example2 => example2.inventoryItems?.[0]?.id),
 * });
 * const exampleVirtualMachineManagerVirtualMachineInstance = new azure.systemcenter.VirtualMachineManagerVirtualMachineInstance("example", {
 *     scopedResourceId: exampleArcMachine.id,
 *     customLocationId: exampleVirtualMachineManagerServer.customLocationId,
 *     infrastructure: {
 *         systemCenterVirtualMachineManagerCloudId: exampleVirtualMachineManagerCloud.id,
 *         systemCenterVirtualMachineManagerTemplateId: exampleVirtualMachineManagerVirtualMachineTemplate.id,
 *         systemCenterVirtualMachineManagerVirtualMachineServerId: exampleVirtualMachineManagerServer.id,
 *     },
 *     operatingSystem: {
 *         computerName: "testComputer",
 *     },
 *     hardware: {
 *         cpuCount: 1,
 *         memoryInMb: 1024,
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.ScVmm` - 2023-10-07
 *
 * ## Import
 *
 * System Center Virtual Machine Manager Virtual Machine Instances can be imported into Pulumi using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:systemcenter/virtualMachineManagerVirtualMachineInstance:VirtualMachineManagerVirtualMachineInstance example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.ScVmm/virtualMachineInstances/default
 * ```
 */
class VirtualMachineManagerVirtualMachineInstance extends pulumi.CustomResource {
    /**
     * Get an existing VirtualMachineManagerVirtualMachineInstance 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 VirtualMachineManagerVirtualMachineInstance(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:systemcenter/virtualMachineManagerVirtualMachineInstance:VirtualMachineManagerVirtualMachineInstance';
    /**
     * Returns true if the given object is an instance of VirtualMachineManagerVirtualMachineInstance.  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'] === VirtualMachineManagerVirtualMachineInstance.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["customLocationId"] = state?.customLocationId;
            resourceInputs["hardware"] = state?.hardware;
            resourceInputs["infrastructure"] = state?.infrastructure;
            resourceInputs["networkInterfaces"] = state?.networkInterfaces;
            resourceInputs["operatingSystem"] = state?.operatingSystem;
            resourceInputs["scopedResourceId"] = state?.scopedResourceId;
            resourceInputs["storageDisks"] = state?.storageDisks;
            resourceInputs["systemCenterVirtualMachineManagerAvailabilitySetIds"] = state?.systemCenterVirtualMachineManagerAvailabilitySetIds;
        }
        else {
            const args = argsOrState;
            if (args?.customLocationId === undefined && !opts.urn) {
                throw new Error("Missing required property 'customLocationId'");
            }
            if (args?.infrastructure === undefined && !opts.urn) {
                throw new Error("Missing required property 'infrastructure'");
            }
            if (args?.scopedResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'scopedResourceId'");
            }
            resourceInputs["customLocationId"] = args?.customLocationId;
            resourceInputs["hardware"] = args?.hardware;
            resourceInputs["infrastructure"] = args?.infrastructure;
            resourceInputs["networkInterfaces"] = args?.networkInterfaces;
            resourceInputs["operatingSystem"] = args?.operatingSystem;
            resourceInputs["scopedResourceId"] = args?.scopedResourceId;
            resourceInputs["storageDisks"] = args?.storageDisks;
            resourceInputs["systemCenterVirtualMachineManagerAvailabilitySetIds"] = args?.systemCenterVirtualMachineManagerAvailabilitySetIds;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(VirtualMachineManagerVirtualMachineInstance.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VirtualMachineManagerVirtualMachineInstance = VirtualMachineManagerVirtualMachineInstance;
//# sourceMappingURL=virtualMachineManagerVirtualMachineInstance.js.map