From 5c0a9255769ea6f749acb8f4e572c3aa6409d2be Mon Sep 17 00:00:00 2001 From: JoyerJin <116236375+JoyerJin@users.noreply.github.com> Date: Fri, 11 Apr 2025 16:29:58 +0800 Subject: [PATCH 1/3] migrate Reservation module to autorest v4 --- .../Properties/AssemblyInfo.cs | 27 ++++ .../Reservations.Autorest/README.md | 15 +-- .../reservationOrders-reservations.json | 33 ----- .../Microsoft.Capacity/reservationOrders.json | 65 --------- .../custom/Invoke-AzReservationReturn.ps1 | 86 ++++++------ .../custom/Merge-AzReservation.ps1 | 2 +- .../custom/Split-AzReservation.ps1 | 4 +- .../docs/Az.Reservations.md | 8 +- .../docs/Get-AzReservation.md | 28 +++- .../docs/Get-AzReservationAvailableScope.md | 95 ++++++++----- .../docs/Get-AzReservationCatalog.md | 3 +- .../docs/Get-AzReservationHistory.md | 2 +- .../docs/Get-AzReservationOrder.md | 3 +- .../docs/Get-AzReservationOrderId.md | 3 +- .../docs/Get-AzReservationQuote.md | 78 ++++++----- .../Invoke-AzReservationArchiveReservation.md | 25 +++- .../Invoke-AzReservationCalculateExchange.md | 65 +++++---- .../Invoke-AzReservationCalculateRefund.md | 69 ++++++---- .../docs/Invoke-AzReservationExchange.md | 56 +++++--- .../docs/Invoke-AzReservationReturn.md | 75 +++++++---- ...nvoke-AzReservationUnarchiveReservation.md | 25 +++- .../docs/Merge-AzReservation.md | 2 +- .../docs/Move-AzReservationDirectory.md | 71 +++++----- .../docs/New-AzReservation.md | 109 ++++++++------- .../docs/Split-AzReservation.md | 2 +- .../docs/Update-AzReservation.md | 126 +++++++++++------- .../Reservations.Autorest/generate-info.json | 2 +- .../Reservations.Autorest/resources/README.md | 11 ++ .../Get-AzReservationAvailableScope.Tests.ps1 | 20 +-- .../test/Get-AzReservationQuote.Tests.ps1 | 14 +- ...e-AzReservationCalculateExchange.Tests.ps1 | 11 +- ...oke-AzReservationCalculateRefund.Tests.ps1 | 23 +--- .../Invoke-AzReservationExchange.Tests.ps1 | 15 +-- .../test/Invoke-AzReservationReturn.Tests.ps1 | 42 +----- .../Move-AzReservationDirectory.Tests.ps1 | 11 +- .../test/New-AzReservation.Tests.ps1 | 37 +---- .../test/Update-AzReservation.Tests.ps1 | 25 +--- src/Reservations/Reservations.sln | 89 +++++++++++-- .../Reservations/Az.Reservations.psd1 | 14 +- .../Reservations/help/Az.Reservations.md | 6 +- .../Reservations/help/Get-AzReservation.md | 28 +++- .../help/Get-AzReservationAvailableScope.md | 97 +++++++++----- .../help/Get-AzReservationCatalog.md | 3 +- .../help/Get-AzReservationHistory.md | 2 +- .../help/Get-AzReservationOrder.md | 3 +- .../help/Get-AzReservationOrderId.md | 3 +- .../help/Get-AzReservationQuote.md | 79 ++++++----- .../Invoke-AzReservationArchiveReservation.md | 25 +++- .../Invoke-AzReservationCalculateExchange.md | 65 +++++---- .../Invoke-AzReservationCalculateRefund.md | 69 ++++++---- .../help/Invoke-AzReservationExchange.md | 54 +++++--- .../help/Invoke-AzReservationReturn.md | 78 +++++++---- ...nvoke-AzReservationUnarchiveReservation.md | 25 +++- .../Reservations/help/Merge-AzReservation.md | 2 +- .../help/Move-AzReservationDirectory.md | 75 ++++++----- .../Reservations/help/New-AzReservation.md | 103 +++++++------- .../Reservations/help/Split-AzReservation.md | 2 +- .../Reservations/help/Update-AzReservation.md | 126 +++++++++++------- 58 files changed, 1286 insertions(+), 950 deletions(-) create mode 100644 src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs delete mode 100644 src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders.json create mode 100644 src/Reservations/Reservations.Autorest/resources/README.md diff --git a/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs b/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..f120065f5e14 --- /dev/null +++ b/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the ""License""); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an ""AS IS"" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +// is regenerated. + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] +[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - Reservations")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.13.1")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.13.1")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] + diff --git a/src/Reservations/Reservations.Autorest/README.md b/src/Reservations/Reservations.Autorest/README.md index e1acc1e29667..b8961ca7635c 100644 --- a/src/Reservations/Reservations.Autorest/README.md +++ b/src/Reservations/Reservations.Autorest/README.md @@ -53,13 +53,6 @@ module-version: 0.1.0 title: Reservations subject-prefix: $(service-name) -resourcegroup-append: true -nested-object-to-string: true - -# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option -use-extension: - "@autorest/powershell": "3.x" - directive: ### Rename Cmdlet names - where: @@ -189,7 +182,13 @@ directive: subject-prefix: Reservation subject: AvailableScope - ### Hide cmdlet + # Following are common directives which are normally required in all the RPs + # Remove the unexpanded parameter set + - where: + variant: ^(Available|Calculate|Change|Post|Purchase|Split|Update)(?!.*?(Expanded|JsonFilePath|JsonString)) + remove: true + + ### Hide cmdlet to customize - where: verb: Split subject-prefix: '' diff --git a/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders-reservations.json b/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders-reservations.json index 620aa1fe47c8..a755e43d2db6 100644 --- a/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders-reservations.json +++ b/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders-reservations.json @@ -5,39 +5,6 @@ "url": "https://learn.microsoft.com/powershell/module/az.reservations" }, "commands": [ - { - "name": "Get-AzReservationAvailableScope", - "description": "Check whether the scopes from request is valid for `Reservation`.\\n", - "path": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationavailablescope" - }, - "parameterSets": [ - { - "parameters": [ - "-ReservationId ", - "-ReservationOrderId " - ] - } - ] - }, - "examples": [ - { - "description": "Check whether the scopes from request is valid for `Reservation`.\\n", - "parameters": [ - { - "name": "-ReservationId", - "value": "[Path.reservationId]" - }, - { - "name": "-ReservationOrderId", - "value": "[Path.reservationOrderId]" - } - ] - } - ] - }, { "name": "Invoke-AzReservationArchiveReservation", "description": "Archiving a `Reservation` moves it to `Archived` state.", diff --git a/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders.json b/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders.json deleted file mode 100644 index 0ac29f149185..000000000000 --- a/src/Reservations/Reservations.Autorest/UX/Microsoft.Capacity/reservationOrders.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "resourceType": "reservationOrders", - "apiVersion": "2022-11-01", - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.reservations" - }, - "commands": [ - { - "name": "Invoke-AzReservationCalculateRefund", - "description": "Calculate price for returning `Reservations` if there are no policy errors.\\n", - "path": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/calculateRefund", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.reservations/invoke-azreservationcalculaterefund" - }, - "parameterSets": [ - { - "parameters": [ - "-ReservationOrderId " - ] - } - ] - }, - "examples": [ - { - "description": "Calculate price for returning `Reservations` if there are no policy errors.\\n", - "parameters": [ - { - "name": "-ReservationOrderId", - "value": "[Path.reservationOrderId]" - } - ] - } - ] - }, - { - "name": "Move-AzReservationDirectory", - "description": "Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id", - "path": "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory", - "help": { - "learnMore": { - "url": "https://learn.microsoft.com/powershell/module/az.reservations/move-azreservationdirectory" - }, - "parameterSets": [ - { - "parameters": [ - "-ReservationOrderId " - ] - } - ] - }, - "examples": [ - { - "description": "Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id", - "parameters": [ - { - "name": "-ReservationOrderId", - "value": "[Path.reservationOrderId]" - } - ] - } - ] - } - ] -} diff --git a/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 b/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 index 83e0abc16515..6b20a881b65b 100644 --- a/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 +++ b/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 @@ -1,6 +1,6 @@ # ---------------------------------------------------------------------------------- # -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -14,15 +14,16 @@ <# .Synopsis -Return a Reservation. +Return a reservation and get refund information. .Description -Return a Reservation. +Return a reservation and get refund information. .Inputs Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse - +Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse +.Notes +COMPLEX PARAMETER PROPERTIES 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. INPUTOBJECT : Identity Parameter @@ -30,42 +31,53 @@ INPUTOBJECT : Identity Parameter [ReservationId ]: Id of the reservation item [ReservationOrderId ]: Order Id of the reservation [SubscriptionId ]: Id of the subscription +.Link +https://learn.microsoft.com/powershell/module/az.reservations/invoke-azreservationreturn #> function Invoke-AzReservationReturn { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Post', Mandatory)] [Parameter(ParameterSetName='PostExpanded', Mandatory)] + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')] [System.String] - # Reservation Order Id. + # Order Id of the reservation ${ReservationOrderId}, - + + [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity] + # Identity Parameter + ${InputObject}, + [Parameter(ParameterSetName='PostExpanded', Mandatory)] [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] - [System.String] - # Reservation Id to return. - ${ReservationToReturnReservationId}, - + [System.Int32] + # Quantity to be returned. + # Must be greater than zero. + ${ReservationToReturnQuantity}, + [Parameter(ParameterSetName='PostExpanded', Mandatory)] [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] - [int] - # Quantity to return. - ${ReservationToReturnQuantity}, + [System.String] + # Fully qualified identifier of the reservation being returned + ${ReservationToReturnReservationId}, [Parameter(ParameterSetName='PostExpanded', Mandatory)] [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] [System.String] - # The session id obtained from Invoke-AzReservationCalculateRefund.. - ${SessionId}, + # The reason of returning the reservation + ${ReturnReason}, [Parameter(ParameterSetName='PostExpanded', Mandatory)] [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory)] @@ -80,9 +92,20 @@ function Invoke-AzReservationReturn { [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] [System.String] - # The reason for this reservation return. - ${ReturnReason}, + # The session id obtained from Invoke-AzReservationCalculateRefund.. + ${SessionId}, + [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] + [System.String] + # Path of Json file supplied to the Post operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='PostViaJsonString', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] + [System.String] + # Json string supplied to the Post operation + ${JsonString}, [Parameter(DontShow)] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -128,23 +151,7 @@ function Invoke-AzReservationReturn { [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials}, - - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(ParameterSetName='Post', Mandatory)] - [Parameter(ParameterSetName='PostViaIdentity', Mandatory)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IRefundRequest] - # The return request body. - ${Body} + ${ProxyUseDefaultCredentials} ) process { @@ -153,7 +160,8 @@ function Invoke-AzReservationReturn { $response = Az.Reservations.internal\Invoke-AzReservationReturn @PSBoundParameters # Remove extra parameters for Get-AzReservationOrder - $null = $PSBoundParameters.Remove('Body') + $null = $PSBoundParameters.Remove('JsonString') + $null = $PSBoundParameters.Remove('JsonFilePath') $null = $PSBoundParameters.Remove('ReservationToReturnReservationId') $null = $PSBoundParameters.Remove('ReservationToReturnQuantity') $null = $PSBoundParameters.Remove('SessionId') diff --git a/src/Reservations/Reservations.Autorest/custom/Merge-AzReservation.ps1 b/src/Reservations/Reservations.Autorest/custom/Merge-AzReservation.ps1 index ac6ad426e7af..52f940162caf 100644 --- a/src/Reservations/Reservations.Autorest/custom/Merge-AzReservation.ps1 +++ b/src/Reservations/Reservations.Autorest/custom/Merge-AzReservation.ps1 @@ -19,7 +19,7 @@ Merge two reservations into one reservation within the same reservation order. Merge two reservations into one reservation within the same reservation order. #> function Merge-AzReservation { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, HelpMessage='Reservation Order Id.')] diff --git a/src/Reservations/Reservations.Autorest/custom/Split-AzReservation.ps1 b/src/Reservations/Reservations.Autorest/custom/Split-AzReservation.ps1 index 5c80feb1a27e..5719cd3b706e 100644 --- a/src/Reservations/Reservations.Autorest/custom/Split-AzReservation.ps1 +++ b/src/Reservations/Reservations.Autorest/custom/Split-AzReservation.ps1 @@ -1,6 +1,6 @@ # ---------------------------------------------------------------------------------- # -# Copyright Microsoft Corporation +# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -19,7 +19,7 @@ Split a Reservation order. Split a Reservation order. #> function Split-AzReservation { - [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])] + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory, HelpMessage='Reservation Order Id.')] diff --git a/src/Reservations/Reservations.Autorest/docs/Az.Reservations.md b/src/Reservations/Reservations.Autorest/docs/Az.Reservations.md index d607a018c6cd..79801521154e 100644 --- a/src/Reservations/Reservations.Autorest/docs/Az.Reservations.md +++ b/src/Reservations/Reservations.Autorest/docs/Az.Reservations.md @@ -1,6 +1,6 @@ --- Module Name: Az.Reservations -Module Guid: 59d3f19f-af05-4d96-a9a8-ff647983b57f +Module Guid: 2aeef1d3-a103-451c-ae76-1769e85dc1f3 Download Help Link: https://learn.microsoft.com/powershell/module/az.reservations Help Version: 1.0.0.0 Locale: en-US @@ -45,7 +45,7 @@ Calculate price for returning `Reservations` if there are no policy errors.\n Returns one or more `Reservations` in exchange for one or more `Reservation` purchases.\n ### [Invoke-AzReservationReturn](Invoke-AzReservationReturn.md) -Return a Reservation. +Return a reservation and get refund information. ### [Invoke-AzReservationUnarchiveReservation](Invoke-AzReservationUnarchiveReservation.md) Restores a `Reservation` to the state it was before archiving.\n @@ -57,11 +57,11 @@ Merge two reservations into one reservation within the same reservation order. Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id ### [New-AzReservation](New-AzReservation.md) -Purchase `ReservationOrder` and create resource under the specified URI. +Purchase `ReservationOrder` and purchase resource under the specified URI. ### [Split-AzReservation](Split-AzReservation.md) Split a Reservation order. ### [Update-AzReservation](Update-AzReservation.md) -Updates the applied scopes of the `Reservation`. +update the applied scopes of the `Reservation`. diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservation.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservation.md index c9ac2830abf8..64496eb59572 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservation.md @@ -30,6 +30,12 @@ Get-AzReservation -InputObject [-Expand ] [-Defa [] ``` +### GetViaIdentityReservationOrder +``` +Get-AzReservation -Id -ReservationOrderInputObject [-Expand ] + [-DefaultProfile ] [] +``` + ### List ``` Get-AzReservation -OrderId [-DefaultProfile ] [] @@ -97,7 +103,7 @@ Supported value of this query is renewProperties ```yaml Type: System.String -Parameter Sets: Get, GetViaIdentity +Parameter Sets: Get, GetViaIdentity, GetViaIdentityReservationOrder Aliases: Required: False @@ -145,7 +151,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: Get, GetViaIdentityReservationOrder Aliases: ReservationId Required: True @@ -157,7 +163,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -201,6 +206,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: GetViaIdentityReservationOrder +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SelectedState The selected provisioning state @@ -240,7 +260,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationAvailableScope.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationAvailableScope.md index d5b939c5138d..2424b215354d 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationAvailableScope.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationAvailableScope.md @@ -18,22 +18,27 @@ Get-AzReservationAvailableScope -ReservationId -ReservationOrderId ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### Available +### AvailableViaIdentityExpanded +``` +Get-AzReservationAvailableScope -InputObject [-Scope ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -Get-AzReservationAvailableScope -ReservationId -ReservationOrderId - -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + +### AvailableViaIdentityReservationOrderExpanded +``` +Get-AzReservationAvailableScope -ReservationId -ReservationOrderInputObject + [-Scope ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### AvailableViaIdentity +### AvailableViaJsonFilePath ``` -Get-AzReservationAvailableScope -InputObject -Body +Get-AzReservationAvailableScope -ReservationId -ReservationOrderId -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### AvailableViaIdentityExpanded +### AvailableViaJsonString ``` -Get-AzReservationAvailableScope -InputObject [-Scope ] +Get-AzReservationAvailableScope -ReservationId -ReservationOrderId -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` @@ -72,22 +77,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -Available scope -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest -Parameter Sets: Available, AvailableViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -106,11 +95,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: AvailableViaIdentity, AvailableViaIdentityExpanded +Parameter Sets: AvailableViaIdentityExpanded Aliases: Required: True @@ -120,6 +108,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Available operation + +```yaml +Type: System.String +Parameter Sets: AvailableViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Available operation + +```yaml +Type: System.String +Parameter Sets: AvailableViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -140,7 +158,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Available, AvailableExpanded +Parameter Sets: AvailableExpanded, AvailableViaIdentityReservationOrderExpanded, AvailableViaJsonFilePath, AvailableViaJsonString Aliases: Required: True @@ -155,7 +173,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: Available, AvailableExpanded +Parameter Sets: AvailableExpanded, AvailableViaJsonFilePath, AvailableViaJsonString Aliases: Required: True @@ -165,12 +183,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: AvailableViaIdentityReservationOrderExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Scope . ```yaml Type: System.String[] -Parameter Sets: AvailableExpanded, AvailableViaIdentityExpanded +Parameter Sets: AvailableExpanded, AvailableViaIdentityExpanded, AvailableViaIdentityReservationOrderExpanded Aliases: Required: False @@ -216,13 +249,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationCatalog.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationCatalog.md index a3be3526f6dd..6a656997d035 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationCatalog.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationCatalog.md @@ -139,7 +139,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -283,7 +282,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICatalog +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICatalog ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationHistory.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationHistory.md index f2618a90bc40..dd3c881b0fcb 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationHistory.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationHistory.md @@ -99,7 +99,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrder.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrder.md index f4482d46c77d..6d4285dd480b 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrder.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrder.md @@ -114,7 +114,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -137,7 +136,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrderId.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrderId.md index c8fb5a2e3fd6..f97da054ce2e 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrderId.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrderId.md @@ -67,7 +67,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -105,7 +104,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAppliedReservations +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAppliedReservations ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationQuote.md b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationQuote.md index 1219d0377e69..ef8209cc97b7 100644 --- a/src/Reservations/Reservations.Autorest/docs/Get-AzReservationQuote.md +++ b/src/Reservations/Reservations.Autorest/docs/Get-AzReservationQuote.md @@ -17,15 +17,21 @@ Calculate price for placing a `ReservationOrder`. Get-AzReservationQuote [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] - [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] - [-DisplayName ] [-InstanceFlexibility ] [-Location ] [-Quantity ] - [-Renew] [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] - [-Term ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] + [-InstanceFlexibility ] [-Location ] [-Quantity ] [-Renew] + [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] [-Term ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### Calculate +### CalculateViaJsonFilePath ``` -Get-AzReservationQuote -Body [-DefaultProfile ] [-Confirm] [-WhatIf] +Get-AzReservationQuote -JsonFilePath [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### CalculateViaJsonString +``` +Get-AzReservationQuote -JsonString [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` @@ -218,7 +224,7 @@ Accept wildcard characters: False Type of the Applied Scope. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -233,7 +239,7 @@ Accept wildcard characters: False Represent the billing plans. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -259,22 +265,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -The request for reservation purchase -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest -Parameter Sets: Calculate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -311,7 +301,7 @@ Turning this on will apply the reservation discount to other VMs in the same VM Only specify for VirtualMachines reserved resource type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -322,6 +312,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Calculate operation + +```yaml +Type: System.String +Parameter Sets: CalculateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Calculate operation + +```yaml +Type: System.String +Parameter Sets: CalculateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The Azure region where the reserved resource lives. @@ -371,7 +391,7 @@ Accept wildcard characters: False The type of the resource that is being reserved. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -416,7 +436,7 @@ Accept wildcard characters: False Represent the term of reservation. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -463,11 +483,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculatePriceResponseProperties +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculatePriceResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationArchiveReservation.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationArchiveReservation.md index 6f9ea058f477..28d798330899 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationArchiveReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationArchiveReservation.md @@ -24,6 +24,13 @@ Invoke-AzReservationArchiveReservation -InputObject [-De [-PassThru] [-Confirm] [-WhatIf] [] ``` +### ArchiveViaIdentityReservationOrder +``` +Invoke-AzReservationArchiveReservation -ReservationId + -ReservationOrderInputObject [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + ## DESCRIPTION Archiving a `Reservation` moves it to `Archived` state. @@ -60,7 +67,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -94,7 +100,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Archive +Parameter Sets: Archive, ArchiveViaIdentityReservationOrder Aliases: Required: True @@ -119,6 +125,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: ArchiveViaIdentityReservationOrder +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateExchange.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateExchange.md index df49d096e9df..ddb53e432705 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateExchange.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateExchange.md @@ -19,10 +19,16 @@ Invoke-AzReservationCalculateExchange [-ReservationsToExchange ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### Post +### PostViaJsonFilePath ``` -Invoke-AzReservationCalculateExchange -Body [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] +Invoke-AzReservationCalculateExchange -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### PostViaJsonString +``` +Invoke-AzReservationCalculateExchange -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -100,32 +106,46 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -Calculate exchange request -To construct, see NOTES section for BODY properties and create a hash table. +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeRequest -Parameter Sets: Post +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. +### -JsonString +Json string supplied to the Post operation ```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -149,10 +169,9 @@ Accept wildcard characters: False ### -ReservationsToExchange List of reservations that are being returned in this exchange. -To construct, see NOTES section for RESERVATIONSTOEXCHANGE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationToReturn[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationToReturn[] Parameter Sets: PostExpanded Aliases: @@ -165,10 +184,9 @@ Accept wildcard characters: False ### -ReservationsToPurchase List of reservations that are being purchased in this exchange. -To construct, see NOTES section for RESERVATIONSTOPURCHASE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IPurchaseRequest[] Parameter Sets: PostExpanded Aliases: @@ -181,10 +199,9 @@ Accept wildcard characters: False ### -SavingsPlansToPurchase List of savings plans that are being purchased in this exchange. -To construct, see NOTES section for SAVINGSPLANSTOPURCHASE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISavingsPlanPurchaseRequest[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ISavingsPlanPurchaseRequest[] Parameter Sets: PostExpanded Aliases: @@ -231,11 +248,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeRequest - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeOperationResultResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateExchangeOperationResultResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateRefund.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateRefund.md index 588687357062..94ca5874077d 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateRefund.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationCalculateRefund.md @@ -19,22 +19,22 @@ Invoke-AzReservationCalculateRefund -ReservationOrderId [-Id ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### Post +### PostViaIdentityExpanded ``` -Invoke-AzReservationCalculateRefund -ReservationOrderId -Body +Invoke-AzReservationCalculateRefund -InputObject [-Id ] + [-ReservationToReturnQuantity ] [-ReservationToReturnReservationId ] [-Scope ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### PostViaIdentity +### PostViaJsonFilePath ``` -Invoke-AzReservationCalculateRefund -InputObject -Body +Invoke-AzReservationCalculateRefund -ReservationOrderId -JsonFilePath [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### PostViaIdentityExpanded +### PostViaJsonString ``` -Invoke-AzReservationCalculateRefund -InputObject [-Id ] - [-ReservationToReturnQuantity ] [-ReservationToReturnReservationId ] [-Scope ] +Invoke-AzReservationCalculateRefund -ReservationOrderId -JsonString [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` @@ -96,22 +96,6 @@ The SessionId in the response is a required input parameter for cmdlet Invoke-Az ## PARAMETERS -### -Body -Request containing information needed for calculating refund. -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundRequest -Parameter Sets: Post, PostViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -145,11 +129,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Parameter Sets: PostViaIdentityExpanded Aliases: Required: True @@ -159,12 +142,42 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ReservationOrderId Order Id of the reservation ```yaml Type: System.String -Parameter Sets: Post, PostExpanded +Parameter Sets: PostExpanded, PostViaJsonFilePath, PostViaJsonString Aliases: Required: True @@ -257,13 +270,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateRefundResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationExchange.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationExchange.md index d1a584de7b86..0d201f1588f9 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationExchange.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationExchange.md @@ -18,10 +18,16 @@ Invoke-AzReservationExchange [-SessionId ] [-DefaultProfile ] [-WhatIf] [] ``` -### Post +### PostViaJsonFilePath ``` -Invoke-AzReservationExchange -Body [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] +Invoke-AzReservationExchange -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### PostViaJsonString +``` +Invoke-AzReservationExchange -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] ``` ## DESCRIPTION @@ -60,32 +66,46 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -Exchange request -To construct, see NOTES section for BODY properties and create a hash table. +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeRequest -Parameter Sets: Post +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. +### -JsonString +Json string supplied to the Post operation ```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -158,11 +178,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeRequest - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeOperationResultResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IExchangeOperationResultResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md index 49b7e2e34a53..b088289fff8d 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md @@ -8,27 +8,26 @@ schema: 2.0.0 # Invoke-AzReservationReturn ## SYNOPSIS -Return a Reservation. +Return a reservation and get refund information. ## SYNTAX -### PostExpanded (Default) +### PostViaJsonString (Default) ``` -Invoke-AzReservationReturn -ReservationOrderId -ReservationToReturnQuantity - -ReservationToReturnReservationId -ReturnReason -Scope -SessionId - [-Confirm] [-WhatIf] [] +Invoke-AzReservationReturn -ReservationOrderId -JsonString [-Confirm] [-WhatIf] + [] ``` -### Post +### PostExpanded ``` -Invoke-AzReservationReturn -Body -ReservationOrderId [-Confirm] [-WhatIf] - [] +Invoke-AzReservationReturn -ReservationOrderId -ReservationToReturnQuantity + -ReservationToReturnReservationId -ReturnReason -Scope -SessionId + [-Confirm] [-WhatIf] [] ``` ### PostViaIdentity ``` -Invoke-AzReservationReturn -InputObject -Body [-Confirm] [-WhatIf] - [] +Invoke-AzReservationReturn -InputObject [-Confirm] [-WhatIf] [] ``` ### PostViaIdentityExpanded @@ -38,8 +37,14 @@ Invoke-AzReservationReturn -InputObject -ReservationToRe [-Confirm] [-WhatIf] [] ``` +### PostViaJsonFilePath +``` +Invoke-AzReservationReturn -ReservationOrderId -JsonFilePath [-Confirm] [-WhatIf] + [] +``` + ## DESCRIPTION -Return a Reservation. +Return a reservation and get refund information. ## EXAMPLES @@ -62,13 +67,27 @@ Proceed reservations return with session ID obtained from Invoke-AzReservationCa ## PARAMETERS -### -Body -The return request body. -To construct, see NOTES section for BODY properties and create a hash table. +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IRefundRequest -Parameter Sets: Post, PostViaIdentity +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True @@ -78,28 +97,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -JsonString +Json string supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Type: System.String +Parameter Sets: PostViaJsonString Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` ### -ReservationOrderId -Reservation Order Id. +Order Id of the reservation ```yaml Type: System.String -Parameter Sets: Post, PostExpanded +Parameter Sets: PostExpanded, PostViaJsonFilePath, PostViaJsonString Aliases: Required: True @@ -110,7 +128,8 @@ Accept wildcard characters: False ``` ### -ReservationToReturnQuantity -Quantity to return. +Quantity to be returned. +Must be greater than zero. ```yaml Type: System.Int32 @@ -125,7 +144,7 @@ Accept wildcard characters: False ``` ### -ReservationToReturnReservationId -Reservation Id to return. +Fully qualified identifier of the reservation being returned ```yaml Type: System.String @@ -140,7 +159,7 @@ Accept wildcard characters: False ``` ### -ReturnReason -The reason for this reservation return. +The reason of returning the reservation ```yaml Type: System.String @@ -225,7 +244,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationUnarchiveReservation.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationUnarchiveReservation.md index 0619270ae68b..7060a1c3c45a 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationUnarchiveReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationUnarchiveReservation.md @@ -24,6 +24,13 @@ Invoke-AzReservationUnarchiveReservation -InputObject [- [-PassThru] [-Confirm] [-WhatIf] [] ``` +### UnarchiveViaIdentityReservationOrder +``` +Invoke-AzReservationUnarchiveReservation -ReservationId + -ReservationOrderInputObject [-DefaultProfile ] [-PassThru] [-Confirm] + [-WhatIf] [] +``` + ## DESCRIPTION Restores a `Reservation` to the state it was before archiving.\n @@ -60,7 +67,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -94,7 +100,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Unarchive +Parameter Sets: Unarchive, UnarchiveViaIdentityReservationOrder Aliases: Required: True @@ -119,6 +125,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: UnarchiveViaIdentityReservationOrder +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Reservations/Reservations.Autorest/docs/Merge-AzReservation.md b/src/Reservations/Reservations.Autorest/docs/Merge-AzReservation.md index 6deef750c35b..57274b5d1404 100644 --- a/src/Reservations/Reservations.Autorest/docs/Merge-AzReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/Merge-AzReservation.md @@ -125,7 +125,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Move-AzReservationDirectory.md b/src/Reservations/Reservations.Autorest/docs/Move-AzReservationDirectory.md index fe308104ab56..e66f6663d223 100644 --- a/src/Reservations/Reservations.Autorest/docs/Move-AzReservationDirectory.md +++ b/src/Reservations/Reservations.Autorest/docs/Move-AzReservationDirectory.md @@ -18,22 +18,22 @@ Move-AzReservationDirectory -ReservationOrderId [-DestinationTenantId < [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### Change +### ChangeViaIdentityExpanded ``` -Move-AzReservationDirectory -ReservationOrderId -Body +Move-AzReservationDirectory -InputObject [-DestinationTenantId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] ``` -### ChangeViaIdentity +### ChangeViaJsonFilePath ``` -Move-AzReservationDirectory -InputObject -Body - [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Move-AzReservationDirectory -ReservationOrderId -JsonFilePath [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` -### ChangeViaIdentityExpanded +### ChangeViaJsonString ``` -Move-AzReservationDirectory -InputObject [-DestinationTenantId ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] +Move-AzReservationDirectory -ReservationOrderId -JsonString [-DefaultProfile ] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -70,22 +70,6 @@ Move reservation order from one tenant to another ## PARAMETERS -### -Body -Request body for change directory of a reservation. -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryRequest -Parameter Sets: Change, ChangeViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -119,11 +103,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: ChangeViaIdentity, ChangeViaIdentityExpanded +Parameter Sets: ChangeViaIdentityExpanded Aliases: Required: True @@ -133,12 +116,42 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Change operation + +```yaml +Type: System.String +Parameter Sets: ChangeViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Change operation + +```yaml +Type: System.String +Parameter Sets: ChangeViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ReservationOrderId Order Id of the reservation ```yaml Type: System.String -Parameter Sets: Change, ChangeExpanded +Parameter Sets: ChangeExpanded, ChangeViaJsonFilePath, ChangeViaJsonString Aliases: Required: True @@ -184,13 +197,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IChangeDirectoryResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/New-AzReservation.md b/src/Reservations/Reservations.Autorest/docs/New-AzReservation.md index 2698700af976..27c0c1d3ceaf 100644 --- a/src/Reservations/Reservations.Autorest/docs/New-AzReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/New-AzReservation.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzReservation ## SYNOPSIS -Purchase `ReservationOrder` and create resource under the specified URI. +Purchase `ReservationOrder` and purchase resource under the specified URI. ## SYNTAX @@ -17,41 +17,37 @@ Purchase `ReservationOrder` and create resource under the specified URI. New-AzReservation -ReservationOrderId [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] - [-InstanceFlexibility ] [-Location ] [-Quantity ] [-Renew] - [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-BillingPlan ] + [-BillingScopeId ] [-DisplayName ] [-InstanceFlexibility ] [-Location ] + [-Quantity ] [-Renew] [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### Purchase +### PurchaseViaIdentityExpanded ``` -New-AzReservation -ReservationOrderId -Body [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] +New-AzReservation -InputObject [-AppliedScope ] + [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] + [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-BillingPlan ] + [-BillingScopeId ] [-DisplayName ] [-InstanceFlexibility ] [-Location ] + [-Quantity ] [-Renew] [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### PurchaseViaIdentity +### PurchaseViaJsonFilePath ``` -New-AzReservation -InputObject -Body [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +New-AzReservation -ReservationOrderId -JsonFilePath [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` -### PurchaseViaIdentityExpanded +### PurchaseViaJsonString ``` -New-AzReservation -InputObject [-AppliedScope ] - [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] - [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] - [-InstanceFlexibility ] [-Location ] [-Quantity ] [-Renew] - [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] +New-AzReservation -ReservationOrderId -JsonString [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION -Purchase `ReservationOrder` and create resource under the specified URI. +Purchase `ReservationOrder` and purchase resource under the specified URI. ## EXAMPLES @@ -167,7 +163,7 @@ Accept wildcard characters: False Type of the Applied Scope. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -197,7 +193,7 @@ Accept wildcard characters: False Represent the billing plans. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -223,22 +219,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -The request for reservation purchase -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest -Parameter Sets: Purchase, PurchaseViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -272,11 +252,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PurchaseViaIdentity, PurchaseViaIdentityExpanded +Parameter Sets: PurchaseViaIdentityExpanded Aliases: Required: True @@ -291,7 +270,7 @@ Turning this on will apply the reservation discount to other VMs in the same VM Only specify for VirtualMachines reserved resource type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -302,6 +281,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Purchase operation + +```yaml +Type: System.String +Parameter Sets: PurchaseViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Purchase operation + +```yaml +Type: System.String +Parameter Sets: PurchaseViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The Azure region where the reserved resource lives. @@ -367,7 +376,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: Purchase, PurchaseExpanded +Parameter Sets: PurchaseExpanded, PurchaseViaJsonFilePath, PurchaseViaJsonString Aliases: Required: True @@ -381,7 +390,7 @@ Accept wildcard characters: False The type of the resource that is being reserved. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -426,7 +435,7 @@ Accept wildcard characters: False Represent the term of reservation. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -473,13 +482,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Split-AzReservation.md b/src/Reservations/Reservations.Autorest/docs/Split-AzReservation.md index b9761c03f60f..0fbe43e88852 100644 --- a/src/Reservations/Reservations.Autorest/docs/Split-AzReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/Split-AzReservation.md @@ -140,7 +140,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/docs/Update-AzReservation.md b/src/Reservations/Reservations.Autorest/docs/Update-AzReservation.md index f62e690ed714..54d716e3d997 100644 --- a/src/Reservations/Reservations.Autorest/docs/Update-AzReservation.md +++ b/src/Reservations/Reservations.Autorest/docs/Update-AzReservation.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzReservation ## SYNOPSIS -Updates the applied scopes of the `Reservation`. +update the applied scopes of the `Reservation`. ## SYNTAX @@ -17,37 +17,46 @@ Updates the applied scopes of the `Reservation`. Update-AzReservation -Id -OrderId [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-InstanceFlexibility ] [-Name ] [-Renew] - [-RenewProperty ] [-ReviewDateTime ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-InstanceFlexibility ] + [-Name ] [-Renew] [-RenewProperty ] [-ReviewDateTime ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### Update +### UpdateViaIdentityExpanded ``` -Update-AzReservation -Id -OrderId -Reservation [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Update-AzReservation -InputObject [-AppliedScope ] + [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] + [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-InstanceFlexibility ] + [-Name ] [-Renew] [-RenewProperty ] [-ReviewDateTime ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### UpdateViaIdentity +### UpdateViaIdentityReservationOrderExpanded ``` -Update-AzReservation -InputObject -Reservation [-DefaultProfile ] +Update-AzReservation -Id -ReservationOrderInputObject + [-AppliedScope ] [-AppliedScopePropertyDisplayName ] + [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] + [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] + [-AppliedScopeType ] [-InstanceFlexibility ] [-Name ] [-Renew] + [-RenewProperty ] [-ReviewDateTime ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` -### UpdateViaIdentityExpanded +### UpdateViaJsonFilePath ``` -Update-AzReservation -InputObject [-AppliedScope ] - [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] - [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-InstanceFlexibility ] [-Name ] [-Renew] - [-RenewProperty ] [-ReviewDateTime ] [-DefaultProfile ] +Update-AzReservation -Id -OrderId -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] ``` +### UpdateViaJsonString +``` +Update-AzReservation -Id -OrderId -JsonString [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION -Updates the applied scopes of the `Reservation`. +update the applied scopes of the `Reservation`. ## EXAMPLES @@ -93,7 +102,7 @@ This property will be deprecated and replaced by appliedScopeProperties instead ```yaml Type: System.String[] -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -108,7 +117,7 @@ Display name ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -123,7 +132,7 @@ Fully-qualified identifier of the management group where the benefit must be app ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -138,7 +147,7 @@ Fully-qualified identifier of the resource group. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -153,7 +162,7 @@ Fully-qualified identifier of the subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -168,7 +177,7 @@ Tenant ID where the savings plan should apply benefit. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -182,8 +191,8 @@ Accept wildcard characters: False Type of the Applied Scope. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -229,7 +238,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: ReservationId Required: True @@ -241,11 +250,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded +Parameter Sets: UpdateViaIdentityExpanded Aliases: Required: True @@ -260,8 +268,8 @@ Turning this on will apply the reservation discount to other VMs in the same VM Only specify for VirtualMachines reserved resource type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -271,12 +279,42 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Name Display name of the reservation ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -306,7 +344,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString Aliases: ReservationOrderId Required: True @@ -321,7 +359,7 @@ Setting this to true will automatically purchase a new reservation on the expira ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -333,11 +371,10 @@ Accept wildcard characters: False ### -RenewProperty . -To construct, see NOTES section for RENEWPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatchPropertiesRenewProperties -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IPatchPropertiesRenewProperties +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -347,13 +384,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Reservation -The request for reservation patch -To construct, see NOTES section for RESERVATION properties and create a hash table. +### -ReservationOrderInputObject +Identity Parameter ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatch -Parameter Sets: Update, UpdateViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: UpdateViaIdentityReservationOrderExpanded Aliases: Required: True @@ -368,7 +404,7 @@ This is the date-time when the Azure hybrid benefit needs to be reviewed. ```yaml Type: System.DateTime -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityReservationOrderExpanded Aliases: Required: False @@ -414,13 +450,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatch - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations.Autorest/generate-info.json b/src/Reservations/Reservations.Autorest/generate-info.json index f01a6e5c92d1..2d7540850249 100644 --- a/src/Reservations/Reservations.Autorest/generate-info.json +++ b/src/Reservations/Reservations.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "3ad71e82-d301-4a09-9eaa-da9ed9082998" + "generate_Id": "aa094f3e-f143-4d67-bd90-fdce6ecf4cf6" } diff --git a/src/Reservations/Reservations.Autorest/resources/README.md b/src/Reservations/Reservations.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/src/Reservations/Reservations.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/Reservations/Reservations.Autorest/test/Get-AzReservationAvailableScope.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Get-AzReservationAvailableScope.Tests.ps1 index 8c45f0378cbc..81ad623b1395 100644 --- a/src/Reservations/Reservations.Autorest/test/Get-AzReservationAvailableScope.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Get-AzReservationAvailableScope.Tests.ps1 @@ -16,8 +16,8 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzReservationAvailableSco function ExecuteTestCases([object]$response) { $response | Should -Not -Be $null - $response.Scope | Should -Be "/subscriptions/40000000-aaaa-bbbb-cccc-100000000003" - $response.Valid | Should -Be "True" + $response.Scope.Scope | Should -Be "/subscriptions/40000000-aaaa-bbbb-cccc-100000000003" + $response.Scope.Valid | Should -Be "True" } Describe 'Get-AzReservationAvailableScope' { @@ -27,9 +27,10 @@ Describe 'Get-AzReservationAvailableScope' { ExecuteTestCases($response) } + #AvailableViaJsonString It 'Available' { - $param = @{Scope = "/subscriptions/40000000-aaaa-bbbb-cccc-100000000003"} - $response = Get-AzReservationAvailableScope -ReservationId "10000000-aaaa-bbbb-cccc-100000000001" -ReservationOrderId "50000000-aaaa-bbbb-cccc-100000000003" -Body $param + $param = '"Scope": "/subscriptions/40000000-aaaa-bbbb-cccc-100000000003"' + $response = Get-AzReservationAvailableScope -ReservationId "10000000-aaaa-bbbb-cccc-100000000001" -ReservationOrderId "50000000-aaaa-bbbb-cccc-100000000003" -JsonString $param ExecuteTestCases($response) } @@ -44,15 +45,4 @@ Describe 'Get-AzReservationAvailableScope' { ExecuteTestCases($response) } - - It 'AvailableViaIdentity' { - $body = @{Scope = "/subscriptions/40000000-aaaa-bbbb-cccc-100000000003"} - $identity = @{ - ReservationOrderId = "50000000-aaaa-bbbb-cccc-100000000003" - ReservationId = "10000000-aaaa-bbbb-cccc-100000000001" - } - $response = Get-AzReservationAvailableScope -InputObject $identity -Body $body - - ExecuteTestCases($response) - } } \ No newline at end of file diff --git a/src/Reservations/Reservations.Autorest/test/Get-AzReservationQuote.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Get-AzReservationQuote.Tests.ps1 index 45d93a013405..d08de24e644b 100644 --- a/src/Reservations/Reservations.Autorest/test/Get-AzReservationQuote.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Get-AzReservationQuote.Tests.ps1 @@ -32,18 +32,8 @@ Describe 'Get-AzReservationQuote' { } It 'Calculate' { - $reservationToPurchase = @{ - AppliedScopeType = "Shared" - BillingPlan = "Upfront" - billingScopeId = '/subscriptions/30000000-aaaa-bbbb-cccc-100000000005' - DisplayName = "Testvm" - Location = "westus" - Quantity = 1 - ReservedResourceType = "VirtualMachines" - Sku = "Standard_b1ls" - Term = "P1Y" - } - $response = Get-AzReservationQuote -Body $reservationToPurchase + $reservationToPurchase = "AppliedScopeType=Shared;BillingPlan=Upfront;billingScopeId=/subscriptions/30000000-aaaa-bbbb-cccc-100000000005;DisplayName=TestVm;Location=westus;Quantity=1;ReservedResourceType=VirtualMachines;Sku=Standard_b1ls;Term=P1Y" + $response = Get-AzReservationQuote -JsonString $reservationToPurchase ExecuteTestCases($response) } } diff --git a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateExchange.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateExchange.Tests.ps1 index 1201e7e41ae9..1b8bf555e943 100644 --- a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateExchange.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateExchange.Tests.ps1 @@ -19,11 +19,14 @@ $reservationToReturn1 = @{ Quantity = 1 ReservationId = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003" } +# $reservationToReturn3 = "Quantity=1;reservationId=/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003" $reservationToReturn2 = @{ Quantity = 1 ReservationId = "/providers/microsoft.capacity/reservationOrders/10000000-aaaa-bbbb-cccc-100000000003/reservations/40000000-aaaa-bbbb-cccc-100000000002" } +# $reservationToReturn4 = "Quantity=1;reservationId=/providers/microsoft.capacity/reservationOrders/10000000-aaaa-bbbb-cccc-100000000003/reservations/40000000-aaaa-bbbb-cccc-100000000002" $reservationsToReturn = @($reservationToReturn1, $reservationToReturn2) +$reservationsToReturn2 = $reservationsToReturn | ConvertTo-Json $reservationToPurchase1Properties = @{ AppliedScopeType = "Shared" BillingPlan = "Upfront" @@ -53,6 +56,7 @@ $reservationToPurchase2 = @{ Properties = $reservationToPurchase2Properties } $reservationsToPurchase = @($reservationToPurchase1, $reservationToPurchase2) +$reservationToPurchase2 = $reservationsToPurchase | ConvertTo-Json function ExecuteTestCases([object]$response) { $response | Should -Not -Be $null @@ -76,11 +80,8 @@ Describe 'Invoke-AzReservationCalculateExchange' { } It 'Post' { - $request = @{ - ReservationsToExchange = $reservationsToReturn - ReservationsToPurchase = $reservationsToPurchase - } - $response = Invoke-AzReservationCalculateExchange -Body $request + $request = "ReservationsToExchange=$reservationsToReturn2;ReservationsToPurchase=$reservationsToPurchase2" + $response = Invoke-AzReservationCalculateExchange -JsonString $request ExecuteTestCases($response) } } diff --git a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateRefund.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateRefund.Tests.ps1 index eee0f78ad7e1..1a10e87336d1 100644 --- a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateRefund.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationCalculateRefund.Tests.ps1 @@ -55,13 +55,8 @@ Describe 'Invoke-AzReservationCalculateRefund' { It 'Post' { $orderId = "50000000-aaaa-bbbb-cccc-100000000003" - $body = @{ - Id = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003" - ReservationToReturnQuantity = 1 - ReservationToReturnReservationId = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003" - Scope = "Reservation" - } - $response = Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -Body $body + $json = "Id=/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003;ReservationToReturnQuantity=1;ReservationToReturnReservationId=/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003;Scope=Reservation" + $response = Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -JsonString $json ExecuteTestCases($response) } @@ -74,18 +69,4 @@ Describe 'Invoke-AzReservationCalculateRefund' { $response = Invoke-AzReservationCalculateRefund -InputObject $param -ReservationToReturnQuantity 1 -ReservationToReturnReservationId $fullyQualifiedId -Id $fullyQualifiedOrderId -Scope "Reservation" ExecuteTestCases($response) } - - It 'PostViaIdentity' { - $param = @{ - ReservationOrderId = "50000000-aaaa-bbbb-cccc-100000000003" - } - $body = @{ - Id = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003" - ReservationToReturnQuantity = 1 - ReservationToReturnReservationId = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003" - Scope = "Reservation" - } - $response = Invoke-AzReservationCalculateRefund -InputObject $param -Body $body - ExecuteTestCases($response) - } } diff --git a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationExchange.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationExchange.Tests.ps1 index 5d5e54cb6a31..a823b0ecf00e 100644 --- a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationExchange.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationExchange.Tests.ps1 @@ -101,17 +101,14 @@ Describe 'Invoke-AzReservationExchange' { } It 'Post' { - $calculateExchangeRequest = @{ - ReservationsToExchange = $reservationsToReturn - ReservationsToPurchase = $reservationsToPurchase - } - $calculateExchangeRes = Invoke-AzReservationCalculateExchange -Body $calculateExchangeRequest + $reservationToReturn2 = "Quantity=1;ReservationId=/providers/microsoft.capacity/reservationOrders/068506a3-a704-4c3e-8d3a-6c566d4af58b/reservations/936a414b-5999-4eb9-9fe7-883c5fc19d34" + $reservation2ToPurchase2 = $reservationsToPurchase | ConvertTo-Json + $calculateExchangeRequest = "ReservationsToExchange=$reservationToReturn2;ReservationsToPurchase=$reservation2ToPurchase2" + $calculateExchangeRes = Invoke-AzReservationCalculateExchange -JsonString $calculateExchangeRequest $calculateExchangeRes.SessionId | Should -Not -Be $null - $request = @{ - SessionId = $calculateExchangeRes.SessionId - } - $response = Invoke-AzReservationExchange -Body $request + $json = "SessionId=$($calculateExchangeRes.SessionId)" + $response = Invoke-AzReservationExchange -JsonString $json ExecuteTestCases($response) } } diff --git a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationReturn.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationReturn.Tests.ps1 index 21df2e55e3ca..47cab212b096 100644 --- a/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationReturn.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Invoke-AzReservationReturn.Tests.ps1 @@ -47,25 +47,14 @@ Describe 'Invoke-AzReservationReturn' { It 'Post' { $orderId = "984f6907-4d2c-4411-a5d9-0e2e72d0e06a" - $body = @{ - Id = "/providers/microsoft.capacity/reservationOrders/984f6907-4d2c-4411-a5d9-0e2e72d0e06a" - ReservationToReturnQuantity = 1 - ReservationToReturnReservationId = "/providers/microsoft.capacity/reservationOrders/984f6907-4d2c-4411-a5d9-0e2e72d0e06a/reservations/e188ea59-e105-493f-86be-64b4af4907a7" - Scope = "Reservation" - } - $res = Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -Body $body + $jsonString = "Id=/providers/microsoft.capacity/reservationOrders/984f6907-4d2c-4411-a5d9-0e2e72d0e06a;ReservationToReturnQuantity=1;ReservationToReturnReservationId=/providers/microsoft.capacity/reservationOrders/984f6907-4d2c-4411-a5d9-0e2e72d0e06a/reservations/e188ea59-e105-493f-86be-64b4af4907a7;Scope=Reservation" + $res = Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -JsonString $jsonString $res | Should -Not -Be $null $res.SessionId | Should -Not -Be $null - $body2 = @{ - ReservationToReturnQuantity = 1 - ReservationToReturnReservationId = "/providers/microsoft.capacity/reservationOrders/984f6907-4d2c-4411-a5d9-0e2e72d0e06a/reservations/e188ea59-e105-493f-86be-64b4af4907a7" - Scope = "Reservation" - ReturnReason = "Sample reason" - SessionId = $res.SessionId - } + $jsonString2 = "ReservationToReturnQuantity=1;ReservationToReturnReservationId=/providers/microsoft.capacity/reservationOrders/984f6907-4d2c-4411-a5d9-0e2e72d0e06a/reservations/e188ea59-e105-493f-86be-64b4af4907a7;Scope=Reservation;ReturnReason=Sample reason;SessionId=$($res.SessionId)" - $response = Invoke-AzReservationReturn -ReservationOrderId $orderId -Body $body2 + $response = Invoke-AzReservationReturn -ReservationOrderId $orderId -JsonString $jsonString2 ExecuteTestCases($response) } @@ -82,27 +71,4 @@ Describe 'Invoke-AzReservationReturn' { $response = Invoke-AzReservationReturn -InputObject $param -ReservationToReturnQuantity 1 -ReservationToReturnReservationId $fullyQualifiedId -ReturnReason "Sample return reason" -SessionId $res.SessionId -Scope "Reservation" ExecuteTestCases($response) } - - It 'PostViaIdentity' { - $param = @{ - ReservationOrderId = "73e63333-9b94-442c-8a5d-9403ba0e8b87" - } - $body = @{ - Id = "/providers/microsoft.capacity/reservationOrders/73e63333-9b94-442c-8a5d-9403ba0e8b87" - ReservationToReturnQuantity = 1 - ReservationToReturnReservationId = "/providers/microsoft.capacity/reservationOrders/73e63333-9b94-442c-8a5d-9403ba0e8b87/reservations/6414bc34-8753-45df-8499-ba5b5af1c62b" - Scope = "Reservation" - } - $res = Invoke-AzReservationCalculateRefund -InputObject $param -Body $body - - $body2 = @{ - ReservationToReturnQuantity = 1 - ReservationToReturnReservationId = "/providers/microsoft.capacity/reservationOrders/73e63333-9b94-442c-8a5d-9403ba0e8b87/reservations/6414bc34-8753-45df-8499-ba5b5af1c62b" - Scope = "Reservation" - ReturnReason = "Sample reason" - SessionId = $res.SessionId - } - $response = Invoke-AzReservationReturn -InputObject $param -Body $body2 - ExecuteTestCases($response) - } } diff --git a/src/Reservations/Reservations.Autorest/test/Move-AzReservationDirectory.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Move-AzReservationDirectory.Tests.ps1 index 73afaf675027..f2ab6af597f3 100644 --- a/src/Reservations/Reservations.Autorest/test/Move-AzReservationDirectory.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Move-AzReservationDirectory.Tests.ps1 @@ -31,8 +31,8 @@ Describe 'Move-AzReservationDirectory' { } It 'Change' { - $request = @{ DestinationTenantId = "30000000-aaaa-bbbb-cccc-100000000004" } - $response = Move-AzReservationDirectory -ReservationOrderId "50000000-aaaa-bbbb-cccc-200000000005" -Body $request + $json = "DestinationTenantId=30000000-aaaa-bbbb-cccc-100000000004" + $response = Move-AzReservationDirectory -ReservationOrderId "50000000-aaaa-bbbb-cccc-200000000005" -JsonString $json ExecuteTestCases($response) } @@ -41,11 +41,4 @@ Describe 'Move-AzReservationDirectory' { $response = Move-AzReservationDirectory -InputObject $identity -DestinationTenantId "30000000-aaaa-bbbb-cccc-100000000004" ExecuteTestCases($response) } - - It 'ChangeViaIdentity' { - $identity = @{ ReservationOrderId = "40000000-aaaa-bbbb-cccc-200000000007" } - $request = @{ DestinationTenantId = "30000000-aaaa-bbbb-cccc-100000000004" } - $response = Move-AzReservationDirectory -InputObject $identity -Body $request - ExecuteTestCases($response) - } } diff --git a/src/Reservations/Reservations.Autorest/test/New-AzReservation.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/New-AzReservation.Tests.ps1 index caef8167dfab..d7bc2ed4b527 100644 --- a/src/Reservations/Reservations.Autorest/test/New-AzReservation.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/New-AzReservation.Tests.ps1 @@ -38,21 +38,11 @@ Describe 'New-AzReservation' { } It 'Purchase' { - $purchaseRequest = @{ - AppliedScopeType = "Shared" - BillingPlan = "Upfront" - billingScopeId = '/subscriptions/40000000-aaaa-bbbb-cccc-200000000006' - DisplayName = "Testvm2" - Location = "westus" - Quantity = 1 - ReservedResourceType = "VirtualMachines" - Sku = "Standard_b1ls" - Term = "P1Y" - } - $quoteResponse = Get-AzReservationQuote -Body $purchaseRequest + $json = "AppliedScopeType=Shared;BillingPlan=Upfront;billingScopeId=/subscriptions/40000000-aaaa-bbbb-cccc-200000000006;DisplayName=Testvm2;Location=westus;Quantity=1;ReservedResourceType=VirtualMachines;Sku=Standard_b1ls;Term=P1Y" + $quoteResponse = Get-AzReservationQuote -JsonString $json $quoteResponse.ReservationOrderId | Should -Not -Be $null - $response = New-AzReservation -ReservationOrderId $quoteResponse.ReservationOrderId -Body $purchaseRequest + $response = New-AzReservation -ReservationOrderId $quoteResponse.ReservationOrderId -JsonString $json ExecuteTestCases($response) } @@ -65,25 +55,4 @@ Describe 'New-AzReservation' { $response = New-AzReservation -InputObject $param -AppliedScopeType 'Shared' -BillingPlan 'Upfront' -billingScopeId '/subscriptions/40000000-aaaa-bbbb-cccc-200000000006' -DisplayName 'TestVm3' -Location 'westus' -Quantity 1 -ReservedResourceType 'VirtualMachines' -Sku 'Standard_b1ls' -Term 'P1Y' ExecuteTestCases($response) } - - It 'PurchaseViaIdentity' { - $purchaseRequest = @{ - AppliedScopeType = "Shared" - BillingPlan = "Upfront" - billingScopeId = '/subscriptions/40000000-aaaa-bbbb-cccc-200000000006' - DisplayName = "Testvm4" - Location = "westus" - Quantity = 1 - ReservedResourceType = "VirtualMachines" - Sku = "Standard_b1ls" - Term = "P1Y" - } - $quoteResponse = Get-AzReservationQuote -Body $purchaseRequest - $quoteResponse.ReservationOrderId | Should -Not -Be $null - $param = @{ - ReservationOrderId = $quoteResponse.ReservationOrderId - } - $response = New-AzReservation -InputObject $param -Body $purchaseRequest - ExecuteTestCases($response) - } } diff --git a/src/Reservations/Reservations.Autorest/test/Update-AzReservation.Tests.ps1 b/src/Reservations/Reservations.Autorest/test/Update-AzReservation.Tests.ps1 index d7ed2bb333ee..765a2337f866 100644 --- a/src/Reservations/Reservations.Autorest/test/Update-AzReservation.Tests.ps1 +++ b/src/Reservations/Reservations.Autorest/test/Update-AzReservation.Tests.ps1 @@ -31,12 +31,8 @@ Describe 'Update-AzReservation' { It 'Update' { $reservation = Get-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" $newName = GetNewName($reservation.DisplayName) - $newRi = @{ - Name = $newName; - AppliedScopeType = $reservation.AppliedScopeType; - InstanceFlexibility = $reservation.InstanceFlexibility; - } - $res = Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -Reservation $newRi + $jsonString = "Name=$newName;AppliedScopeType=$reservation.AppliedScopeType;InstanceFlexibility=$reservation.InstanceFlexibility" + $res = Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -JsonString $jsonString $res.DisplayName | Should -Not -Be reservation.DisplayName } @@ -53,23 +49,6 @@ Describe 'Update-AzReservation' { $res.DisplayName | Should -Not -Be reservation.DisplayName } - It 'UpdateViaIdentity' { - $input = @{ - ReservationId = "10000000-aaaa-bbbb-cccc-200000000007" - ReservationOrderId = "30000000-aaaa-bbbb-cccc-200000000013" - } - $reservation = Get-AzReservation -InputObject $input - $newName = GetNewName($reservation.DisplayName) - $newRi = @{ - Name = $newName; - AppliedScopeType = $reservation.AppliedScopeType; - InstanceFlexibility = $reservation.InstanceFlexibility; - } - $res = Update-AzReservation -InputObject $input -Reservation $newRi - - $res.DisplayName | Should -Not -Be reservation.DisplayName - } - It 'UpdateAppliedScope' { #Update AppliedScopeType to be 'Shared' $res = Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Shared" diff --git a/src/Reservations/Reservations.sln b/src/Reservations/Reservations.sln index b99d1a99ed9c..f76ff06c1823 100644 --- a/src/Reservations/Reservations.sln +++ b/src/Reservations/Reservations.sln @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31903.59 @@ -19,49 +19,119 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accoun EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reservations", "Reservations\Reservations.csproj", "{CC105CC3-9F01-4F09-8732-CC625234A54C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Reservations", "..\..\generated\Reservations\Reservations.Autorest\Az.Reservations.csproj", "{A9813A10-E229-4F8A-9241-357789E5B14D}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reservations.Autorest", "Reservations.Autorest", "{B5A02996-EF9C-F97C-AC54-1CE210940BE3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Reservations", "..\..\generated\Reservations\Reservations.Autorest\Az.Reservations.csproj", "{6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Debug|x64.ActiveCfg = Debug|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Debug|x64.Build.0 = Debug|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Debug|x86.ActiveCfg = Debug|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Debug|x86.Build.0 = Debug|Any CPU {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Release|Any CPU.Build.0 = Release|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Release|x64.ActiveCfg = Release|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Release|x64.Build.0 = Release|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Release|x86.ActiveCfg = Release|Any CPU + {7E33EA36-393D-4495-9BB9-4299EFD668EA}.Release|x86.Build.0 = Release|Any CPU {29FBB332-89F5-4728-9368-341800CBD6D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29FBB332-89F5-4728-9368-341800CBD6D4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Debug|x64.ActiveCfg = Debug|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Debug|x64.Build.0 = Debug|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Debug|x86.ActiveCfg = Debug|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Debug|x86.Build.0 = Debug|Any CPU {29FBB332-89F5-4728-9368-341800CBD6D4}.Release|Any CPU.ActiveCfg = Release|Any CPU {29FBB332-89F5-4728-9368-341800CBD6D4}.Release|Any CPU.Build.0 = Release|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Release|x64.ActiveCfg = Release|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Release|x64.Build.0 = Release|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Release|x86.ActiveCfg = Release|Any CPU + {29FBB332-89F5-4728-9368-341800CBD6D4}.Release|x86.Build.0 = Release|Any CPU {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Debug|x64.ActiveCfg = Debug|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Debug|x64.Build.0 = Debug|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Debug|x86.ActiveCfg = Debug|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Debug|x86.Build.0 = Debug|Any CPU {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Release|Any CPU.ActiveCfg = Release|Any CPU {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Release|Any CPU.Build.0 = Release|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Release|x64.ActiveCfg = Release|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Release|x64.Build.0 = Release|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Release|x86.ActiveCfg = Release|Any CPU + {E2BEF58F-EFD6-4BF8-B3AB-C6D03EA2E59B}.Release|x86.Build.0 = Release|Any CPU {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Debug|x64.ActiveCfg = Debug|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Debug|x64.Build.0 = Debug|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Debug|x86.ActiveCfg = Debug|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Debug|x86.Build.0 = Debug|Any CPU {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Release|Any CPU.ActiveCfg = Release|Any CPU {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Release|Any CPU.Build.0 = Release|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Release|x64.ActiveCfg = Release|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Release|x64.Build.0 = Release|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Release|x86.ActiveCfg = Release|Any CPU + {B286ECF2-CD7C-4370-BF5F-87FE932D42BB}.Release|x86.Build.0 = Release|Any CPU {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Debug|x64.ActiveCfg = Debug|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Debug|x64.Build.0 = Debug|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Debug|x86.ActiveCfg = Debug|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Debug|x86.Build.0 = Debug|Any CPU {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Release|Any CPU.Build.0 = Release|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Release|x64.ActiveCfg = Release|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Release|x64.Build.0 = Release|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Release|x86.ActiveCfg = Release|Any CPU + {75C9B261-2918-4F8B-BB71-2D3A9A075DDA}.Release|x86.Build.0 = Release|Any CPU {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Debug|x64.ActiveCfg = Debug|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Debug|x64.Build.0 = Debug|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Debug|x86.ActiveCfg = Debug|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Debug|x86.Build.0 = Debug|Any CPU {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Release|Any CPU.ActiveCfg = Release|Any CPU {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Release|Any CPU.Build.0 = Release|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Release|x64.ActiveCfg = Release|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Release|x64.Build.0 = Release|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Release|x86.ActiveCfg = Release|Any CPU + {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89}.Release|x86.Build.0 = Release|Any CPU {CC105CC3-9F01-4F09-8732-CC625234A54C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CC105CC3-9F01-4F09-8732-CC625234A54C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Debug|x64.ActiveCfg = Debug|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Debug|x64.Build.0 = Debug|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Debug|x86.ActiveCfg = Debug|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Debug|x86.Build.0 = Debug|Any CPU {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|Any CPU.ActiveCfg = Release|Any CPU {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|Any CPU.Build.0 = Release|Any CPU - {A9813A10-E229-4F8A-9241-357789E5B14D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A9813A10-E229-4F8A-9241-357789E5B14D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A9813A10-E229-4F8A-9241-357789E5B14D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A9813A10-E229-4F8A-9241-357789E5B14D}.Release|Any CPU.Build.0 = Release|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x64.ActiveCfg = Release|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x64.Build.0 = Release|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x86.ActiveCfg = Release|Any CPU + {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x86.Build.0 = Release|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x64.ActiveCfg = Debug|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x64.Build.0 = Debug|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x86.ActiveCfg = Debug|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x86.Build.0 = Debug|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|Any CPU.Build.0 = Release|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x64.ActiveCfg = Release|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x64.Build.0 = Release|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x86.ActiveCfg = Release|Any CPU + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {7E33EA36-393D-4495-9BB9-4299EFD668EA} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} @@ -70,5 +140,6 @@ Global {B286ECF2-CD7C-4370-BF5F-87FE932D42BB} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} {75C9B261-2918-4F8B-BB71-2D3A9A075DDA} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} + {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3} = {B5A02996-EF9C-F97C-AC54-1CE210940BE3} EndGlobalSection EndGlobal diff --git a/src/Reservations/Reservations/Az.Reservations.psd1 b/src/Reservations/Reservations/Az.Reservations.psd1 index 90921b5acc67..a1c18bc847c2 100644 --- a/src/Reservations/Reservations/Az.Reservations.psd1 +++ b/src/Reservations/Reservations/Az.Reservations.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 1/9/2025 +# Generated on: 4/11/2025 # @{ @@ -51,19 +51,19 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '4.0.1'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '4.1.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'Reservations.Autorest/bin/Az.Reservations.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'Reservations.Autorest\Az.Reservations.format.ps1xml' +FormatsToProcess = 'Reservations.Autorest/Az.Reservations.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('Reservations.Autorest/Az.Reservations.psm1') @@ -104,7 +104,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','Reservations' + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Reservations' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -129,7 +129,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Reservations/Reservations/help/Az.Reservations.md b/src/Reservations/Reservations/help/Az.Reservations.md index d607a018c6cd..dc835aa46c78 100644 --- a/src/Reservations/Reservations/help/Az.Reservations.md +++ b/src/Reservations/Reservations/help/Az.Reservations.md @@ -45,7 +45,7 @@ Calculate price for returning `Reservations` if there are no policy errors.\n Returns one or more `Reservations` in exchange for one or more `Reservation` purchases.\n ### [Invoke-AzReservationReturn](Invoke-AzReservationReturn.md) -Return a Reservation. +Return a reservation and get refund information. ### [Invoke-AzReservationUnarchiveReservation](Invoke-AzReservationUnarchiveReservation.md) Restores a `Reservation` to the state it was before archiving.\n @@ -57,11 +57,11 @@ Merge two reservations into one reservation within the same reservation order. Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id ### [New-AzReservation](New-AzReservation.md) -Purchase `ReservationOrder` and create resource under the specified URI. +Purchase `ReservationOrder` and purchase resource under the specified URI. ### [Split-AzReservation](Split-AzReservation.md) Split a Reservation order. ### [Update-AzReservation](Update-AzReservation.md) -Updates the applied scopes of the `Reservation`. +update the applied scopes of the `Reservation`. diff --git a/src/Reservations/Reservations/help/Get-AzReservation.md b/src/Reservations/Reservations/help/Get-AzReservation.md index 52ab7f14f22e..95846a6548fb 100644 --- a/src/Reservations/Reservations/help/Get-AzReservation.md +++ b/src/Reservations/Reservations/help/Get-AzReservation.md @@ -18,6 +18,12 @@ Get-AzReservation [-Filter ] [-Orderby ] [-SelectedState ] [-DefaultProfile ] [] ``` +### GetViaIdentityReservationOrder +``` +Get-AzReservation -Id -ReservationOrderInputObject [-Expand ] + [-DefaultProfile ] [] +``` + ### Get ``` Get-AzReservation -Id -OrderId [-Expand ] [-DefaultProfile ] @@ -98,7 +104,7 @@ Supported value of this query is renewProperties ```yaml Type: System.String -Parameter Sets: Get, GetViaIdentity +Parameter Sets: GetViaIdentityReservationOrder, Get, GetViaIdentity Aliases: Required: False @@ -131,7 +137,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Get +Parameter Sets: GetViaIdentityReservationOrder, Get Aliases: ReservationId Required: True @@ -143,7 +149,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -187,6 +192,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: GetViaIdentityReservationOrder +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -SelectedState The selected provisioning state @@ -241,7 +261,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Get-AzReservationAvailableScope.md b/src/Reservations/Reservations/help/Get-AzReservationAvailableScope.md index b93aa5dc9e2f..cc05c6a845d2 100644 --- a/src/Reservations/Reservations/help/Get-AzReservationAvailableScope.md +++ b/src/Reservations/Reservations/help/Get-AzReservationAvailableScope.md @@ -19,23 +19,30 @@ Get-AzReservationAvailableScope -ReservationId -ReservationOrderId ] ``` -### Available +### AvailableViaJsonString ``` -Get-AzReservationAvailableScope -ReservationId -ReservationOrderId - -Body [-DefaultProfile ] [-AsJob] [-NoWait] - [-WhatIf] [-Confirm] [] +Get-AzReservationAvailableScope -ReservationId -ReservationOrderId -JsonString + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] ``` -### AvailableViaIdentityExpanded +### AvailableViaJsonFilePath ``` -Get-AzReservationAvailableScope -InputObject [-Scope ] +Get-AzReservationAvailableScope -ReservationId -ReservationOrderId -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` -### AvailableViaIdentity +### AvailableViaIdentityReservationOrderExpanded +``` +Get-AzReservationAvailableScope -ReservationId -ReservationOrderInputObject + [-Scope ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] ``` -Get-AzReservationAvailableScope -InputObject -Body + +### AvailableViaIdentityExpanded +``` +Get-AzReservationAvailableScope -InputObject [-Scope ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` @@ -75,22 +82,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -Available scope -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest -Parameter Sets: Available, AvailableViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -109,11 +100,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: AvailableViaIdentityExpanded, AvailableViaIdentity +Parameter Sets: AvailableViaIdentityExpanded Aliases: Required: True @@ -123,6 +113,36 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Available operation + +```yaml +Type: System.String +Parameter Sets: AvailableViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Available operation + +```yaml +Type: System.String +Parameter Sets: AvailableViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -NoWait Run the command asynchronously @@ -143,7 +163,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: AvailableExpanded, Available +Parameter Sets: AvailableExpanded, AvailableViaJsonString, AvailableViaJsonFilePath, AvailableViaIdentityReservationOrderExpanded Aliases: Required: True @@ -158,7 +178,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: AvailableExpanded, Available +Parameter Sets: AvailableExpanded, AvailableViaJsonString, AvailableViaJsonFilePath Aliases: Required: True @@ -168,12 +188,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: AvailableViaIdentityReservationOrderExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Scope . ```yaml Type: System.String[] -Parameter Sets: AvailableExpanded, AvailableViaIdentityExpanded +Parameter Sets: AvailableExpanded, AvailableViaIdentityReservationOrderExpanded, AvailableViaIdentityExpanded Aliases: Required: False @@ -219,13 +254,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties ## NOTES diff --git a/src/Reservations/Reservations/help/Get-AzReservationCatalog.md b/src/Reservations/Reservations/help/Get-AzReservationCatalog.md index f762c3b9026d..88ec3cc1f305 100644 --- a/src/Reservations/Reservations/help/Get-AzReservationCatalog.md +++ b/src/Reservations/Reservations/help/Get-AzReservationCatalog.md @@ -141,7 +141,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -285,7 +284,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICatalog +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICatalog ## NOTES diff --git a/src/Reservations/Reservations/help/Get-AzReservationHistory.md b/src/Reservations/Reservations/help/Get-AzReservationHistory.md index 258dda351bb6..14873c693986 100644 --- a/src/Reservations/Reservations/help/Get-AzReservationHistory.md +++ b/src/Reservations/Reservations/help/Get-AzReservationHistory.md @@ -99,7 +99,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Get-AzReservationOrder.md b/src/Reservations/Reservations/help/Get-AzReservationOrder.md index 093b7bda1b57..b2b495eca1c2 100644 --- a/src/Reservations/Reservations/help/Get-AzReservationOrder.md +++ b/src/Reservations/Reservations/help/Get-AzReservationOrder.md @@ -115,7 +115,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -138,7 +137,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Get-AzReservationOrderId.md b/src/Reservations/Reservations/help/Get-AzReservationOrderId.md index 0dda9da3f489..917e636f242c 100644 --- a/src/Reservations/Reservations/help/Get-AzReservationOrderId.md +++ b/src/Reservations/Reservations/help/Get-AzReservationOrderId.md @@ -68,7 +68,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -106,7 +105,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAppliedReservations +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAppliedReservations ## NOTES diff --git a/src/Reservations/Reservations/help/Get-AzReservationQuote.md b/src/Reservations/Reservations/help/Get-AzReservationQuote.md index 7d8c0154a82a..2aab3a3620e1 100644 --- a/src/Reservations/Reservations/help/Get-AzReservationQuote.md +++ b/src/Reservations/Reservations/help/Get-AzReservationQuote.md @@ -17,16 +17,21 @@ Calculate price for placing a `ReservationOrder`. Get-AzReservationQuote [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] - [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] - [-DisplayName ] [-InstanceFlexibility ] [-Location ] [-Quantity ] - [-Renew] [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] - [-Term ] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] + [-InstanceFlexibility ] [-Location ] [-Quantity ] [-Renew] + [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] [-Term ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### Calculate +### CalculateViaJsonFilePath ``` -Get-AzReservationQuote -Body [-DefaultProfile ] +Get-AzReservationQuote -JsonFilePath [-DefaultProfile ] + [-WhatIf] [-Confirm] [] +``` + +### CalculateViaJsonString +``` +Get-AzReservationQuote -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -219,7 +224,7 @@ Accept wildcard characters: False Type of the Applied Scope. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -234,7 +239,7 @@ Accept wildcard characters: False Represent the billing plans. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -260,22 +265,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -The request for reservation purchase -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest -Parameter Sets: Calculate -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -312,7 +301,7 @@ Turning this on will apply the reservation discount to other VMs in the same VM Only specify for VirtualMachines reserved resource type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -323,6 +312,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Calculate operation + +```yaml +Type: System.String +Parameter Sets: CalculateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Calculate operation + +```yaml +Type: System.String +Parameter Sets: CalculateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The Azure region where the reserved resource lives. @@ -372,7 +391,7 @@ Accept wildcard characters: False The type of the resource that is being reserved. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -417,7 +436,7 @@ Accept wildcard characters: False Represent the term of reservation. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm +Type: System.String Parameter Sets: CalculateExpanded Aliases: @@ -464,11 +483,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculatePriceResponseProperties +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculatePriceResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationArchiveReservation.md b/src/Reservations/Reservations/help/Invoke-AzReservationArchiveReservation.md index 92f109121cdf..305dffbf81ba 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationArchiveReservation.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationArchiveReservation.md @@ -19,6 +19,13 @@ Invoke-AzReservationArchiveReservation -ReservationId -ReservationOrder [] ``` +### ArchiveViaIdentityReservationOrder +``` +Invoke-AzReservationArchiveReservation -ReservationId + -ReservationOrderInputObject [-DefaultProfile ] [-PassThru] + [-WhatIf] [-Confirm] [] +``` + ### ArchiveViaIdentity ``` Invoke-AzReservationArchiveReservation -InputObject [-DefaultProfile ] @@ -61,7 +68,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -95,7 +101,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Archive +Parameter Sets: Archive, ArchiveViaIdentityReservationOrder Aliases: Required: True @@ -120,6 +126,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: ArchiveViaIdentityReservationOrder +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationCalculateExchange.md b/src/Reservations/Reservations/help/Invoke-AzReservationCalculateExchange.md index c183bde0c57a..d135fc0cbfe2 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationCalculateExchange.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationCalculateExchange.md @@ -20,10 +20,16 @@ Invoke-AzReservationCalculateExchange [-ReservationsToExchange ] ``` -### Post +### PostViaJsonFilePath ``` -Invoke-AzReservationCalculateExchange -Body [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] +Invoke-AzReservationCalculateExchange -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### PostViaJsonString +``` +Invoke-AzReservationCalculateExchange -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -101,32 +107,46 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -Calculate exchange request -To construct, see NOTES section for BODY properties and create a hash table. +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeRequest -Parameter Sets: Post +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. +### -JsonString +Json string supplied to the Post operation ```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -150,10 +170,9 @@ Accept wildcard characters: False ### -ReservationsToExchange List of reservations that are being returned in this exchange. -To construct, see NOTES section for RESERVATIONSTOEXCHANGE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationToReturn[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationToReturn[] Parameter Sets: PostExpanded Aliases: @@ -166,10 +185,9 @@ Accept wildcard characters: False ### -ReservationsToPurchase List of reservations that are being purchased in this exchange. -To construct, see NOTES section for RESERVATIONSTOPURCHASE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IPurchaseRequest[] Parameter Sets: PostExpanded Aliases: @@ -182,10 +200,9 @@ Accept wildcard characters: False ### -SavingsPlansToPurchase List of savings plans that are being purchased in this exchange. -To construct, see NOTES section for SAVINGSPLANSTOPURCHASE properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISavingsPlanPurchaseRequest[] +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ISavingsPlanPurchaseRequest[] Parameter Sets: PostExpanded Aliases: @@ -232,11 +249,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeRequest - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeOperationResultResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateExchangeOperationResultResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationCalculateRefund.md b/src/Reservations/Reservations/help/Invoke-AzReservationCalculateRefund.md index 4ffbd41e6a4a..6cca692aa2e9 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationCalculateRefund.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationCalculateRefund.md @@ -19,22 +19,22 @@ Invoke-AzReservationCalculateRefund -ReservationOrderId [-Id ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### Post +### PostViaJsonString ``` -Invoke-AzReservationCalculateRefund -ReservationOrderId -Body +Invoke-AzReservationCalculateRefund -ReservationOrderId -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### PostViaIdentityExpanded +### PostViaJsonFilePath ``` -Invoke-AzReservationCalculateRefund -InputObject [-Id ] - [-ReservationToReturnQuantity ] [-ReservationToReturnReservationId ] [-Scope ] +Invoke-AzReservationCalculateRefund -ReservationOrderId -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### PostViaIdentity +### PostViaIdentityExpanded ``` -Invoke-AzReservationCalculateRefund -InputObject -Body +Invoke-AzReservationCalculateRefund -InputObject [-Id ] + [-ReservationToReturnQuantity ] [-ReservationToReturnReservationId ] [-Scope ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -96,22 +96,6 @@ The SessionId in the response is a required input parameter for cmdlet Invoke-Az ## PARAMETERS -### -Body -Request containing information needed for calculating refund. -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundRequest -Parameter Sets: Post, PostViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -145,11 +129,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PostViaIdentityExpanded, PostViaIdentity +Parameter Sets: PostViaIdentityExpanded Aliases: Required: True @@ -159,12 +142,42 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ReservationOrderId Order Id of the reservation ```yaml Type: System.String -Parameter Sets: PostExpanded, Post +Parameter Sets: PostExpanded, PostViaJsonString, PostViaJsonFilePath Aliases: Required: True @@ -257,13 +270,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateRefundResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationExchange.md b/src/Reservations/Reservations/help/Invoke-AzReservationExchange.md index 6871fa761fd7..a5acd9a24d62 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationExchange.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationExchange.md @@ -18,9 +18,15 @@ Invoke-AzReservationExchange [-SessionId ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### Post +### PostViaJsonFilePath ``` -Invoke-AzReservationExchange -Body [-DefaultProfile ] [-AsJob] [-NoWait] +Invoke-AzReservationExchange -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### PostViaJsonString +``` +Invoke-AzReservationExchange -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` @@ -60,32 +66,46 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -Exchange request -To construct, see NOTES section for BODY properties and create a hash table. +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeRequest -Parameter Sets: Post +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation + +```yaml +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. +### -JsonString +Json string supplied to the Post operation ```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential +Type: System.String +Parameter Sets: PostViaJsonString +Aliases: -Required: False +Required: True Position: Named Default value: None Accept pipeline input: False @@ -158,11 +178,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeRequest - ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeOperationResultResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IExchangeOperationResultResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md b/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md index c13d7868d6a0..8343039d9684 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md @@ -8,38 +8,44 @@ schema: 2.0.0 # Invoke-AzReservationReturn ## SYNOPSIS -Return a Reservation. +Return a reservation and get refund information. ## SYNTAX -### PostExpanded (Default) +### PostViaJsonString (Default) ``` -Invoke-AzReservationReturn -ReservationOrderId -ReservationToReturnReservationId - -ReservationToReturnQuantity -SessionId -Scope -ReturnReason +Invoke-AzReservationReturn -ReservationOrderId -JsonString [-WhatIf] [-Confirm] [] ``` -### PostViaIdentity +### PostExpanded ``` -Invoke-AzReservationReturn -InputObject -Body +Invoke-AzReservationReturn -ReservationOrderId -ReservationToReturnQuantity + -ReservationToReturnReservationId -ReturnReason -Scope -SessionId [-WhatIf] [-Confirm] [] ``` -### PostViaIdentityExpanded +### PostViaJsonFilePath ``` -Invoke-AzReservationReturn -InputObject -ReservationToReturnReservationId - -ReservationToReturnQuantity -SessionId -Scope -ReturnReason +Invoke-AzReservationReturn -ReservationOrderId -JsonFilePath [-WhatIf] [-Confirm] [] ``` -### Post +### PostViaIdentity +``` +Invoke-AzReservationReturn -InputObject [-WhatIf] + [-Confirm] [] +``` + +### PostViaIdentityExpanded ``` -Invoke-AzReservationReturn -ReservationOrderId -Body +Invoke-AzReservationReturn -InputObject -ReservationToReturnQuantity + -ReservationToReturnReservationId -ReturnReason -Scope -SessionId [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Return a Reservation. +Return a reservation and get refund information. ## EXAMPLES @@ -62,13 +68,27 @@ Proceed reservations return with session ID obtained from Invoke-AzReservationCa ## PARAMETERS -### -Body -The return request body. -To construct, see NOTES section for BODY properties and create a hash table. +### -InputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -JsonFilePath +Path of Json file supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IRefundRequest -Parameter Sets: PostViaIdentity, Post +Type: System.String +Parameter Sets: PostViaJsonFilePath Aliases: Required: True @@ -78,28 +98,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +### -JsonString +Json string supplied to the Post operation ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Type: System.String +Parameter Sets: PostViaJsonString Aliases: Required: True Position: Named Default value: None -Accept pipeline input: True (ByValue) +Accept pipeline input: False Accept wildcard characters: False ``` ### -ReservationOrderId -Reservation Order Id. +Order Id of the reservation ```yaml Type: System.String -Parameter Sets: PostExpanded, Post +Parameter Sets: PostViaJsonString, PostExpanded, PostViaJsonFilePath Aliases: Required: True @@ -110,7 +129,8 @@ Accept wildcard characters: False ``` ### -ReservationToReturnQuantity -Quantity to return. +Quantity to be returned. +Must be greater than zero. ```yaml Type: System.Int32 @@ -125,7 +145,7 @@ Accept wildcard characters: False ``` ### -ReservationToReturnReservationId -Reservation Id to return. +Fully qualified identifier of the reservation being returned ```yaml Type: System.String @@ -140,7 +160,7 @@ Accept wildcard characters: False ``` ### -ReturnReason -The reason for this reservation return. +The reason of returning the reservation ```yaml Type: System.String @@ -225,7 +245,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationUnarchiveReservation.md b/src/Reservations/Reservations/help/Invoke-AzReservationUnarchiveReservation.md index 7493f208b28e..d828714a0c7b 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationUnarchiveReservation.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationUnarchiveReservation.md @@ -19,6 +19,13 @@ Invoke-AzReservationUnarchiveReservation -ReservationId -ReservationOrd [] ``` +### UnarchiveViaIdentityReservationOrder +``` +Invoke-AzReservationUnarchiveReservation -ReservationId + -ReservationOrderInputObject [-DefaultProfile ] [-PassThru] + [-WhatIf] [-Confirm] [] +``` + ### UnarchiveViaIdentity ``` Invoke-AzReservationUnarchiveReservation -InputObject [-DefaultProfile ] @@ -61,7 +68,6 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity @@ -95,7 +101,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: Unarchive +Parameter Sets: Unarchive, UnarchiveViaIdentityReservationOrder Aliases: Required: True @@ -120,6 +126,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ReservationOrderInputObject +Identity Parameter + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: UnarchiveViaIdentityReservationOrder +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Reservations/Reservations/help/Merge-AzReservation.md b/src/Reservations/Reservations/help/Merge-AzReservation.md index 92de3506cf9b..7dcae0c09f9b 100644 --- a/src/Reservations/Reservations/help/Merge-AzReservation.md +++ b/src/Reservations/Reservations/help/Merge-AzReservation.md @@ -125,7 +125,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Move-AzReservationDirectory.md b/src/Reservations/Reservations/help/Move-AzReservationDirectory.md index 84dd106d7b5c..2713c5e299e7 100644 --- a/src/Reservations/Reservations/help/Move-AzReservationDirectory.md +++ b/src/Reservations/Reservations/help/Move-AzReservationDirectory.md @@ -18,21 +18,21 @@ Move-AzReservationDirectory -ReservationOrderId [-DestinationTenantId < [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` -### Change +### ChangeViaJsonString ``` -Move-AzReservationDirectory -ReservationOrderId -Body - [-DefaultProfile ] [-WhatIf] [-Confirm] [] +Move-AzReservationDirectory -ReservationOrderId -JsonString [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` -### ChangeViaIdentityExpanded +### ChangeViaJsonFilePath ``` -Move-AzReservationDirectory -InputObject [-DestinationTenantId ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] +Move-AzReservationDirectory -ReservationOrderId -JsonFilePath [-DefaultProfile ] + [-WhatIf] [-Confirm] [] ``` -### ChangeViaIdentity +### ChangeViaIdentityExpanded ``` -Move-AzReservationDirectory -InputObject -Body +Move-AzReservationDirectory -InputObject [-DestinationTenantId ] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -43,7 +43,7 @@ Change directory (tenant) of `ReservationOrder` and all `Reservation` under it t ### Example 1: Move reservation order from one tenant to another ```powershell -Move-AzReservationDirectory -ReservationOrderId "00001111-aaaa-2222-bbbb-3333cccc4444" -DestinationTenantId "f65fbe9a-14b0-44c6-8c0d-2ef2c4543040" +Move-AzReservationDirectory -ReservationOrderId "7c31a9e8-8490-4002-88cd-3a16b71362a9" -DestinationTenantId "f65fbe9a-14b0-44c6-8c0d-2ef2c4543040" ``` ```output @@ -61,7 +61,7 @@ Reservation : {{ "isSucceeded": true }} ReservationOrderError : -ReservationOrderId : 00001111-aaaa-2222-bbbb-3333cccc4444 +ReservationOrderId : 7c31a9e8-8490-4002-88cd-3a16b71362a9 ReservationOrderIsSucceeded : True ReservationOrderName : VM_RI_05-26-2022_16-53 ``` @@ -70,22 +70,6 @@ Move reservation order from one tenant to another ## PARAMETERS -### -Body -Request body for change directory of a reservation. -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryRequest -Parameter Sets: Change, ChangeViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -119,11 +103,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: ChangeViaIdentityExpanded, ChangeViaIdentity +Parameter Sets: ChangeViaIdentityExpanded Aliases: Required: True @@ -133,12 +116,42 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Change operation + +```yaml +Type: System.String +Parameter Sets: ChangeViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Change operation + +```yaml +Type: System.String +Parameter Sets: ChangeViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ReservationOrderId Order Id of the reservation ```yaml Type: System.String -Parameter Sets: ChangeExpanded, Change +Parameter Sets: ChangeExpanded, ChangeViaJsonString, ChangeViaJsonFilePath Aliases: Required: True @@ -184,13 +197,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IChangeDirectoryResponse ## NOTES diff --git a/src/Reservations/Reservations/help/New-AzReservation.md b/src/Reservations/Reservations/help/New-AzReservation.md index 89403cca4730..c01679dbcf95 100644 --- a/src/Reservations/Reservations/help/New-AzReservation.md +++ b/src/Reservations/Reservations/help/New-AzReservation.md @@ -8,7 +8,7 @@ schema: 2.0.0 # New-AzReservation ## SYNOPSIS -Purchase `ReservationOrder` and create resource under the specified URI. +Purchase `ReservationOrder` and purchase resource under the specified URI. ## SYNTAX @@ -17,17 +17,22 @@ Purchase `ReservationOrder` and create resource under the specified URI. New-AzReservation -ReservationOrderId [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] - [-InstanceFlexibility ] [-Location ] [-Quantity ] [-Renew] - [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-BillingPlan ] + [-BillingScopeId ] [-DisplayName ] [-InstanceFlexibility ] [-Location ] + [-Quantity ] [-Renew] [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` -### Purchase +### PurchaseViaJsonString ``` -New-AzReservation -ReservationOrderId -Body [-DefaultProfile ] [-AsJob] +New-AzReservation -ReservationOrderId -JsonString [-DefaultProfile ] [-AsJob] + [-NoWait] [-WhatIf] [-Confirm] [] +``` + +### PurchaseViaJsonFilePath +``` +New-AzReservation -ReservationOrderId -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` @@ -36,22 +41,15 @@ New-AzReservation -ReservationOrderId -Body [-Defaul New-AzReservation -InputObject [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] - [-InstanceFlexibility ] [-Location ] [-Quantity ] [-Renew] - [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-BillingPlan ] + [-BillingScopeId ] [-DisplayName ] [-InstanceFlexibility ] [-Location ] + [-Quantity ] [-Renew] [-ReservedResourceType ] [-ReviewDateTime ] [-Sku ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` -### PurchaseViaIdentity -``` -New-AzReservation -InputObject -Body [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] -``` - ## DESCRIPTION -Purchase `ReservationOrder` and create resource under the specified URI. +Purchase `ReservationOrder` and purchase resource under the specified URI. ## EXAMPLES @@ -167,7 +165,7 @@ Accept wildcard characters: False Type of the Applied Scope. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -197,7 +195,7 @@ Accept wildcard characters: False Represent the billing plans. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -223,22 +221,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Body -The request for reservation purchase -To construct, see NOTES section for BODY properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest -Parameter Sets: Purchase, PurchaseViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - ### -DefaultProfile The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. @@ -272,11 +254,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PurchaseViaIdentityExpanded, PurchaseViaIdentity +Parameter Sets: PurchaseViaIdentityExpanded Aliases: Required: True @@ -291,7 +272,7 @@ Turning this on will apply the reservation discount to other VMs in the same VM Only specify for VirtualMachines reserved resource type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -302,6 +283,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Purchase operation + +```yaml +Type: System.String +Parameter Sets: PurchaseViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Purchase operation + +```yaml +Type: System.String +Parameter Sets: PurchaseViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Location The Azure region where the reserved resource lives. @@ -367,7 +378,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: PurchaseExpanded, Purchase +Parameter Sets: PurchaseExpanded, PurchaseViaJsonString, PurchaseViaJsonFilePath Aliases: Required: True @@ -381,7 +392,7 @@ Accept wildcard characters: False The type of the resource that is being reserved. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -426,7 +437,7 @@ Accept wildcard characters: False Represent the term of reservation. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm +Type: System.String Parameter Sets: PurchaseExpanded, PurchaseViaIdentityExpanded Aliases: @@ -473,13 +484,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Split-AzReservation.md b/src/Reservations/Reservations/help/Split-AzReservation.md index 665d4c1776ca..914ef9a35945 100644 --- a/src/Reservations/Reservations/help/Split-AzReservation.md +++ b/src/Reservations/Reservations/help/Split-AzReservation.md @@ -139,7 +139,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES diff --git a/src/Reservations/Reservations/help/Update-AzReservation.md b/src/Reservations/Reservations/help/Update-AzReservation.md index 8219977a76df..6082d7ebe4fd 100644 --- a/src/Reservations/Reservations/help/Update-AzReservation.md +++ b/src/Reservations/Reservations/help/Update-AzReservation.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Update-AzReservation ## SYNOPSIS -Updates the applied scopes of the `Reservation`. +update the applied scopes of the `Reservation`. ## SYNTAX @@ -17,37 +17,48 @@ Updates the applied scopes of the `Reservation`. Update-AzReservation -Id -OrderId [-AppliedScope ] [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-InstanceFlexibility ] [-Name ] [-Renew] - [-RenewProperty ] [-ReviewDateTime ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-InstanceFlexibility ] + [-Name ] [-Renew] [-RenewProperty ] [-ReviewDateTime ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] ``` -### Update +### UpdateViaJsonString ``` -Update-AzReservation -Id -OrderId -Reservation [-DefaultProfile ] [-AsJob] +Update-AzReservation -Id -OrderId -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` -### UpdateViaIdentityExpanded +### UpdateViaJsonFilePath ``` -Update-AzReservation -InputObject [-AppliedScope ] - [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] - [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] - [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] - [-InstanceFlexibility ] [-Name ] [-Renew] - [-RenewProperty ] [-ReviewDateTime ] [-DefaultProfile ] +Update-AzReservation -Id -OrderId -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` -### UpdateViaIdentity +### UpdateViaIdentityReservationOrderExpanded ``` -Update-AzReservation -InputObject -Reservation [-DefaultProfile ] +Update-AzReservation -Id -ReservationOrderInputObject + [-AppliedScope ] [-AppliedScopePropertyDisplayName ] + [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] + [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] + [-AppliedScopeType ] [-InstanceFlexibility ] [-Name ] [-Renew] + [-RenewProperty ] [-ReviewDateTime ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] ``` +### UpdateViaIdentityExpanded +``` +Update-AzReservation -InputObject [-AppliedScope ] + [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] + [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-InstanceFlexibility ] + [-Name ] [-Renew] [-RenewProperty ] [-ReviewDateTime ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] + [] +``` + ## DESCRIPTION -Updates the applied scopes of the `Reservation`. +update the applied scopes of the `Reservation`. ## EXAMPLES @@ -93,7 +104,7 @@ This property will be deprecated and replaced by appliedScopeProperties instead ```yaml Type: System.String[] -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -108,7 +119,7 @@ Display name ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -123,7 +134,7 @@ Fully-qualified identifier of the management group where the benefit must be app ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -138,7 +149,7 @@ Fully-qualified identifier of the resource group. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -153,7 +164,7 @@ Fully-qualified identifier of the subscription. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -168,7 +179,7 @@ Tenant ID where the savings plan should apply benefit. ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -182,8 +193,8 @@ Accept wildcard characters: False Type of the Applied Scope. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -229,7 +240,7 @@ Id of the reservation item ```yaml Type: System.String -Parameter Sets: UpdateExpanded, Update +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, UpdateViaIdentityReservationOrderExpanded Aliases: ReservationId Required: True @@ -241,11 +252,10 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: UpdateViaIdentityExpanded, UpdateViaIdentity +Parameter Sets: UpdateViaIdentityExpanded Aliases: Required: True @@ -260,8 +270,8 @@ Turning this on will apply the reservation discount to other VMs in the same VM Only specify for VirtualMachines reserved resource type. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -271,12 +281,42 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -JsonFilePath +Path of Json file supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonFilePath +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -JsonString +Json string supplied to the Update operation + +```yaml +Type: System.String +Parameter Sets: UpdateViaJsonString +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Name Display name of the reservation ```yaml Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -306,7 +346,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: UpdateExpanded, Update +Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath Aliases: ReservationOrderId Required: True @@ -321,7 +361,7 @@ Setting this to true will automatically purchase a new reservation on the expira ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -333,11 +373,10 @@ Accept wildcard characters: False ### -RenewProperty . -To construct, see NOTES section for RENEWPROPERTY properties and create a hash table. ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatchPropertiesRenewProperties -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IPatchPropertiesRenewProperties +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -347,13 +386,12 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Reservation -The request for reservation patch -To construct, see NOTES section for RESERVATION properties and create a hash table. +### -ReservationOrderInputObject +Identity Parameter ```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatch -Parameter Sets: Update, UpdateViaIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity +Parameter Sets: UpdateViaIdentityReservationOrderExpanded Aliases: Required: True @@ -368,7 +406,7 @@ This is the date-time when the Azure hybrid benefit needs to be reviewed. ```yaml Type: System.DateTime -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Parameter Sets: UpdateExpanded, UpdateViaIdentityReservationOrderExpanded, UpdateViaIdentityExpanded Aliases: Required: False @@ -414,13 +452,11 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## INPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPatch - ### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse +### Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse ## NOTES From 31a493cf859733ef67adcb2517f91d49f925f3b0 Mon Sep 17 00:00:00 2001 From: JoyerJin <116236375+JoyerJin@users.noreply.github.com> Date: Fri, 11 Apr 2025 17:59:54 +0800 Subject: [PATCH 2/3] Update ChangeLog.md --- src/Reservations/Reservations/ChangeLog.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Reservations/Reservations/ChangeLog.md b/src/Reservations/Reservations/ChangeLog.md index 6e217c942321..06a033d1a905 100644 --- a/src/Reservations/Reservations/ChangeLog.md +++ b/src/Reservations/Reservations/ChangeLog.md @@ -18,6 +18,17 @@ - Additional information about change #1 --> ## Upcoming Release +* Introduced various new features by upgrading code generator. Please see details [here](https://github.com/Azure/azure-powershell/blob/main/documentation/Autorest-powershell-v4-new-features.md). +* Removed unexpanded variant for some cmdlets + * Get-AzReservationAvailableScope + * Get-AzReservationQuote + * Invoke-AzReservationCalculateExchange + * Invoke-AzReservationCalculateRefund + * Invoke-AzReservationExchange + * Invoke-AzReservationReturn + * Move-AzReservationDirectory + * New-AzReservation + * Update-AzReservation ## Version 0.13.1 * Upgraded nuget package to signed package. From 679f8ee3c31f953901d32a08c9537bb537b90cc9 Mon Sep 17 00:00:00 2001 From: JoyerJin <116236375+JoyerJin@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:19:24 +0800 Subject: [PATCH 3/3] update Invoke-AzReservationReturn --- .../Properties/AssemblyInfo.cs | 3 ++ .../custom/Invoke-AzReservationReturn.ps1 | 6 ++-- .../docs/Invoke-AzReservationReturn.md | 21 ++++++-------- .../Reservations.Autorest/generate-info.json | 2 +- src/Reservations/Reservations.sln | 28 +++++++++---------- .../Reservations/Az.Reservations.psd1 | 2 +- .../help/Invoke-AzReservationReturn.md | 18 ++++-------- 7 files changed, 36 insertions(+), 44 deletions(-) diff --git a/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs b/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs index f120065f5e14..c35f0587b3e7 100644 --- a/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs +++ b/src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs @@ -25,3 +25,6 @@ [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] + + + diff --git a/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 b/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 index 6b20a881b65b..1e82aac20509 100644 --- a/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 +++ b/src/Reservations/Reservations.Autorest/custom/Invoke-AzReservationReturn.ps1 @@ -36,7 +36,7 @@ https://learn.microsoft.com/powershell/module/az.reservations/invoke-azreservati #> function Invoke-AzReservationReturn { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse])] - [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] + [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='PostExpanded', Mandatory)] [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)] @@ -47,7 +47,6 @@ function Invoke-AzReservationReturn { # Order Id of the reservation ${ReservationOrderId}, - [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity] @@ -111,7 +110,8 @@ function Invoke-AzReservationReturn { [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md index b088289fff8d..b43b10d19bdb 100644 --- a/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md +++ b/src/Reservations/Reservations.Autorest/docs/Invoke-AzReservationReturn.md @@ -12,24 +12,13 @@ Return a reservation and get refund information. ## SYNTAX -### PostViaJsonString (Default) -``` -Invoke-AzReservationReturn -ReservationOrderId -JsonString [-Confirm] [-WhatIf] - [] -``` - -### PostExpanded +### PostExpanded (Default) ``` Invoke-AzReservationReturn -ReservationOrderId -ReservationToReturnQuantity -ReservationToReturnReservationId -ReturnReason -Scope -SessionId [-Confirm] [-WhatIf] [] ``` -### PostViaIdentity -``` -Invoke-AzReservationReturn -InputObject [-Confirm] [-WhatIf] [] -``` - ### PostViaIdentityExpanded ``` Invoke-AzReservationReturn -InputObject -ReservationToReturnQuantity @@ -43,6 +32,12 @@ Invoke-AzReservationReturn -ReservationOrderId -JsonFilePath [ [] ``` +### PostViaJsonString +``` +Invoke-AzReservationReturn -ReservationOrderId -JsonString [-Confirm] [-WhatIf] + [] +``` + ## DESCRIPTION Return a reservation and get refund information. @@ -72,7 +67,7 @@ Identity Parameter ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Parameter Sets: PostViaIdentityExpanded Aliases: Required: True diff --git a/src/Reservations/Reservations.Autorest/generate-info.json b/src/Reservations/Reservations.Autorest/generate-info.json index 2d7540850249..edb7af219d23 100644 --- a/src/Reservations/Reservations.Autorest/generate-info.json +++ b/src/Reservations/Reservations.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "aa094f3e-f143-4d67-bd90-fdce6ecf4cf6" + "generate_Id": "5e316ba2-1e49-4220-ad42-f59f4b1209ea" } diff --git a/src/Reservations/Reservations.sln b/src/Reservations/Reservations.sln index f76ff06c1823..6cee50a2d747 100644 --- a/src/Reservations/Reservations.sln +++ b/src/Reservations/Reservations.sln @@ -21,7 +21,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reservations", "Reservation EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reservations.Autorest", "Reservations.Autorest", "{B5A02996-EF9C-F97C-AC54-1CE210940BE3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Reservations", "..\..\generated\Reservations\Reservations.Autorest\Az.Reservations.csproj", "{6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.Reservations", "..\..\generated\Reservations\Reservations.Autorest\Az.Reservations.csproj", "{1357B329-5050-4583-8BA0-E0B364EBB6DC}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -117,18 +117,18 @@ Global {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x64.Build.0 = Release|Any CPU {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x86.ActiveCfg = Release|Any CPU {CC105CC3-9F01-4F09-8732-CC625234A54C}.Release|x86.Build.0 = Release|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x64.ActiveCfg = Debug|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x64.Build.0 = Debug|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x86.ActiveCfg = Debug|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Debug|x86.Build.0 = Debug|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|Any CPU.Build.0 = Release|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x64.ActiveCfg = Release|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x64.Build.0 = Release|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x86.ActiveCfg = Release|Any CPU - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3}.Release|x86.Build.0 = Release|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Debug|x64.ActiveCfg = Debug|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Debug|x64.Build.0 = Debug|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Debug|x86.ActiveCfg = Debug|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Debug|x86.Build.0 = Debug|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Release|Any CPU.Build.0 = Release|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Release|x64.ActiveCfg = Release|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Release|x64.Build.0 = Release|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Release|x86.ActiveCfg = Release|Any CPU + {1357B329-5050-4583-8BA0-E0B364EBB6DC}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -140,6 +140,6 @@ Global {B286ECF2-CD7C-4370-BF5F-87FE932D42BB} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} {75C9B261-2918-4F8B-BB71-2D3A9A075DDA} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} {F6121CE4-4EB9-45A5-AA11-B83EB57DBD89} = {8F90E32F-15E6-4B85-9914-A6A042C8603F} - {6C4F1A8D-3178-4DCE-82D5-D717F222DFA3} = {B5A02996-EF9C-F97C-AC54-1CE210940BE3} + {1357B329-5050-4583-8BA0-E0B364EBB6DC} = {B5A02996-EF9C-F97C-AC54-1CE210940BE3} EndGlobalSection EndGlobal diff --git a/src/Reservations/Reservations/Az.Reservations.psd1 b/src/Reservations/Reservations/Az.Reservations.psd1 index a1c18bc847c2..c92c0f69d041 100644 --- a/src/Reservations/Reservations/Az.Reservations.psd1 +++ b/src/Reservations/Reservations/Az.Reservations.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/11/2025 +# Generated on: 4/14/2025 # @{ diff --git a/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md b/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md index 8343039d9684..95308a9063ff 100644 --- a/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md +++ b/src/Reservations/Reservations/help/Invoke-AzReservationReturn.md @@ -12,13 +12,7 @@ Return a reservation and get refund information. ## SYNTAX -### PostViaJsonString (Default) -``` -Invoke-AzReservationReturn -ReservationOrderId -JsonString - [-WhatIf] [-Confirm] [] -``` - -### PostExpanded +### PostExpanded (Default) ``` Invoke-AzReservationReturn -ReservationOrderId -ReservationToReturnQuantity -ReservationToReturnReservationId -ReturnReason -Scope -SessionId @@ -31,10 +25,10 @@ Invoke-AzReservationReturn -ReservationOrderId -JsonFilePath [-WhatIf] [-Confirm] [] ``` -### PostViaIdentity +### PostViaJsonString ``` -Invoke-AzReservationReturn -InputObject [-WhatIf] - [-Confirm] [] +Invoke-AzReservationReturn -ReservationOrderId -JsonString + [-WhatIf] [-Confirm] [] ``` ### PostViaIdentityExpanded @@ -73,7 +67,7 @@ Identity Parameter ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity -Parameter Sets: PostViaIdentity, PostViaIdentityExpanded +Parameter Sets: PostViaIdentityExpanded Aliases: Required: True @@ -118,7 +112,7 @@ Order Id of the reservation ```yaml Type: System.String -Parameter Sets: PostViaJsonString, PostExpanded, PostViaJsonFilePath +Parameter Sets: PostExpanded, PostViaJsonFilePath, PostViaJsonString Aliases: Required: True