diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index f17ce8b09e2f..b9ac7bba315c 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -21,6 +21,11 @@ --> ## Upcoming Release * Edited `New-AzVm` cmdlet internal logic to use the `PlatformFaultDomain` value in the `PSVirtualMachine` object passed to it in the new virtual machine. +* Add `-DataAccessAuthMode` parameter to the following cmdlets: + - New-AzDiskConfig + - New-AzDiskUpdateConfig + - New-AzSnapshotConfig + - New-AzSnapshotUpdateConfig * Added `-Architecture` parameter to the following cmdlets: - New-AzDiskConfig`` - New-AzDiskUpdateConfig diff --git a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs index bbd4168cb81f..a340a1c8f7b4 100644 --- a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs +++ b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskConfigCommand.cs @@ -228,6 +228,13 @@ public partial class NewAzureRmDiskConfigCommand : Microsoft.Azure.Commands.Reso HelpMessage = "True if the image from which the OS disk is created supports accelerated networking.")] public bool? AcceleratedNetwork { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Additional authentication requirements when exporting or uploading to a disk or snapshot.")] + [PSArgumentCompleter("AzureActiveDirectory", "None")] + public string DataAccessAuthMode { get; set; } + [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -459,7 +466,8 @@ private void Run() PurchasePlan = this.IsParameterBound(c => c.PurchasePlan) ? this.PurchasePlan : null, SupportsHibernation = this.IsParameterBound(c => c.SupportsHibernation) ? SupportsHibernation : null, SupportedCapabilities = vSupportedCapabilities, - PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null + PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null, + DataAccessAuthMode = this.IsParameterBound(c => c.DataAccessAuthMode) ? DataAccessAuthMode : null }; WriteObject(vDisk); diff --git a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs index 7764bebafe73..6952ba968868 100644 --- a/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs +++ b/src/Compute/Compute/Generated/Disk/Config/NewAzureRmDiskUpdateConfigCommand.cs @@ -161,6 +161,13 @@ public partial class NewAzureRmDiskUpdateConfigCommand : Microsoft.Azure.Command HelpMessage = "True if the image from which the OS disk is created supports accelerated networking.")] public bool? AcceleratedNetwork { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Additional authentication requirements when exporting or uploading to a disk or snapshot.")] + [PSArgumentCompleter("AzureActiveDirectory", "None")] + public string DataAccessAuthMode { get; set; } + [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -310,7 +317,8 @@ private void Run() PurchasePlan = this.IsParameterBound(c => c.PurchasePlan) ? this.PurchasePlan : null, SupportsHibernation = this.IsParameterBound(c => c.SupportsHibernation) ? SupportsHibernation : null, SupportedCapabilities = vSupportedCapabilities, - PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null + PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null, + DataAccessAuthMode = this.IsParameterBound(c => c.DataAccessAuthMode) ? DataAccessAuthMode : null }; WriteObject(vDiskUpdate); diff --git a/src/Compute/Compute/Generated/Models/PSDisk.cs b/src/Compute/Compute/Generated/Models/PSDisk.cs index be823bb4ac0c..da4ab0879975 100644 --- a/src/Compute/Compute/Generated/Models/PSDisk.cs +++ b/src/Compute/Compute/Generated/Models/PSDisk.cs @@ -67,7 +67,6 @@ public string ResourceGroupName public string Location { get; set; } public ExtendedLocation ExtendedLocation { get; set; } public IDictionary Tags { get; set; } - // Gets or sets possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' public string NetworkAccessPolicy { get; set; } public string DiskAccessId { get; set; } public string Tier { get; set; } @@ -75,16 +74,8 @@ public string ResourceGroupName public PSPurchasePlan PurchasePlan { get; set; } public bool? SupportsHibernation { get; set; } public DiskSecurityProfile SecurityProfile { get; set; } - - // - // Summary: - // Gets or sets possible values include: 'Enabled', 'Disabled' public string PublicNetworkAccess { get; set; } - - // - // Summary: - // Gets or sets list of supported capabilities for the image from which the OS disk - // was created. public SupportedCapabilities SupportedCapabilities { get; set; } + public string DataAccessAuthMode { get; set; } } } diff --git a/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs b/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs index ad15201aa264..b8869c26d86c 100644 --- a/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs +++ b/src/Compute/Compute/Generated/Models/PSDiskUpdate.cs @@ -56,5 +56,6 @@ public partial class PSDiskUpdate // Summary: // Gets or sets possible values include: 'Enabled', 'Disabled' public string PublicNetworkAccess { get; set; } + public string DataAccessAuthMode { get; set; } } } diff --git a/src/Compute/Compute/Generated/Models/PSSnapshot.cs b/src/Compute/Compute/Generated/Models/PSSnapshot.cs index dd0064e57011..bf0bcbfe93d7 100644 --- a/src/Compute/Compute/Generated/Models/PSSnapshot.cs +++ b/src/Compute/Compute/Generated/Models/PSSnapshot.cs @@ -81,6 +81,6 @@ public string ResourceGroupName // Gets or sets percentage complete for the background copy when a resource is created // via the CopyStart operation. public double? CompletionPercent { get; set; } - + public string DataAccessAuthMode { get; set; } } } diff --git a/src/Compute/Compute/Generated/Models/PSSnapshotUpdate.cs b/src/Compute/Compute/Generated/Models/PSSnapshotUpdate.cs index 68c7327cff02..349109733cfb 100644 --- a/src/Compute/Compute/Generated/Models/PSSnapshotUpdate.cs +++ b/src/Compute/Compute/Generated/Models/PSSnapshotUpdate.cs @@ -40,5 +40,6 @@ public partial class PSSnapshotUpdate // Summary: // Gets or sets possible values include: 'Enabled', 'Disabled' public string PublicNetworkAccess { get; set; } + public string DataAccessAuthMode { get; set; } } } diff --git a/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs b/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs index ffb38ca25e08..9cb5b6ee1a95 100644 --- a/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs +++ b/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotConfigCommand.cs @@ -173,6 +173,13 @@ public partial class NewAzureRmSnapshotConfigCommand : Microsoft.Azure.Commands. HelpMessage = "True if the image from which the OS disk is created supports accelerated networking.")] public bool? AcceleratedNetwork { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Additional authentication requirements when exporting or uploading to a disk or snapshot.")] + [PSArgumentCompleter("AzureActiveDirectory", "None")] + public string DataAccessAuthMode { get; set; } + [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -370,7 +377,8 @@ private void Run() PurchasePlan = this.IsParameterBound(c => c.PurchasePlan) ? this.PurchasePlan : null, SupportsHibernation = this.IsParameterBound(c => c.SupportsHibernation) ? SupportsHibernation : null, SupportedCapabilities = vSupportedCapabilities, - PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null + PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null, + DataAccessAuthMode = this.IsParameterBound(c => c.DataAccessAuthMode) ? DataAccessAuthMode : null }; WriteObject(vSnapshot); diff --git a/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs b/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs index 1c9c1aa2cd80..7f47bb3c1f41 100644 --- a/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs +++ b/src/Compute/Compute/Generated/Snapshot/Config/NewAzureRmSnapshotUpdateConfigCommand.cs @@ -101,6 +101,13 @@ public partial class NewAzureRmSnapshotUpdateConfigCommand : Microsoft.Azure.Com [PSArgumentCompleter("Enabled", "Disabled")] public string PublicNetworkAccess { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "Additional authentication requirements when exporting or uploading to a disk or snapshot.")] + [PSArgumentCompleter("AzureActiveDirectory", "None")] + public string DataAccessAuthMode { get; set; } + [Parameter( Mandatory = false, ValueFromPipelineByPropertyName = true, @@ -221,6 +228,7 @@ private void Run() Sku = vSku, SupportsHibernation = this.IsParameterBound(c => c.SupportsHibernation) ? SupportsHibernation : null, PublicNetworkAccess = this.IsParameterBound(c => c.PublicNetworkAccess) ? PublicNetworkAccess : null, + DataAccessAuthMode = this.IsParameterBound(c => c.DataAccessAuthMode) ? DataAccessAuthMode : null, SupportedCapabilities = vSupportedCapabilities }; diff --git a/src/Compute/Compute/StorageServices/AddAzureVhdCommand.cs b/src/Compute/Compute/StorageServices/AddAzureVhdCommand.cs index 65dabad7a4d1..9fb4e53b4aab 100644 --- a/src/Compute/Compute/StorageServices/AddAzureVhdCommand.cs +++ b/src/Compute/Compute/StorageServices/AddAzureVhdCommand.cs @@ -102,7 +102,7 @@ public class AddAzureVhdCommand : ComputeClientBaseCmdlet public string DiskName { get; set; } [Parameter( - Mandatory = true, + Mandatory = true, Position = 1, ParameterSetName = DirectUploadToManagedDiskSet, ValueFromPipelineByPropertyName = true, @@ -461,7 +461,7 @@ private void CheckForInvalidVhd() try { bool resizeNeeded = false; - long resizeTo=0; + long resizeTo = 0; using (VirtualDiskStream vds = new VirtualDiskStream(filePath.FullName)) { if (vds.Length < 20971520 || vds.Length > 4396972769280) @@ -640,4 +640,4 @@ private void resizeVhdFile(long FileSize) } } } -} +} \ No newline at end of file diff --git a/src/Compute/Compute/help/New-AzDiskConfig.md b/src/Compute/Compute/help/New-AzDiskConfig.md index 6a846124fef7..3dfd57364ab9 100644 --- a/src/Compute/Compute/help/New-AzDiskConfig.md +++ b/src/Compute/Compute/help/New-AzDiskConfig.md @@ -24,8 +24,8 @@ New-AzDiskConfig [[-SkuName] ] [-Tier ] [-LogicalSectorSize ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-DiskAccessId ] [-NetworkAccessPolicy ] [-BurstingEnabled ] [-PublicNetworkAccess ] - [-AcceleratedNetwork ] [-Architecture ] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-AcceleratedNetwork ] [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -143,6 +143,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -DataAccessAuthMode +Additional authentication requirements when exporting or uploading to a disk or snapshot. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with azure. diff --git a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md index 280e3d9a052a..2354cee75e65 100644 --- a/src/Compute/Compute/help/New-AzDiskUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzDiskUpdateConfig.md @@ -20,7 +20,8 @@ New-AzDiskUpdateConfig [[-SkuName] ] [-Tier ] [-DiskIOPSReadOnly [-EncryptionSettingsEnabled ] [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-BurstingEnabled ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] - [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -100,6 +101,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -DataAccessAuthMode +Additional authentication requirements when exporting or uploading to a disk or snapshot. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with azure. diff --git a/src/Compute/Compute/help/New-AzSnapshotConfig.md b/src/Compute/Compute/help/New-AzSnapshotConfig.md index dd8dcac7e817..e91d6a48b3f9 100644 --- a/src/Compute/Compute/help/New-AzSnapshotConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotConfig.md @@ -21,7 +21,8 @@ New-AzSnapshotConfig [[-SkuName] ] [[-OsType] ] [[ [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-DiskAccessId ] [-NetworkAccessPolicy ] [-PublicNetworkAccess ] [-AcceleratedNetwork ] - [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -101,6 +102,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -DataAccessAuthMode +Additional authentication requirements when exporting or uploading to a disk or snapshot. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with azure. diff --git a/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md b/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md index ee4741603b39..a78ceff59f43 100644 --- a/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md +++ b/src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md @@ -17,7 +17,8 @@ New-AzSnapshotUpdateConfig [[-SkuName] ] [[-OsType] ] [-SupportsHibernation ] [-EncryptionSettingsEnabled ] [-DiskEncryptionKey ] [-KeyEncryptionKey ] [-DiskEncryptionSetId ] [-EncryptionType ] [-PublicNetworkAccess ] - [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DataAccessAuthMode ] [-Architecture ] [-DefaultProfile ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -68,6 +69,21 @@ Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ``` +### -DataAccessAuthMode +Additional authentication requirements when exporting or uploading to a disk or snapshot. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with azure.