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

Supporting Customer-managed keys for managed disks in VMWare to Azure and HyperV to Azure scenarios #9202

Merged
merged 3 commits into from
Dec 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
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/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\sdk1\azure-sdk-for-net\sdk
2019-10-16 06:50:54 UTC
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\ASROneSDK\azure-sdk-for-net\sdk
2019-12-20 05:05:29 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 2c079a493e904166c7ecc4d1c4dbf2a01ea8059d
Commit: cb5fe2f993e08939a712c20f26ff9cbab7e98c82
AutoRest information
Requested version: latest
Bootstrapper version: autorest@2.0.4283
Bootstrapper version: autorest@2.0.4407
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public A2AProtectedManagedDiskDetails()
/// <param name="recoveryTargetDiskAccountType">The target disk type
/// after failover. Its an optional value and will be same as source
/// disk type if not user provided.</param>
/// <param name="recoveryDiskEncryptionSetId">The recovery disk
/// encryption set Id.</param>
/// <param name="diskName">The disk name.</param>
/// <param name="diskCapacityInBytes">The disk capacity in
/// bytes.</param>
Expand Down Expand Up @@ -78,14 +80,15 @@ public A2AProtectedManagedDiskDetails()
/// <param name="keyIdentifier">The key URL / identifier (KEK).</param>
/// <param name="kekKeyVaultArmId">The KeyVault resource id for key
/// (KEK).</param>
public A2AProtectedManagedDiskDetails(string diskId = default(string), string recoveryResourceGroupId = default(string), string recoveryTargetDiskId = default(string), string recoveryReplicaDiskId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), string diskState = default(string), IList<string> allowedDiskLevelOperation = default(IList<string>), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string))
public A2AProtectedManagedDiskDetails(string diskId = default(string), string recoveryResourceGroupId = default(string), string recoveryTargetDiskId = default(string), string recoveryReplicaDiskId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryDiskEncryptionSetId = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), string diskState = default(string), IList<string> allowedDiskLevelOperation = default(IList<string>), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string))
{
DiskId = diskId;
RecoveryResourceGroupId = recoveryResourceGroupId;
RecoveryTargetDiskId = recoveryTargetDiskId;
RecoveryReplicaDiskId = recoveryReplicaDiskId;
RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType;
RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType;
RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId;
DiskName = diskName;
DiskCapacityInBytes = diskCapacityInBytes;
PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId;
Expand Down Expand Up @@ -149,6 +152,12 @@ public A2AProtectedManagedDiskDetails()
[JsonProperty(PropertyName = "recoveryTargetDiskAccountType")]
public string RecoveryTargetDiskAccountType { get; set; }

/// <summary>
/// Gets or sets the recovery disk encryption set Id.
/// </summary>
[JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")]
public string RecoveryDiskEncryptionSetId { get; set; }

/// <summary>
/// Gets or sets the disk name.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,18 @@ public A2AVmManagedDiskInputDetails()
/// <param name="recoveryTargetDiskAccountType">The target disk type
/// after failover. Its an optional value and will be same as source
/// disk type if not user provided.</param>
/// <param name="recoveryDiskEncryptionSetId">The recovery disk
/// encryption set Id.</param>
/// <param name="diskEncryptionInfo">The recovery disk encryption
/// information (for one / single pass flows).</param>
public A2AVmManagedDiskInputDetails(string diskId = default(string), string primaryStagingAzureStorageAccountId = default(string), string recoveryResourceGroupId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo))
public A2AVmManagedDiskInputDetails(string diskId = default(string), string primaryStagingAzureStorageAccountId = default(string), string recoveryResourceGroupId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string recoveryDiskEncryptionSetId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo))
{
DiskId = diskId;
PrimaryStagingAzureStorageAccountId = primaryStagingAzureStorageAccountId;
RecoveryResourceGroupId = recoveryResourceGroupId;
RecoveryReplicaDiskAccountType = recoveryReplicaDiskAccountType;
RecoveryTargetDiskAccountType = recoveryTargetDiskAccountType;
RecoveryDiskEncryptionSetId = recoveryDiskEncryptionSetId;
DiskEncryptionInfo = diskEncryptionInfo;
CustomInit();
}
Expand Down Expand Up @@ -92,6 +95,12 @@ public A2AVmManagedDiskInputDetails()
[JsonProperty(PropertyName = "recoveryTargetDiskAccountType")]
public string RecoveryTargetDiskAccountType { get; set; }

