Skip to content

Commit 13272b8

Browse files
[skip ci] Archive 37351f4 (#28848)
1 parent 5611e97 commit 13272b8

File tree

917 files changed

+60166
-27981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

917 files changed

+60166
-27981
lines changed

generated/Monitor/Autoscale.Autorest/Az.Autoscale.format.ps1xml

Lines changed: 116 additions & 140 deletions
Large diffs are not rendered by default.

generated/Monitor/Autoscale.Autorest/Az.Autoscale.psd1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Autoscale.private.dll'
1313
FormatsToProcess = './Az.Autoscale.format.ps1xml'
14-
FunctionsToExport = 'Get-AzAutoscalePredictiveMetric', 'Get-AzAutoscaleSetting', 'New-AzAutoscaleNotificationObject', 'New-AzAutoscaleProfileObject', 'New-AzAutoscaleScaleRuleMetricDimensionObject', 'New-AzAutoscaleScaleRuleObject', 'New-AzAutoscaleSetting', 'New-AzAutoscaleWebhookNotificationObject', 'Remove-AzAutoscaleSetting', 'Update-AzAutoscaleSetting', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzAutoscalePredictiveMetric', 'Get-AzAutoscaleSetting', 'New-AzAutoscaleNotificationObject', 'New-AzAutoscaleProfileObject', 'New-AzAutoscaleScaleRuleMetricDimensionObject', 'New-AzAutoscaleScaleRuleObject', 'New-AzAutoscaleSetting', 'New-AzAutoscaleWebhookNotificationObject', 'Remove-AzAutoscaleSetting', 'Update-AzAutoscaleSetting'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Autoscale'

generated/Monitor/Autoscale.Autorest/check-dependencies.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
1313
# is regenerated.
1414
# ----------------------------------------------------------------------------------
15-
param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
15+
param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
1616
$ErrorActionPreference = 'Stop'
1717

18-
if(-not $Isolated) {
18+
if(-not $NotIsolated) {
1919
Write-Host -ForegroundColor Green 'Creating isolated process...'
2020
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
21-
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
21+
& "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
2222
return
2323
}
2424

generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscalePredictiveMetric.ps1

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616

1717
<#
1818
.Synopsis
19-
get predictive autoscale metric future data
19+
Get predictive autoscale metric future data
2020
.Description
21-
get predictive autoscale metric future data
21+
Get predictive autoscale metric future data
2222
.Example
2323
Get-AzAutoscalePredictiveMetric -AutoscaleSettingName test-autoscalesetting -ResourceGroupName test-group -Timespan "2021-10-14T22:00:00.000Z/2021-10-16T22:00:00.000Z" -Aggregation "Total" -Interval ([System.TimeSpan]::New(0,60,0)) -MetricName "PercentageCPU" -MetricNamespace "Microsoft.Compute/virtualMachineScaleSets"
2424
2525
.Inputs
2626
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IAutoscaleIdentity
2727
.Outputs
28-
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IPredictiveResponse
28+
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IPredictiveResponse
2929
.Notes
3030
COMPLEX PARAMETER PROPERTIES
3131
@@ -40,7 +40,7 @@ INPUTOBJECT <IAutoscaleIdentity>: Identity Parameter
4040
https://learn.microsoft.com/powershell/module/az.monitor/get-azautoscalepredictivemetric
4141
#>
4242
function Get-AzAutoscalePredictiveMetric {
43-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IPredictiveResponse])]
43+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IPredictiveResponse])]
4444
[CmdletBinding(DefaultParameterSetName='GetViaIdentity', PositionalBinding=$false)]
4545
param(
4646
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -67,7 +67,6 @@ param(
6767
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Category('Path')]
6868
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IAutoscaleIdentity]
6969
# Identity Parameter
70-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7170
${InputObject},
7271

7372
[Parameter(Mandatory)]
@@ -160,6 +159,15 @@ begin {
160159
$PSBoundParameters['OutBuffer'] = 1
161160
}
162161
$parameterSet = $PSCmdlet.ParameterSetName
162+
163+
$testPlayback = $false
164+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
165+
166+
$context = Get-AzContext
167+
if (-not $context -and -not $testPlayback) {
168+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
169+
exit
170+
}
163171

