Skip to content

Commit 8b2b393

Browse files
[skip ci] Archive 6fa2807 (#27571)
1 parent c926eab commit 8b2b393

File tree

598 files changed

+32877
-20406
lines changed

Some content is hidden

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

598 files changed

+32877
-20406
lines changed

generated/Reservations/Reservations.Autorest/Az.Reservations.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<PropertyGroup>
33
<PsModuleName>Reservations</PsModuleName>
44
<PsRootModuleName>Reservations</PsRootModuleName>
5+
<PsModuleFolder>Reservations.Autorest</PsModuleFolder>
56
</PropertyGroup>
67

78
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.autorest.props" />
89
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., build.proj))\src\Az.Post.props" />
9-
1010
</Project>

generated/Reservations/Reservations.Autorest/Az.Reservations.format.ps1xml

+240-348
Large diffs are not rendered by default.

generated/Reservations/Reservations.Autorest/Az.Reservations.psd1

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
DotNetFrameworkVersion = '4.7.2'
1212
RequiredAssemblies = './bin/Az.Reservations.private.dll'
1313
FormatsToProcess = './Az.Reservations.format.ps1xml'
14-
FunctionsToExport = 'Get-AzReservation', 'Get-AzReservationAvailableScope', 'Get-AzReservationCatalog', 'Get-AzReservationHistory', 'Get-AzReservationOrder', 'Get-AzReservationOrderId', 'Get-AzReservationQuote', 'Invoke-AzReservationArchiveReservation', 'Invoke-AzReservationCalculateExchange', 'Invoke-AzReservationCalculateRefund', 'Invoke-AzReservationExchange', 'Invoke-AzReservationReturn', 'Invoke-AzReservationUnarchiveReservation', 'Merge-AzReservation', 'Move-AzReservationDirectory', 'New-AzReservation', 'Split-AzReservation', 'Update-AzReservation', '*'
15-
AliasesToExport = '*'
14+
FunctionsToExport = 'Get-AzReservation', 'Get-AzReservationAvailableScope', 'Get-AzReservationCatalog', 'Get-AzReservationHistory', 'Get-AzReservationOrder', 'Get-AzReservationOrderId', 'Get-AzReservationQuote', 'Invoke-AzReservationArchiveReservation', 'Invoke-AzReservationCalculateExchange', 'Invoke-AzReservationCalculateRefund', 'Invoke-AzReservationExchange', 'Invoke-AzReservationReturn', 'Invoke-AzReservationUnarchiveReservation', 'Merge-AzReservation', 'Move-AzReservationDirectory', 'New-AzReservation', 'Split-AzReservation', 'Update-AzReservation'
1615
PrivateData = @{
1716
PSData = @{
1817
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Reservations'

generated/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
// ----------------------------------------------------------------------------------
2-
//
3-
// Copyright Microsoft Corporation
4-
// Licensed under the Apache License, Version 2.0 (the "License");
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0 (the ""License"");
53
// you may not use this file except in compliance with the License.
64
// You may obtain a copy of the License at
75
// http://www.apache.org/licenses/LICENSE-2.0
86
// Unless required by applicable law or agreed to in writing, software
9-
// distributed under the License is distributed on an "AS IS" BASIS,
7+
// distributed under the License is distributed on an ""AS IS"" BASIS,
108
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
// See the License for the specific language governing permissions and
1210
// limitations under the License.
13-
// ----------------------------------------------------------------------------------
11+
// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
12+
// is regenerated.
1413

1514
using System;
1615
using System.Reflection;
16+
using System.Runtime.CompilerServices;
1717
using System.Runtime.InteropServices;
1818

19-
[assembly: AssemblyTitle("Microsoft Azure Powershell - Reservations")]
20-
[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
21-
[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
22-
[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
19+
[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
20+
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
21+
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
22+
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Reservations")]
23+
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.13.1")]
24+
[assembly: System.Reflection.AssemblyVersionAttribute("0.13.1")]
25+
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
26+
[assembly: System.CLSCompliantAttribute(false)]
27+
28+
29+
2330

24-
[assembly: ComVisible(false)]
25-
[assembly: CLSCompliant(false)]
26-
[assembly: Guid("6035c2bd-2183-4107-8f37-8395d134babd")]
27-
[assembly: AssemblyVersion("0.13.1")]
28-
[assembly: AssemblyFileVersion("0.13.1")]

generated/Reservations/Reservations.Autorest/check-dependencies.ps1

+3-3
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/Reservations/Reservations.Autorest/exports/Get-AzReservation.ps1

+29-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Get-AzReservation -ReservationOrderId a87c1742-0080-5b4d-b953-8531ad46fdc8 -Rese
2727
.Inputs
2828
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
2929
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse
30+
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse
3131
.Notes
3232
COMPLEX PARAMETER PROPERTIES
3333
@@ -38,14 +38,21 @@ INPUTOBJECT <IReservationsIdentity>: Identity Parameter
3838
[ReservationId <String>]: Id of the reservation item
3939
[ReservationOrderId <String>]: Order Id of the reservation
4040
[SubscriptionId <String>]: Id of the subscription
41+
42+
RESERVATIONORDERINPUTOBJECT <IReservationsIdentity>: Identity Parameter
43+
[Id <String>]: Resource identity path
44+
[ReservationId <String>]: Id of the reservation item
45+
[ReservationOrderId <String>]: Order Id of the reservation
46+
[SubscriptionId <String>]: Id of the subscription
4147
.Link
4248
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservation
4349
#>
4450
function Get-AzReservation {
45-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])]
51+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])]
4652
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
4753
param(
4854
[Parameter(ParameterSetName='Get', Mandatory)]
55+
[Parameter(ParameterSetName='GetViaIdentityReservationOrder', Mandatory)]
4956
[Alias('ReservationId')]
5057
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
5158
[System.String]
@@ -64,11 +71,17 @@ param(
6471
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
6572
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
6673
# Identity Parameter
67-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
6874
${InputObject},
6975

76+
[Parameter(ParameterSetName='GetViaIdentityReservationOrder', Mandatory, ValueFromPipeline)]
77+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
78+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
79+
# Identity Parameter
80+
${ReservationOrderInputObject},
81+
7082
[Parameter(ParameterSetName='Get')]
7183
[Parameter(ParameterSetName='GetViaIdentity')]
84+
[Parameter(ParameterSetName='GetViaIdentityReservationOrder')]
7285
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
7386
[System.String]
7487
# Supported value of this query is renewProperties
@@ -163,6 +176,15 @@ begin {
163176
$PSBoundParameters['OutBuffer'] = 1
164177
}
165178
$parameterSet = $PSCmdlet.ParameterSetName
179+
180+
$testPlayback = $false
181+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
182+
183+
$context = Get-AzContext
184+
if (-not $context -and -not $testPlayback) {
185+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
186+
exit
187+
}
166188

167189
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
168190
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -184,6 +206,7 @@ begin {
184206
$mapping = @{
185207
Get = 'Az.Reservations.private\Get-AzReservation_Get';
186208
GetViaIdentity = 'Az.Reservations.private\Get-AzReservation_GetViaIdentity';
209+
GetViaIdentityReservationOrder = 'Az.Reservations.private\Get-AzReservation_GetViaIdentityReservationOrder';
187210
List = 'Az.Reservations.private\Get-AzReservation_List';
188211
List1 = 'Az.Reservations.private\Get-AzReservation_List1';
189212
}
@@ -194,6 +217,9 @@ begin {
194217
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
195218
}
196219
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
220+
if ($wrappedCmd -eq $null) {
221+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
222+
}
197223
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
198224
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
199225
$steppablePipeline.Begin($PSCmdlet)

generated/Reservations/Reservations.Autorest/exports/Get-AzReservationAvailableScope.ps1

+46-20
Original file line numberDiff line numberDiff line change
@@ -22,70 +22,83 @@ Check whether the scopes from request is valid for `Reservation`.\n
2222
.Example
2323
Get-AzReservationAvailableScope -ReservationId 2ef560a7-f469-4b62-87b7-5312d588ce2a -ReservationOrderId 2b9b9372-24e1-4a07-a354-2078fe347cf9 -Scope "/subscriptions/3f0487ff-27ca-4b9c-2a23-000770724b1b"
2424
25-
.Inputs
26-
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest
2725
.Inputs
2826
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
2927
.Outputs
30-
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties
28+
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties
3129
.Notes
3230
COMPLEX PARAMETER PROPERTIES
3331
3432
To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
3533
36-
BODY <IAvailableScopeRequest>: Available scope
37-
[Scope <String[]>]:
38-
3934
INPUTOBJECT <IReservationsIdentity>: Identity Parameter
4035
[Id <String>]: Resource identity path
4136
[ReservationId <String>]: Id of the reservation item
4237
[ReservationOrderId <String>]: Order Id of the reservation
4338
[SubscriptionId <String>]: Id of the subscription
39+
40+
RESERVATIONORDERINPUTOBJECT <IReservationsIdentity>: Identity Parameter
41+
[Id <String>]: Resource identity path
42+
[ReservationId <String>]: Id of the reservation item
43+
[ReservationOrderId <String>]: Order Id of the reservation
44+
[SubscriptionId <String>]: Id of the subscription
4445
.Link
4546
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationavailablescope
4647
#>
4748
function Get-AzReservationAvailableScope {
48-
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties])]
49+
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties])]
4950
[CmdletBinding(DefaultParameterSetName='AvailableExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
5051
param(
51-
[Parameter(ParameterSetName='Available', Mandatory)]
5252
[Parameter(ParameterSetName='AvailableExpanded', Mandatory)]
53+
[Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded', Mandatory)]
54+
[Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
55+
[Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
5356
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
5457
[System.String]
5558
# Id of the reservation item
5659
${ReservationId},
5760

58-
[Parameter(ParameterSetName='Available', Mandatory)]
5961
[Parameter(ParameterSetName='AvailableExpanded', Mandatory)]
62+
[Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
63+
[Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
6064
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
6165
[System.String]
6266
# Order Id of the reservation
6367
${ReservationOrderId},
6468

65-
[Parameter(ParameterSetName='AvailableViaIdentity', Mandatory, ValueFromPipeline)]
6669
[Parameter(ParameterSetName='AvailableViaIdentityExpanded', Mandatory, ValueFromPipeline)]
6770
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
6871
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
6972
# Identity Parameter
70-
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
7173
${InputObject},
7274

73-
[Parameter(ParameterSetName='Available', Mandatory, ValueFromPipeline)]
74-
[Parameter(ParameterSetName='AvailableViaIdentity', Mandatory, ValueFromPipeline)]
75-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
76-
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest]
77-
# Available scope
78-
# To construct, see NOTES section for BODY properties and create a hash table.
79-
${Body},
75+
[Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded', Mandatory, ValueFromPipeline)]
76+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
77+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
78+
# Identity Parameter
79+
${ReservationOrderInputObject},
8080

8181
[Parameter(ParameterSetName='AvailableExpanded')]
8282
[Parameter(ParameterSetName='AvailableViaIdentityExpanded')]
83+
[Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded')]
8384
[AllowEmptyCollection()]
8485
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
8586
[System.String[]]
8687
# .
8788
${Scope},
8889

90+
[Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
91+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
92+
[System.String]
93+
# Path of Json file supplied to the Available operation
94+
${JsonFilePath},
95+
96+
[Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
97+
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
98+
[System.String]
99+
# Json string supplied to the Available operation
100+
${JsonString},
101+
89102
[Parameter()]
90103
[Alias('AzureRMContext', 'AzureCredential')]
91104
[ValidateNotNull()]
@@ -154,6 +167,15 @@ begin {
154167
$PSBoundParameters['OutBuffer'] = 1
155168
}
156169
$parameterSet = $PSCmdlet.ParameterSetName
170+
171+
$testPlayback = $false
172+
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
173+
174+
$context = Get-AzContext
175+
if (-not $context -and -not $testPlayback) {
176+
Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
177+
exit
178+
}
157179

158180
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
159181
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -173,10 +195,11 @@ begin {
173195
}
174196

175197
$mapping = @{
176-
Available = 'Az.Reservations.private\Get-AzReservationAvailableScope_Available';
177198
AvailableExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableExpanded';
178-
AvailableViaIdentity = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentity';
179199
AvailableViaIdentityExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentityExpanded';
200+
AvailableViaIdentityReservationOrderExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentityReservationOrderExpanded';
201+
AvailableViaJsonFilePath = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaJsonFilePath';
202+
AvailableViaJsonString = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaJsonString';
180203
}
181204
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
182205
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -185,6 +208,9 @@ begin {
185208
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
186209
}
187210
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
211+
if ($wrappedCmd -eq $null) {
212+
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
213+
}
188214
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
189215
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
190216
$steppablePipeline.Begin($PSCmdlet)

0 commit comments

Comments
 (0)