"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.ManagedDisk = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * Manages a managed disk.
 *
 * ## Example Usage
 *
 * ### With Create Empty
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleManagedDisk = new azure.compute.ManagedDisk("example", {
 *     name: "acctestmd",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccountType: "Standard_LRS",
 *     createOption: "Empty",
 *     diskSizeGb: 1,
 *     tags: {
 *         environment: "staging",
 *     },
 * });
 * ```
 *
 * ### With Create Copy
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 *
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const source = new azure.compute.ManagedDisk("source", {
 *     name: "acctestmd1",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccountType: "Standard_LRS",
 *     createOption: "Empty",
 *     diskSizeGb: 1,
 *     tags: {
 *         environment: "staging",
 *     },
 * });
 * const copy = new azure.compute.ManagedDisk("copy", {
 *     name: "acctestmd2",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     storageAccountType: "Standard_LRS",
 *     createOption: "Copy",
 *     sourceResourceId: source.id,
 *     diskSizeGb: 1,
 *     tags: {
 *         environment: "staging",
 *     },
 * });
 * ```
 *
 * ## API Providers
 *
 * <!-- This section is generated, changes will be overwritten -->
 * This resource uses the following Azure API Providers:
 *
 * * `Microsoft.Compute` - 2023-04-02
 *
 * ## Import
 *
 * Managed Disks can be imported using the `resource id`, e.g.
 *
 * ```sh
 * $ pulumi import azure:compute/managedDisk:ManagedDisk example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Compute/disks/manageddisk1
 * ```
 */
