diff --git a/generated/Reservations/Reservations.Autorest/Az.Reservations.csproj b/generated/Reservations/Reservations.Autorest/Az.Reservations.csproj
index 9b8f0f42cb09..894e01e58f3d 100644
--- a/generated/Reservations/Reservations.Autorest/Az.Reservations.csproj
+++ b/generated/Reservations/Reservations.Autorest/Az.Reservations.csproj
@@ -2,9 +2,9 @@
Reservations
Reservations
+ Reservations.Autorest
-
diff --git a/generated/Reservations/Reservations.Autorest/Az.Reservations.format.ps1xml b/generated/Reservations/Reservations.Autorest/Az.Reservations.format.ps1xml
index 2dc4f5c61aba..55a1882e7a7d 100644
--- a/generated/Reservations/Reservations.Autorest/Az.Reservations.format.ps1xml
+++ b/generated/Reservations/Reservations.Autorest/Az.Reservations.format.ps1xml
@@ -2,132 +2,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsIdentity
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.AppliedReservationList
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsIdentity
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ReservationId
-
-
- ReservationOrderId
-
-
- SubscriptionId
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api40.ProxyResource
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api40.ProxyResource
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
- SystemDataCreatedAt
-
-
- SystemDataCreatedBy
-
-
- SystemDataCreatedByType
-
-
- SystemDataLastModifiedAt
-
-
- SystemDataLastModifiedBy
-
-
- SystemDataLastModifiedByType
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api40.Resource
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api40.Resource
-
-
-
-
-
-
-
-
-
-
-
- Name
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.AppliedReservationList
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.AppliedReservationList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.AppliedReservationList#Multiple
-
-
-
@@ -135,18 +18,15 @@
NextLink
-
- Value
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.AppliedScopeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.AppliedScopeProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.AppliedScopeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.AppliedScopeProperties#Multiple
@@ -190,31 +70,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.AvailableScopeRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculateExchangeOperationResultResponse
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.AvailableScopeRequestProperties
-
-
-
-
-
-
-
-
-
-
-
- Scope
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculateExchangeOperationResultResponse
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculateExchangeOperationResultResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculateExchangeOperationResultResponse#Multiple
@@ -240,9 +98,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculateExchangeResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculateExchangeResponseProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculateExchangeResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculateExchangeResponseProperties#Multiple
@@ -262,9 +120,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculatePriceResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculatePriceResponseProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculatePriceResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculatePriceResponseProperties#Multiple
@@ -326,9 +184,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculatePriceResponsePropertiesBillingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculatePriceResponsePropertiesBillingCurrencyTotal
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculatePriceResponsePropertiesBillingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculatePriceResponsePropertiesBillingCurrencyTotal#Multiple
@@ -354,9 +212,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculatePriceResponsePropertiesPricingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculatePriceResponsePropertiesPricingCurrencyTotal
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculatePriceResponsePropertiesPricingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculatePriceResponsePropertiesPricingCurrencyTotal#Multiple
@@ -382,9 +240,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculateRefundRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculateRefundRequestProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CalculateRefundRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CalculateRefundRequestProperties#Multiple
@@ -404,9 +262,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.Catalog
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Catalog
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.Catalog
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Catalog#Multiple
@@ -444,31 +302,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CatalogBillingPlans
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CatalogBillingPlans
-
-
-
-
-
-
-
-
-
-
-
- Item
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CatalogsResult
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CatalogsResult
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.CatalogsResult
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.CatalogsResult#Multiple
@@ -494,9 +330,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ChangeDirectoryRequest
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ChangeDirectoryRequest
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ChangeDirectoryRequest
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ChangeDirectoryRequest#Multiple
@@ -516,9 +352,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ChangeDirectoryResult
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ChangeDirectoryResult
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ChangeDirectoryResult
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ChangeDirectoryResult#Multiple
@@ -550,9 +386,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.Commitment
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Commitment
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.Commitment
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Commitment#Multiple
@@ -584,9 +420,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ErrorDetails
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ErrorDetails
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ErrorDetails
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ErrorDetails#Multiple
@@ -618,9 +454,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangeOperationResultResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangeOperationResultResponse
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangeOperationResultResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangeOperationResultResponse#Multiple
@@ -646,9 +482,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangePolicyError
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangePolicyError
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangePolicyError
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangePolicyError#Multiple
@@ -674,9 +510,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangeRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangeRequestProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangeRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangeRequestProperties#Multiple
@@ -696,9 +532,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangeResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangeResponseProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExchangeResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExchangeResponseProperties#Multiple
@@ -718,9 +554,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExtendedErrorInfo
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExtendedErrorInfo
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExtendedErrorInfo
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExtendedErrorInfo#Multiple
@@ -746,9 +582,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExtendedStatusInfo
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExtendedStatusInfo
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ExtendedStatusInfo
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ExtendedStatusInfo#Multiple
@@ -774,31 +610,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.MergeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationDisplay
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.MergeProperties
-
-
-
-
-
-
-
-
-
-
-
- Source
-
-
-
-
-
-
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationDisplay
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationDisplay#Multiple
@@ -836,9 +650,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationList
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationList#Multiple
@@ -858,9 +672,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationResponse
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationResponse#Multiple
@@ -892,9 +706,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationResultError
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationResultError
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.OperationResultError
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.OperationResultError#Multiple
@@ -920,15 +734,12 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PatchProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PatchProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PatchProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PatchProperties#Multiple
-
-
-
@@ -948,9 +759,6 @@
-
- AppliedScope
-
AppliedScopeType
@@ -972,9 +780,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PaymentDetail
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PaymentDetail
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PaymentDetail
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PaymentDetail#Multiple
@@ -1006,9 +814,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.Price
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Price
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.Price
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Price#Multiple
@@ -1034,9 +842,67 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PurchaseRequest
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ProxyResource
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PurchaseRequest
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ProxyResource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PurchaseRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PurchaseRequest#Multiple
@@ -1056,18 +922,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PurchaseRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PurchaseRequestProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PurchaseRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PurchaseRequestProperties#Multiple
-
-
-
@@ -1099,9 +962,6 @@
AppliedScopeType
-
- AppliedScopes
-
BillingPlan
@@ -1132,9 +992,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PurchaseRequestPropertiesReservedResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PurchaseRequestPropertiesReservedResourceProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.PurchaseRequestPropertiesReservedResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.PurchaseRequestPropertiesReservedResourceProperties#Multiple
@@ -1154,9 +1014,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundBillingInformation
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundBillingInformation
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundBillingInformation
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundBillingInformation#Multiple
@@ -1188,9 +1048,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundPolicyError
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundPolicyError
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundPolicyError
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundPolicyError#Multiple
@@ -1216,9 +1076,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundRequestProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundRequestProperties#Multiple
@@ -1250,9 +1110,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundResponseProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RefundResponseProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RefundResponseProperties#Multiple
@@ -1278,9 +1138,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RenewPropertiesResponseBillingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RenewPropertiesResponseBillingCurrencyTotal
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RenewPropertiesResponseBillingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RenewPropertiesResponseBillingCurrencyTotal#Multiple
@@ -1306,9 +1166,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RenewPropertiesResponsePricingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RenewPropertiesResponsePricingCurrencyTotal
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.RenewPropertiesResponsePricingCurrencyTotal
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.RenewPropertiesResponsePricingCurrencyTotal#Multiple
@@ -1334,9 +1194,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationList
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationList#Multiple
@@ -1356,18 +1216,15 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationMergeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationMergeProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationMergeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationMergeProperties#Multiple
-
-
-
@@ -1375,18 +1232,15 @@
MergeDestination
-
- MergeSources
-
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderBillingPlanInformation
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderBillingPlanInformation
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderBillingPlanInformation
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderBillingPlanInformation#Multiple
@@ -1412,9 +1266,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderList
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderList
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderList#Multiple
@@ -1434,9 +1288,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderProperties#Multiple
@@ -1516,9 +1370,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderResponse
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationOrderResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationOrderResponse#Multiple
@@ -1562,9 +1416,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationResponse
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationResponse
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationResponse#Multiple
@@ -1620,21 +1474,33 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationsListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsIdentity
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationsListResult
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsIdentity#Multiple
-
+
+
+
+
+
+
+
- NextLink
+ ReservationId
+
+
+ ReservationOrderId
+
+
+ SubscriptionId
@@ -1642,15 +1508,34 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationSplitProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsListResult
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationSplitProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsListResult#Multiple
-
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationSplitProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationSplitProperties#Multiple
+
+
+
@@ -1658,9 +1543,6 @@
-
- SplitDestinations
-
SplitSource
@@ -1670,15 +1552,12 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationsProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationsProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsProperties#Multiple
-
-
-
@@ -1764,9 +1643,6 @@
-
- AppliedScope
-
AppliedScopeType
@@ -1854,9 +1730,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationsPropertiesUtilization
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsPropertiesUtilization
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationsPropertiesUtilization
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationsPropertiesUtilization#Multiple
@@ -1876,9 +1752,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationSummary
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationSummary
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationSummary
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationSummary#Multiple
@@ -1946,9 +1822,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationSwapProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationSwapProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationSwapProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationSwapProperties#Multiple
@@ -1974,9 +1850,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToExchange
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToExchange#Multiple
@@ -2002,9 +1878,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToPurchaseExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToPurchaseExchange
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToPurchaseExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToPurchaseExchange#Multiple
@@ -2036,9 +1912,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToReturn
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToReturn
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToReturn
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToReturn#Multiple
@@ -2064,9 +1940,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToReturnForExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToReturnForExchange
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationToReturnForExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationToReturnForExchange#Multiple
@@ -2098,9 +1974,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationUtilizationAggregates
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationUtilizationAggregates
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ReservationUtilizationAggregates
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ReservationUtilizationAggregates#Multiple
@@ -2138,9 +2014,31 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SavingsPlanPurchaseRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Resource#Multiple
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SavingsPlanPurchaseRequestProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SavingsPlanPurchaseRequestProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SavingsPlanPurchaseRequestProperties#Multiple
@@ -2184,9 +2082,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SavingsPlanToPurchaseExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SavingsPlanToPurchaseExchange
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SavingsPlanToPurchaseExchange
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SavingsPlanToPurchaseExchange#Multiple
@@ -2218,9 +2116,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ScopeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ScopeProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ScopeProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ScopeProperties#Multiple
@@ -2246,9 +2144,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuCapability
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuCapability
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuCapability
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuCapability#Multiple
@@ -2274,9 +2172,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuName
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuName
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuName
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuName#Multiple
@@ -2296,9 +2194,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuProperty
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuProperty
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuProperty
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuProperty#Multiple
@@ -2324,9 +2222,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuRestriction
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuRestriction
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SkuRestriction
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SkuRestriction#Multiple
@@ -2352,15 +2250,12 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SplitProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SplitProperties
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.SplitProperties
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SplitProperties#Multiple
-
-
-
@@ -2368,9 +2263,6 @@
-
- Quantity
-
ReservationId
@@ -2380,9 +2272,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api10.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SystemData
- Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api10.SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.SystemData#Multiple
diff --git a/generated/Reservations/Reservations.Autorest/Az.Reservations.psd1 b/generated/Reservations/Reservations.Autorest/Az.Reservations.psd1
index 256b6df38fb8..a135872cd779 100644
--- a/generated/Reservations/Reservations.Autorest/Az.Reservations.psd1
+++ b/generated/Reservations/Reservations.Autorest/Az.Reservations.psd1
@@ -11,8 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.Reservations.private.dll'
FormatsToProcess = './Az.Reservations.format.ps1xml'
- FunctionsToExport = 'Get-AzReservation', 'Get-AzReservationAvailableScope', 'Get-AzReservationCatalog', 'Get-AzReservationHistory', 'Get-AzReservationOrder', 'Get-AzReservationOrderId', 'Get-AzReservationQuote', 'Invoke-AzReservationArchiveReservation', 'Invoke-AzReservationCalculateExchange', 'Invoke-AzReservationCalculateRefund', 'Invoke-AzReservationExchange', 'Invoke-AzReservationReturn', 'Invoke-AzReservationUnarchiveReservation', 'Merge-AzReservation', 'Move-AzReservationDirectory', 'New-AzReservation', 'Split-AzReservation', 'Update-AzReservation', '*'
- AliasesToExport = '*'
+ FunctionsToExport = 'Get-AzReservation', 'Get-AzReservationAvailableScope', 'Get-AzReservationCatalog', 'Get-AzReservationHistory', 'Get-AzReservationOrder', 'Get-AzReservationOrderId', 'Get-AzReservationQuote', 'Invoke-AzReservationArchiveReservation', 'Invoke-AzReservationCalculateExchange', 'Invoke-AzReservationCalculateRefund', 'Invoke-AzReservationExchange', 'Invoke-AzReservationReturn', 'Invoke-AzReservationUnarchiveReservation', 'Merge-AzReservation', 'Move-AzReservationDirectory', 'New-AzReservation', 'Split-AzReservation', 'Update-AzReservation'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Reservations'
diff --git a/generated/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs b/generated/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs
index 014de140746b..c35f0587b3e7 100644
--- a/generated/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs
+++ b/generated/Reservations/Reservations.Autorest/Properties/AssemblyInfo.cs
@@ -1,28 +1,30 @@
-// ----------------------------------------------------------------------------------
-//
-// Copyright Microsoft Corporation
-// Licensed under the Apache License, Version 2.0 (the "License");
+// 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,
+// 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: AssemblyTitle("Microsoft Azure Powershell - Reservations")]
-[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
-[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
-[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+[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)]
+
+
+
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(false)]
-[assembly: Guid("6035c2bd-2183-4107-8f37-8395d134babd")]
-[assembly: AssemblyVersion("0.13.1")]
-[assembly: AssemblyFileVersion("0.13.1")]
diff --git a/generated/Reservations/Reservations.Autorest/check-dependencies.ps1 b/generated/Reservations/Reservations.Autorest/check-dependencies.ps1
index c29591c7bfe1..90ca9867ae40 100644
--- a/generated/Reservations/Reservations.Autorest/check-dependencies.ps1
+++ b/generated/Reservations/Reservations.Autorest/check-dependencies.ps1
@@ -12,13 +12,13 @@
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------
-param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+param([switch]$NotIsolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
$ErrorActionPreference = 'Stop'
-if(-not $Isolated) {
+if(-not $NotIsolated) {
Write-Host -ForegroundColor Green 'Creating isolated process...'
$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
- & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -NotIsolated
return
}
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservation.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservation.ps1
index a669e2540af5..26ca43d94354 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservation.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservation.ps1
@@ -27,7 +27,7 @@ Get-AzReservation -ReservationOrderId a87c1742-0080-5b4d-b953-8531ad46fdc8 -Rese
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -38,14 +38,21 @@ INPUTOBJECT : Identity Parameter
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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/get-azreservation
#>
function Get-AzReservation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityReservationOrder', Mandatory)]
[Alias('ReservationId')]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
@@ -64,11 +71,17 @@ param(
[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='GetViaIdentityReservationOrder', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
+
[Parameter(ParameterSetName='Get')]
[Parameter(ParameterSetName='GetViaIdentity')]
+ [Parameter(ParameterSetName='GetViaIdentityReservationOrder')]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
[System.String]
# Supported value of this query is renewProperties
@@ -163,6 +176,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -184,6 +206,7 @@ begin {
$mapping = @{
Get = 'Az.Reservations.private\Get-AzReservation_Get';
GetViaIdentity = 'Az.Reservations.private\Get-AzReservation_GetViaIdentity';
+ GetViaIdentityReservationOrder = 'Az.Reservations.private\Get-AzReservation_GetViaIdentityReservationOrder';
List = 'Az.Reservations.private\Get-AzReservation_List';
List1 = 'Az.Reservations.private\Get-AzReservation_List1';
}
@@ -194,6 +217,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationAvailableScope.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationAvailableScope.ps1
index e4353d692dec..b43a969b5323 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationAvailableScope.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationAvailableScope.ps1
@@ -22,70 +22,83 @@ Check whether the scopes from request is valid for `Reservation`.\n
.Example
Get-AzReservationAvailableScope -ReservationId 2ef560a7-f469-4b62-87b7-5312d588ce2a -ReservationOrderId 2b9b9372-24e1-4a07-a354-2078fe347cf9 -Scope "/subscriptions/3f0487ff-27ca-4b9c-2a23-000770724b1b"
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties
.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.
-BODY : Available scope
- [Scope ]:
-
INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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/get-azreservationavailablescope
#>
function Get-AzReservationAvailableScope {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties])]
[CmdletBinding(DefaultParameterSetName='AvailableExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Available', Mandatory)]
[Parameter(ParameterSetName='AvailableExpanded', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Id of the reservation item
${ReservationId},
- [Parameter(ParameterSetName='Available', Mandatory)]
[Parameter(ParameterSetName='AvailableExpanded', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Order Id of the reservation
${ReservationOrderId},
- [Parameter(ParameterSetName='AvailableViaIdentity', Mandatory, ValueFromPipeline)]
[Parameter(ParameterSetName='AvailableViaIdentityExpanded', 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='Available', Mandatory, ValueFromPipeline)]
- [Parameter(ParameterSetName='AvailableViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest]
- # Available scope
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
+ [Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
[Parameter(ParameterSetName='AvailableExpanded')]
[Parameter(ParameterSetName='AvailableViaIdentityExpanded')]
+ [Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
[System.String[]]
# .
${Scope},
+ [Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Available operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Available operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -154,6 +167,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -173,10 +195,11 @@ begin {
}
$mapping = @{
- Available = 'Az.Reservations.private\Get-AzReservationAvailableScope_Available';
AvailableExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableExpanded';
- AvailableViaIdentity = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentity';
AvailableViaIdentityExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentityExpanded';
+ AvailableViaIdentityReservationOrderExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentityReservationOrderExpanded';
+ AvailableViaJsonFilePath = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaJsonFilePath';
+ AvailableViaJsonString = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -185,6 +208,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationCatalog.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationCatalog.ps1
index 4026e2763f42..7313998f68dd 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationCatalog.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationCatalog.ps1
@@ -29,7 +29,7 @@ Get-AzReservationCatalog -SubscriptionId "10000000-aaaa-bbbb-cccc-100000000001"
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICatalog
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICatalog
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -44,7 +44,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationcatalog
#>
function Get-AzReservationCatalog {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICatalog])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICatalog])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
@@ -58,7 +58,6 @@ param(
[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()]
@@ -167,6 +166,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -189,9 +197,7 @@ begin {
Get = 'Az.Reservations.private\Get-AzReservationCatalog_Get';
GetViaIdentity = 'Az.Reservations.private\Get-AzReservationCatalog_GetViaIdentity';
}
- if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -205,6 +211,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationHistory.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationHistory.ps1
index 299f54db2dab..b9e8af625500 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationHistory.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationHistory.ps1
@@ -23,12 +23,12 @@ List of all the revisions for the `Reservation`.
Get-AzReservationHistory -ReservationId 2ef560a7-f469-4b62-87b7-5312d588ce2a -ReservationOrderId 2b9b9372-24e1-4a07-a354-2078fe347cf9
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse
.Link
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationhistory
#>
function Get-AzReservationHistory {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -99,6 +99,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -127,6 +136,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrder.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrder.ps1
index b73692ff7426..daef2180104e 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrder.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrder.ps1
@@ -27,7 +27,7 @@ Get-AzReservationOrder -ReservationOrderId 179de21b-90ec-4fe4-9423-f804b856dfee
.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
@@ -42,7 +42,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationorder
#>
function Get-AzReservationOrder {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -56,7 +56,6 @@ param(
[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='Get')]
@@ -122,6 +121,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -152,6 +160,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrderId.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrderId.ps1
index 33e9f1948e73..c29e75c3f437 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrderId.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationOrderId.ps1
@@ -25,7 +25,7 @@ Get-AzReservationOrderId -SubscriptionId '10000000-aaaa-bbbb-cccc-100000000005'
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAppliedReservations
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAppliedReservations
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -40,7 +40,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationorderid
#>
function Get-AzReservationOrderId {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAppliedReservations])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAppliedReservations])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
@@ -54,7 +54,6 @@ param(
[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()]
@@ -113,6 +112,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -135,9 +143,7 @@ begin {
Get = 'Az.Reservations.private\Get-AzReservationOrderId_Get';
GetViaIdentity = 'Az.Reservations.private\Get-AzReservationOrderId_GetViaIdentity';
}
- if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -151,6 +157,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationQuote.ps1 b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationQuote.ps1
index 4612c807db22..dd25eadbf04b 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationQuote.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Get-AzReservationQuote.ps1
@@ -24,48 +24,15 @@ Get-AzReservationQuote -AppliedScopeType 'Shared' -BillingPlan 'Upfront' -billin
.Example
Get-AzReservationQuote -AppliedScopeType 'Shared' -BillingPlan 'Monthly' -billingScopeId '/subscriptions/b0f278e1-1f18-4378-84d7-b44dfa708665' -DisplayName 'yourRIName' -Location 'westus' -Quantity 1 -ReservedResourceType 'VirtualMachines' -Sku 'Standard_b1ls' -Term 'P1Y'
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculatePriceResponseProperties
-.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.
-
-BODY : The request for reservation purchase
- [AppliedScopePropertyDisplayName ]: Display name
- [AppliedScopePropertyManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
- [AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
- [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
- [AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [AppliedScopes ]: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
- [BillingPlan ]: Represent the billing plans.
- [BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
- [DisplayName ]: Friendly name of the reservation
- [InstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
- [Location ]: The Azure region where the reserved resource lives.
- [Quantity ]: Quantity of the skus that are part of the reservation.
- [Renew ]: Setting this to true will automatically purchase a new reservation on the expiration date time.
- [ReservedResourceType ]: The type of the resource that is being reserved.
- [ReviewDateTime ]: This is the date-time when the Azure hybrid benefit needs to be reviewed.
- [Sku ]:
- [Term ]: Represent the term of reservation.
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculatePriceResponse
.Link
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationquote
#>
function Get-AzReservationQuote {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculatePriceResponseProperties])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculatePriceResponse])]
[CmdletBinding(DefaultParameterSetName='CalculateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Calculate', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest]
- # The request for reservation purchase
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='CalculateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
@@ -106,16 +73,16 @@ param(
${AppliedScopePropertyTenantId},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("Single", "Shared", "ManagementGroup")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType]
+ [System.String]
# Type of the Applied Scope.
${AppliedScopeType},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("Upfront", "Monthly")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan]
+ [System.String]
# Represent the billing plans.
${BillingPlan},
@@ -132,9 +99,9 @@ param(
${DisplayName},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("On", "Off")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility]
+ [System.String]
# Turning this on will apply the reservation discount to other VMs in the same VM size group.
# Only specify for VirtualMachines reserved resource type.
${InstanceFlexibility},
@@ -158,9 +125,9 @@ param(
${Renew},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType]
+ [System.String]
# The type of the resource that is being reserved.
${ReservedResourceType},
@@ -177,12 +144,24 @@ param(
${Sku},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("P1Y", "P3Y", "P5Y")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm]
+ [System.String]
# Represent the term of reservation.
${Term},
+ [Parameter(ParameterSetName='CalculateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Calculate operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CalculateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Calculate operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -239,6 +218,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -258,8 +246,9 @@ begin {
}
$mapping = @{
- Calculate = 'Az.Reservations.private\Get-AzReservationQuote_Calculate';
CalculateExpanded = 'Az.Reservations.private\Get-AzReservationQuote_CalculateExpanded';
+ CalculateViaJsonFilePath = 'Az.Reservations.private\Get-AzReservationQuote_CalculateViaJsonFilePath';
+ CalculateViaJsonString = 'Az.Reservations.private\Get-AzReservationQuote_CalculateViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -268,6 +257,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationArchiveReservation.ps1 b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationArchiveReservation.ps1
index da264d154797..06260ceca316 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationArchiveReservation.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationArchiveReservation.ps1
@@ -36,6 +36,12 @@ INPUTOBJECT : Identity Parameter
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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-azreservationarchivereservation
#>
@@ -44,6 +50,7 @@ function Invoke-AzReservationArchiveReservation {
[CmdletBinding(DefaultParameterSetName='Archive', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='Archive', Mandatory)]
+ [Parameter(ParameterSetName='ArchiveViaIdentityReservationOrder', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Id of the reservation item
@@ -59,9 +66,14 @@ param(
[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='ArchiveViaIdentityReservationOrder', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -124,6 +136,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -145,6 +166,7 @@ begin {
$mapping = @{
Archive = 'Az.Reservations.private\Invoke-AzReservationArchiveReservation_Archive';
ArchiveViaIdentity = 'Az.Reservations.private\Invoke-AzReservationArchiveReservation_ArchiveViaIdentity';
+ ArchiveViaIdentityReservationOrder = 'Az.Reservations.private\Invoke-AzReservationArchiveReservation_ArchiveViaIdentityReservationOrder';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -153,6 +175,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateExchange.ps1 b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateExchange.ps1
index 6df53d74f6bd..72d1e719ff21 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateExchange.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateExchange.ps1
@@ -61,54 +61,13 @@ $reservationsToPurchase = @($reservationToPurchase1, $reservationToPurchase2)
Invoke-AzReservationCalculateExchange -ReservationsToExchange $reservationsToReturn -ReservationsToPurchase $reservationsToPurchase
-.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
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.
-BODY : Calculate exchange request
- [ReservationsToExchange ]: List of reservations that are being returned in this exchange.
- [Quantity ]: Quantity to be returned. Must be greater than zero.
- [ReservationId ]: Fully qualified identifier of the reservation being returned
- [ReservationsToPurchase ]: List of reservations that are being purchased in this exchange.
- [AppliedScopePropertyDisplayName ]: Display name
- [AppliedScopePropertyManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
- [AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
- [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
- [AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [AppliedScopes ]: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
- [BillingPlan ]: Represent the billing plans.
- [BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
- [DisplayName ]: Friendly name of the reservation
- [InstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
- [Location ]: The Azure region where the reserved resource lives.
- [Quantity ]: Quantity of the skus that are part of the reservation.
- [Renew ]: Setting this to true will automatically purchase a new reservation on the expiration date time.
- [ReservedResourceType ]: The type of the resource that is being reserved.
- [ReviewDateTime ]: This is the date-time when the Azure hybrid benefit needs to be reviewed.
- [Sku ]:
- [Term ]: Represent the term of reservation.
- [SavingsPlansToPurchase ]: List of savings plans that are being purchased in this exchange.
- [AppliedScopePropertyDisplayName ]: Display name
- [AppliedScopePropertyManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
- [AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
- [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
- [AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
- [BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
- [CommitmentAmount ]:
- [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
- [CommitmentGrain ]: Commitment grain.
- [DisplayName ]: Friendly name of the savings plan
- [SkuName ]:
- [Term ]: Represent savings plan term in ISO 8601 format.
-
RESERVATIONSTOEXCHANGE : List of reservations that are being returned in this exchange.
[Quantity ]: Quantity to be returned. Must be greater than zero.
[ReservationId ]: Fully qualified identifier of the reservation being returned
@@ -119,19 +78,19 @@ RESERVATIONSTOPURCHASE : List of reservations that are being
[AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
[AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
[AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [AppliedScopes ]: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
- [BillingPlan ]: Represent the billing plans.
+ [AppliedScopeType ]: Type of the Applied Scope.
+ [AppliedScopes >]: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
+ [BillingPlan ]: Represent the billing plans.
[BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
[DisplayName ]: Friendly name of the reservation
- [InstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
+ [InstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
[Location ]: The Azure region where the reserved resource lives.
[Quantity ]: Quantity of the skus that are part of the reservation.
[Renew ]: Setting this to true will automatically purchase a new reservation on the expiration date time.
- [ReservedResourceType ]: The type of the resource that is being reserved.
+ [ReservedResourceType ]: The type of the resource that is being reserved.
[ReviewDateTime ]: This is the date-time when the Azure hybrid benefit needs to be reviewed.
[Sku ]:
- [Term ]: Represent the term of reservation.
+ [Term ]: Represent the term of reservation.
SAVINGSPLANSTOPURCHASE : List of savings plans that are being purchased in this exchange.
[AppliedScopePropertyDisplayName ]: Display name
@@ -139,53 +98,55 @@ SAVINGSPLANSTOPURCHASE : List of savings plans th
[AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
[AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
[AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
+ [AppliedScopeType ]: Type of the Applied Scope.
+ [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
[BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
[CommitmentAmount ]:
[CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
- [CommitmentGrain ]: Commitment grain.
+ [CommitmentGrain ]: Commitment grain.
[DisplayName ]: Friendly name of the savings plan
[SkuName ]:
- [Term ]: Represent savings plan term in ISO 8601 format.
+ [Term ]: Represent savings plan term in ISO 8601 format.
.Link
https://learn.microsoft.com/powershell/module/az.reservations/invoke-azreservationcalculateexchange
#>
function Invoke-AzReservationCalculateExchange {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeOperationResultResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateExchangeOperationResultResponse])]
[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateExchangeRequest]
- # Calculate exchange request
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='PostExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationToReturn[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationToReturn[]]
# List of reservations that are being returned in this exchange.
- # To construct, see NOTES section for RESERVATIONSTOEXCHANGE properties and create a hash table.
${ReservationsToExchange},
[Parameter(ParameterSetName='PostExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IPurchaseRequest[]]
# List of reservations that are being purchased in this exchange.
- # To construct, see NOTES section for RESERVATIONSTOPURCHASE properties and create a hash table.
${ReservationsToPurchase},
[Parameter(ParameterSetName='PostExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISavingsPlanPurchaseRequest[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ISavingsPlanPurchaseRequest[]]
# List of savings plans that are being purchased in this exchange.
- # To construct, see NOTES section for SAVINGSPLANSTOPURCHASE properties and create a hash table.
${SavingsPlansToPurchase},
+ [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()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -254,6 +215,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -273,8 +243,9 @@ begin {
}
$mapping = @{
- Post = 'Az.Reservations.private\Invoke-AzReservationCalculateExchange_Post';
PostExpanded = 'Az.Reservations.private\Invoke-AzReservationCalculateExchange_PostExpanded';
+ PostViaJsonFilePath = 'Az.Reservations.private\Invoke-AzReservationCalculateExchange_PostViaJsonFilePath';
+ PostViaJsonString = 'Az.Reservations.private\Invoke-AzReservationCalculateExchange_PostViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -283,6 +254,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateRefund.ps1 b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateRefund.ps1
index 9c74dbba8ce9..422f459ff7d0 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateRefund.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationCalculateRefund.ps1
@@ -26,23 +26,15 @@ $fullyQualifiedOrderId = "/providers/microsoft.capacity/reservationOrders/500000
Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -ReservationToReturnQuantity 1 -ReservationToReturnReservationId $fullyQualifiedId -Id $fullyQualifiedOrderId -Scope "Reservation"
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateRefundResponse
.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.
-BODY : Request containing information needed for calculating refund.
- [Id ]: Fully qualified identifier of the reservation order being returned
- [ReservationToReturnQuantity ]: Quantity to be returned. Must be greater than zero.
- [ReservationToReturnReservationId ]: Fully qualified identifier of the reservation being returned
- [Scope ]: The scope of the refund, e.g. Reservation
-
INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[ReservationId ]: Id of the reservation item
@@ -52,32 +44,23 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/invoke-azreservationcalculaterefund
#>
function Invoke-AzReservationCalculateRefund {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculateRefundResponse])]
[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Post', Mandatory)]
[Parameter(ParameterSetName='PostExpanded', Mandatory)]
+ [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='PostViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# 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
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)]
- [Parameter(ParameterSetName='PostViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculateRefundRequest]
- # Request containing information needed for calculating refund.
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='PostExpanded')]
[Parameter(ParameterSetName='PostViaIdentityExpanded')]
[Alias('ReservationId')]
@@ -109,6 +92,18 @@ param(
# Reservation
${Scope},
+ [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()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -165,6 +160,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -184,10 +188,10 @@ begin {
}
$mapping = @{
- Post = 'Az.Reservations.private\Invoke-AzReservationCalculateRefund_Post';
PostExpanded = 'Az.Reservations.private\Invoke-AzReservationCalculateRefund_PostExpanded';
- PostViaIdentity = 'Az.Reservations.private\Invoke-AzReservationCalculateRefund_PostViaIdentity';
PostViaIdentityExpanded = 'Az.Reservations.private\Invoke-AzReservationCalculateRefund_PostViaIdentityExpanded';
+ PostViaJsonFilePath = 'Az.Reservations.private\Invoke-AzReservationCalculateRefund_PostViaJsonFilePath';
+ PostViaJsonString = 'Az.Reservations.private\Invoke-AzReservationCalculateRefund_PostViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -196,6 +200,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationExchange.ps1 b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationExchange.ps1
index b0bbdb245daa..4c57d98d3a7e 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationExchange.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationExchange.ps1
@@ -22,37 +22,33 @@ Returns one or more `Reservations` in exchange for one or more `Reservation` pur
.Example
Invoke-AzReservationExchange -SessionId 8982593c-679e-4d4e-b971-c48b6d824cba
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeRequest
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeOperationResultResponse
-.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.
-
-BODY : Exchange request
- [SessionId ]: SessionId that was returned by CalculateExchange API.
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IExchangeOperationResultResponse
.Link
https://learn.microsoft.com/powershell/module/az.reservations/invoke-azreservationexchange
#>
function Invoke-AzReservationExchange {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeOperationResultResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IExchangeOperationResultResponse])]
[CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Post', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IExchangeRequest]
- # Exchange request
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='PostExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
[System.String]
# SessionId that was returned by CalculateExchange API.
${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()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -121,6 +117,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -140,8 +145,9 @@ begin {
}
$mapping = @{
- Post = 'Az.Reservations.private\Invoke-AzReservationExchange_Post';
PostExpanded = 'Az.Reservations.private\Invoke-AzReservationExchange_PostExpanded';
+ PostViaJsonFilePath = 'Az.Reservations.private\Invoke-AzReservationExchange_PostViaJsonFilePath';
+ PostViaJsonString = 'Az.Reservations.private\Invoke-AzReservationExchange_PostViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -150,6 +156,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationReturn.ps1 b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationReturn.ps1
index a1738940b0b9..e04c89f80ae6 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationReturn.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationReturn.ps1
@@ -16,9 +16,9 @@
<#
.Synopsis
-Return a Reservation.
+Return a reservation and get refund information.
.Description
-Return a Reservation.
+Return a reservation and get refund information.
.Example
$orderId = "50000000-aaaa-bbbb-cccc-100000000003"
$fullyQualifiedId = "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000003/reservations/30000000-aaaa-bbbb-cccc-100000000003"
@@ -29,19 +29,12 @@ Invoke-AzReservationCalculateRefund -ReservationOrderId $orderId -ReservationToR
.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.
-BODY : The return request body.
- [ReservationToReturnQuantity ]: Quantity to be returned. Must be greater than zero.
- [ReservationToReturnReservationId ]: Fully qualified identifier of the reservation being returned
- [ReturnReason ]: The reason of returning the reservation
- [Scope ]: The scope of the refund, e.g. Reservation
- [SessionId ]: SessionId that was returned by CalculateRefund API.
-
INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[ReservationId ]: Id of the reservation item
@@ -51,48 +44,48 @@ INPUTOBJECT : Identity Parameter
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(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
+ [Parameter(ParameterSetName='PostExpanded', Mandatory)]
+ [Parameter(ParameterSetName='PostViaJsonString', Mandatory)]
+ [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [System.String]
+ # Order Id of the reservation
+ ${ReservationOrderId},
+
[Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory, ValueFromPipeline)]
- [Parameter(ParameterSetName='PostViaIdentity', 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='PostExpanded', Mandatory)]
- [Parameter(ParameterSetName='Post', Mandatory)]
+ [Parameter(ParameterSetName='PostViaIdentityExpanded', Mandatory)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [System.String]
- # Reservation Order Id.
- ${ReservationOrderId},
+ [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')]
[System.String]
- # Reservation Id to return.
+ # 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.Int32]
- # Quantity to return.
- ${ReservationToReturnQuantity},
-
[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)]
@@ -108,24 +101,28 @@ param(
[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='Post', Mandatory)]
- [Parameter(ParameterSetName='PostViaIdentity', Mandatory)]
- [ValidateNotNull()]
+ [Parameter(ParameterSetName='PostViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Post operation
+ ${JsonString},
+
+ [Parameter(ParameterSetName='PostViaJsonFilePath', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IRefundRequest]
- # The return request body.
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
+ [System.String]
+ # Path of Json file supplied to the Post operation
+ ${JsonFilePath},
[Parameter(DontShow)]
[Alias('AzureRMContext', 'AzureCredential')]
[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)]
@@ -175,6 +172,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -195,9 +201,9 @@ begin {
$mapping = @{
PostExpanded = 'Az.Reservations.custom\Invoke-AzReservationReturn';
- Post = 'Az.Reservations.custom\Invoke-AzReservationReturn';
+ PostViaJsonString = 'Az.Reservations.custom\Invoke-AzReservationReturn';
+ PostViaJsonFilePath = 'Az.Reservations.custom\Invoke-AzReservationReturn';
PostViaIdentityExpanded = 'Az.Reservations.custom\Invoke-AzReservationReturn';
- PostViaIdentity = 'Az.Reservations.custom\Invoke-AzReservationReturn';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -206,6 +212,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationUnarchiveReservation.ps1 b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationUnarchiveReservation.ps1
index 7dafc713ce3a..467c361a1973 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationUnarchiveReservation.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Invoke-AzReservationUnarchiveReservation.ps1
@@ -36,6 +36,12 @@ INPUTOBJECT : Identity Parameter
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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-azreservationunarchivereservation
#>
@@ -44,6 +50,7 @@ function Invoke-AzReservationUnarchiveReservation {
[CmdletBinding(DefaultParameterSetName='Unarchive', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='Unarchive', Mandatory)]
+ [Parameter(ParameterSetName='UnarchiveViaIdentityReservationOrder', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Id of the reservation item
@@ -59,9 +66,14 @@ param(
[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='UnarchiveViaIdentityReservationOrder', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -124,6 +136,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -145,6 +166,7 @@ begin {
$mapping = @{
Unarchive = 'Az.Reservations.private\Invoke-AzReservationUnarchiveReservation_Unarchive';
UnarchiveViaIdentity = 'Az.Reservations.private\Invoke-AzReservationUnarchiveReservation_UnarchiveViaIdentity';
+ UnarchiveViaIdentityReservationOrder = 'Az.Reservations.private\Invoke-AzReservationUnarchiveReservation_UnarchiveViaIdentityReservationOrder';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -153,6 +175,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Merge-AzReservation.ps1 b/generated/Reservations/Reservations.Autorest/exports/Merge-AzReservation.ps1
index be126b004be7..7ddc964951ad 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Merge-AzReservation.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Merge-AzReservation.ps1
@@ -24,12 +24,12 @@ $arr=@("72bc398d-b201-4a2e-a1fa-60fb48a85b23", "34f2474f-b4d7-41ec-a96d-d4bb7c2f
Merge-AzReservation -ReservationOrderId "79ebddac-4030-4296-ab93-1ad90f032058" -ReservationId $arr
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse
.Link
https://learn.microsoft.com/powershell/module/az.reservations/merge-azreservation
#>
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)]
@@ -102,6 +102,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -130,6 +139,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/Move-AzReservationDirectory.ps1 b/generated/Reservations/Reservations.Autorest/exports/Move-AzReservationDirectory.ps1
index f8530017e8cc..0e3b00720a11 100644
--- a/generated/Reservations/Reservations.Autorest/exports/Move-AzReservationDirectory.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/Move-AzReservationDirectory.ps1
@@ -22,20 +22,15 @@ Change directory (tenant) of `ReservationOrder` and all `Reservation` under it t
.Example
Move-AzReservationDirectory -ReservationOrderId "7c31a9e8-8490-4002-88cd-3a16b71362a9" -DestinationTenantId "f65fbe9a-14b0-44c6-8c0d-2ef2c4543040"
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IChangeDirectoryResponse
.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.
-BODY : Request body for change directory of a reservation.
- [DestinationTenantId ]: Tenant id GUID that reservation order is to be transferred to
-
INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[ReservationId ]: Id of the reservation item
@@ -45,32 +40,23 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/move-azreservationdirectory
#>
function Move-AzReservationDirectory {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IChangeDirectoryResponse])]
[CmdletBinding(DefaultParameterSetName='ChangeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Change', Mandatory)]
[Parameter(ParameterSetName='ChangeExpanded', Mandatory)]
+ [Parameter(ParameterSetName='ChangeViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='ChangeViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Order Id of the reservation
${ReservationOrderId},
- [Parameter(ParameterSetName='ChangeViaIdentity', Mandatory, ValueFromPipeline)]
[Parameter(ParameterSetName='ChangeViaIdentityExpanded', 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='Change', Mandatory, ValueFromPipeline)]
- [Parameter(ParameterSetName='ChangeViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IChangeDirectoryRequest]
- # Request body for change directory of a reservation.
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='ChangeExpanded')]
[Parameter(ParameterSetName='ChangeViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
@@ -78,6 +64,18 @@ param(
# Tenant id GUID that reservation order is to be transferred to
${DestinationTenantId},
+ [Parameter(ParameterSetName='ChangeViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Change operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='ChangeViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Change operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -134,6 +132,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -153,10 +160,10 @@ begin {
}
$mapping = @{
- Change = 'Az.Reservations.private\Move-AzReservationDirectory_Change';
ChangeExpanded = 'Az.Reservations.private\Move-AzReservationDirectory_ChangeExpanded';
- ChangeViaIdentity = 'Az.Reservations.private\Move-AzReservationDirectory_ChangeViaIdentity';
ChangeViaIdentityExpanded = 'Az.Reservations.private\Move-AzReservationDirectory_ChangeViaIdentityExpanded';
+ ChangeViaJsonFilePath = 'Az.Reservations.private\Move-AzReservationDirectory_ChangeViaJsonFilePath';
+ ChangeViaJsonString = 'Az.Reservations.private\Move-AzReservationDirectory_ChangeViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -165,6 +172,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/New-AzReservation.ps1 b/generated/Reservations/Reservations.Autorest/exports/New-AzReservation.ps1
index d15c4fc13c11..82d03e1c9796 100644
--- a/generated/Reservations/Reservations.Autorest/exports/New-AzReservation.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/New-AzReservation.ps1
@@ -16,43 +16,21 @@
<#
.Synopsis
-Purchase `ReservationOrder` and create resource under the specified URI.
+Purchase `ReservationOrder` and purchase resource under the specified URI.
.Description
-Purchase `ReservationOrder` and create resource under the specified URI.
+Purchase `ReservationOrder` and purchase resource under the specified URI.
.Example
New-AzReservation -AppliedScopeType 'Shared' -BillingPlan 'Upfront' -billingScopeId '/subscriptions/b0f278e1-1f18-4378-84d7-b44dfa708665' -DisplayName 'TestVm2222' -Location 'westus' -Quantity 1 -ReservedResourceType 'VirtualMachines' -Sku 'Standard_b1ls' -Term 'P1Y' -ReservationOrderId '846655fa-d9e7-4fb8-9512-3ab7367352f1'
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest
.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.
-BODY : The request for reservation purchase
- [AppliedScopePropertyDisplayName ]: Display name
- [AppliedScopePropertyManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
- [AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
- [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
- [AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [AppliedScopes ]: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
- [BillingPlan ]: Represent the billing plans.
- [BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
- [DisplayName ]: Friendly name of the reservation
- [InstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
- [Location ]: The Azure region where the reserved resource lives.
- [Quantity ]: Quantity of the skus that are part of the reservation.
- [Renew ]: Setting this to true will automatically purchase a new reservation on the expiration date time.
- [ReservedResourceType ]: The type of the resource that is being reserved.
- [ReviewDateTime ]: This is the date-time when the Azure hybrid benefit needs to be reviewed.
- [Sku ]:
- [Term ]: Represent the term of reservation.
-
INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[ReservationId ]: Id of the reservation item
@@ -62,32 +40,23 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/new-azreservation
#>
function New-AzReservation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse])]
[CmdletBinding(DefaultParameterSetName='PurchaseExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Purchase', Mandatory)]
[Parameter(ParameterSetName='PurchaseExpanded', Mandatory)]
+ [Parameter(ParameterSetName='PurchaseViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='PurchaseViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Order Id of the reservation
${ReservationOrderId},
- [Parameter(ParameterSetName='PurchaseViaIdentity', Mandatory, ValueFromPipeline)]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded', 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='Purchase', Mandatory, ValueFromPipeline)]
- [Parameter(ParameterSetName='PurchaseViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest]
- # The request for reservation purchase
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='PurchaseExpanded')]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded')]
[AllowEmptyCollection()]
@@ -135,17 +104,17 @@ param(
[Parameter(ParameterSetName='PurchaseExpanded')]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("Single", "Shared", "ManagementGroup")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType]
+ [System.String]
# Type of the Applied Scope.
${AppliedScopeType},
[Parameter(ParameterSetName='PurchaseExpanded')]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("Upfront", "Monthly")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan]
+ [System.String]
# Represent the billing plans.
${BillingPlan},
@@ -165,9 +134,9 @@ param(
[Parameter(ParameterSetName='PurchaseExpanded')]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("On", "Off")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility]
+ [System.String]
# Turning this on will apply the reservation discount to other VMs in the same VM size group.
# Only specify for VirtualMachines reserved resource type.
${InstanceFlexibility},
@@ -195,9 +164,9 @@ param(
[Parameter(ParameterSetName='PurchaseExpanded')]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType]
+ [System.String]
# The type of the resource that is being reserved.
${ReservedResourceType},
@@ -217,12 +186,24 @@ param(
[Parameter(ParameterSetName='PurchaseExpanded')]
[Parameter(ParameterSetName='PurchaseViaIdentityExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("P1Y", "P3Y", "P5Y")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm]
+ [System.String]
# Represent the term of reservation.
${Term},
+ [Parameter(ParameterSetName='PurchaseViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Purchase operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='PurchaseViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Purchase operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -291,6 +272,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -310,10 +300,10 @@ begin {
}
$mapping = @{
- Purchase = 'Az.Reservations.private\New-AzReservation_Purchase';
PurchaseExpanded = 'Az.Reservations.private\New-AzReservation_PurchaseExpanded';
- PurchaseViaIdentity = 'Az.Reservations.private\New-AzReservation_PurchaseViaIdentity';
PurchaseViaIdentityExpanded = 'Az.Reservations.private\New-AzReservation_PurchaseViaIdentityExpanded';
+ PurchaseViaJsonFilePath = 'Az.Reservations.private\New-AzReservation_PurchaseViaJsonFilePath';
+ PurchaseViaJsonString = 'Az.Reservations.private\New-AzReservation_PurchaseViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -322,6 +312,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
diff --git a/generated/Reservations/Reservations.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/Reservations/Reservations.Autorest/exports/ProxyCmdletDefinitions.ps1
index 5b7ecfdae8fa..975bd81f9025 100644
--- a/generated/Reservations/Reservations.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/generated/Reservations/Reservations.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -22,70 +22,83 @@ Check whether the scopes from request is valid for `Reservation`.\n
.Example
Get-AzReservationAvailableScope -ReservationId 2ef560a7-f469-4b62-87b7-5312d588ce2a -ReservationOrderId 2b9b9372-24e1-4a07-a354-2078fe347cf9 -Scope "/subscriptions/3f0487ff-27ca-4b9c-2a23-000770724b1b"
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties
.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.
-BODY : Available scope
- [Scope ]:
-
INPUTOBJECT : Identity Parameter
[Id ]: Resource identity path
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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/get-azreservationavailablescope
#>
function Get-AzReservationAvailableScope {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ISubscriptionScopeProperties])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAvailableScopeProperties])]
[CmdletBinding(DefaultParameterSetName='AvailableExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Available', Mandatory)]
[Parameter(ParameterSetName='AvailableExpanded', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Id of the reservation item
${ReservationId},
- [Parameter(ParameterSetName='Available', Mandatory)]
[Parameter(ParameterSetName='AvailableExpanded', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
+ [Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Order Id of the reservation
${ReservationOrderId},
- [Parameter(ParameterSetName='AvailableViaIdentity', Mandatory, ValueFromPipeline)]
[Parameter(ParameterSetName='AvailableViaIdentityExpanded', 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='Available', Mandatory, ValueFromPipeline)]
- [Parameter(ParameterSetName='AvailableViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAvailableScopeRequest]
- # Available scope
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
+ [Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
[Parameter(ParameterSetName='AvailableExpanded')]
[Parameter(ParameterSetName='AvailableViaIdentityExpanded')]
+ [Parameter(ParameterSetName='AvailableViaIdentityReservationOrderExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
[System.String[]]
# .
${Scope},
+ [Parameter(ParameterSetName='AvailableViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Available operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='AvailableViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Available operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -154,6 +167,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -173,10 +195,11 @@ begin {
}
$mapping = @{
- Available = 'Az.Reservations.private\Get-AzReservationAvailableScope_Available';
AvailableExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableExpanded';
- AvailableViaIdentity = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentity';
AvailableViaIdentityExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentityExpanded';
+ AvailableViaIdentityReservationOrderExpanded = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaIdentityReservationOrderExpanded';
+ AvailableViaJsonFilePath = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaJsonFilePath';
+ AvailableViaJsonString = 'Az.Reservations.private\Get-AzReservationAvailableScope_AvailableViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -185,6 +208,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -243,7 +269,7 @@ Get-AzReservationCatalog -SubscriptionId "10000000-aaaa-bbbb-cccc-100000000001"
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICatalog
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICatalog
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -258,7 +284,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationcatalog
#>
function Get-AzReservationCatalog {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICatalog])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICatalog])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
@@ -272,7 +298,6 @@ param(
[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()]
@@ -381,6 +406,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -403,9 +437,7 @@ begin {
Get = 'Az.Reservations.private\Get-AzReservationCatalog_Get';
GetViaIdentity = 'Az.Reservations.private\Get-AzReservationCatalog_GetViaIdentity';
}
- if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -419,6 +451,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -471,12 +506,12 @@ List of all the revisions for the `Reservation`.
Get-AzReservationHistory -ReservationId 2ef560a7-f469-4b62-87b7-5312d588ce2a -ReservationOrderId 2b9b9372-24e1-4a07-a354-2078fe347cf9
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse
.Link
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationhistory
#>
function Get-AzReservationHistory {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -547,6 +582,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -575,6 +619,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -629,7 +676,7 @@ Get-AzReservationOrderId -SubscriptionId '10000000-aaaa-bbbb-cccc-100000000005'
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAppliedReservations
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAppliedReservations
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -644,7 +691,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationorderid
#>
function Get-AzReservationOrderId {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IAppliedReservations])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IAppliedReservations])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
@@ -658,7 +705,6 @@ param(
[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()]
@@ -717,6 +763,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -739,9 +794,7 @@ begin {
Get = 'Az.Reservations.private\Get-AzReservationOrderId_Get';
GetViaIdentity = 'Az.Reservations.private\Get-AzReservationOrderId_GetViaIdentity';
}
- if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $testPlayback = $false
- $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) {
if ($testPlayback) {
$PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')
} else {
@@ -755,6 +808,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -811,7 +867,7 @@ Get-AzReservationOrder -ReservationOrderId 179de21b-90ec-4fe4-9423-f804b856dfee
.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
@@ -826,7 +882,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationorder
#>
function Get-AzReservationOrder {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationOrderResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationOrderResponse])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -840,7 +896,6 @@ param(
[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='Get')]
@@ -906,6 +961,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -936,6 +1000,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -989,48 +1056,15 @@ Get-AzReservationQuote -AppliedScopeType 'Shared' -BillingPlan 'Upfront' -billin
.Example
Get-AzReservationQuote -AppliedScopeType 'Shared' -BillingPlan 'Monthly' -billingScopeId '/subscriptions/b0f278e1-1f18-4378-84d7-b44dfa708665' -DisplayName 'yourRIName' -Location 'westus' -Quantity 1 -ReservedResourceType 'VirtualMachines' -Sku 'Standard_b1ls' -Term 'P1Y'
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculatePriceResponseProperties
-.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.
-
-BODY : The request for reservation purchase
- [AppliedScopePropertyDisplayName ]: Display name
- [AppliedScopePropertyManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
- [AppliedScopePropertyResourceGroupId ]: Fully-qualified identifier of the resource group.
- [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription.
- [AppliedScopePropertyTenantId ]: Tenant ID where the savings plan should apply benefit.
- [AppliedScopeType ]: Type of the Applied Scope.
- [AppliedScopes ]: List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.
- [BillingPlan ]: Represent the billing plans.
- [BillingScopeId ]: Subscription that will be charged for purchasing reservation or savings plan
- [DisplayName ]: Friendly name of the reservation
- [InstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
- [Location ]: The Azure region where the reserved resource lives.
- [Quantity ]: Quantity of the skus that are part of the reservation.
- [Renew ]: Setting this to true will automatically purchase a new reservation on the expiration date time.
- [ReservedResourceType ]: The type of the resource that is being reserved.
- [ReviewDateTime ]: This is the date-time when the Azure hybrid benefit needs to be reviewed.
- [Sku ]:
- [Term ]: Represent the term of reservation.
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculatePriceResponse
.Link
https://learn.microsoft.com/powershell/module/az.reservations/get-azreservationquote
#>
function Get-AzReservationQuote {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.ICalculatePriceResponseProperties])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.ICalculatePriceResponse])]
[CmdletBinding(DefaultParameterSetName='CalculateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Calculate', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IPurchaseRequest]
- # The request for reservation purchase
- # To construct, see NOTES section for BODY properties and create a hash table.
- ${Body},
-
[Parameter(ParameterSetName='CalculateExpanded')]
[AllowEmptyCollection()]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
@@ -1071,16 +1105,16 @@ param(
${AppliedScopePropertyTenantId},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("Single", "Shared", "ManagementGroup")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.AppliedScopeType]
+ [System.String]
# Type of the Applied Scope.
${AppliedScopeType},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("Upfront", "Monthly")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationBillingPlan]
+ [System.String]
# Represent the billing plans.
${BillingPlan},
@@ -1097,9 +1131,9 @@ param(
${DisplayName},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("On", "Off")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.InstanceFlexibility]
+ [System.String]
# Turning this on will apply the reservation discount to other VMs in the same VM size group.
# Only specify for VirtualMachines reserved resource type.
${InstanceFlexibility},
@@ -1123,9 +1157,9 @@ param(
${Renew},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb", "RedHat", "SqlDataWarehouse", "VMwareCloudSimple", "RedHatOsa", "Databricks", "AppService", "ManagedDisk", "BlockBlob", "RedisCache", "AzureDataExplorer", "MySql", "MariaDb", "PostgreSql", "DedicatedHost", "SapHana", "SqlAzureHybridBenefit", "AVS", "DataFactory", "NetAppStorage", "AzureFiles", "SqlEdge", "VirtualMachineSoftware")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservedResourceType]
+ [System.String]
# The type of the resource that is being reserved.
${ReservedResourceType},
@@ -1142,12 +1176,24 @@ param(
${Sku},
[Parameter(ParameterSetName='CalculateExpanded')]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm])]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.PSArgumentCompleterAttribute("P1Y", "P3Y", "P5Y")]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Support.ReservationTerm]
+ [System.String]
# Represent the term of reservation.
${Term},
+ [Parameter(ParameterSetName='CalculateViaJsonFilePath', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Path of Json file supplied to the Calculate operation
+ ${JsonFilePath},
+
+ [Parameter(ParameterSetName='CalculateViaJsonString', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Body')]
+ [System.String]
+ # Json string supplied to the Calculate operation
+ ${JsonString},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -1204,6 +1250,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1223,8 +1278,9 @@ begin {
}
$mapping = @{
- Calculate = 'Az.Reservations.private\Get-AzReservationQuote_Calculate';
CalculateExpanded = 'Az.Reservations.private\Get-AzReservationQuote_CalculateExpanded';
+ CalculateViaJsonFilePath = 'Az.Reservations.private\Get-AzReservationQuote_CalculateViaJsonFilePath';
+ CalculateViaJsonString = 'Az.Reservations.private\Get-AzReservationQuote_CalculateViaJsonString';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -1233,6 +1289,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1289,7 +1348,7 @@ Get-AzReservation -ReservationOrderId a87c1742-0080-5b4d-b953-8531ad46fdc8 -Rese
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse
+Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -1300,14 +1359,21 @@ INPUTOBJECT : Identity Parameter
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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/get-azreservation
#>
function Get-AzReservation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.Api20221101.IReservationResponse])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationResponse])]
[CmdletBinding(DefaultParameterSetName='List1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='GetViaIdentityReservationOrder', Mandatory)]
[Alias('ReservationId')]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
@@ -1326,11 +1392,17 @@ param(
[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='GetViaIdentityReservationOrder', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
+
[Parameter(ParameterSetName='Get')]
[Parameter(ParameterSetName='GetViaIdentity')]
+ [Parameter(ParameterSetName='GetViaIdentityReservationOrder')]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Query')]
[System.String]
# Supported value of this query is renewProperties
@@ -1425,6 +1497,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1446,6 +1527,7 @@ begin {
$mapping = @{
Get = 'Az.Reservations.private\Get-AzReservation_Get';
GetViaIdentity = 'Az.Reservations.private\Get-AzReservation_GetViaIdentity';
+ GetViaIdentityReservationOrder = 'Az.Reservations.private\Get-AzReservation_GetViaIdentityReservationOrder';
List = 'Az.Reservations.private\Get-AzReservation_List';
List1 = 'Az.Reservations.private\Get-AzReservation_List1';
}
@@ -1456,6 +1538,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1521,6 +1606,12 @@ INPUTOBJECT : Identity Parameter
[ReservationId ]: Id of the reservation item
[ReservationOrderId ]: Order Id of the reservation
[SubscriptionId ]: Id of the subscription
+
+RESERVATIONORDERINPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [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-azreservationarchivereservation
#>
@@ -1529,6 +1620,7 @@ function Invoke-AzReservationArchiveReservation {
[CmdletBinding(DefaultParameterSetName='Archive', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='Archive', Mandatory)]
+ [Parameter(ParameterSetName='ArchiveViaIdentityReservationOrder', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
[System.String]
# Id of the reservation item
@@ -1544,9 +1636,14 @@ param(
[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='ArchiveViaIdentityReservationOrder', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.Reservations.Models.IReservationsIdentity]
+ # Identity Parameter
+ ${ReservationOrderInputObject},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -1609,6 +1706,15 @@ begin {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName
+
+ $testPlayback = $false
+ $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }
+
+ $context = Get-AzContext
+ if (-not $context -and -not $testPlayback) {
+ Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in."
+ exit
+ }
if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
@@ -1630,6 +1736,7 @@ begin {
$mapping = @{
Archive = 'Az.Reservations.private\Invoke-AzReservationArchiveReservation_Archive';
ArchiveViaIdentity = 'Az.Reservations.private\Invoke-AzReservationArchiveReservation_ArchiveViaIdentity';
+ ArchiveViaIdentityReservationOrder = 'Az.Reservations.private\Invoke-AzReservationArchiveReservation_ArchiveViaIdentityReservationOrder';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.Reservations.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
@@ -1638,6 +1745,9 @@ begin {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ if ($wrappedCmd -eq $null) {
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
+ }
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
@@ -1728,54 +1838,13 @@ $reservationsToPurchase = @($reservationToPurchase1, $reservationToPurchase2)
Invoke-AzReservationCalculateExchange -ReservationsToExchange $reservationsToReturn -ReservationsToPurchase $reservationsToPurchase
-.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
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.
-BODY : Calculate exchange request
- [ReservationsToExchange ]: List of reservations that are being returned in this exchange.
- [Quantity ]: Quantity to be returned. Must be greater than zero.
- [ReservationId