Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compute] Upgrading the diskrp sdk to use version 2019-03-01 #7363

Merged
merged 4 commits into from
Aug 23, 2019
Merged
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
6 changes: 3 additions & 3 deletions eng/mgmt/mgmtmetadata/compute_resource-manager.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=E:\hylee-sdk\august2\sdk
2019-08-16 17:57:42 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\Users\jopolloc\codebase\azure-sdk-for-net\sdk
2019-08-23 03:36:40 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 23326b92394ef630c59833f27e512544162ef4dd
Commit: 86796b0f17d82b046fddbc7cce463a159774f6d6
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-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 = "2018-09-30";
string apiVersion = "2019-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.Compute.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Specifies the billing related details of a low priority VM or VMSS.
/// &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-01.
/// </summary>
public partial class BillingProfile
{
/// <summary>
/// Initializes a new instance of the BillingProfile class.
/// </summary>
public BillingProfile()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the BillingProfile class.
/// </summary>
/// <param name="maxPrice">Specifies the maximum price you are willing
/// to pay for a low priority VM/VMSS. This price is in US Dollars.
/// &lt;br&gt;&lt;br&gt; This price will be compared with the current
/// low priority price for the VM size. Also, the prices are compared
/// at the time of create/update of low priority VM/VMSS and the
/// operation will only succeed if the maxPrice is greater than the
/// current low priority price. &lt;br&gt;&lt;br&gt; The maxPrice will
/// also be used for evicting a low priority VM/VMSS if the current low
/// priority price goes beyond the maxPrice after creation of VM/VMSS.
/// &lt;br&gt;&lt;br&gt; Possible values are: &lt;br&gt;&lt;br&gt; -
/// Any decimal value greater than zero. Example: $0.01538
/// &lt;br&gt;&lt;br&gt; -1 – indicates default price to be up-to
/// on-demand. &lt;br&gt;&lt;br&gt; You can set the maxPrice to -1 to
/// indicate that the low priority VM/VMSS should not be evicted for
/// price reasons. Also, the default max price is -1 if it is not
/// provided by you. &lt;br&gt;&lt;br&gt;Minimum api-version:
/// 2019-03-01.</param>
public BillingProfile(double? maxPrice = default(double?))
{
MaxPrice = maxPrice;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets specifies the maximum price you are willing to pay for
/// a low priority VM/VMSS. This price is in US Dollars.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; This price will be compared
/// with the current low priority price for the VM size. Also, the
/// prices are compared at the time of create/update of low priority
/// VM/VMSS and the operation will only succeed if the maxPrice is
/// greater than the current low priority price.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; The maxPrice will also be used
/// for evicting a low priority VM/VMSS if the current low priority
/// price goes beyond the maxPrice after creation of VM/VMSS.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; Possible values are:
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; - Any decimal value greater
/// than zero. Example: $0.01538 &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
/// -1 – indicates default price to be up-to on-demand.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt; You can set the maxPrice to -1
/// to indicate that the low priority VM/VMSS should not be evicted for
/// price reasons. Also, the default max price is -1 if it is not
/// provided by you. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Minimum
/// api-version: 2019-03-01.
/// </summary>
[JsonProperty(PropertyName = "maxPrice")]
public double? MaxPrice { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,22 @@ public CreationData()
/// of a blob to be imported into a managed disk.</param>
/// <param name="sourceResourceId">If createOption is Copy, this is the
/// ARM id of the source snapshot or disk.</param>
public CreationData(string createOption, string storageAccountId = default(string), ImageDiskReference imageReference = default(ImageDiskReference), string sourceUri = default(string), string sourceResourceId = default(string))
/// <param name="sourceUniqueId">If this field is set, this is the
/// unique id identifying the source of this resource.</param>
/// <param name="uploadSizeBytes">If createOption is Upload, this is
/// the size of the contents of the upload including the VHD footer.
/// 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?))
{
CreateOption = createOption;
StorageAccountId = storageAccountId;
ImageReference = imageReference;
SourceUri = sourceUri;
SourceResourceId = sourceResourceId;
SourceUniqueId = sourceUniqueId;
UploadSizeBytes = uploadSizeBytes;
CustomInit();
}

Expand Down Expand Up @@ -93,6 +102,22 @@ public CreationData()
[JsonProperty(PropertyName = "sourceResourceId")]
public string SourceResourceId { get; set; }

/// <summary>
/// Gets if this field is set, this is the unique id identifying the
/// source of this resource.
/// </summary>
[JsonProperty(PropertyName = "sourceUniqueId")]
public string SourceUniqueId { get; private set; }

/// <summary>
/// Gets or sets if createOption is Upload, this is the size of the
/// contents of the upload including the VHD footer. 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).
/// </summary>
[JsonProperty(PropertyName = "uploadSizeBytes")]
public long? UploadSizeBytes { get; set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ public Disk()
/// Virtual Machine. Applicable to OS disks only. Possible values
/// include: 'V1', 'V2'</param>
/// <param name="diskSizeGB">If creationData.createOption is Empty,
/// this field is mandatory and it indicates the size of the VHD to
/// 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.</param>
/// <param name="diskSizeBytes">The size of the disk in bytes. This
/// field is read only.</param>
/// <param name="uniqueId">Unique Guid identifying the
/// resource.</param>
/// <param name="encryptionSettingsCollection">Encryption settings
/// collection used for Azure Disk Encryption, can contain multiple
/// encryption settings per disk or snapshot.</param>
Expand All @@ -73,7 +77,7 @@ public Disk()
/// <param name="diskState">The state of the disk. Possible values
/// include: 'Unattached', 'Attached', 'Reserved', 'ActiveSAS',
/// 'ReadyToUpload', 'ActiveUpload'</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?), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), long? diskIOPSReadWrite = default(long?), int? diskMBpsReadWrite = default(int?), string diskState = default(string))
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))
: base(location, id, name, type, tags)
{
ManagedBy = managedBy;
Expand All @@ -84,6 +88,8 @@ public Disk()
HyperVGeneration = hyperVGeneration;
CreationData = creationData;
DiskSizeGB = diskSizeGB;
DiskSizeBytes = diskSizeBytes;
UniqueId = uniqueId;
EncryptionSettingsCollection = encryptionSettingsCollection;
ProvisioningState = provisioningState;
DiskIOPSReadWrite = diskIOPSReadWrite;
Expand Down Expand Up @@ -144,14 +150,26 @@ public Disk()

/// <summary>
/// Gets or sets if creationData.createOption is Empty, this field is
/// mandatory and it indicates the size of the VHD to create. If this
/// 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.
/// </summary>
[JsonProperty(PropertyName = "properties.diskSizeGB")]
public int? DiskSizeGB { get; set; }

/// <summary>
/// Gets the size of the disk in bytes. This field is read only.
/// </summary>
[JsonProperty(PropertyName = "properties.diskSizeBytes")]
public long? DiskSizeBytes { get; private set; }

/// <summary>
/// Gets unique Guid identifying the resource.
/// </summary>
[JsonProperty(PropertyName = "properties.uniqueId")]
public string UniqueId { get; private set; }

/// <summary>
/// Gets or sets encryption settings collection used for Azure Disk
/// Encryption, can contain multiple encryption settings per disk or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,37 @@ namespace Microsoft.Azure.Management.Compute.Models
/// </summary>
public static class DiskCreateOption
{
/// <summary>
/// Create an empty data disk of a size given by diskSizeGB.
/// </summary>
public const string Empty = "Empty";
/// <summary>
/// Disk will be attached to a VM.
/// </summary>
public const string Attach = "Attach";
/// <summary>
/// Create a new disk from a platform image specified by the given
/// imageReference.
/// </summary>
public const string FromImage = "FromImage";
/// <summary>
/// Create a disk by importing from a blob specified by a sourceUri in
/// a storage account specified by storageAccountId.
/// </summary>
public const string Import = "Import";
/// <summary>
/// Create a new disk or snapshot by copying from a disk or snapshot
/// specified by the given sourceResourceId.
/// </summary>
public const string Copy = "Copy";
/// <summary>
/// Create a new disk by copying from a backup recovery point.
/// </summary>
public const string Restore = "Restore";
/// <summary>
/// Create a new disk by obtaining a write token and using it to
/// directly upload the contents of the disk.
/// </summary>
public const string Upload = "Upload";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,31 @@ namespace Microsoft.Azure.Management.Compute.Models
/// </summary>
public static class DiskState
{
/// <summary>
/// The disk is not being used and can be attached to a VM.
/// </summary>
public const string Unattached = "Unattached";
/// <summary>
/// The disk is currently mounted to a running VM.
/// </summary>
public const string Attached = "Attached";
/// <summary>
/// The disk is mounted to a stopped-deallocated VM
/// </summary>
public const string Reserved = "Reserved";
/// <summary>
/// The disk currently has an Active SAS Uri associated with it.
/// </summary>
public const string ActiveSAS = "ActiveSAS";
/// <summary>
/// A disk is ready to be created by upload by requesting a write
/// token.
/// </summary>
public const string ReadyToUpload = "ReadyToUpload";
/// <summary>
/// A disk is created for upload and a write token has been issued for
/// uploading to it.
/// </summary>
public const string ActiveUpload = "ActiveUpload";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,26 @@ namespace Microsoft.Azure.Management.Compute.Models
/// </summary>
public static class DiskStorageAccountTypes
{
/// <summary>
/// Standard HDD locally redundant storage. Best for backup,
/// non-critical, and infrequent access.
/// </summary>
public const string StandardLRS = "Standard_LRS";
/// <summary>
/// Premium SSD locally redundant storage. Best for production and
/// performance sensitive workloads.
/// </summary>
public const string PremiumLRS = "Premium_LRS";
/// <summary>
/// Standard SSD locally redundant storage. Best for web servers,
/// lightly used enterprise applications and dev/test.
/// </summary>
public const string StandardSSDLRS = "StandardSSD_LRS";
/// <summary>
/// Ultra SSD locally redundant storage. Best for IO-intensive
/// workloads such as SAP HANA, top tier databases (for example, SQL,
/// Oracle), and other transaction-heavy workloads.
/// </summary>
public const string UltraSSDLRS = "UltraSSD_LRS";
}
}
Loading