class ManagedDisk extends pulumi.CustomResource {
    /**
     * Get an existing ManagedDisk 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 ManagedDisk(name, state, { ...opts, id: id });
    }
    /** @internal */
    static __pulumiType = 'azure:compute/managedDisk:ManagedDisk';
    /**
     * Returns true if the given object is an instance of ManagedDisk.  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'] === ManagedDisk.__pulumiType;
    }
    constructor(name, argsOrState, opts) {
        let resourceInputs = {};
        opts = opts || {};
        if (opts.id) {
            const state = argsOrState;
            resourceInputs["createOption"] = state?.createOption;
            resourceInputs["diskAccessId"] = state?.diskAccessId;
            resourceInputs["diskEncryptionSetId"] = state?.diskEncryptionSetId;
            resourceInputs["diskIopsReadOnly"] = state?.diskIopsReadOnly;
            resourceInputs["diskIopsReadWrite"] = state?.diskIopsReadWrite;
            resourceInputs["diskMbpsReadOnly"] = state?.diskMbpsReadOnly;
            resourceInputs["diskMbpsReadWrite"] = state?.diskMbpsReadWrite;
            resourceInputs["diskSizeGb"] = state?.diskSizeGb;
            resourceInputs["edgeZone"] = state?.edgeZone;
            resourceInputs["encryptionSettings"] = state?.encryptionSettings;
            resourceInputs["galleryImageReferenceId"] = state?.galleryImageReferenceId;
            resourceInputs["hyperVGeneration"] = state?.hyperVGeneration;
            resourceInputs["imageReferenceId"] = state?.imageReferenceId;
            resourceInputs["location"] = state?.location;
            resourceInputs["logicalSectorSize"] = state?.logicalSectorSize;
            resourceInputs["maxShares"] = state?.maxShares;
            resourceInputs["name"] = state?.name;
            resourceInputs["networkAccessPolicy"] = state?.networkAccessPolicy;
            resourceInputs["onDemandBurstingEnabled"] = state?.onDemandBurstingEnabled;
            resourceInputs["optimizedFrequentAttachEnabled"] = state?.optimizedFrequentAttachEnabled;
            resourceInputs["osType"] = state?.osType;
            resourceInputs["performancePlusEnabled"] = state?.performancePlusEnabled;
            resourceInputs["publicNetworkAccessEnabled"] = state?.publicNetworkAccessEnabled;
            resourceInputs["resourceGroupName"] = state?.resourceGroupName;
            resourceInputs["secureVmDiskEncryptionSetId"] = state?.secureVmDiskEncryptionSetId;
            resourceInputs["securityType"] = state?.securityType;
            resourceInputs["sourceResourceId"] = state?.sourceResourceId;
            resourceInputs["sourceUri"] = state?.sourceUri;
            resourceInputs["storageAccountId"] = state?.storageAccountId;
            resourceInputs["storageAccountType"] = state?.storageAccountType;
            resourceInputs["tags"] = state?.tags;
            resourceInputs["tier"] = state?.tier;
            resourceInputs["trustedLaunchEnabled"] = state?.trustedLaunchEnabled;
            resourceInputs["uploadSizeBytes"] = state?.uploadSizeBytes;
            resourceInputs["zone"] = state?.zone;
        }
        else {
            const args = argsOrState;
            if (args?.createOption === undefined && !opts.urn) {
                throw new Error("Missing required property 'createOption'");
            }
            if (args?.resourceGroupName === undefined && !opts.urn) {
                throw new Error("Missing required property 'resourceGroupName'");
            }
            if (args?.storageAccountType === undefined && !opts.urn) {
                throw new Error("Missing required property 'storageAccountType'");
            }
            resourceInputs["createOption"] = args?.createOption;
            resourceInputs["diskAccessId"] = args?.diskAccessId;
            resourceInputs["diskEncryptionSetId"] = args?.diskEncryptionSetId;
            resourceInputs["diskIopsReadOnly"] = args?.diskIopsReadOnly;
            resourceInputs["diskIopsReadWrite"] = args?.diskIopsReadWrite;
            resourceInputs["diskMbpsReadOnly"] = args?.diskMbpsReadOnly;
            resourceInputs["diskMbpsReadWrite"] = args?.diskMbpsReadWrite;
            resourceInputs["diskSizeGb"] = args?.diskSizeGb;
            resourceInputs["edgeZone"] = args?.edgeZone;
            resourceInputs["encryptionSettings"] = args?.encryptionSettings;
            resourceInputs["galleryImageReferenceId"] = args?.galleryImageReferenceId;
            resourceInputs["hyperVGeneration"] = args?.hyperVGeneration;
            resourceInputs["imageReferenceId"] = args?.imageReferenceId;
            resourceInputs["location"] = args?.location;
            resourceInputs["logicalSectorSize"] = args?.logicalSectorSize;
            resourceInputs["maxShares"] = args?.maxShares;
            resourceInputs["name"] = args?.name;
            resourceInputs["networkAccessPolicy"] = args?.networkAccessPolicy;
            resourceInputs["onDemandBurstingEnabled"] = args?.onDemandBurstingEnabled;
            resourceInputs["optimizedFrequentAttachEnabled"] = args?.optimizedFrequentAttachEnabled;
            resourceInputs["osType"] = args?.osType;
            resourceInputs["performancePlusEnabled"] = args?.performancePlusEnabled;
            resourceInputs["publicNetworkAccessEnabled"] = args?.publicNetworkAccessEnabled;
            resourceInputs["resourceGroupName"] = args?.resourceGroupName;
            resourceInputs["secureVmDiskEncryptionSetId"] = args?.secureVmDiskEncryptionSetId;
            resourceInputs["securityType"] = args?.securityType;
            resourceInputs["sourceResourceId"] = args?.sourceResourceId;
            resourceInputs["sourceUri"] = args?.sourceUri;
            resourceInputs["storageAccountId"] = args?.storageAccountId;
            resourceInputs["storageAccountType"] = args?.storageAccountType;
            resourceInputs["tags"] = args?.tags;
            resourceInputs["tier"] = args?.tier;
            resourceInputs["trustedLaunchEnabled"] = args?.trustedLaunchEnabled;
            resourceInputs["uploadSizeBytes"] = args?.uploadSizeBytes;
            resourceInputs["zone"] = args?.zone;
        }
        opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
        super(ManagedDisk.__pulumiType, name, resourceInputs, opts);
    }
}
exports.ManagedDisk = ManagedDisk;
//# sourceMappingURL=managedDisk.js.map