@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 16.2 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
import * as enums from "../types/enums";
/**
* Disk resource.
*
* Uses Azure REST API version 2024-03-02. In version 2.x of the Azure Native provider, it used API version 2022-07-02.
*
* Other available API versions: 2022-07-02, 2023-01-02, 2023-04-02, 2023-10-02, 2025-01-02. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native compute [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare class Disk extends pulumi.CustomResource {
/**
* Get an existing Disk 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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Disk;
/**
* Returns true if the given object is an instance of Disk. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Disk;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
*/
readonly burstingEnabled: pulumi.Output<boolean | undefined>;
/**
* Latest time when bursting was last enabled on a disk.
*/
readonly burstingEnabledTime: pulumi.Output<string>;
/**
* Percentage complete for the background copy when a resource is created via the CopyStart operation.
*/
readonly completionPercent: pulumi.Output<number | undefined>;
/**
* Disk source information. CreationData information cannot be changed after the disk has been created.
*/
readonly creationData: pulumi.Output<outputs.compute.CreationDataResponse>;
/**
* Additional authentication requirements when exporting or uploading to a disk or snapshot.
*/
readonly dataAccessAuthMode: pulumi.Output<string | undefined>;
/**
* ARM id of the DiskAccess resource for using private endpoints on disks.
*/
readonly diskAccessId: pulumi.Output<string | undefined>;
/**
* The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
*/
readonly diskIOPSReadOnly: pulumi.Output<number | undefined>;
/**
* The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
*/
readonly diskIOPSReadWrite: pulumi.Output<number | undefined>;
/**
* The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
*/
readonly diskMBpsReadOnly: pulumi.Output<number | undefined>;
/**
* The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
*/
readonly diskMBpsReadWrite: pulumi.Output<number | undefined>;
/**
* The size of the disk in bytes. This field is read only.
*/
readonly diskSizeBytes: pulumi.Output<number>;
/**
* If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
*/
readonly diskSizeGB: pulumi.Output<number | undefined>;
/**
* The state of the disk.
*/
readonly diskState: pulumi.Output<string>;
/**
* Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
*/
readonly encryption: pulumi.Output<outputs.compute.EncryptionResponse | undefined>;
/**
* Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
*/
readonly encryptionSettingsCollection: pulumi.Output<outputs.compute.EncryptionSettingsCollectionResponse | undefined>;
/**
* The extended location where the disk will be created. Extended location cannot be changed.
*/
readonly extendedLocation: pulumi.Output<outputs.compute.ExtendedLocationResponse | undefined>;
/**
* The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
*/
readonly hyperVGeneration: pulumi.Output<string | undefined>;
/**
* The UTC time when the ownership state of the disk was last changed i.e., the time the disk was last attached or detached from a VM or the time when the VM to which the disk was attached was deallocated or started.
*/
readonly lastOwnershipUpdateTime: pulumi.Output<string>;
/**
* The geo-location where the resource lives
*/
readonly location: pulumi.Output<string>;
/**
* A relative URI containing the ID of the VM that has the disk attached.
*/
readonly managedBy: pulumi.Output<string>;
/**
* List of relative URIs containing the IDs of the VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
*/
readonly managedByExtended: pulumi.Output<string[]>;
/**
* The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
*/
readonly maxShares: pulumi.Output<number | undefined>;
/**
* The name of the resource
*/
readonly name: pulumi.Output<string>;
/**
* Policy for accessing the disk via network.
*/
readonly networkAccessPolicy: pulumi.Output<string | undefined>;
/**
* Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.
*/
readonly optimizedForFrequentAttach: pulumi.Output<boolean | undefined>;
/**
* The Operating System type.
*/
readonly osType: pulumi.Output<string | undefined>;
/**
* Properties of the disk for which update is pending.
*/
readonly propertyUpdatesInProgress: pulumi.Output<outputs.compute.PropertyUpdatesInProgressResponse>;
/**
* The disk provisioning state.
*/
readonly provisioningState: pulumi.Output<string>;
/**
* Policy for controlling export on the disk.
*/
readonly publicNetworkAccess: pulumi.Output<string | undefined>;
/**
* Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
*/
readonly purchasePlan: pulumi.Output<outputs.compute.DiskPurchasePlanResponse | undefined>;
/**
* Contains the security related information for the resource.
*/
readonly securityProfile: pulumi.Output<outputs.compute.DiskSecurityProfileResponse | undefined>;
/**
* Details of the list of all VMs that have the disk attached. maxShares should be set to a value greater than one for disks to allow attaching them to multiple VMs.
*/
readonly shareInfo: pulumi.Output<outputs.compute.ShareInfoElementResponse[]>;
/**
* The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.
*/
readonly sku: pulumi.Output<outputs.compute.DiskSkuResponse | undefined>;
/**
* List of supported capabilities for the image from which the OS disk was created.
*/
readonly supportedCapabilities: pulumi.Output<outputs.compute.SupportedCapabilitiesResponse | undefined>;
/**
* Indicates the OS on a disk supports hibernation.
*/
readonly supportsHibernation: pulumi.Output<boolean | undefined>;
/**
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
readonly systemData: pulumi.Output<outputs.compute.SystemDataResponse>;
/**
* Resource tags.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
*/
readonly tier: pulumi.Output<string | undefined>;
/**
* The time when the disk was created.
*/
readonly timeCreated: pulumi.Output<string>;
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*/
readonly type: pulumi.Output<string>;
/**
* Unique Guid identifying the resource.
*/
readonly uniqueId: pulumi.Output<string>;
/**
* The Logical zone list for Disk.
*/
readonly zones: pulumi.Output<string[] | undefined>;
/**
* Create a Disk resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: DiskArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a Disk resource.
*/
export interface DiskArgs {
/**
* Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
*/
burstingEnabled?: pulumi.Input<boolean>;
/**
* Percentage complete for the background copy when a resource is created via the CopyStart operation.
*/
completionPercent?: pulumi.Input<number>;
/**
* Disk source information. CreationData information cannot be changed after the disk has been created.
*/
creationData: pulumi.Input<inputs.compute.CreationDataArgs>;
/**
* Additional authentication requirements when exporting or uploading to a disk or snapshot.
*/
dataAccessAuthMode?: pulumi.Input<string | enums.compute.DataAccessAuthMode>;
/**
* ARM id of the DiskAccess resource for using private endpoints on disks.
*/
diskAccessId?: pulumi.Input<string>;
/**
* The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.
*/
diskIOPSReadOnly?: pulumi.Input<number>;
/**
* The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
*/
diskIOPSReadWrite?: pulumi.Input<number>;
/**
* The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
*/
diskMBpsReadOnly?: pulumi.Input<number>;
/**
* The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
*/
diskMBpsReadWrite?: pulumi.Input<number>;
/**
* The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters.
*/
diskName?: pulumi.Input<string>;
/**
* If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
*/
diskSizeGB?: pulumi.Input<number>;
/**
* Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
*/
encryption?: pulumi.Input<inputs.compute.EncryptionArgs>;
/**
* Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
*/
encryptionSettingsCollection?: pulumi.Input<inputs.compute.EncryptionSettingsCollectionArgs>;
/**
* The extended location where the disk will be created. Extended location cannot be changed.
*/
extendedLocation?: pulumi.Input<inputs.compute.ExtendedLocationArgs>;
/**
* The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
*/
hyperVGeneration?: pulumi.Input<string | enums.compute.HyperVGeneration>;
/**
* The geo-location where the resource lives
*/
location?: pulumi.Input<string>;
/**
* The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.
*/
maxShares?: pulumi.Input<number>;
/**
* Policy for accessing the disk via network.
*/
networkAccessPolicy?: pulumi.Input<string | enums.compute.NetworkAccessPolicy>;
/**
* Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.
*/
optimizedForFrequentAttach?: pulumi.Input<boolean>;
/**
* The Operating System type.
*/
osType?: pulumi.Input<enums.compute.OperatingSystemTypes>;
/**
* Policy for controlling export on the disk.
*/
publicNetworkAccess?: pulumi.Input<string | enums.compute.PublicNetworkAccess>;
/**
* Purchase plan information for the the image from which the OS disk was created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: WindowsServer}
*/
purchasePlan?: pulumi.Input<inputs.compute.DiskPurchasePlanArgs>;
/**
* The name of the resource group. The name is case insensitive.
*/
resourceGroupName: pulumi.Input<string>;
/**
* Contains the security related information for the resource.
*/
securityProfile?: pulumi.Input<inputs.compute.DiskSecurityProfileArgs>;
/**
* The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.
*/
sku?: pulumi.Input<inputs.compute.DiskSkuArgs>;
/**
* List of supported capabilities for the image from which the OS disk was created.
*/
supportedCapabilities?: pulumi.Input<inputs.compute.SupportedCapabilitiesArgs>;
/**
* Indicates the OS on a disk supports hibernation.
*/
supportsHibernation?: pulumi.Input<boolean>;
/**
* Resource tags.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.
*/
tier?: pulumi.Input<string>;
/**
* The Logical zone list for Disk.
*/
zones?: pulumi.Input<pulumi.Input<string>[]>;
}