Skip to content

Commit 4fab0f2

Browse files
authored
[PS Reservation] Fixed purchase request missing update x-ms-mutability for location (#27958)
1 parent 8ebfa08 commit 4fab0f2

19 files changed

+54
-47
lines changed

src/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs

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

2828

29-
30-

src/Reservations/Reservations.Autorest/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ title: Reservations
5454
subject-prefix: $(service-name)
5555

5656
directive:
57+
- from: swagger-document
58+
where: $.definitions.PurchaseRequest.properties.location.x-ms-mutability
59+
transform: >-
60+
return [
61+
"read",
62+
"update",
63+
"create"
64+
]
5765
### Rename Cmdlet names
5866
- where:
5967
verb: Invoke

src/Reservations/Reservations.Autorest/docs/Az.Reservations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Module Name: Az.Reservations
3-
Module Guid: 2aeef1d3-a103-451c-ae76-1769e85dc1f3
3+
Module Guid: c2d95a4e-b23f-4c3a-84b1-f8221d3f3d0e
44
Download Help Link: https://learn.microsoft.com/powershell/module/az.reservations
55
Help Version: 1.0.0.0
66
Locale: en-US
@@ -63,5 +63,5 @@ Purchase `ReservationOrder` and purchase resource under the specified URI.
6363
Split a Reservation order.
6464

6565
### [Update-AzReservation](Update-AzReservation.md)
66-
update the applied scopes of the `Reservation`.
66+
Update the applied scopes of the `Reservation`.
6767

src/Reservations/Reservations.Autorest/docs/Get-AzReservation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ centralus bd82bff8-4d29-9375-8194-ce0709fc1691/f2c3a058-b469-4529-88fa-1bae251c
6060
```
6161

6262
Get the list of reservation orders in the current tenant.
63-
By design, some propeties do not have data due to the api response(e.g.
63+
By design, some properties do not have data due to the api response(e.g.
6464
LastUpdatedDateTime and SkuDescription).
6565
In this case please get the single reservation with command in example 2 to get the missing data.
6666

67-
Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
67+
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
6868

6969
### Example 2: Get the reservation details given ReservationOrderId and ReservationId
7070
```powershell
@@ -78,7 +78,7 @@ centralus a87c1742-0080-5b4d-b953-8531ad46fdc8/cad6fef7-ae86-4d47-91d0-67c897934
7878
```
7979

8080
Get the details of a single reservation.
81-
Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
81+
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
8282

8383
## PARAMETERS
8484

src/Reservations/Reservations.Autorest/docs/Get-AzReservationHistory.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ westus 2b9b9372-24e1-4a07-a354-2078fe347cf9/2ef560a7-f469-4b62-87b7-5312d588ce
4242
```
4343

4444
Get the revision of a reservation.
45-
Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
45+
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
4646

4747
## PARAMETERS
4848

src/Reservations/Reservations.Autorest/docs/Get-AzReservationOrder.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ReservationOrderId DisplayName
4848
```
4949

5050
Get the list of reservation orders in the current tenant.
51-
Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
51+
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
5252

5353
### Example 2: Get the reservation order in the current tenant, given reservation order Id
5454
```powershell
@@ -62,7 +62,7 @@ ReservationOrderId DisplayName Term State Quant
6262
```
6363

6464
Get the reservation order in the current tenant, given reservation order Id.
65-
Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
65+
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
6666

6767
## PARAMETERS
6868

src/Reservations/Reservations.Autorest/docs/Merge-AzReservation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ westeurope 79ebddac-4030-4296-ab93-1ad90f032058/5a91b7d0-9276-4bc9-adae-2a3f5c2e
3838

3939
Merge two reservations into one single reservation.
4040
The two reservations must have the same reservation order id.
41-
ReservationId can be either GUID form or fully qulified reservation id form "providers/Microsoft.Capacity/reservationOrders/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/reservations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
41+
ReservationId can be either GUID form or fully qualified reservation id form "providers/Microsoft.Capacity/reservationOrders/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/reservations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
4242

4343
## PARAMETERS
4444

src/Reservations/Reservations.Autorest/docs/Split-AzReservation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ westeurope c615c897-aaaa-4123-8527-c42cc0da41e0/1bdfaf4a-159d-46ec-be3a-f4aa527d
3838

3939
Split one reservation order into two reservations, given the quantity of each reservation.
4040
The quantity sum up should be equal to the original reservation before splitting.
41-
ReservationId can be either GUID form or fully qulified reservation id form "providers/Microsoft.Capacity/reservationOrders/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/reservations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
41+
ReservationId can be either GUID form or fully qualified reservation id form "providers/Microsoft.Capacity/reservationOrders/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/reservations/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
4242

4343
## PARAMETERS
4444

src/Reservations/Reservations.Autorest/docs/Update-AzReservation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Update-AzReservation
99

1010
## SYNOPSIS
11-
update the applied scopes of the `Reservation`.
11+
Update the applied scopes of the `Reservation`.
1212

1313
## SYNTAX
1414

@@ -56,7 +56,7 @@ Update-AzReservation -Id <String> -OrderId <String> -JsonString <String> [-Defau
5656
```
5757

5858
## DESCRIPTION
59-
update the applied scopes of the `Reservation`.
59+
Update the applied scopes of the `Reservation`.
6060

6161
## EXAMPLES
6262

src/Reservations/Reservations.Autorest/examples/Get-AzReservation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ westeurope c5cf5c26-1920-4895-bf34-098ed1c69b92/6540137e-5a4f-4a14-bd17-3f2ea72b
1111
centralus bd82bff8-4d29-9375-8194-ce0709fc1691/f2c3a058-b469-4529-88fa-1bae251c4a47 Standard_B1s Cancelled 6/1/2024 12:00:00 AM
1212
```
1313

14-
Get the list of reservation orders in the current tenant. By design, some propeties do not have data due to the api response(e.g. LastUpdatedDateTime and SkuDescription). In this case please get the single reservation with command in example 2 to get the missing data.
14+
Get the list of reservation orders in the current tenant. By design, some properties do not have data due to the api response(e.g. LastUpdatedDateTime and SkuDescription). In this case please get the single reservation with command in example 2 to get the missing data.
1515

16-
Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
16+
Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
1717

1818
### Example 2: Get the reservation details given ReservationOrderId and ReservationId
1919
```powershell
@@ -26,5 +26,5 @@ Location ReservationOrderId/ReservationId
2626
centralus a87c1742-0080-5b4d-b953-8531ad46fdc8/cad6fef7-ae86-4d47-91d0-67c897934bfe Standard_B1s Succeeded 6/1/2021 5:01:58 PM 6/1/2024 12:00:00 AM 6/1/2021 5:02:09 PM Reserved VM Instance, Standard_B1s, US Central, 3 Years
2727
```
2828

29-
Get the details of a single reservation. Some data might be trucated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
29+
Get the details of a single reservation. Some data might be truncated due to the width of powershell view, appending this to the end of the command to show the truncated data: | ft -Wrap
3030

0 commit comments

Comments
 (0)