"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.VirtualMachineManagerVirtualMachineInstanceGuestAgent = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a System Center Virtual Machine Manager Virtual Machine Instance Guest Agent.
 *
 * > **Note:** By request of the service team the provider is no longer automatically registering the `Microsoft.ScVmm` Resource Provider for this resource. To register it you can run `az provider register --namespace Microsoft.ScVmm`.
 *
 * ## 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",
 *     identity: {
 *         type: "SystemAssigned",
 *     },
 * });
 * 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: {
 *         checkpointType: "Standard",
 *         systemCenterVirtualMachineManagerCloudId: exampleVirtualMachineManagerCloud.id,
 *         systemCenterVirtualMachineManagerTemplateId: exampleVirtualMachineManagerVirtualMachineTemplate.id,
 *         systemCenterVirtualMachineManagerVirtualMachineServerId: exampleVirtualMachineManagerServer.id,
 *     },
 *     operatingSystem: {
 *         adminPassword: "AdminPassword123!",
 *     },
 * });
 * const exampleVirtualMachineManagerVirtualMachineInstanceGuestAgent = new azure.systemcenter.VirtualMachineManagerVirtualMachineInstanceGuestAgent("example", {
 *     scopedResourceId: exampleArcMachine.id,
 *     username: "Administrator",
 *     password: "AdminPassword123!",
 * }, {
 *     dependsOn: [exampleVirtualMachineManagerVirtualMachineInstance],
 * });
 * ```
 *
 * ## 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 Instance Guest Agents can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent:VirtualMachineManagerVirtualMachineInstanceGuestAgent example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.HybridCompute/machines/machine1/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default
 * ```
 */
class VirtualMachineManagerVirtualMachineInstanceGuestAgent extends pulumi.CustomResource {
    /**
     * Get an existing VirtualMachineManagerVirtualMachineInstanceGuestAgent 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 VirtualMachineManagerVirtualMachineInstanceGuestAgent(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:systemcenter/virtualMachineManagerVirtualMachineInstanceGuestAgent:VirtualMachineManagerVirtualMachineInstanceGuestAgent';
    /**
     * Returns true if the given object is an instance of VirtualMachineManagerVirtualMachineInstanceGuestAgent.  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'] === VirtualMachineManagerVirtualMachineInstanceGuestAgent.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["password"] = state?.password;
            resourceInputs["provisioningAction"] = state?.provisioningAction;
            resourceInputs["scopedResourceId"] = state?.scopedResourceId;
            resourceInputs["username"] = state?.username;
        }
        else {
            const args = argsOrState;
            if (args?.password === undefined && !opts.urn) {
                throw new Error("Missing required property 'password'");
            }
            if (args?.scopedResourceId === undefined && !opts.urn) {
                throw new Error("Missing required property 'scopedResourceId'");
            }
            if (args?.username === undefined && !opts.urn) {
                throw new Error("Missing required property 'username'");
            }
            resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
            resourceInputs["provisioningAction"] = args?.provisioningAction;
            resourceInputs["scopedResourceId"] = args?.scopedResourceId;
            resourceInputs["username"] = args?.username;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        const secretOpts = { additionalSecretOutputs: ["password"] };
        opts = pulumi.mergeOptions(opts, secretOpts);
        super(VirtualMachineManagerVirtualMachineInstanceGuestAgent.__pulumiType, name, resourceInputs, opts);
    }
}
exports.VirtualMachineManagerVirtualMachineInstanceGuestAgent = VirtualMachineManagerVirtualMachineInstanceGuestAgent;
//# sourceMappingURL=virtualMachineManagerVirtualMachineInstanceGuestAgent.js.map