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

[ReleasePR Microsoft.Azure.Management.Compute] Add encryption in DiskUpdateProperties and SnapshotUpdateProperties #9126

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 @@ -261,7 +261,12 @@ public partial interface IVirtualMachinesOperations
/// <summary>
/// Sets the OS state of the virtual machine to generalized. It is
/// recommended to sysprep the virtual machine before performing this
/// operation
/// operation. &lt;br&gt;For Windows, please refer to [Create a managed
/// image of a generalized VM in
/// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For
/// Linux, please refer to [How to create an image of a virtual machine
/// or
/// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ public CreationData()
/// <param name="createOption">This enumerates the possible sources of
/// a disk's creation. Possible values include: 'Empty', 'Attach',
/// 'FromImage', 'Import', 'Copy', 'Restore', 'Upload'</param>
/// <param name="storageAccountId">If createOption is Import, the Azure
/// Resource Manager identifier of the storage account containing the
/// blob to import as a disk. Required only if the blob is in a
/// different subscription</param>
/// <param name="storageAccountId">Required if createOption is Import.
/// 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="sourceUri">If createOption is Import, this is the URI
/// of a blob to be imported into a managed disk.</param>
Expand Down Expand Up @@ -75,9 +74,9 @@ public CreationData()
public string CreateOption { get; set; }