/// <summary>
/// Gets or sets the recovery disk encryption set Id.
/// </summary>
[JsonProperty(PropertyName = "recoveryDiskEncryptionSetId")]
public string RecoveryDiskEncryptionSetId { get; set; }

/// <summary>
/// Gets or sets the recovery disk encryption information (for one /
/// single pass flows).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,27 @@ public AzureVmDiskDetails()
/// </summary>
/// <param name="vhdType">VHD type.</param>
/// <param name="vhdId">The VHD id.</param>
/// <param name="diskId">The disk resource id.</param>
/// <param name="vhdName">VHD name.</param>
/// <param name="maxSizeMB">Max side in MB.</param>
/// <param name="targetDiskLocation">Blob uri of the Azure
/// disk.</param>
/// <param name="targetDiskName">The target Azure disk name.</param>
/// <param name="lunId">Ordinal\LunId of the disk for the Azure
/// VM.</param>
public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string vhdName = default(string), string maxSizeMB = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string))
/// <param name="diskEncryptionSetId">The DiskEncryptionSet ARM
/// ID.</param>
public AzureVmDiskDetails(string vhdType = default(string), string vhdId = default(string), string diskId = default(string), string vhdName = default(string), string maxSizeMB = default(string), string targetDiskLocation = default(string), string targetDiskName = default(string), string lunId = default(string), string diskEncryptionSetId = default(string))
{
VhdType = vhdType;
VhdId = vhdId;
DiskId = diskId;
VhdName = vhdName;
MaxSizeMB = maxSizeMB;
TargetDiskLocation = targetDiskLocation;
TargetDiskName = targetDiskName;
LunId = lunId;
DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}

Expand All @@ -67,6 +72,12 @@ public AzureVmDiskDetails()
[JsonProperty(PropertyName = "vhdId")]
public string VhdId { get; set; }

/// <summary>
/// Gets or sets the disk resource id.
/// </summary>
[JsonProperty(PropertyName = "diskId")]
public string DiskId { get; set; }

/// <summary>
/// Gets or sets VHD name.
/// </summary>
Expand Down Expand Up @@ -97,5 +108,11 @@ public AzureVmDiskDetails()
[JsonProperty(PropertyName = "lunId")]
public string LunId { get; set; }

/// <summary>
/// Gets or sets the DiskEncryptionSet ARM ID.
/// </summary>
[JsonProperty(PropertyName = "diskEncryptionSetId")]
public string DiskEncryptionSetId { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
Expand Down Expand Up @@ -38,11 +40,14 @@ public HyperVReplicaAzureUpdateReplicationProtectedItemInput()
/// resource group Id for resource manager deployment.</param>
/// <param name="useManagedDisks">A value indicating whether managed
/// disks should be used during failover.</param>
public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string))
/// <param name="diskIdToDiskEncryptionMap">The dictionary of disk
/// resource Id to disk encryption set ARM Id.</param>
public HyperVReplicaAzureUpdateReplicationProtectedItemInput(string recoveryAzureV1ResourceGroupId = default(string), string recoveryAzureV2ResourceGroupId = default(string), string useManagedDisks = default(string), IDictionary<string, string> diskIdToDiskEncryptionMap = default(IDictionary<string, string>))
{
RecoveryAzureV1ResourceGroupId = recoveryAzureV1ResourceGroupId;
RecoveryAzureV2ResourceGroupId = recoveryAzureV2ResourceGroupId;
UseManagedDisks = useManagedDisks;
DiskIdToDiskEncryptionMap = diskIdToDiskEncryptionMap;
CustomInit();
}

Expand Down Expand Up @@ -72,5 +77,12 @@ public HyperVReplicaAzureUpdateReplicationProtectedItemInput()
[JsonProperty(PropertyName = "useManagedDisks")]
public string UseManagedDisks { get; set; }

