Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ internal DiskEncryptionSetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "diskEncryptionSetName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -367,7 +367,7 @@ internal DiskEncryptionSetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -545,7 +545,7 @@ internal DiskEncryptionSetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -750,7 +750,7 @@ internal DiskEncryptionSetsOperations(ComputeManagementClient client)
{
diskEncryptionSet.Validate();
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -980,7 +980,7 @@ internal DiskEncryptionSetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "diskEncryptionSet");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1199,7 +1199,7 @@ internal DiskEncryptionSetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "diskEncryptionSetName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ internal DisksOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "diskName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -361,7 +361,7 @@ internal DisksOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -539,7 +539,7 @@ internal DisksOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -793,7 +793,7 @@ internal DisksOperations(ComputeManagementClient client)
{
disk.Validate();
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1021,7 +1021,7 @@ internal DisksOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "disk");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1239,7 +1239,7 @@ internal DisksOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "diskName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1428,7 +1428,7 @@ internal DisksOperations(ComputeManagementClient client)
{
grantAccessData.Validate();
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1628,7 +1628,7 @@ internal DisksOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "diskName");
}
string apiVersion = "2019-07-01";
string apiVersion = "2019-11-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace Microsoft.Azure.Management.Compute
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Azure.OData;
using Models;
using System.Collections;
using System.Collections.Generic;
Expand Down Expand Up @@ -74,8 +73,12 @@ public partial interface IVirtualMachineImagesOperations
/// <param name='skus'>
/// A valid image SKU.
/// </param>
/// <param name='odataQuery'>
/// OData parameters to apply to the operation.
/// <param name='expand'>
/// The expand expression to apply on the operation.
/// </param>
/// <param name='top'>
/// </param>
/// <param name='orderby'>
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand All @@ -92,7 +95,7 @@ public partial interface IVirtualMachineImagesOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IList<VirtualMachineImageResource>>> ListWithHttpMessagesAsync(string location, string publisherName, string offer, string skus, ODataQuery<VirtualMachineImageResource> odataQuery = default(ODataQuery<VirtualMachineImageResource>), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<IList<VirtualMachineImageResource>>> ListWithHttpMessagesAsync(string location, string publisherName, string offer, string skus, string expand = default(string), int? top = default(int?), string orderby = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Gets a list of virtual machine image offers for the specified
/// location and publisher.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public CreationData()
/// The Azure Resource Manager identifier of the storage account
/// containing the blob to import as a disk.</param>
/// <param name="imageReference">Disk source information.</param>
/// <param name="galleryImageReference">Required if creating from a
/// Gallery Image. The id of the ImageDiskReference will be the ARM id
/// of the shared galley image version from which to create a
/// disk.</param>
/// <param name="sourceUri">If createOption is Import, this is the URI
/// of a blob to be imported into a managed disk.</param>
/// <param name="sourceResourceId">If createOption is Copy, this is the
Expand All @@ -48,11 +52,12 @@ public CreationData()
/// This value should be between 20972032 (20 MiB + 512 bytes for the
/// VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the
/// VHD footer).</param>
public CreationData(string createOption, string storageAccountId = default(string), ImageDiskReference imageReference = default(ImageDiskReference), string sourceUri = default(string), string sourceResourceId = default(string), string sourceUniqueId = default(string), long? uploadSizeBytes = default(long?))
public CreationData(string createOption, string storageAccountId = default(string), ImageDiskReference imageReference = default(ImageDiskReference), ImageDiskReference galleryImageReference = default(ImageDiskReference), string sourceUri = default(string), string sourceResourceId = default(string), string sourceUniqueId = default(string), long? uploadSizeBytes = default(long?))
{
CreateOption = createOption;
StorageAccountId = storageAccountId;
ImageReference = imageReference;
GalleryImageReference = galleryImageReference;
SourceUri = sourceUri;
SourceResourceId = sourceResourceId;
SourceUniqueId = sourceUniqueId;
Expand Down Expand Up @@ -87,6 +92,14 @@ public CreationData()
[JsonProperty(PropertyName = "imageReference")]
public ImageDiskReference ImageReference { get; set; }

/// <summary>
/// Gets or sets required if creating from a Gallery Image. The id of
/// the ImageDiskReference will be the ARM id of the shared galley
/// image version from which to create a disk.
/// </summary>
[JsonProperty(PropertyName = "galleryImageReference")]
public ImageDiskReference GalleryImageReference { get; set; }

/// <summary>
/// Gets or sets if createOption is Import, this is the URI of a blob
/// to be imported into a managed disk.
Expand Down Expand Up @@ -133,6 +146,10 @@ public virtual void Validate()
{
ImageReference.Validate();
}
if (GalleryImageReference != null)
{
GalleryImageReference.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public Disk()
/// <param name="tags">Resource tags</param>
/// <param name="managedBy">A relative URI containing the ID of the VM
/// that has the disk attached.</param>
/// <param name="managedByExtended">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.</param>
/// <param name="zones">The Logical zone list for Disk.</param>
/// <param name="timeCreated">The time when the disk was
/// created.</param>
Expand Down Expand Up @@ -74,16 +78,30 @@ public Disk()
/// disk; only settable for UltraSSD disks. MBps means millions of
/// bytes per second - MB here uses the ISO notation, of powers of
/// 10.</param>
/// <param name="diskIOPSReadOnly">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.</param>
/// <param name="diskMBpsReadOnly">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.</param>
/// <param name="diskState">The state of the disk. Possible values
/// include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS',
/// 'ReadyToUpload', 'ActiveUpload'</param>
/// <param name="encryption">Encryption property can be used to encrypt
/// data at rest with customer managed keys or platform managed
/// keys.</param>
public Disk(string location, CreationData creationData, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string managedBy = default(string), DiskSku sku = default(DiskSku), IList<string> zones = default(IList<string>), System.DateTime? timeCreated = default(System.DateTime?), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), int? diskSizeGB = default(int?), long? diskSizeBytes = default(long?), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), long? diskIOPSReadWrite = default(long?), int? diskMBpsReadWrite = default(int?), string diskState = default(string), Encryption encryption = default(Encryption))
/// <param name="maxShares">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.</param>
/// <param name="shareInfo">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.</param>
public Disk(string location, CreationData creationData, string id = default(string), string name = default(string), string type = default(string), IDictionary<string, string> tags = default(IDictionary<string, string>), string managedBy = default(string), IList<string> managedByExtended = default(IList<string>), DiskSku sku = default(DiskSku), IList<string> zones = default(IList<string>), System.DateTime? timeCreated = default(System.DateTime?), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), int? diskSizeGB = default(int?), long? diskSizeBytes = default(long?), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), long? diskIOPSReadWrite = default(long?), long? diskMBpsReadWrite = default(long?), long? diskIOPSReadOnly = default(long?), long? diskMBpsReadOnly = default(long?), string diskState = default(string), Encryption encryption = default(Encryption), int? maxShares = default(int?), IList<ShareInfoElement> shareInfo = default(IList<ShareInfoElement>))
: base(location, id, name, type, tags)
{
ManagedBy = managedBy;
ManagedByExtended = managedByExtended;
Sku = sku;
Zones = zones;
TimeCreated = timeCreated;
Expand All @@ -97,8 +115,12 @@ public Disk()
ProvisioningState = provisioningState;
DiskIOPSReadWrite = diskIOPSReadWrite;
DiskMBpsReadWrite = diskMBpsReadWrite;
DiskIOPSReadOnly = diskIOPSReadOnly;
DiskMBpsReadOnly = diskMBpsReadOnly;
DiskState = diskState;
Encryption = encryption;
MaxShares = maxShares;
ShareInfo = shareInfo;
CustomInit();
}