/// <summary>
/// Gets or sets if createOption is Import, the Azure Resource Manager
/// identifier of the storage account containing the blob to import as
/// a disk. Required only if the blob is in a different subscription
/// Gets or sets required if createOption is Import. The Azure Resource
/// Manager identifier of the storage account containing the blob to
/// import as a disk.
/// </summary>
[JsonProperty(PropertyName = "storageAccountId")]
public string StorageAccountId { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,18 @@ public DiskUpdate()
/// 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="encryption">Encryption property can be used to encrypt
/// data at rest with customer managed keys or platform managed
/// keys.</param>
/// <param name="tags">Resource tags</param>
public DiskUpdate(OperatingSystemTypes? osType = default(OperatingSystemTypes?), int? diskSizeGB = default(int?), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), long? diskIOPSReadWrite = default(long?), int? diskMBpsReadWrite = default(int?), IDictionary<string, string> tags = default(IDictionary<string, string>), DiskSku sku = default(DiskSku))
public DiskUpdate(OperatingSystemTypes? osType = default(OperatingSystemTypes?), int? diskSizeGB = default(int?), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), long? diskIOPSReadWrite = default(long?), int? diskMBpsReadWrite = default(int?), Encryption encryption = default(Encryption), IDictionary<string, string> tags = default(IDictionary<string, string>), DiskSku sku = default(DiskSku))
{
OsType = osType;
DiskSizeGB = diskSizeGB;
EncryptionSettingsCollection = encryptionSettingsCollection;
DiskIOPSReadWrite = diskIOPSReadWrite;
DiskMBpsReadWrite = diskMBpsReadWrite;
Encryption = encryption;
Tags = tags;
Sku = sku;
CustomInit();
Expand Down Expand Up @@ -111,6 +115,13 @@ public DiskUpdate()
[JsonProperty(PropertyName = "properties.diskMBpsReadWrite")]
public int? DiskMBpsReadWrite { get; set; }

/// <summary>
/// Gets or sets encryption property can be used to encrypt data at
/// rest with customer managed keys or platform managed keys.
/// </summary>
[JsonProperty(PropertyName = "properties.encryption")]
public Encryption Encryption { get; set; }

/// <summary>
/// Gets or sets resource tags
/// </summary>
Expand All @@ -134,6 +145,10 @@ public virtual void Validate()
{
EncryptionSettingsCollection.Validate();
}
if (Encryption != null)
{
Encryption.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ namespace Microsoft.Azure.Management.Compute.Models
[JsonConverter(typeof(StringEnumConverter))]
public enum OperatingSystemStateTypes
{
/// <summary>
/// Generalized image. Needs to be provisioned during deployment time.
/// </summary>
[EnumMember(Value = "Generalized")]
Generalized,
/// <summary>
/// Specialized image. Contains already provisioned OS Disk.
/// </summary>
[EnumMember(Value = "Specialized")]
Specialized
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ public SnapshotUpdate()
/// <param name="encryptionSettingsCollection">Encryption settings
/// collection used be Azure Disk Encryption, can contain multiple
/// encryption settings per disk or snapshot.</param>
/// <param name="encryption">Encryption property can be used to encrypt
/// data at rest with customer managed keys or platform managed
/// keys.</param>
/// <param name="tags">Resource tags</param>
public SnapshotUpdate(OperatingSystemTypes? osType = default(OperatingSystemTypes?), int? diskSizeGB = default(int?), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), IDictionary<string, string> tags = default(IDictionary<string, string>), SnapshotSku sku = default(SnapshotSku))
public SnapshotUpdate(OperatingSystemTypes? osType = default(OperatingSystemTypes?), int? diskSizeGB = default(int?), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), Encryption encryption = default(Encryption), IDictionary<string, string> tags = default(IDictionary<string, string>), SnapshotSku sku = default(SnapshotSku))
{
OsType = osType;
DiskSizeGB = diskSizeGB;
EncryptionSettingsCollection = encryptionSettingsCollection;
Encryption = encryption;
Tags = tags;
Sku = sku;
CustomInit();
Expand Down Expand Up @@ -86,6 +90,13 @@ public SnapshotUpdate()
[JsonProperty(PropertyName = "properties.encryptionSettingsCollection")]
public EncryptionSettingsCollection EncryptionSettingsCollection { get; set; }

/// <summary>
/// Gets or sets encryption property can be used to encrypt data at
/// rest with customer managed keys or platform managed keys.
/// </summary>
[JsonProperty(PropertyName = "properties.encryption")]
public Encryption Encryption { get; set; }

/// <summary>
/// Gets or sets resource tags
/// </summary>
Expand All @@ -109,6 +120,10 @@ public virtual void Validate()
{
EncryptionSettingsCollection.Validate();
}
if (Encryption != null)
{
Encryption.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ public VirtualMachine()
/// machine. &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-01.
/// Possible values include: 'Regular', 'Low', 'Spot'</param>
/// <param name="evictionPolicy">Specifies the eviction policy for the
/// Azure Spot virtual machine. Only supported value is 'Deallocate'.
/// &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-01. Possible
/// values include: 'Deallocate', 'Delete'</param>
/// Azure Spot virtual machine and Azure Spot scale set.
/// &lt;br&gt;&lt;br&gt;For Azure Spot virtual machines, the only
/// supported value is 'Deallocate' and the minimum api-version is
/// 2019-03-01. &lt;br&gt;&lt;br&gt;For Azure Spot scale sets, both
/// 'Deallocate' and 'Delete' are supported and the minimum api-version
/// is 2017-10-30-preview. Possible values include: 'Deallocate',
/// 'Delete'</param>
/// <param name="billingProfile">Specifies the billing related details
/// of a Azure Spot virtual machine. &lt;br&gt;&lt;br&gt;Minimum
/// api-version: 2019-03-01.</param>
Expand Down Expand Up @@ -263,9 +267,13 @@ public VirtualMachine()

/// <summary>
/// Gets or sets specifies the eviction policy for the Azure Spot
/// virtual machine. Only supported value is 'Deallocate'.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Minimum api-version:
/// 2019-03-01. Possible values include: 'Deallocate', 'Delete'
/// virtual machine and Azure Spot scale set.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For Azure Spot virtual
/// machines, the only supported value is 'Deallocate' and the minimum
/// api-version is 2019-03-01. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For
/// Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported
/// and the minimum api-version is 2017-10-30-preview. Possible values
/// include: 'Deallocate', 'Delete'
/// </summary>
[JsonProperty(PropertyName = "properties.evictionPolicy")]
public string EvictionPolicy { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ public VirtualMachineScaleSetVMProfile()
/// machines in the scale set. &lt;br&gt;&lt;br&gt;Minimum api-version:
/// 2017-10-30-preview. Possible values include: 'Regular', 'Low',
/// 'Spot'</param>
/// <param name="evictionPolicy">Specifies the eviction policy for
/// virtual machines in a Azure Spot scale set.
/// &lt;br&gt;&lt;br&gt;Minimum api-version: 2017-10-30-preview.
/// Possible values include: 'Deallocate', 'Delete'</param>
/// <param name="evictionPolicy">Specifies the eviction policy for the
/// Azure Spot virtual machine and Azure Spot scale set.
/// &lt;br&gt;&lt;br&gt;For Azure Spot virtual machines, the only
/// supported value is 'Deallocate' and the minimum api-version is
/// 2019-03-01. &lt;br&gt;&lt;br&gt;For Azure Spot scale sets, both
/// 'Deallocate' and 'Delete' are supported and the minimum api-version
/// is 2017-10-30-preview. Possible values include: 'Deallocate',
/// 'Delete'</param>
/// <param name="billingProfile">Specifies the billing related details
/// of a Azure Spot VMSS. &lt;br&gt;&lt;br&gt;Minimum api-version:
/// 2019-03-01.</param>
Expand Down Expand Up @@ -151,10 +155,14 @@ public VirtualMachineScaleSetVMProfile()
public string Priority { get; set; }

/// <summary>
/// Gets or sets specifies the eviction policy for virtual machines in
/// a Azure Spot scale set. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Minimum
/// api-version: 2017-10-30-preview. Possible values include:
/// 'Deallocate', 'Delete'
/// Gets or sets specifies the eviction policy for the Azure Spot
/// virtual machine and Azure Spot scale set.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For Azure Spot virtual
/// machines, the only supported value is 'Deallocate' and the minimum
/// api-version is 2019-03-01. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For
/// Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported
/// and the minimum api-version is 2017-10-30-preview. Possible values
/// include: 'Deallocate', 'Delete'
/// </summary>
[JsonProperty(PropertyName = "evictionPolicy")]
public string EvictionPolicy { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ public VirtualMachineUpdate()
/// machine. &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-01.
/// Possible values include: 'Regular', 'Low', 'Spot'</param>
/// <param name="evictionPolicy">Specifies the eviction policy for the
/// Azure Spot virtual machine. Only supported value is 'Deallocate'.
/// &lt;br&gt;&lt;br&gt;Minimum api-version: 2019-03-01. Possible
/// values include: 'Deallocate', 'Delete'</param>
/// Azure Spot virtual machine and Azure Spot scale set.
/// &lt;br&gt;&lt;br&gt;For Azure Spot virtual machines, the only
/// supported value is 'Deallocate' and the minimum api-version is
/// 2019-03-01. &lt;br&gt;&lt;br&gt;For Azure Spot scale sets, both
/// 'Deallocate' and 'Delete' are supported and the minimum api-version
/// is 2017-10-30-preview. Possible values include: 'Deallocate',
/// 'Delete'</param>
/// <param name="billingProfile">Specifies the billing related details
/// of a Azure Spot virtual machine. &lt;br&gt;&lt;br&gt;Minimum
/// api-version: 2019-03-01.</param>
Expand Down Expand Up @@ -259,9 +263,13 @@ public VirtualMachineUpdate()

/// <summary>
/// Gets or sets specifies the eviction policy for the Azure Spot
/// virtual machine. Only supported value is 'Deallocate'.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Minimum api-version:
/// 2019-03-01. Possible values include: 'Deallocate', 'Delete'
/// virtual machine and Azure Spot scale set.
/// &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For Azure Spot virtual
/// machines, the only supported value is 'Deallocate' and the minimum
/// api-version is 2019-03-01. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For
/// Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported
/// and the minimum api-version is 2017-10-30-preview. Possible values
/// include: 'Deallocate', 'Delete'
/// </summary>
[JsonProperty(PropertyName = "properties.evictionPolicy")]
public string EvictionPolicy { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,5 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_ComputeManageme
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4407";
public static readonly String AutoRestCmdExecuted = "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:\\GH\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "f57417493691c0d9a15440ffd7fdb4173bf7295c";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,12 @@ internal VirtualMachinesOperations(ComputeManagementClient client)

/// <summary>
/// Sets the OS state of the virtual machine to generalized. It is recommended
/// to sysprep the virtual machine before performing this operation
/// to sysprep the virtual machine before performing this operation.
/// &lt;br&gt;For Windows, please refer to [Create a managed image of a
/// generalized VM in
/// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For
/// Linux, please refer to [How to create an image of a virtual machine or
/// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
/// </summary>
/// <param name='resourceGroupName'>
/// The name of the resource group.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,12 @@ public static void Deallocate(this IVirtualMachinesOperations operations, string

/// <summary>
/// Sets the OS state of the virtual machine to generalized. It is recommended
/// to sysprep the virtual machine before performing this operation
/// to sysprep the virtual machine before performing this operation.
/// &lt;br&gt;For Windows, please refer to [Create a managed image of a
/// generalized VM in
/// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For
/// Linux, please refer to [How to create an image of a virtual machine or
/// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -424,7 +429,12 @@ public static void Generalize(this IVirtualMachinesOperations operations, string

/// <summary>
/// Sets the OS state of the virtual machine to generalized. It is recommended
/// to sysprep the virtual machine before performing this operation
/// to sysprep the virtual machine before performing this operation.
/// &lt;br&gt;For Windows, please refer to [Create a managed image of a
/// generalized VM in
/// Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/capture-image-resource).&lt;br&gt;For
/// Linux, please refer to [How to create an image of a virtual machine or
/// VHD](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image).
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand Down