/// <summary>
/// Gets or sets the dictionary of disk resource Id to disk encryption
/// set ARM Id.
/// </summary>
[JsonProperty(PropertyName = "diskIdToDiskEncryptionMap")]
public IDictionary<string, string> DiskIdToDiskEncryptionMap { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ public InMageAzureV2DiskInputDetails()
/// <param name="logStorageAccountId">The LogStorageAccountId.</param>
/// <param name="diskType">The DiskType. Possible values include:
/// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS'</param>
public InMageAzureV2DiskInputDetails(string diskId = default(string), string logStorageAccountId = default(string), string diskType = default(string))
/// <param name="diskEncryptionSetId">The DiskEncryptionSet ARM
/// ID.</param>
public InMageAzureV2DiskInputDetails(string diskId = default(string), string logStorageAccountId = default(string), string diskType = default(string), string diskEncryptionSetId = default(string))
{
DiskId = diskId;
LogStorageAccountId = logStorageAccountId;
DiskType = diskType;
DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}

Expand Down Expand Up @@ -67,5 +70,11 @@ public InMageAzureV2DiskInputDetails()
[JsonProperty(PropertyName = "diskType")]
public string DiskType { get; set; }

/// <summary>
/// Gets or sets the DiskEncryptionSet ARM ID.
/// </summary>
[JsonProperty(PropertyName = "diskEncryptionSetId")]
public string DiskEncryptionSetId { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public InMageAzureV2EnableProtectionInput()
/// failover VM is to be created.</param>
/// <param name="diskType">The DiskType. Possible values include:
/// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS'</param>
public InMageAzureV2EnableProtectionInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), IList<InMageAzureV2DiskInputDetails> disksToInclude = default(IList<InMageAzureV2DiskInputDetails>), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string diskType = default(string))
/// <param name="diskEncryptionSetId">The DiskEncryptionSet ARM
/// ID.</param>
public InMageAzureV2EnableProtectionInput(string masterTargetId = default(string), string processServerId = default(string), string storageAccountId = default(string), string runAsAccountId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), IList<InMageAzureV2DiskInputDetails> disksToInclude = default(IList<InMageAzureV2DiskInputDetails>), string targetAzureNetworkId = default(string), string targetAzureSubnetId = default(string), string enableRdpOnTargetOption = default(string), string targetAzureVmName = default(string), string logStorageAccountId = default(string), string targetAzureV1ResourceGroupId = default(string), string targetAzureV2ResourceGroupId = default(string), string diskType = default(string), string diskEncryptionSetId = default(string))
{
MasterTargetId = masterTargetId;
ProcessServerId = processServerId;
Expand All @@ -76,6 +78,7 @@ public InMageAzureV2EnableProtectionInput()
TargetAzureV1ResourceGroupId = targetAzureV1ResourceGroupId;
TargetAzureV2ResourceGroupId = targetAzureV2ResourceGroupId;
DiskType = diskType;
DiskEncryptionSetId = diskEncryptionSetId;
CustomInit();
}

Expand Down Expand Up @@ -180,5 +183,11 @@ public InMageAzureV2EnableProtectionInput()
[JsonProperty(PropertyName = "diskType")]
public string DiskType { get; set; }

/// <summary>
/// Gets or sets the DiskEncryptionSet ARM ID.
/// </summary>
[JsonProperty(PropertyName = "diskEncryptionSetId")]
public string DiskEncryptionSetId { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SiteRecoveryMan
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("Compute", "ReplicationEligibilityResults", "2018-07-10"),
new Tuple<string, string, string>("RecoveryServices", "MigrationRecoveryPoints", "2018-07-10"),
new Tuple<string, string, string>("RecoveryServices", "Operations", "2018-07-10"),
new Tuple<string, string, string>("RecoveryServices", "RecoveryPoints", "2018-07-10"),
Expand Down Expand Up @@ -49,11 +50,11 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SiteRecoveryMan
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\sdk1\\azure-sdk-for-net\\sdk";
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/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\\ASROneSDK\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "2c079a493e904166c7ecc4d1c4dbf2a01ea8059d";
public static readonly String GithubCommidId = "cb5fe2f993e08939a712c20f26ff9cbab7e98c82";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
Expand Down
Loading