diff --git a/src/BillingBenefits/Az.BillingBenefits.csproj b/src/BillingBenefits/Az.BillingBenefits.csproj
new file mode 100644
index 000000000000..7308951050e2
--- /dev/null
+++ b/src/BillingBenefits/Az.BillingBenefits.csproj
@@ -0,0 +1,8 @@
+
+
+ BillingBenefits
+
+
+
+
+
diff --git a/src/BillingBenefits/Az.BillingBenefits.format.ps1xml b/src/BillingBenefits/Az.BillingBenefits.format.ps1xml
new file mode 100644
index 000000000000..157708a55f8d
--- /dev/null
+++ b/src/BillingBenefits/Az.BillingBenefits.format.ps1xml
@@ -0,0 +1,1889 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.BillingBenefitsIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.BillingBenefitsIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ReservationOrderAliasName
+
+
+ SavingsPlanId
+
+
+ SavingsPlanOrderAliasName
+
+
+ SavingsPlanOrderId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.SavingsPlanUpdateAcceptedResponseHeaders
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.SavingsPlanUpdateAcceptedResponseHeaders
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.ErrorDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.Operation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ActionType
+
+
+ IsDataAction
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.OperationListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.OperationListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.Resource
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.Resource
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.SystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedAt
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.AppliedScopeProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.AppliedScopeProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayName
+
+
+ ManagementGroupId
+
+
+ ResourceGroupId
+
+
+ SubscriptionId
+
+
+ TenantId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.BillingPlanInformation
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.BillingPlanInformation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NextPaymentDueDate
+
+
+ StartDate
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Commitment
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Commitment
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+ CurrencyCode
+
+
+ Grain
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ExtendedStatusInfo
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ExtendedStatusInfo
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Message
+
+
+ StatusCode
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.OperationResultError
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.OperationResultError
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.PaymentDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.PaymentDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BillingAccount
+
+
+ DueDate
+
+
+ PaymentDate
+
+
+ Status
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Price
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Price
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+ CurrencyCode
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.PricingCurrencyTotal
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.PricingCurrencyTotal
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Amount
+
+
+ CurrencyCode
+
+
+ Duration
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.PurchaseRequestProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.PurchaseRequestProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppliedScopeType
+
+
+ BillingPlan
+
+
+ BillingScopeId
+
+
+ DisplayName
+
+
+ EffectiveDateTime
+
+
+ Renew
+
+
+ Term
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedAt
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ Location
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasRequestProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasRequestProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppliedScopeType
+
+
+ BillingPlan
+
+
+ BillingScopeId
+
+
+ DisplayName
+
+
+ Quantity
+
+
+ Renew
+
+
+ ReservedResourceType
+
+
+ ReviewDateTime
+
+
+ Term
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasRequestPropertiesReservedResourceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasRequestPropertiesReservedResourceProperties
+
+
+
+
+
+
+
+
+
+
+
+ InstanceFlexibility
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponse
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ DisplayName
+
+
+ SkuName
+
+
+ Location
+
+
+ Term
+
+
+ BillingPlan
+
+
+ ReservedResourceType
+
+
+ ReservationOrderId
+
+
+ ProvisioningState
+
+
+ BillingScopeId
+
+
+ AppliedScopeType
+
+
+ AppliedScopePropertyDisplayName
+
+
+ AppliedScopePropertyManagementGroupId
+
+
+ AppliedScopePropertyResourceGroupId
+
+
+ AppliedScopePropertySubscriptionId
+
+
+ AppliedScopePropertyTenantId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponseProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponseProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppliedScopeType
+
+
+ BillingPlan
+
+
+ BillingScopeId
+
+
+ DisplayName
+
+
+ ProvisioningState
+
+
+ Quantity
+
+
+ Renew
+
+
+ ReservationOrderId
+
+
+ ReservedResourceType
+
+
+ ReviewDateTime
+
+
+ Term
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponsePropertiesReservedResourceProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponsePropertiesReservedResourceProperties
+
+
+
+
+
+
+
+
+
+
+
+ InstanceFlexibility
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.RoleAssignmentEntity
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.RoleAssignmentEntity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ PrincipalId
+
+
+ RoleDefinitionId
+
+
+ Scope
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.RoleAssignmentEntityProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.RoleAssignmentEntityProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalId
+
+
+ RoleDefinitionId
+
+
+ Scope
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModel
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayName
+
+
+ DisplayProvisioningState
+
+
+ ExpiryDateTime
+
+
+ PurchaseDateTime
+
+
+ Term
+
+
+ UserFriendlyAppliedScopeType
+
+
+ AppliedScopePropertiesDisplayName
+
+
+ SkuName1
+
+
+ Amount
+
+
+ CurrencyCode
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModelList
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModelList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModelListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModelListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModelProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanModelProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppliedScopeType
+
+
+ BenefitStartTime
+
+
+ BillingAccountId
+
+
+ BillingPlan
+
+
+ BillingProfileId
+
+
+ BillingScopeId
+
+
+ CustomerId
+
+
+ DisplayName
+
+
+ DisplayProvisioningState
+
+
+ EffectiveDateTime
+
+
+ ExpiryDateTime
+
+
+ ProvisioningState
+
+
+ PurchaseDateTime
+
+
+ Renew
+
+
+ RenewDestination
+
+
+ RenewSource
+
+
+ Term
+
+
+ UserFriendlyAppliedScopeType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasModel
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasModel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ DisplayName
+
+
+ SkuName
+
+
+ CommitmentAmount
+
+
+ CommitmentCurrencyCode
+
+
+ CommitmentGrain
+
+
+ SavingsPlanOrderId
+
+
+ ProvisioningState
+
+
+ BillingScopeId
+
+
+ Term
+
+
+ BillingPlan
+
+
+ AppliedScopeType
+
+
+ AppliedScopePropertyDisplayName
+
+
+ AppliedScopePropertyManagementGroupId
+
+
+ AppliedScopePropertyResourceGroupId
+
+
+ AppliedScopePropertySubscriptionId
+
+
+ AppliedScopePropertyTenantId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppliedScopeType
+
+
+ BillingPlan
+
+
+ BillingScopeId
+
+
+ DisplayName
+
+
+ ProvisioningState
+
+
+ SavingsPlanOrderId
+
+
+ Term
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderModel
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderModel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ SkuName
+
+
+ ProvisioningState
+
+
+ ExpiryDateTime
+
+
+ Term
+
+
+ BillingPlan
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderModelList
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderModelList
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderModelProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderModelProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BenefitStartTime
+
+
+ BillingAccountId
+
+
+ BillingPlan
+
+
+ BillingProfileId
+
+
+ BillingScopeId
+
+
+ CustomerId
+
+
+ DisplayName
+
+
+ ExpiryDateTime
+
+
+ ProvisioningState
+
+
+ SavingsPlan
+
+
+ Term
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanSummary
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanSummary
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanSummaryCount
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanSummaryCount
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CancelledCount
+
+
+ ExpiredCount
+
+
+ ExpiringCount
+
+
+ FailedCount
+
+
+ NoBenefitCount
+
+
+ PendingCount
+
+
+ ProcessingCount
+
+
+ SucceededCount
+
+
+ WarningCount
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanUpdateRequestProperties
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanUpdateRequestProperties
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AppliedScopeType
+
+
+ DisplayName
+
+
+ Renew
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanValidateResponse
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanValidateResponse
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanValidResponseProperty
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanValidResponseProperty
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Valid
+
+
+ ReasonCode
+
+
+ Reason
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Sku
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Sku
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Utilization
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.Utilization
+
+
+
+
+
+
+
+
+
+
+
+ Trend
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.UtilizationAggregates
+
+ Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.UtilizationAggregates
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Grain
+
+
+ GrainUnit
+
+
+ Value
+
+
+ ValueUnit
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/BillingBenefits/Az.BillingBenefits.psd1 b/src/BillingBenefits/Az.BillingBenefits.psd1
new file mode 100644
index 000000000000..f743e429db29
--- /dev/null
+++ b/src/BillingBenefits/Az.BillingBenefits.psd1
@@ -0,0 +1,142 @@
+#
+# Module manifest for module 'Az.BillingBenefits'
+#
+# Generated by: Microsoft Corporation
+#
+# Generated on: 1/11/2023
+#
+
+@{
+
+# Script module or binary module file associated with this manifest.
+RootModule = './Az.BillingBenefits.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.1.0'
+
+# Supported PSEditions
+CompatiblePSEditions = 'Core', 'Desktop'
+
+# ID used to uniquely identify this module
+GUID = '7c220d70-27ec-4403-aedd-429aa925a6a6'
+
+# Author of this module
+Author = 'Microsoft Corporation'
+
+# Company or vendor of this module
+CompanyName = 'Microsoft Corporation'
+
+# Copyright statement for this module
+Copyright = 'Microsoft Corporation. All rights reserved.'
+
+# Description of the functionality provided by this module
+Description = 'Microsoft Azure PowerShell: BillingBenefits cmdlets'
+
+# Minimum version of the PowerShell engine required by this module
+PowerShellVersion = '5.1'
+
+# Name of the PowerShell host required by this module
+# PowerShellHostName = ''
+
+# Minimum version of the PowerShell host required by this module
+# PowerShellHostVersion = ''
+
+# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+DotNetFrameworkVersion = '4.7.2'
+
+# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# ClrVersion = ''
+
+# Processor architecture (None, X86, Amd64) required by this module
+# ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.0'; })
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = './bin/Az.BillingBenefits.private.dll'
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module.
+# ScriptsToProcess = @()
+
+# Type files (.ps1xml) to be loaded when importing this module
+# TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = './Az.BillingBenefits.format.ps1xml'
+
+# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
+# NestedModules = @()
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+FunctionsToExport = 'Get-AzBillingBenefitsReservationOrderAlias',
+ 'Get-AzBillingBenefitsSavingsPlan',
+ 'Get-AzBillingBenefitsSavingsPlanList',
+ 'Get-AzBillingBenefitsSavingsPlanOrder',
+ 'Get-AzBillingBenefitsSavingsPlanOrderAlias',
+ 'Invoke-AzBillingBenefitsElevateSavingPlanOrder',
+ 'Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation',
+ 'Invoke-AzBillingBenefitsSavingsPlanUpdateValidation',
+ 'New-AzBillingBenefitsReservationOrderAlias',
+ 'New-AzBillingBenefitsSavingsPlanOrderAlias',
+ 'Update-AzBillingBenefitsSavingsPlan'
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = @()
+
+# Variables to export from this module
+# VariablesToExport = @()
+
+# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
+AliasesToExport = '*'
+
+# DSC resources to export from this module
+# DscResourcesToExport = @()
+
+# List of all modules packaged with this module
+# ModuleList = @()
+
+# List of all files packaged with this module
+# FileList = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData = @{
+
+ PSData = @{
+
+ # Tags applied to this module. These help with module discovery in online galleries.
+ Tags = 'Azure','ResourceManager','ARM','PSModule','BillingBenefits'
+
+ # A URL to the license for this module.
+ LicenseUri = 'https://aka.ms/azps-license'
+
+ # A URL to the main website for this project.
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+
+ # A URL to an icon representing this module.
+ # IconUri = ''
+
+ # ReleaseNotes of this module
+ # ReleaseNotes = ''
+
+ # Prerelease string of this module
+ # Prerelease = ''
+
+ # Flag to indicate whether the module requires explicit user acceptance for install/update/save
+ # RequireLicenseAcceptance = $false
+
+ # External dependent modules of this module
+ # ExternalModuleDependencies = @()
+
+ } # End of PSData hashtable
+
+ } # End of PrivateData hashtable
+
+# HelpInfo URI of this module
+# HelpInfoURI = ''
+
+# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
+# DefaultCommandPrefix = ''
+
+}
+
diff --git a/src/BillingBenefits/Az.BillingBenefits.psm1 b/src/BillingBenefits/Az.BillingBenefits.psm1
new file mode 100644
index 000000000000..b5477ae387b8
--- /dev/null
+++ b/src/BillingBenefits/Az.BillingBenefits.psm1
@@ -0,0 +1,115 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ # Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.BillingBenefits.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module]::Instance
+
+ # Ask for the shared functionality table
+ $VTable = Register-AzModule
+
+ # Tweaks the pipeline on module load
+ $instance.OnModuleLoad = $VTable.OnModuleLoad
+
+ # Following two delegates are added for telemetry
+ $instance.GetTelemetryId = $VTable.GetTelemetryId
+ $instance.Telemetry = $VTable.Telemetry
+
+
+ # Tweaks the pipeline per call
+ $instance.OnNewRequest = $VTable.OnNewRequest
+
+ # Gets shared parameter values
+ $instance.GetParameterValue = $VTable.GetParameterValue
+
+ # Allows shared module to listen to events from this module
+ $instance.EventListener = $VTable.EventListener
+
+ # Gets shared argument completers
+ $instance.ArgumentCompleter = $VTable.ArgumentCompleter
+
+ # The name of the currently selected Azure profile
+ $instance.ProfileName = $VTable.ProfileName
+
+
+ # Load the custom module
+ $customModulePath = Join-Path $PSScriptRoot './custom/Az.BillingBenefits.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/BillingBenefits/BillingBenefits.sln b/src/BillingBenefits/BillingBenefits.sln
new file mode 100644
index 000000000000..049551c477de
--- /dev/null
+++ b/src/BillingBenefits/BillingBenefits.sln
@@ -0,0 +1,58 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{33A2E5B4-9EF4-4CF7-91E9-40539CE59A7C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{EB5E1131-2EAF-47A9-8D13-55F58A14879E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{765E59E6-7980-49A1-B2DF-6FB34FC95111}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{1A7B7B23-2FB4-4473-900B-F0F35BC367BA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{D9A3DEB2-B4D9-44A7-B835-769AB4213B5D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{F762B24A-2EFB-4E9C-9C95-620357E7716F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.BillingBenefits", "Az.BillingBenefits.csproj", "{3F5307B5-C120-49AA-B742-5C5D5F99D014}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {33A2E5B4-9EF4-4CF7-91E9-40539CE59A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {33A2E5B4-9EF4-4CF7-91E9-40539CE59A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {33A2E5B4-9EF4-4CF7-91E9-40539CE59A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {33A2E5B4-9EF4-4CF7-91E9-40539CE59A7C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EB5E1131-2EAF-47A9-8D13-55F58A14879E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EB5E1131-2EAF-47A9-8D13-55F58A14879E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EB5E1131-2EAF-47A9-8D13-55F58A14879E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EB5E1131-2EAF-47A9-8D13-55F58A14879E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {765E59E6-7980-49A1-B2DF-6FB34FC95111}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {765E59E6-7980-49A1-B2DF-6FB34FC95111}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {765E59E6-7980-49A1-B2DF-6FB34FC95111}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {765E59E6-7980-49A1-B2DF-6FB34FC95111}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A7B7B23-2FB4-4473-900B-F0F35BC367BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A7B7B23-2FB4-4473-900B-F0F35BC367BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A7B7B23-2FB4-4473-900B-F0F35BC367BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A7B7B23-2FB4-4473-900B-F0F35BC367BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D9A3DEB2-B4D9-44A7-B835-769AB4213B5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D9A3DEB2-B4D9-44A7-B835-769AB4213B5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D9A3DEB2-B4D9-44A7-B835-769AB4213B5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D9A3DEB2-B4D9-44A7-B835-769AB4213B5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F762B24A-2EFB-4E9C-9C95-620357E7716F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F762B24A-2EFB-4E9C-9C95-620357E7716F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F762B24A-2EFB-4E9C-9C95-620357E7716F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F762B24A-2EFB-4E9C-9C95-620357E7716F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3F5307B5-C120-49AA-B742-5C5D5F99D014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3F5307B5-C120-49AA-B742-5C5D5F99D014}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3F5307B5-C120-49AA-B742-5C5D5F99D014}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3F5307B5-C120-49AA-B742-5C5D5F99D014}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/src/BillingBenefits/Changelog.md b/src/BillingBenefits/Changelog.md
new file mode 100644
index 000000000000..50e78256961a
--- /dev/null
+++ b/src/BillingBenefits/Changelog.md
@@ -0,0 +1,24 @@
+
+## Upcoming Release
+
+## Version 0.1.0
+* First preview release for module Az.BillingBenefits
+
diff --git a/src/BillingBenefits/Properties/AssemblyInfo.cs b/src/BillingBenefits/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..205dae5a9e98
--- /dev/null
+++ b/src/BillingBenefits/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - BillingBenefits")]
+[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: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+[assembly: Guid("83005d06-428d-4051-92c5-188180d9e6b5")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")]
diff --git a/src/BillingBenefits/README.md b/src/BillingBenefits/README.md
new file mode 100644
index 000000000000..12cf7b51848f
--- /dev/null
+++ b/src/BillingBenefits/README.md
@@ -0,0 +1,193 @@
+
+# Az.BillingBenefits
+This directory contains the PowerShell module for the BillingBenefits service.
+
+---
+## Status
+[](https://www.powershellgallery.com/packages/Az.BillingBenefits/)
+
+## Info
+- Modifiable: yes
+- Generated: all
+- Committed: yes
+- Packaged: yes
+
+---
+## Detail
+This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
+
+## Module Requirements
+- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
+
+## Authentication
+AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
+
+## Development
+For information on how to develop for `Az.BillingBenefits`, see [how-to.md](how-to.md).
+
+
+---
+## Generation Requirements
+Use of the beta version of `autorest.powershell` generator requires the following:
+- [NodeJS LTS](https://nodejs.org) (10.15.x LTS preferred)
+ - **Note**: It *will not work* with Node < 10.x. Using 11.x builds may cause issues as they may introduce instability or breaking changes.
+> If you want an easy way to install and update Node, [NVS - Node Version Switcher](../nodejs/installing-via-nvs.md) or [NVM - Node Version Manager](../nodejs/installing-via-nvm.md) is recommended.
+- [AutoRest](https://aka.ms/autorest) v3 beta
`npm install -g autorest@autorest`
+- PowerShell 6.0 or greater
+ - If you don't have it installed, you can use the cross-platform npm package
`npm install -g pwsh`
+- .NET Core SDK 2.0 or greater
+ - If you don't have it installed, you can use the cross-platform npm package
`npm install -g dotnet-sdk-2.2`
+
+## Run Generation
+In this directory, run AutoRest:
+> `autorest-beta`
+
+---
+### AutoRest Configuration
+> see https://aka.ms/autorest
+
+``` yaml
+branch: bab95d5636c7d47cc5584ea8dadb21199d229ca7
+require:
+ - $(this-folder)/../readme.azure.noprofile.md
+input-file:
+ - $(repo)/specification/billingbenefits/resource-manager/Microsoft.BillingBenefits/stable/2022-11-01/billingbenefits.json
+module-version: 0.1.0
+title: BillingBenefits
+subject-prefix: $(service-name)
+
+resourcegroup-append: true
+nested-object-to-string: true
+
+directive:
+ ### Rename Cmdlet names
+ - where:
+ verb: Get
+ subject: SavingPlan
+ set:
+ verb: Get
+ subject: SavingsPlanList
+ - where:
+ verb: Test
+ subject: Purchase
+ set:
+ verb: Invoke
+ subject: SavingsPlanPurchaseValidation
+ - where:
+ verb: Test
+ subject: SavingPlanUpdate
+ set:
+ verb: Invoke
+ subject: SavingsPlanUpdateValidation
+
+ ### Rename property name
+
+ ### Rename parameter name
+
+ ### Format output table
+ - where:
+ model-name: SavingsPlanModel
+ set:
+ format-table:
+ properties:
+ - DisplayName
+ - DisplayProvisioningState
+ - ExpiryDateTime
+ - PurchaseDateTime
+ - Term
+ - UserFriendlyAppliedScopeType
+ - AppliedScopePropertiesDisplayName
+ - SkuName1
+ - Amount
+ - CurrencyCode
+ labels:
+ DisplayName: Name
+ DisplayProvisioningState: Status
+ ExpiryDateTime: ExpiryDate
+ PurchaseDateTime: PurchaseDate
+ UserFriendlyAppliedScopeType: Scope
+ SkuName1: ProductName
+ Amount: CommitmentAmount
+ CurrencyCode: CommitmentCurrency
+ AppliedScopePropertiesDisplayName: AppliedScopeDisplayName
+ - where:
+ model-name: SavingsPlanOrderModel
+ set:
+ format-table:
+ properties:
+ - Name
+ - SkuName
+ - ProvisioningState
+ - ExpiryDateTime
+ - Term
+ - BillingPlan
+ labels:
+ Name: OrderId
+ ProvisioningState: Status
+ ExpiryDateTime: ExpiryDate
+ - where:
+ model-name: SavingsPlanOrderAliasModel
+ set:
+ format-table:
+ properties:
+ - Name
+ - DisplayName
+ - Id
+ - Type
+ - SkuName
+ - CommitmentAmount
+ - CommitmentCurrencyCode
+ - CommitmentGrain
+ - SavingsPlanOrderId
+ - ProvisioningState
+ - BillingScopeId
+ - Term
+ - BillingPlan
+ - AppliedScopeType
+ - AppliedScopePropertyDisplayName
+ - AppliedScopePropertyManagementGroupId
+ - AppliedScopePropertyResourceGroupId
+ - AppliedScopePropertySubscriptionId
+ - AppliedScopePropertyTenantId
+ - where:
+ model-name: ReservationOrderAliasResponse
+ set:
+ format-table:
+ properties:
+ - Name
+ - DisplayName
+ - Id
+ - Type
+ - SkuName
+ - Location
+ - Term
+ - BillingPlan
+ - ReservedResourceType
+ - ReservationOrderId
+ - ProvisioningState
+ - BillingScopeId
+ - AppliedScopeType
+ - AppliedScopePropertyDisplayName
+ - AppliedScopePropertyManagementGroupId
+ - AppliedScopePropertyResourceGroupId
+ - AppliedScopePropertySubscriptionId
+ - AppliedScopePropertyTenantId
+ - where:
+ model-name: RoleAssignmentEntity
+ set:
+ format-table:
+ properties:
+ - Id
+ - Name
+ - PrincipalId
+ - RoleDefinitionId
+ - Scope
+ - where:
+ model-name: SavingsPlanValidResponseProperty
+ set:
+ format-table:
+ properties:
+ - Valid
+ - ReasonCode
+ - Reason
+```
diff --git a/src/BillingBenefits/build-module.ps1 b/src/BillingBenefits/build-module.ps1
new file mode 100644
index 000000000000..4b08b7180af3
--- /dev/null
+++ b/src/BillingBenefits/build-module.ps1
@@ -0,0 +1,161 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+$ErrorActionPreference = 'Stop'
+
+if($PSEdition -ne 'Core') {
+ Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
+}
+
+if(-not $Isolated -and -not $Debugger) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+
+ if($LastExitCode -ne 0) {
+ # Build failed. Don't attempt to run the module.
+ return
+ }
+
+ if($Test) {
+ . (Join-Path $PSScriptRoot 'test-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Tests failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Docs) {
+ . (Join-Path $PSScriptRoot 'generate-help.ps1')
+ if($LastExitCode -ne 0) {
+ # Docs generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Pack) {
+ . (Join-Path $PSScriptRoot 'pack-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Packing failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1'
+ if($Code) {
+ . $runModulePath -Code
+ } elseif($Run) {
+ . $runModulePath
+ } else {
+ Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script."
+ }
+ return
+}
+
+$binFolder = Join-Path $PSScriptRoot 'bin'
+$objFolder = Join-Path $PSScriptRoot 'obj'
+
+if(-not $Debugger) {
+ Write-Host -ForegroundColor Green 'Cleaning build folders...'
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
+
+ if((Test-Path $binFolder) -or (Test-Path $objFolder)) {
+ Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?'
+ Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.'
+ }
+
+ Write-Host -ForegroundColor Green 'Compiling module...'
+ $buildConfig = 'Debug'
+ if($Release) {
+ $buildConfig = 'Release'
+ }
+ dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo
+ if($LastExitCode -ne 0) {
+ Write-Error 'Compilation failed.'
+ }
+
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.BillingBenefits.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+
+# Load DLL to use build-time cmdlets
+$null = Import-Module -Name $dll
+
+$modulePaths = $dll
+$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.BillingBenefits.custom.psm1'
+if(Test-Path $customPsm1) {
+ $modulePaths = @($dll, $customPsm1)
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(Test-Path $exportsFolder) {
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $exportsFolder
+
+$internalFolder = Join-Path $PSScriptRoot 'internal'
+if(Test-Path $internalFolder) {
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $internalFolder
+
+$psd1 = Join-Path $PSScriptRoot './Az.BillingBenefits.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.BillingBenefits'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @()
+if ($modelCmdlets.Count -gt 0) {
+ . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
+ CreateModelCmdlet($modelCmdlets)
+}
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: BillingBenefits cmdlets'
+ $docsFolder = Join-Path $PSScriptRoot 'docs'
+ if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+ }
+ $null = New-Item -ItemType Directory -Force -Path $docsFolder
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.BillingBenefits.format.ps1xml'
+Export-FormatPs1xml -FilePath $formatPs1xml
+
+Write-Host -ForegroundColor Green 'Creating psd1...'
+$customFolder = Join-Path $PSScriptRoot 'custom'
+Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid
+
+Write-Host -ForegroundColor Green 'Creating test stubs...'
+$testFolder = Join-Path $PSScriptRoot 'test'
+$null = New-Item -ItemType Directory -Force -Path $testFolder
+Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder
+
+Write-Host -ForegroundColor Green 'Creating example stubs...'
+Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/BillingBenefits/check-dependencies.ps1 b/src/BillingBenefits/check-dependencies.ps1
new file mode 100644
index 000000000000..c29591c7bfe1
--- /dev/null
+++ b/src/BillingBenefits/check-dependencies.ps1
@@ -0,0 +1,65 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
+ if($predicate) {
+ $module = Get-Module -ListAvailable -Name $moduleName
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) {
+ $null = New-Item -ItemType Directory -Force -Path $path
+ Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
+ if ($requiredVersion) {
+ Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
+ }elseif($versionMinimum) {
+ Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
+ } else {
+ Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
+ }
+ }
+ }
+}
+
+$ProgressPreference = 'SilentlyContinue'
+$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
+
+$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
+if(Test-Path -Path $localModulesPath) {
+ $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
+}
+
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5'
+DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
+
+$tools = Join-Path $PSScriptRoot 'tools'
+$resourceDir = Join-Path $tools 'Resources'
+$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
+
+if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) {
+ Write-Host -ForegroundColor Green "Building local Resource module used for test..."
+ Set-Location $resourceDir
+ $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
+ $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
+ Set-Location $HOME/.PSSharedModules/Resources
+ $null = .\build-module.ps1
+ Set-Location $PSScriptRoot
+}
diff --git a/src/BillingBenefits/create-model-cmdlets.ps1 b/src/BillingBenefits/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..d4acfbc52e55
--- /dev/null
+++ b/src/BillingBenefits/create-model-cmdlets.ps1
@@ -0,0 +1,179 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+function CreateModelCmdlet {
+
+ param([string[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
+ $ModuleName = 'BillingBenefits'
+ $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+
+ $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
+ $Content = ''
+ $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 )
+ { $Content += get-content $_.fullname -raw
+ } }
+
+ $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content)
+ $Nodes = $Tree.ChildNodes().ChildNodes()
+ foreach ($Model in $Models)
+ {
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") }
+ if ($InterfaceNode.count -eq 0) {
+ continue
+ }
+ # through a queue, we iterate all the parent models.
+ $Queue = @($InterfaceNode)
+ $visited = @("I$Model")
+ $AllInterfaceNodes = @()
+ while ($Queue.count -ne 0)
+ {
+ $AllInterfaceNodes += $Queue[0]
+ # Baselist contains the direct parent models.
+ foreach ($parent in $Queue[0].BaseList.Types)
+ {
+ if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value)))
+ {
+ $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) })
+ $visited = [Array]$visited + $parent.Type.Right.Identifier.Value
+ }
+ }
+ $first, $Queue = $Queue
+ }
+
+ $Namespace = $InterfaceNode.Parent.Name
+ $ObjectType = $Model
+ $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
+ # remove duplicated module name
+ if ($ObjectType.StartsWith($ModuleName)) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = $ModuleName
+ }
+ $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
+
+ $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string]
+ $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string]
+ foreach ($Node in $AllInterfaceNodes)
+ {
+ foreach ($Member in $Node.Members)
+ {
+ $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
+ $Required = $false
+ $Description = ""
+ $Readonly = $False
+ foreach ($Argument in $Arguments)
+ {
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Required")
+ {
+ $Required = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Description")
+ {
+ $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"')
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly")
+ {
+ $Readonly = $Argument.Expression.Token.Value
+ }
+ }
+ if ($Readonly)
+ {
+ continue
+ }
+ $Identifier = $Member.Identifier.Value
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
+ if ($Required)
+ {
+ $ParameterDefinePropertyList.Add("Mandatory")
+ }
+ if ($Description -ne "")
+ {
+ $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
+ }
+ $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
+ # check whether completer is needed
+ $completer = '';
+ if($Type.Split('.').Split('.')[-2] -eq 'Support') {
+ # If Type is an array, need to strip []
+ $strippedType = $Type.Replace('[]', '')
+ $completer += "`n [ArgumentCompleter([${strippedType}])]"
+ }
+ $ParameterDefineScript = "
+ [Parameter($ParameterDefineProperty)]${completer}
+ [${Type}]
+ `$${Identifier}"
+ $ParameterDefineScriptList.Add($ParameterDefineScript)
+ $ParameterAssignScriptList.Add("
+ if (`$PSBoundParameters.ContainsKey('${Identifier}')) {
+ `$Object.${Identifier} = `$${Identifier}
+ }")
+ }
+ }
+ $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator ","
+ $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator ""
+
+ $Script = "
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the ""License"");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an ""AS IS"" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for ${ObjectType}.
+.Description
+Create an in-memory object for ${ObjectType}.
+
+.Outputs
+${ObjectTypeWithNamespace}
+.Link
+https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
+#>
+function New-Az${ModulePrefix}${ObjectType}Object {
+ [OutputType('${ObjectTypeWithNamespace}')]
+ [CmdletBinding(PositionalBinding=`$false)]
+ Param(
+${ParameterDefineScript}
+ )
+
+ process {
+ `$Object = [${ObjectTypeWithNamespace}]::New()
+${ParameterAssignScript}
+ return `$Object
+ }
+}
+"
+ Set-Content -Path $OutputPath -Value $Script
+ }
+}
diff --git a/src/BillingBenefits/custom/Az.BillingBenefits.custom.psm1 b/src/BillingBenefits/custom/Az.BillingBenefits.custom.psm1
new file mode 100644
index 000000000000..c2cfe9f233e7
--- /dev/null
+++ b/src/BillingBenefits/custom/Az.BillingBenefits.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.BillingBenefits.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.BillingBenefits.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/BillingBenefits/custom/README.md b/src/BillingBenefits/custom/README.md
new file mode 100644
index 000000000000..33d14738ec0a
--- /dev/null
+++ b/src/BillingBenefits/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.BillingBenefits` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.BillingBenefits.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.BillingBenefits` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*.
+
+For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.BillingBenefits.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
+
+For script cmdlets, these are loaded via the `Az.BillingBenefits.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
+
+## Purpose
+This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
+
+## Usage
+The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
+- Break
+- DefaultProfile
+- HttpPipelineAppend
+- HttpPipelinePrepend
+- Proxy
+- ProxyCredential
+- ProxyUseDefaultCredentials
+
+These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.BillingBenefits`. For C#, follow the usage seen in the `ProcessRecordAsync` method.
+
+### Attributes
+For processing the cmdlets, we've created some additional attributes:
+- `Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.BillingBenefits`.
+- `Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.BillingBenefits`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/BillingBenefits/examples/Get-AzBillingBenefitsReservationOrderAlias.md b/src/BillingBenefits/examples/Get-AzBillingBenefitsReservationOrderAlias.md
new file mode 100644
index 000000000000..3e080c043ca1
--- /dev/null
+++ b/src/BillingBenefits/examples/Get-AzBillingBenefitsReservationOrderAlias.md
@@ -0,0 +1,29 @@
+### Example 1: Get a reservation order alias.
+```powershell
+Get-AzBillingBenefitsReservationOrderAlias -Name "PSRITest2"
+```
+
+```output
+Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId
+---- ----------- ------- -------- ---- ----------- -------------------- ------------------
+PSRITest2 PSRITest2 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Microsoft.Capacity/reservationOrders/8d5aacd0-f098-4202-8d4d-1e7cb8a3ac…
+```
+
+Get a reservation order alias.
+
+### Example 2: Get a reservation order alias via identity.
+```powershell
+$identity = @{
+ ReservationOrderAliasName = "PSRITest2"
+}
+
+$response = Get-AzBillingBenefitsReservationOrderAlias -InputObject $identity
+```
+
+```output
+Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId
+---- ----------- ------- -------- ---- ----------- -------------------- ------------------
+PSRITest2 PSRITest2 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Microsoft.Capacity/reservationOrders/8d5aacd0-f098-4202-8d4d-1e7cb8a3ac…
+```
+
+Get a reservation order alias via identity.
diff --git a/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlan.md b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlan.md
new file mode 100644
index 000000000000..c17e968fd533
--- /dev/null
+++ b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlan.md
@@ -0,0 +1,25 @@
+### Example 1: List savings plan under a savings plan order
+```powershell
+Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d
+```
+
+```output
+Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrency
+---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------
+PSTest7 Succeeded 11/29/2025 2:23:51 AM 11/29/2022 2:20:38 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+```
+
+List savings plan under a savings plan order
+
+### Example 2: Get a single savings plan
+```powershell
+Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d -Id 9fde2a72-776b-49fc-869c-dca8859d7d62
+```
+
+```output
+Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrency
+---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------
+PSTest7 Succeeded 11/29/2025 2:23:51 AM 11/29/2022 2:20:38 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+```
+
+Get a single savings plan
diff --git a/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanList.md b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanList.md
new file mode 100644
index 000000000000..a2a4f8e85e59
--- /dev/null
+++ b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanList.md
@@ -0,0 +1,34 @@
+### Example 1: List savings plans.
+```powershell
+Get-AzBillingBenefitsSavingsPlanList
+```
+
+```output
+Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrency
+---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------
+Compute_SavingsPlan_11-30-2022_15-19 Succeeded 11/30/2023 11:22:53 PM 11/30/2022 11:19:31 PM P1Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth1234 Succeeded 11/30/2025 12:36:25 AM 11/30/2022 12:34:31 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth123 Succeeded 11/29/2025 2:51:18 AM 11/29/2022 2:49:24 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth12 Succeeded 11/29/2025 2:48:30 AM 11/29/2022 2:46:45 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth1 Succeeded 11/29/2025 2:45:28 AM 11/29/2022 2:43:36 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth Succeeded 11/29/2025 2:42:49 AM 11/29/2022 2:41:03 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+```
+
+List savings plans.
+
+### Example 2: List savings plans with filtering condition.
+```powershell
+Get-AzBillingBenefitsSavingsPlanList -Filter "properties/userFriendlyAppliedScopeType eq 'Shared'"
+```
+
+```output
+Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrency
+---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------
+Compute_SavingsPlan_11-30-2022_15-19 Succeeded 11/30/2023 11:22:53 PM 11/30/2022 11:19:31 PM P1Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth1234 Succeeded 11/30/2025 12:36:25 AM 11/30/2022 12:34:31 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth123 Succeeded 11/29/2025 2:51:18 AM 11/29/2022 2:49:24 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth12 Succeeded 11/29/2025 2:48:30 AM 11/29/2022 2:46:45 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+PSTesth1 Succeeded 11/29/2025 2:45:28 AM 11/29/2022 2:43:36 AM P3Y Shared Compute_Savings_Plan 0.001 USD
+```
+
+List savings plans with filtering condition.
diff --git a/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanOrder.md b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanOrder.md
new file mode 100644
index 000000000000..5904ac85172c
--- /dev/null
+++ b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanOrder.md
@@ -0,0 +1,28 @@
+### Example 1: List savings plan orders
+```powershell
+Get-AzBillingBenefitsSavingsPlanOrder
+```
+
+```output
+OrderId SkuName Status ExpiryDate Term BillingPlan
+------- ------- ------ ---------- ---- -----------
+23420e73-752b-47e8-96d9-6f9ac2bcee27 Compute_Savings_Plan Succeeded 11/30/2023 11:22:53 PM P1Y P1M
+953fc18d-04d6-4f8a-9f51-6b784cbc4d2a Compute_Savings_Plan Succeeded 11/30/2025 12:36:25 AM P3Y P1M
+a05e9e28-0adf-4e73-8e24-87bf51ab6cdc Compute_Savings_Plan Succeeded 11/29/2025 2:51:18 AM P3Y P1M
+1a06f5fc-2152-40ec-9675-f890ab680df9 Compute_Savings_Plan Succeeded 11/29/2025 2:48:30 AM P3Y P1M
+```
+
+List savings plan orders
+
+### Example 2: Get a single savings plan order
+```powershell
+Get-AzBillingBenefitsSavingsPlanOrder -Id 23420e73-752b-47e8-96d9-6f9ac2bcee27
+```
+
+```output
+OrderId SkuName Status ExpiryDate Term BillingPlan
+------- ------- ------ ---------- ---- -----------
+23420e73-752b-47e8-96d9-6f9ac2bcee27 Compute_Savings_Plan Succeeded 11/30/2023 11:22:53 PM P1Y P1M
+```
+
+Get a single savings plan order
diff --git a/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanOrderAlias.md b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanOrderAlias.md
new file mode 100644
index 000000000000..3268b023c614
--- /dev/null
+++ b/src/BillingBenefits/examples/Get-AzBillingBenefitsSavingsPlanOrderAlias.md
@@ -0,0 +1,29 @@
+### Example 1: Get a savings plan order alias.
+```powershell
+Get-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest2"
+```
+
+```output
+Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId
+---- ----------- ------- ---------------- ---------------------- --------------- ------------------
+PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1…
+```
+
+Get a savings plan order alias.
+
+### Example 2: Get a savings plan order alias via identity.
+```powershell
+$identity = @{
+ SavingsPlanOrderAliasName = "PSTest2"
+}
+
+$response = Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject $identity
+```
+
+```output
+Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId
+---- ----------- ------- ---------------- ---------------------- --------------- ------------------
+PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1…
+```
+
+Get a savings plan order alias via identity.
\ No newline at end of file
diff --git a/src/BillingBenefits/examples/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md b/src/BillingBenefits/examples/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md
new file mode 100644
index 000000000000..7e986f08c7cc
--- /dev/null
+++ b/src/BillingBenefits/examples/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md
@@ -0,0 +1,29 @@
+### Example 1: Elevate savings plan order
+```powershell
+Invoke-AzBillingBenefitsElevateSavingPlanOrder -SavingsPlanOrderId "e0b1f446-5684-4fa6-a0c8-d394368eda11"
+```
+
+```output
+Name PrincipalId RoleDefinitionId Scope
+---- ----------- ---------------- -----
+5c545baf-2ef5-4016-9c31-6e0e23c397a0 067e7443-3a55-40b6-a2d8-0a7a12a9da2d /providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635 /providers/Microsoft.BillingBenefits/savingsplanorders/e45905d2-9207-4f24-8549-f615c203b49b
+```
+
+Elevate savings plan order
+
+### Example 2: Elevate savings plan order via identiy
+```powershell
+$identity = @{
+ SavingsPlanOrderId = "e45905d2-9207-4f24-8549-f615c203b49b"
+}
+
+$response = Invoke-AzBillingBenefitsElevateSavingPlanOrder -InputObject $identity
+```
+
+```output
+Name PrincipalId RoleDefinitionId Scope
+---- ----------- ---------------- -----
+5c545baf-2ef5-4016-9c31-6e0e23c397a0 067e7443-3a55-40b6-a2d8-0a7a12a9da2d /providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635 /providers/Microsoft.BillingBenefits/savingsplanorders/e45905d2-9207-4f24-8549-f615c203b49b
+```
+
+Elevate savings plan order
diff --git a/src/BillingBenefits/examples/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md b/src/BillingBenefits/examples/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md
new file mode 100644
index 000000000000..7a9e8c26d776
--- /dev/null
+++ b/src/BillingBenefits/examples/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md
@@ -0,0 +1,40 @@
+## EXAMPLES
+
+### Example 1: Validate savings plan purchase(expended).
+```powershell
+$model = @{
+ SkuName = "Compute_Savings_Plan"
+ DisplayName = "MockName"
+ Term = "P1Y"
+ AppliedScopeType = "Shared"
+ BillingScopeId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47"
+ CommitmentGrain = "Hourly"
+ CommitmentAmount = 0.01
+ CommitmentCurrencyCode = "USD"
+}
+
+$models = @($model)
+
+Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Benefit $models
+```
+
+```output
+Valid ReasonCode Reason
+----- ---------- ------
+True
+```
+
+Validate savings plan purchase(expended).
+
+### Example 2: Validate savings plan purchase.
+```powershell
+Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Body $body
+```
+
+```output
+Valid ReasonCode Reason
+----- ---------- ------
+True
+```
+
+Validate savings plan purchase.
diff --git a/src/BillingBenefits/examples/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md b/src/BillingBenefits/examples/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md
new file mode 100644
index 000000000000..8291c9b481ec
--- /dev/null
+++ b/src/BillingBenefits/examples/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md
@@ -0,0 +1,21 @@
+## EXAMPLES
+
+### Example 1: Validate savings plan patch
+```powershell
+$model = @{
+ AppliedScopeType = "Single"
+ AppliedScopePropertiesSubscriptionId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47"
+}
+
+$models = @($model)
+
+$response = Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId "9fde2a72-776b-49fc-869c-dca8859d7d62" -SavingsPlanOrderId "d7ea1620-2bba-46e2-8434-11f31bfb984d" -Benefit $models
+```
+
+```output
+Valid ReasonCode Reason
+----- ---------- ------
+True
+```
+
+Validate savings plan patch
diff --git a/src/BillingBenefits/examples/New-AzBillingBenefitsReservationOrderAlias.md b/src/BillingBenefits/examples/New-AzBillingBenefitsReservationOrderAlias.md
new file mode 100644
index 000000000000..47eb8ed5aeab
--- /dev/null
+++ b/src/BillingBenefits/examples/New-AzBillingBenefitsReservationOrderAlias.md
@@ -0,0 +1,12 @@
+### Example 1: Create a reservation order alias.
+```powershell
+New-AzBillingBenefitsReservationOrderAlias -Name "PSRITest1" -AppliedScopeType "Shared" -BillingPlan "P1M" -BillingScopeId "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" -SkuName "Standard_B1ls" -Location "westus" -Quantity 1 -ReservedResourceType 'VirtualMachines' -Term "P1Y" -DisplayName "PSRITest1"
+```
+
+```output
+Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId ProvisioningState BillingScopeId AppliedScopeType
+---- ----------- ------- -------- ---- ----------- -------------------- ------------------ ----------------- -------------- --------
+PSRITest1 PSRITest1 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Micro... Created /subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47 Shared
+```
+
+Create a reservation order alias.
\ No newline at end of file
diff --git a/src/BillingBenefits/examples/New-AzBillingBenefitsSavingsPlanOrderAlias.md b/src/BillingBenefits/examples/New-AzBillingBenefitsSavingsPlanOrderAlias.md
new file mode 100644
index 000000000000..b1ce283f462a
--- /dev/null
+++ b/src/BillingBenefits/examples/New-AzBillingBenefitsSavingsPlanOrderAlias.md
@@ -0,0 +1,13 @@
+### Example 1: Create a savings plan
+```powershell
+New-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest1" -AppliedScopeType "Shared" -BillingPlan "P1M" `
+-BillingScopeId "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" -CommitmentAmount 0.001 -CommitmentCurrencyCode "USD" -CommitmentGrain "Hourly" -SkuName "Compute_Savings_Plan" -DisplayName "PSTest199" -Term "P3Y"
+```
+
+```output
+Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId ProvisioningState BillingScopeId
+---- ----------- ------- ---------------- ---------------------- --------------- ------------------ ----------------- --------------
+PSTest1 PSTest1 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/955e24a7-6672-4038-9961-619a75c2acf4 Created /subscriptions/eef82110-c91b-4395-9420…
+```
+
+Create a savings plan
\ No newline at end of file
diff --git a/src/BillingBenefits/examples/Update-AzBillingBenefitsSavingsPlan.md b/src/BillingBenefits/examples/Update-AzBillingBenefitsSavingsPlan.md
new file mode 100644
index 000000000000..1828d2f438c2
--- /dev/null
+++ b/src/BillingBenefits/examples/Update-AzBillingBenefitsSavingsPlan.md
@@ -0,0 +1,12 @@
+### Example 1: Update savings plan property value
+```powershell
+Update-AzBillingBenefitsSavingsPlan -Id "f82fd820-f829-4022-8ba5-e3bf4ffc329b" -OrderId "e0b1f446-5684-4fa6-a0c8-d394368eda11" -DisplayName "NewName"
+```
+
+```output
+Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrency
+---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------
+NewName Succeeded 10/25/2025 7:01:05 PM 10/25/2022 6:59:06 PM P3Y Shared Compute_Savings_Plan 0.001 USD
+```
+
+Update savings plan property value
diff --git a/src/BillingBenefits/export-surface.ps1 b/src/BillingBenefits/export-surface.ps1
new file mode 100644
index 000000000000..48f3e8432831
--- /dev/null
+++ b/src/BillingBenefits/export-surface.ps1
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.BillingBenefits.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.BillingBenefits'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/BillingBenefits/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1 b/src/BillingBenefits/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1
new file mode 100644
index 000000000000..75c71dbe3196
--- /dev/null
+++ b/src/BillingBenefits/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1
@@ -0,0 +1,188 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a reservation order alias.
+.Description
+Get a reservation order alias.
+.Example
+Get-AzBillingBenefitsReservationOrderAlias -Name "PSRITest2"
+.Example
+$identity = @{
+ ReservationOrderAliasName = "PSRITest2"
+}
+
+$response = Get-AzBillingBenefitsReservationOrderAlias -InputObject $identity
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitsreservationorderalias
+#>
+function Get-AzBillingBenefitsReservationOrderAlias {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('ReservationOrderAliasName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Name of the reservation order alias
+ ${Name},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsReservationOrderAlias_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsReservationOrderAlias_GetViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlan.ps1 b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlan.ps1
new file mode 100644
index 000000000000..5d9fe83d5238
--- /dev/null
+++ b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlan.ps1
@@ -0,0 +1,200 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get savings plan.
+.Description
+Get savings plan.
+.Example
+Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d
+.Example
+Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d -Id 9fde2a72-776b-49fc-869c-dca8859d7d62
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplan
+#>
+function Get-AzBillingBenefitsSavingsPlan {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('SavingsPlanId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # ID of the savings plan
+ ${Id},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Alias('SavingsPlanOrderId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${OrderId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='GetViaIdentity')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to expand the detail information of some properties.
+ ${Expand},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlan_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlan_GetViaIdentity';
+ List = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlan_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanList.ps1 b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanList.ps1
new file mode 100644
index 000000000000..62697a571a46
--- /dev/null
+++ b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanList.ps1
@@ -0,0 +1,195 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+List savings plans.
+.Description
+List savings plans.
+.Example
+Get-AzBillingBenefitsSavingsPlanList
+.Example
+Get-AzBillingBenefitsSavingsPlanList -Filter "properties/userFriendlyAppliedScopeType eq 'Shared'"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanlist
+#>
+function Get-AzBillingBenefitsSavingsPlanList {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to filter by reservation properties.
+ # The filter supports 'eq', 'or', and 'and'.
+ # It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'.
+ # Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}
+ ${Filter},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to sort order by reservation properties.
+ ${Orderby},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # To indicate whether to refresh the roll up counts of the savings plans group by provisioning states
+ ${RefreshSummary},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # The selected provisioning state
+ ${SelectedState},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.Single]
+ # The number of savings plans to skip from the list before returning results
+ ${Skiptoken},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.Single]
+ # To number of savings plans to return
+ ${Take},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanList_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1 b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1
new file mode 100644
index 000000000000..9117e5689c9c
--- /dev/null
+++ b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1
@@ -0,0 +1,192 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a savings plan order.
+.Description
+Get a savings plan order.
+.Example
+Get-AzBillingBenefitsSavingsPlanOrder
+.Example
+Get-AzBillingBenefitsSavingsPlanOrder -Id 23420e73-752b-47e8-96d9-6f9ac2bcee27
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorder
+#>
+function Get-AzBillingBenefitsSavingsPlanOrder {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('SavingsPlanOrderId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${Id},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='GetViaIdentity')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to expand the detail information of some properties.
+ ${Expand},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrder_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrder_GetViaIdentity';
+ List = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrder_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1 b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1
new file mode 100644
index 000000000000..27b276b0d522
--- /dev/null
+++ b/src/BillingBenefits/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1
@@ -0,0 +1,188 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a savings plan.
+.Description
+Get a savings plan.
+.Example
+Get-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest2"
+.Example
+$identity = @{
+ SavingsPlanOrderAliasName = "PSTest2"
+}
+
+$response = Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject $identity
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorderalias
+#>
+function Get-AzBillingBenefitsSavingsPlanOrderAlias {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('SavingsPlanOrderAliasName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Name of the savings plan order alias
+ ${Name},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrderAlias_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1 b/src/BillingBenefits/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1
new file mode 100644
index 000000000000..611cb462795c
--- /dev/null
+++ b/src/BillingBenefits/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1
@@ -0,0 +1,187 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Elevate as owner on savings plan order based on billing permissions.
+.Description
+Elevate as owner on savings plan order based on billing permissions.
+.Example
+Invoke-AzBillingBenefitsElevateSavingPlanOrder -SavingsPlanOrderId "e0b1f446-5684-4fa6-a0c8-d394368eda11"
+.Example
+$identity = @{
+ SavingsPlanOrderId = "e45905d2-9207-4f24-8549-f615c203b49b"
+}
+
+$response = Invoke-AzBillingBenefitsElevateSavingPlanOrder -InputObject $identity
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitselevatesavingplanorder
+#>
+function Invoke-AzBillingBenefitsElevateSavingPlanOrder {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity])]
+[CmdletBinding(DefaultParameterSetName='Elevate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Elevate', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${SavingsPlanOrderId},
+
+ [Parameter(ParameterSetName='ElevateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Elevate = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsElevateSavingPlanOrder_Elevate';
+ ElevateViaIdentity = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1 b/src/BillingBenefits/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1
new file mode 100644
index 000000000000..13830a778cc4
--- /dev/null
+++ b/src/BillingBenefits/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1
@@ -0,0 +1,242 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Validate savings plan purchase.
+.Description
+Validate savings plan purchase.
+.Example
+$model = @{
+ SkuName = "Compute_Savings_Plan"
+ DisplayName = "MockName"
+ Term = "P1Y"
+ AppliedScopeType = "Shared"
+ BillingScopeId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47"
+ CommitmentGrain = "Hourly"
+ CommitmentAmount = 0.01
+ CommitmentCurrencyCode = "USD"
+}
+
+$models = @($model)
+
+Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Benefit $models
+.Example
+Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Body $body
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse
+.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.
+
+BENEFIT : .
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC)
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [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 benefit is applied.
+ [AppliedScopeType ]: Type of the Applied Scope.
+ [AzureAsyncOperation ]:
+ [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
+ [BillingScopeId ]: Subscription that will be charged for purchasing the benefit
+ [CommitmentAmount ]:
+ [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ [CommitmentGrain ]: Commitment grain.
+ [DisplayName ]: Display name
+ [Kind ]: Resource provider kind
+ [RetryAfter ]:
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+
+BODY : .
+ [Benefit ]:
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC)
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [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 benefit is applied.
+ [AppliedScopeType ]: Type of the Applied Scope.
+ [AzureAsyncOperation ]:
+ [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
+ [BillingScopeId ]: Subscription that will be charged for purchasing the benefit
+ [CommitmentAmount ]:
+ [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ [CommitmentGrain ]: Commitment grain.
+ [DisplayName ]: Display name
+ [Kind ]: Resource provider kind
+ [RetryAfter ]:
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitssavingsplanpurchasevalidation
+#>
+function Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse])]
+[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Validate', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest]
+ # .
+ # To construct, see NOTES section for BODY properties and create a hash table.
+ ${Body},
+
+ [Parameter(ParameterSetName='ValidateExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel[]]
+ # .
+ # To construct, see NOTES section for BENEFIT properties and create a hash table.
+ ${Benefit},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Validate = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation_Validate';
+ ValidateExpanded = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation_ValidateExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1 b/src/BillingBenefits/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1
new file mode 100644
index 000000000000..3193afc79efd
--- /dev/null
+++ b/src/BillingBenefits/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1
@@ -0,0 +1,269 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Validate savings plan patch.
+.Description
+Validate savings plan patch.
+.Example
+$model = @{
+ AppliedScopeType = "Single"
+ AppliedScopePropertiesSubscriptionId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47"
+}
+
+$models = @($model)
+
+$response = Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId "9fde2a72-776b-49fc-869c-dca8859d7d62" -SavingsPlanOrderId "d7ea1620-2bba-46e2-8434-11f31bfb984d" -Benefit $models
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateValidateRequest
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse
+.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.
+
+BENEFIT : .
+ [AppliedScopePropertiesDisplayName ]: Display name
+ [AppliedScopePropertiesManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
+ [AppliedScopePropertiesResourceGroupId ]: Fully-qualified identifier of the resource group.
+ [AppliedScopePropertiesSubscriptionId ]: Fully-qualified identifier of the subscription.
+ [AppliedScopePropertiesTenantId ]: Tenant ID where the benefit is applied.
+ [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 the benefit
+ [CommitmentAmount ]:
+ [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ [CommitmentGrain ]: Commitment grain.
+ [DisplayName ]: Display name
+ [Renew ]: Setting this to true will automatically purchase a new benefit on the expiration date time.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesDisplayName ]: Display name
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesResourceGroupId ]: Fully-qualified identifier of the resource group.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesSubscriptionId ]: Fully-qualified identifier of the subscription.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesTenantId ]: Tenant ID where the benefit is applied.
+ [RenewPropertiesPurchasePropertiesAppliedScopeType ]: Type of the Applied Scope.
+ [RenewPropertiesPurchasePropertiesDisplayName ]: Friendly name of the savings plan
+ [RenewPropertiesPurchasePropertiesRenew ]: Setting this to true will automatically purchase a new benefit on the expiration date time.
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+
+BODY : .
+ [Benefit ]:
+ [AppliedScopePropertiesDisplayName ]: Display name
+ [AppliedScopePropertiesManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
+ [AppliedScopePropertiesResourceGroupId ]: Fully-qualified identifier of the resource group.
+ [AppliedScopePropertiesSubscriptionId ]: Fully-qualified identifier of the subscription.
+ [AppliedScopePropertiesTenantId ]: Tenant ID where the benefit is applied.
+ [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 the benefit
+ [CommitmentAmount ]:
+ [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ [CommitmentGrain ]: Commitment grain.
+ [DisplayName ]: Display name
+ [Renew ]: Setting this to true will automatically purchase a new benefit on the expiration date time.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesDisplayName ]: Display name
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesManagementGroupId ]: Fully-qualified identifier of the management group where the benefit must be applied.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesResourceGroupId ]: Fully-qualified identifier of the resource group.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesSubscriptionId ]: Fully-qualified identifier of the subscription.
+ [RenewPropertiesPurchasePropertiesAppliedScopePropertiesTenantId ]: Tenant ID where the benefit is applied.
+ [RenewPropertiesPurchasePropertiesAppliedScopeType ]: Type of the Applied Scope.
+ [RenewPropertiesPurchasePropertiesDisplayName ]: Friendly name of the savings plan
+ [RenewPropertiesPurchasePropertiesRenew ]: Setting this to true will automatically purchase a new benefit on the expiration date time.
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitssavingsplanupdatevalidation
+#>
+function Invoke-AzBillingBenefitsSavingsPlanUpdateValidation {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse])]
+[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Validate', Mandatory)]
+ [Parameter(ParameterSetName='ValidateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # ID of the savings plan
+ ${SavingsPlanId},
+
+ [Parameter(ParameterSetName='Validate', Mandatory)]
+ [Parameter(ParameterSetName='ValidateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${SavingsPlanOrderId},
+
+ [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Validate', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateValidateRequest]
+ # .
+ # To construct, see NOTES section for BODY properties and create a hash table.
+ ${Body},
+
+ [Parameter(ParameterSetName='ValidateExpanded')]
+ [Parameter(ParameterSetName='ValidateViaIdentityExpanded')]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequestProperties[]]
+ # .
+ # To construct, see NOTES section for BENEFIT properties and create a hash table.
+ ${Benefit},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Validate = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsSavingsPlanUpdateValidation_Validate';
+ ValidateExpanded = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsSavingsPlanUpdateValidation_ValidateExpanded';
+ ValidateViaIdentity = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentity';
+ ValidateViaIdentityExpanded = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentityExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/New-AzBillingBenefitsReservationOrderAlias.ps1 b/src/BillingBenefits/exports/New-AzBillingBenefitsReservationOrderAlias.ps1
new file mode 100644
index 000000000000..f8eeaaafaa95
--- /dev/null
+++ b/src/BillingBenefits/exports/New-AzBillingBenefitsReservationOrderAlias.ps1
@@ -0,0 +1,358 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a reservation order alias.
+.Description
+Create a reservation order alias.
+.Example
+New-AzBillingBenefitsReservationOrderAlias -Name "PSRITest1" -AppliedScopeType "Shared" -BillingPlan "P1M" -BillingScopeId "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" -SkuName "Standard_B1ls" -Location "westus" -Quantity 1 -ReservedResourceType 'VirtualMachines' -Term "P1Y" -DisplayName "PSRITest1"
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasRequest
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse
+.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 : Reservation order alias
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC)
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [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 benefit is applied.
+ [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 the benefit
+ [DisplayName ]: Display name
+ [Location ]: The Azure Region where the reservation benefits are applied to.
+ [Quantity ]: Total Quantity of the SKUs purchased in the Reservation.
+ [Renew ]: Setting this to true will automatically purchase a new benefit on the expiration date time.
+ [ReservedResourcePropertyInstanceFlexibility ]: Turning this on will apply the reservation discount to other VMs in the same VM size group.
+ [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.
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/new-azbillingbenefitsreservationorderalias
+#>
+function New-AzBillingBenefitsReservationOrderAlias {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Create', Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Alias('ReservationOrderAliasName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Name of the reservation order alias
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasRequest]
+ # Reservation order alias
+ # To construct, see NOTES section for BODY properties and create a hash table.
+ ${Body},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Display name
+ ${AppliedScopePropertyDisplayName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Fully-qualified identifier of the management group where the benefit must be applied.
+ ${AppliedScopePropertyManagementGroupId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Fully-qualified identifier of the resource group.
+ ${AppliedScopePropertyResourceGroupId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Fully-qualified identifier of the subscription.
+ ${AppliedScopePropertySubscriptionId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Tenant ID where the benefit is applied.
+ ${AppliedScopePropertyTenantId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType]
+ # Type of the Applied Scope.
+ ${AppliedScopeType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.BillingPlan])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.BillingPlan]
+ # Represents the billing plan in ISO 8601 format.
+ # Required only for monthly billing plans.
+ ${BillingPlan},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Subscription that will be charged for purchasing the benefit
+ ${BillingScopeId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Display name
+ ${DisplayName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # The Azure Region where the reservation benefits are applied to.
+ ${Location},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.Int32]
+ # Total Quantity of the SKUs purchased in the Reservation.
+ ${Quantity},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Setting this to true will automatically purchase a new benefit on the expiration date time.
+ ${Renew},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.InstanceFlexibility])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.InstanceFlexibility]
+ # Turning this on will apply the reservation discount to other VMs in the same VM size group.
+ ${ReservedResourcePropertyInstanceFlexibility},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ReservedResourceType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ReservedResourceType]
+ # The type of the resource that is being reserved.
+ ${ReservedResourceType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.DateTime]
+ # This is the date-time when the Azure Hybrid Benefit needs to be reviewed.
+ ${ReviewDateTime},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Name of the SKU to be applied
+ ${SkuName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.Term])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.Term]
+ # Represent benefit term in ISO 8601 format.
+ ${Term},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Create = 'Az.BillingBenefits.private\New-AzBillingBenefitsReservationOrderAlias_Create';
+ CreateExpanded = 'Az.BillingBenefits.private\New-AzBillingBenefitsReservationOrderAlias_CreateExpanded';
+ CreateViaIdentity = 'Az.BillingBenefits.private\New-AzBillingBenefitsReservationOrderAlias_CreateViaIdentity';
+ CreateViaIdentityExpanded = 'Az.BillingBenefits.private\New-AzBillingBenefitsReservationOrderAlias_CreateViaIdentityExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1 b/src/BillingBenefits/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1
new file mode 100644
index 000000000000..eda287babec0
--- /dev/null
+++ b/src/BillingBenefits/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1
@@ -0,0 +1,346 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create a savings plan.
+Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851
+.Description
+Create a savings plan.
+Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851
+.Example
+New-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest1" -AppliedScopeType "Shared" -BillingPlan "P1M" `
+-BillingScopeId "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" -CommitmentAmount 0.001 -CommitmentCurrencyCode "USD" -CommitmentGrain "Hourly" -SkuName "Compute_Savings_Plan" -DisplayName "PSTest199" -Term "P3Y"
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel
+.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 : Savings plan order alias
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC)
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [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 benefit is applied.
+ [AppliedScopeType ]: Type of the Applied Scope.
+ [AzureAsyncOperation ]:
+ [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
+ [BillingScopeId ]: Subscription that will be charged for purchasing the benefit
+ [CommitmentAmount ]:
+ [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ [CommitmentGrain ]: Commitment grain.
+ [DisplayName ]: Display name
+ [Kind ]: Resource provider kind
+ [RetryAfter ]:
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/new-azbillingbenefitssavingsplanorderalias
+#>
+function New-AzBillingBenefitsSavingsPlanOrderAlias {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Create', Mandatory)]
+ [Parameter(ParameterSetName='CreateExpanded', Mandatory)]
+ [Alias('SavingsPlanOrderAliasName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Name of the savings plan order alias
+ ${Name},
+
+ [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='CreateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel]
+ # Savings plan order alias
+ # To construct, see NOTES section for BODY properties and create a hash table.
+ ${Body},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Display name
+ ${AppliedScopePropertyDisplayName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Fully-qualified identifier of the management group where the benefit must be applied.
+ ${AppliedScopePropertyManagementGroupId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Fully-qualified identifier of the resource group.
+ ${AppliedScopePropertyResourceGroupId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Fully-qualified identifier of the subscription.
+ ${AppliedScopePropertySubscriptionId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Tenant ID where the benefit is applied.
+ ${AppliedScopePropertyTenantId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType]
+ # Type of the Applied Scope.
+ ${AppliedScopeType},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.BillingPlan])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.BillingPlan]
+ # Represents the billing plan in ISO 8601 format.
+ # Required only for monthly billing plans.
+ ${BillingPlan},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Subscription that will be charged for purchasing the benefit
+ ${BillingScopeId},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.Double]
+ # .
+ ${CommitmentAmount},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ ${CommitmentCurrencyCode},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain]
+ # Commitment grain.
+ ${CommitmentGrain},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Display name
+ ${DisplayName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Resource provider kind
+ ${Kind},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [System.String]
+ # Name of the SKU to be applied
+ ${SkuName},
+
+ [Parameter(ParameterSetName='CreateExpanded')]
+ [Parameter(ParameterSetName='CreateViaIdentityExpanded')]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.Term])]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.Term]
+ # Represent benefit term in ISO 8601 format.
+ ${Term},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Create = 'Az.BillingBenefits.private\New-AzBillingBenefitsSavingsPlanOrderAlias_Create';
+ CreateExpanded = 'Az.BillingBenefits.private\New-AzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded';
+ CreateViaIdentity = 'Az.BillingBenefits.private\New-AzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity';
+ CreateViaIdentityExpanded = 'Az.BillingBenefits.private\New-AzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentityExpanded';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/BillingBenefits/exports/ProxyCmdletDefinitions.ps1 b/src/BillingBenefits/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..38beff4f8366
--- /dev/null
+++ b/src/BillingBenefits/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,2617 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Get a reservation order alias.
+.Description
+Get a reservation order alias.
+.Example
+Get-AzBillingBenefitsReservationOrderAlias -Name "PSRITest2"
+.Example
+$identity = @{
+ ReservationOrderAliasName = "PSRITest2"
+}
+
+$response = Get-AzBillingBenefitsReservationOrderAlias -InputObject $identity
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitsreservationorderalias
+#>
+function Get-AzBillingBenefitsReservationOrderAlias {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('ReservationOrderAliasName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Name of the reservation order alias
+ ${Name},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsReservationOrderAlias_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsReservationOrderAlias_GetViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+List savings plans.
+.Description
+List savings plans.
+.Example
+Get-AzBillingBenefitsSavingsPlanList
+.Example
+Get-AzBillingBenefitsSavingsPlanList -Filter "properties/userFriendlyAppliedScopeType eq 'Shared'"
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanlist
+#>
+function Get-AzBillingBenefitsSavingsPlanList {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to filter by reservation properties.
+ # The filter supports 'eq', 'or', and 'and'.
+ # It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'.
+ # Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}
+ ${Filter},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to sort order by reservation properties.
+ ${Orderby},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # To indicate whether to refresh the roll up counts of the savings plans group by provisioning states
+ ${RefreshSummary},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # The selected provisioning state
+ ${SelectedState},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.Single]
+ # The number of savings plans to skip from the list before returning results
+ ${Skiptoken},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.Single]
+ # To number of savings plans to return
+ ${Take},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanList_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get a savings plan.
+.Description
+Get a savings plan.
+.Example
+Get-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest2"
+.Example
+$identity = @{
+ SavingsPlanOrderAliasName = "PSTest2"
+}
+
+$response = Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject $identity
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorderalias
+#>
+function Get-AzBillingBenefitsSavingsPlanOrderAlias {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('SavingsPlanOrderAliasName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Name of the savings plan order alias
+ ${Name},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrderAlias_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get a savings plan order.
+.Description
+Get a savings plan order.
+.Example
+Get-AzBillingBenefitsSavingsPlanOrder
+.Example
+Get-AzBillingBenefitsSavingsPlanOrder -Id 23420e73-752b-47e8-96d9-6f9ac2bcee27
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorder
+#>
+function Get-AzBillingBenefitsSavingsPlanOrder {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('SavingsPlanOrderId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${Id},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='GetViaIdentity')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to expand the detail information of some properties.
+ ${Expand},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrder_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrder_GetViaIdentity';
+ List = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlanOrder_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Get savings plan.
+.Description
+Get savings plan.
+.Example
+Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d
+.Example
+Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d -Id 9fde2a72-776b-49fc-869c-dca8859d7d62
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplan
+#>
+function Get-AzBillingBenefitsSavingsPlan {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('SavingsPlanId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # ID of the savings plan
+ ${Id},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Alias('SavingsPlanOrderId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${OrderId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='GetViaIdentity')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Query')]
+ [System.String]
+ # May be used to expand the detail information of some properties.
+ ${Expand},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlan_Get';
+ GetViaIdentity = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlan_GetViaIdentity';
+ List = 'Az.BillingBenefits.private\Get-AzBillingBenefitsSavingsPlan_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Elevate as owner on savings plan order based on billing permissions.
+.Description
+Elevate as owner on savings plan order based on billing permissions.
+.Example
+Invoke-AzBillingBenefitsElevateSavingPlanOrder -SavingsPlanOrderId "e0b1f446-5684-4fa6-a0c8-d394368eda11"
+.Example
+$identity = @{
+ SavingsPlanOrderId = "e45905d2-9207-4f24-8549-f615c203b49b"
+}
+
+$response = Invoke-AzBillingBenefitsElevateSavingPlanOrder -InputObject $identity
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [Id ]: Resource identity path
+ [ReservationOrderAliasName ]: Name of the reservation order alias
+ [SavingsPlanId ]: ID of the savings plan
+ [SavingsPlanOrderAliasName ]: Name of the savings plan order alias
+ [SavingsPlanOrderId ]: Order ID of the savings plan
+.Link
+https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitselevatesavingplanorder
+#>
+function Invoke-AzBillingBenefitsElevateSavingPlanOrder {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity])]
+[CmdletBinding(DefaultParameterSetName='Elevate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Elevate', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [System.String]
+ # Order ID of the savings plan
+ ${SavingsPlanOrderId},
+
+ [Parameter(ParameterSetName='ElevateViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Elevate = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsElevateSavingPlanOrder_Elevate';
+ ElevateViaIdentity = 'Az.BillingBenefits.private\Invoke-AzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Validate savings plan purchase.
+.Description
+Validate savings plan purchase.
+.Example
+$model = @{
+ SkuName = "Compute_Savings_Plan"
+ DisplayName = "MockName"
+ Term = "P1Y"
+ AppliedScopeType = "Shared"
+ BillingScopeId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47"
+ CommitmentGrain = "Hourly"
+ CommitmentAmount = 0.01
+ CommitmentCurrencyCode = "USD"
+}
+
+$models = @($model)
+
+Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Benefit $models
+.Example
+Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Body $body
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse
+.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.
+
+BENEFIT : .
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC)
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+ [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 benefit is applied.
+ [AppliedScopeType ]: Type of the Applied Scope.
+ [AzureAsyncOperation ]:
+ [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.
+ [BillingScopeId ]: Subscription that will be charged for purchasing the benefit
+ [CommitmentAmount ]:
+ [CommitmentCurrencyCode ]: The ISO 4217 3-letter currency code for the currency used by this purchase record.
+ [CommitmentGrain ]: Commitment grain.
+ [DisplayName ]: Display name
+ [Kind ]: Resource provider kind
+ [RetryAfter ]:
+ [SkuName ]: Name of the SKU to be applied
+ [Term ]: Represent benefit term in ISO 8601 format.
+
+BODY : .
+ [Benefit ]:
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedAt ]: The timestamp of resource last modification (UTC)
+ [SystemDataLastModifiedBy