Expand All @@ -114,6 +136,14 @@ public Disk()
[JsonProperty(PropertyName = "managedBy")]
public string ManagedBy { get; private set; }

/// <summary>
/// Gets 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.
/// </summary>
[JsonProperty(PropertyName = "managedByExtended")]
public IList<string> ManagedByExtended { get; private set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "sku")]
Expand Down Expand Up @@ -202,7 +232,24 @@ public Disk()
/// uses the ISO notation, of powers of 10.
/// </summary>
[JsonProperty(PropertyName = "properties.diskMBpsReadWrite")]
public int? DiskMBpsReadWrite { get; set; }
public long? DiskMBpsReadWrite { get; set; }

/// <summary>
/// Gets or sets 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.
/// </summary>
[JsonProperty(PropertyName = "properties.diskIOPSReadOnly")]
public long? DiskIOPSReadOnly { get; set; }

/// <summary>
/// Gets or sets 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.
/// </summary>
[JsonProperty(PropertyName = "properties.diskMBpsReadOnly")]
public long? DiskMBpsReadOnly { get; set; }

/// <summary>
/// Gets the state of the disk. Possible values include: 'Unattached',
Expand All @@ -219,6 +266,22 @@ public Disk()
[JsonProperty(PropertyName = "properties.encryption")]
public Encryption Encryption { get; set; }

/// <summary>
/// Gets or sets 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.
/// </summary>
[JsonProperty(PropertyName = "properties.maxShares")]
public int? MaxShares { get; set; }

/// <summary>
/// Gets 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.
/// </summary>
[JsonProperty(PropertyName = "properties.shareInfo")]
public IList<ShareInfoElement> ShareInfo { get; private set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand All @@ -240,10 +303,6 @@ public override void Validate()
{
EncryptionSettingsCollection.Validate();
}
if (Encryption != null)
{
Encryption.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static class DiskCreateOption
public const string Attach = "Attach";
/// <summary>
/// Create a new disk from a platform image specified by the given
/// imageReference.
/// imageReference or galleryImageReference.
/// </summary>
public const string FromImage = "FromImage";
/// <summary>
Expand Down
Loading