Skip to content

Commit 675a2e2

Browse files
[skip ci] Archive 6f84705 (#27751)
1 parent 6f84705 commit 675a2e2

13 files changed

+125
-38
lines changed

generated/Storage/Storage.Autorest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
2121
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
2222
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Storage")]
23-
[assembly: System.Reflection.AssemblyFileVersionAttribute("8.1.0")]
24-
[assembly: System.Reflection.AssemblyVersionAttribute("8.1.0")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("8.4.0")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("8.4.0")]
2525
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
2626
[assembly: System.CLSCompliantAttribute(false)]

generated/Storage/Storage.Autorest/exports/Get-AzStorageAccountMigration.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ begin {
138138
$PSBoundParameters['OutBuffer'] = 1
139139
}
140140
$parameterSet = $PSCmdlet.ParameterSetName
141+
142+
$testPlayback = $false
143+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
144+
145+
$context = Get-AzContext
146+
if (-not $context -and -not $testPlayback) {
147+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
148+
exit
149+
}
141150

142151
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
143152
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -161,8 +170,6 @@ begin {
161170
GetViaIdentity = 'Az.Storage.private\Get-AzStorageAccountMigration_GetViaIdentity';
162171
}
163172
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
164-
$testPlayback = $false
165-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
166173
if ($testPlayback) {
167174
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
168175
} else {

generated/Storage/Storage.Autorest/exports/Get-AzStorageFileServiceUsage.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@ begin {
147147
$PSBoundParameters['OutBuffer'] = 1
148148
}
149149
$parameterSet = $PSCmdlet.ParameterSetName
150+
151+
$testPlayback = $false
152+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
153+
154+
$context = Get-AzContext
155+
if (-not $context -and -not $testPlayback) {
156+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
157+
exit
158+
}
150159

151160
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
152161
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -171,8 +180,6 @@ begin {
171180
List = 'Az.Storage.private\Get-AzStorageFileServiceUsage_List';
172181
}
173182
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
174-
$testPlayback = $false
175-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
176183
if ($testPlayback) {
177184
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
178185
} else {

generated/Storage/Storage.Autorest/exports/ProxyCmdletDefinitions.ps1

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,15 @@ begin {
138138
$PSBoundParameters['OutBuffer'] = 1
139139
}
140140
$parameterSet = $PSCmdlet.ParameterSetName
141+
142+
$testPlayback = $false
143+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
144+
145+
$context = Get-AzContext
146+
if (-not $context -and -not $testPlayback) {
147+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
148+
exit
149+
}
141150

142151
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
143152
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -161,8 +170,6 @@ begin {
161170
GetViaIdentity = 'Az.Storage.private\Get-AzStorageAccountMigration_GetViaIdentity';
162171
}
163172
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
164-
$testPlayback = $false
165-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
166173
if ($testPlayback) {
167174
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
168175
} else {
@@ -355,6 +362,15 @@ begin {
355362
$PSBoundParameters['OutBuffer'] = 1
356363
}
357364
$parameterSet = $PSCmdlet.ParameterSetName
365+
366+
$testPlayback = $false
367+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
368+
369+
$context = Get-AzContext
370+
if (-not $context -and -not $testPlayback) {
371+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
372+
exit
373+
}
358374

359375
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
360376
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -379,8 +395,6 @@ begin {
379395
List = 'Az.Storage.private\Get-AzStorageFileServiceUsage_List';
380396
}
381397
if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
382-
$testPlayback = $false
383-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
384398
if ($testPlayback) {
385399
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
386400
} else {
@@ -552,6 +566,12 @@ param(
552566
# SrpAccountMigrationType in ARM contract which is 'accountMigrations'
553567
${Type},
554568

569+
[Parameter()]
570+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
571+
[System.Management.Automation.SwitchParameter]
572+
# Forces the cmdlet to convert the account's redundancy configuration without prompting for confirmation.
573+
${Force},
574+
555575
[Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
556576
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
557577
[System.String]
@@ -638,6 +658,15 @@ begin {
638658
$PSBoundParameters['OutBuffer'] = 1
639659
}
640660
$parameterSet = $PSCmdlet.ParameterSetName
661+
662+
$testPlayback = $false
663+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
664+
665+
$context = Get-AzContext
666+
if (-not $context -and -not $testPlayback) {
667+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
668+
exit
669+
}
641670

642671
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
643672
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -663,8 +692,6 @@ begin {
663692
CustomerViaIdentityExpanded = 'Az.Storage.custom\Start-AzStorageAccountMigration';
664693
}
665694
if (('CustomerExpanded', 'CustomerViaJsonString', 'CustomerViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
666-
$testPlayback = $false
667-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
668695
if ($testPlayback) {
669696
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
670697
} else {

generated/Storage/Storage.Autorest/exports/Start-AzStorageAccountMigration.ps1

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ param(
126126
# SrpAccountMigrationType in ARM contract which is 'accountMigrations'
127127
${Type},
128128

129+
[Parameter()]
130+
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
131+
[System.Management.Automation.SwitchParameter]
132+
# Forces the cmdlet to convert the account's redundancy configuration without prompting for confirmation.
133+
${Force},
134+
129135
[Parameter(ParameterSetName='CustomerViaJsonString', Mandatory)]
130136
[Microsoft.Azure.PowerShell.Cmdlets.Storage.Category('Body')]
131137
[System.String]
@@ -212,6 +218,15 @@ begin {
212218
$PSBoundParameters['OutBuffer'] = 1
213219
}
214220
$parameterSet = $PSCmdlet.ParameterSetName
221+
222+
$testPlayback = $false
223+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
224+
225+
$context = Get-AzContext
226+
if (-not $context -and -not $testPlayback) {
227+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
228+
exit
229+
}
215230

216231
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
217232
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -237,8 +252,6 @@ begin {
237252
CustomerViaIdentityExpanded = 'Az.Storage.custom\Start-AzStorageAccountMigration';
238253
}
239254
if (('CustomerExpanded', 'CustomerViaJsonString', 'CustomerViaJsonFilePath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
240-
$testPlayback = $false
241-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Storage.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
242255
if ($testPlayback) {
243256
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
244257
} else {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"generate_Id": "c1579e62-4c75-4579-8aab-b119ed48e6eb"
2+
"generate_Id": "2355f548-6ff6-4ef8-81a5-ed5ba38c77c0"
33
}

0 commit comments

Comments
 (0)