Class Disk
Disk resource.
Namespace: System.Dynamic.ExpandoObject
Assembly: Microsoft.Azure.Management.Compute.dll
Syntax
[Microsoft.Rest.Serialization.JsonTransformation]
public class Disk : Microsoft.Azure.Management.Compute.Models.Resource
Constructors
Disk()
Initializes a new instance of the Disk class.
Declaration
public Disk ();
Disk(String, CreationData, String, String, String, IDictionary<String,String>, String, DiskSku, IList<String>, Nullable<DateTime>, Nullable<OperatingSystemTypes>, String, Nullable<Int32>, Nullable<Int64>, String, EncryptionSettingsCollection, String, Nullable<Int64>, Nullable<Int32>, String)
Initializes a new instance of the Disk class.
Declaration
public Disk (string location, Microsoft.Azure.Management.Compute.Models.CreationData creationData, string id = null, string name = null, string type = null, System.Collections.Generic.IDictionary<string,string> tags = null, string managedBy = null, Microsoft.Azure.Management.Compute.Models.DiskSku sku = null, System.Collections.Generic.IList<string> zones = null, Nullable<DateTime> timeCreated = null, Nullable<Microsoft.Azure.Management.Compute.Models.OperatingSystemTypes> osType = null, string hyperVGeneration = null, Nullable<int> diskSizeGB = null, Nullable<long> diskSizeBytes = null, string uniqueId = null, Microsoft.Azure.Management.Compute.Models.EncryptionSettingsCollection encryptionSettingsCollection = null, string provisioningState = null, Nullable<long> diskIOPSReadWrite = null, Nullable<int> diskMBpsReadWrite = null, string diskState = null);
Parameters
|
String
location
Resource location |
|
CreationData
creationData
Disk source information. CreationData information cannot be changed after the disk has been created. |
|
String
id
Resource Id |
|
String
name
Resource name |
|
String
type
Resource type |
|
IDictionary<String,String>
tags
Resource tags |
|
String
managedBy
A relative URI containing the ID of the VM that has the disk attached. |
|
DiskSku
sku
|
|
IList<String>
zones
The Logical zone list for Disk. |
|
Nullable<DateTime>
timeCreated
The time when the disk was created. |
|
Nullable<OperatingSystemTypes>
osType
The Operating System type. Possible values include: 'Windows', 'Linux' |
|
String
hyperVGeneration
The hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2' |
|
Nullable<Int32>
diskSizeGB
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. |
|
Nullable<Int64>
diskSizeBytes
The size of the disk in bytes. This field is read only. |
|
String
uniqueId
Unique Guid identifying the resource. |
|
EncryptionSettingsCollection
encryptionSettingsCollection
Encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot. |
|
String
provisioningState
The disk provisioning state. |
|
Nullable<Int64>
diskIOPSReadWrite
The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes. |
|
Nullable<Int32>
diskMBpsReadWrite
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. |
|
String
diskState
The state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload' |
Properties
CreationData
Gets or sets disk source information. CreationData information cannot be changed after the disk has been created.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.creationData")]
public Microsoft.Azure.Management.Compute.Models.CreationData CreationData { get; set; }
Property Value
|
CreationData
|
DiskIOPSReadWrite
Gets or sets the number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.diskIOPSReadWrite")]
public Nullable<long> DiskIOPSReadWrite { get; set; }
Property Value
|
Nullable<Int64>
|
DiskMBpsReadWrite
Gets or sets 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.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.diskMBpsReadWrite")]
public Nullable<int> DiskMBpsReadWrite { get; set; }
Property Value
|
Nullable<Int32>
|
DiskSizeBytes
Gets the size of the disk in bytes. This field is read only.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.diskSizeBytes")]
public Nullable<long> DiskSizeBytes { get; }
Property Value
|
Nullable<Int64>
|
DiskSizeGB
Gets or sets 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.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.diskSizeGB")]
public Nullable<int> DiskSizeGB { get; set; }
Property Value
|
Nullable<Int32>
|
DiskState
Gets the state of the disk. Possible values include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS', 'ReadyToUpload', 'ActiveUpload'
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.diskState")]
public string DiskState { get; }
Property Value
|
String
|
EncryptionSettingsCollection
Gets or sets encryption settings collection used for Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.encryptionSettingsCollection")]
public Microsoft.Azure.Management.Compute.Models.EncryptionSettingsCollection EncryptionSettingsCollection { get; set; }
Property Value
|
EncryptionSettingsCollection
|
HyperVGeneration
Gets or sets the hypervisor generation of the Virtual Machine. Applicable to OS disks only. Possible values include: 'V1', 'V2'
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.hyperVGeneration")]
public string HyperVGeneration { get; set; }
Property Value
|
String
|
ManagedBy
Gets a relative URI containing the ID of the VM that has the disk attached.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="managedBy")]
public string ManagedBy { get; }
Property Value
|
String
|
OsType
Gets or sets the Operating System type. Possible values include: 'Windows', 'Linux'
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.osType")]
public Nullable<Microsoft.Azure.Management.Compute.Models.OperatingSystemTypes> OsType { get; set; }
Property Value
|
Nullable<OperatingSystemTypes>
|
ProvisioningState
Gets the disk provisioning state.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.provisioningState")]
public string ProvisioningState { get; }
Property Value
|
String
|
Sku
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="sku")]
public Microsoft.Azure.Management.Compute.Models.DiskSku Sku { get; set; }
Property Value
|
DiskSku
|
TimeCreated
Gets the time when the disk was created.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.timeCreated")]
public Nullable<DateTime> TimeCreated { get; }
Property Value
|
Nullable<DateTime>
|
UniqueId
Gets unique Guid identifying the resource.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="properties.uniqueId")]
public string UniqueId { get; }
Property Value
|
String
|
Zones
Gets or sets the Logical zone list for Disk.
Declaration
[Newtonsoft.Json.JsonProperty(PropertyName="zones")]
public System.Collections.Generic.IList<string> Zones { get; set; }
Property Value
|
IList<String>
|
Methods
Validate()
Validate the object.
Declaration
public override void Validate ();
Exceptions
|
ValidationException
Thrown if validation fails |