164172
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
165173
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -182,9 +190,7 @@ begin {
182190
Get = 'Az.Autoscale.private\Get-AzAutoscalePredictiveMetric_Get';
183191
GetViaIdentity = 'Az.Autoscale.private\Get-AzAutoscalePredictiveMetric_GetViaIdentity';
184192
}
185-
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
186-
$testPlayback = $false
187-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
193+
if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
188194
if ($testPlayback) {
189195
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
190196
} else {
@@ -198,6 +204,9 @@ begin {
198204
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
199205
}
200206
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
207+
if ($wrappedCmd -eq $null) {
208+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
209+
}
201210
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
202211
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
203212
$steppablePipeline.Begin($PSCmdlet)

generated/Monitor/Autoscale.Autorest/exports/Get-AzAutoscaleSetting.ps1

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Get-AzAutoscaleSetting -ResourceGroupName test-group -Name test-autoscalesetting
2929
.Inputs
3030
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IAutoscaleIdentity
3131
.Outputs
32-
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IAutoscaleSettingResource
32+
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IAutoscaleSettingResource
3333
.Notes
3434
COMPLEX PARAMETER PROPERTIES
3535
@@ -44,7 +44,7 @@ INPUTOBJECT <IAutoscaleIdentity>: Identity Parameter
4444
https://learn.microsoft.com/powershell/module/az.monitor/get-azautoscalesetting
4545
#>
4646
function Get-AzAutoscaleSetting {
47-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IAutoscaleSettingResource])]
47+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IAutoscaleSettingResource])]
4848
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
4949
param(
5050
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -75,7 +75,6 @@ param(
7575
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Category('Path')]
7676
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IAutoscaleIdentity]
7777
# Identity Parameter
78-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7978
${InputObject},
8079

8180
[Parameter()]
@@ -134,6 +133,15 @@ begin {
134133
$PSBoundParameters['OutBuffer'] = 1
135134
}
136135
$parameterSet = $PSCmdlet.ParameterSetName
136+
137+
$testPlayback = $false
138+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
139+
140+
$context = Get-AzContext
141+
if (-not $context -and -not $testPlayback) {
142+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
143+
exit
144+
}
137145

138146
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
139147
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -158,9 +166,7 @@ begin {
158166
List = 'Az.Autoscale.private\Get-AzAutoscaleSetting_List';
159167
List1 = 'Az.Autoscale.private\Get-AzAutoscaleSetting_List1';
160168
}
161-
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
162-
$testPlayback = $false
163-
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
169+
if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
164170
if ($testPlayback) {
165171
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
166172
} else {
@@ -174,6 +180,9 @@ begin {
174180
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
175181
}
176182
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
183+
if ($wrappedCmd -eq $null) {
184+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
185+
}
177186
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
178187
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
179188
$steppablePipeline.Begin($PSCmdlet)

generated/Monitor/Autoscale.Autorest/exports/New-AzAutoscaleNotificationObject.ps1

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $webhook1=New-AzAutoscaleWebhookNotificationObject -Property @{} -ServiceUri "ht
2424
New-AzAutoscaleNotificationObject -EmailCustomEmail "gu@ms.com" -EmailSendToSubscriptionAdministrator $true -EmailSendToSubscriptionCoAdministrator $true -Webhook $webhook1
2525
2626
.Outputs
27-
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.AutoscaleNotification
27+
Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.AutoscaleNotification
2828
.Notes
2929
COMPLEX PARAMETER PROPERTIES
3030
@@ -35,10 +35,10 @@ WEBHOOK <IWebhookNotification[]>: the collection of webhook notifications.
3535
[(Any) <String>]: This indicates any property can be added to this object.
3636
[ServiceUri <String>]: the service address to receive the notification.
3737
.Link
38-
https://learn.microsoft.com/powershell/module/Az.Monitor/new-AzAutoscaleNotificationObject
38+
https://learn.microsoft.com/powershell/module/Az.Monitor/new-azautoscalenotificationobject
3939
#>
4040
function New-AzAutoscaleNotificationObject {
41-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.AutoscaleNotification])]
41+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.AutoscaleNotification])]
4242
[CmdletBinding(PositionalBinding=$false)]
4343
param(
4444
[Parameter()]
@@ -62,9 +62,8 @@ param(
6262

6363
[Parameter()]
6464
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Category('Body')]
65-
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IWebhookNotification[]]
65+
[Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.IWebhookNotification[]]
6666
# the collection of webhook notifications.
67-
# To construct, see NOTES section for WEBHOOK properties and create a hash table.
6867
${Webhook}
6968
)
7069

@@ -75,6 +74,9 @@ begin {
7574
$PSBoundParameters['OutBuffer'] = 1
7675
}
7776
$parameterSet = $PSCmdlet.ParameterSetName
77+
78+
$testPlayback = $false
79+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
7880

7981
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
8082
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -103,6 +105,9 @@ begin {
103105
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
104106
}
105107
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
108+
if ($wrappedCmd -eq $null) {
109+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
110+
}
106111
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
107112
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
108113
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)