From 5ed4b4e9d344d80e2e6f83860d065aabc03328ae Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Fri, 14 Aug 2026 21:58:37 +0000 Subject: [PATCH 1/7] Configurations: 'specification/consumption/resource-manager/Microsoft.Consumption/Consumption/tspconfig.yaml', SDK Release Type: stable, and CommitSHA: 'c724dc9c81b1ab37190c0f56b0354b2d63980710' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6705666 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 441 ++++++++++- .../README.md | 10 +- .../SAMPLE.md | 546 +++++++------ .../azure-resourcemanager-consumption/pom.xml | 10 +- .../consumption/ConsumptionManager.java | 123 +-- .../fluent/AggregatedCostsClient.java | 15 +- .../consumption/fluent/BalancesClient.java | 2 +- .../consumption/fluent/BudgetsClient.java | 144 +--- .../consumption/fluent/ChargesClient.java | 34 +- .../fluent/ConsumptionManagementClient.java | 74 +- .../consumption/fluent/CreditsClient.java | 2 +- .../fluent/EventsOperationsClient.java | 2 +- .../fluent/LotsOperationsClient.java | 2 +- .../fluent/MarketplacesClient.java | 22 +- .../consumption/fluent/OperationsClient.java | 6 +- .../consumption/fluent/PriceSheetsClient.java | 92 ++- ...eservationRecommendationDetailsClient.java | 9 +- .../ReservationRecommendationsClient.java | 16 +- .../fluent/ReservationTransactionsClient.java | 20 +- .../fluent/ReservationsDetailsClient.java | 52 +- .../fluent/ReservationsSummariesClient.java | 36 +- .../consumption/fluent/TagsClient.java | 18 +- .../fluent/UsageDetailsClient.java | 48 +- .../fluent/models/BalanceInner.java | 59 +- .../fluent/models/BalanceProperties.java | 48 +- .../fluent/models/BudgetInner.java | 30 +- .../fluent/models/BudgetProperties.java | 47 +- .../fluent/models/ChargesListResultInner.java | 15 +- .../fluent/models/CreditSummaryInner.java | 65 +- .../models/CreditSummaryProperties.java | 44 +- .../fluent/models/EventProperties.java | 122 ++- .../fluent/models/EventSummaryInner.java | 89 ++- .../models/LegacyChargeSummaryProperties.java | 12 +- ...egacyReservationTransactionProperties.java | 20 +- .../models/LegacyUsageDetailProperties.java | 23 +- .../fluent/models/LotProperties.java | 81 +- .../fluent/models/LotSummaryInner.java | 63 +- ...nagementGroupAggregatedCostProperties.java | 55 +- ...agementGroupAggregatedCostResultInner.java | 81 +- .../fluent/models/MarketplaceInner.java | 37 +- .../fluent/models/MarketplaceProperties.java | 27 +- .../models/ModernChargeSummaryProperties.java | 21 +- .../ModernReservationTransactionInner.java | 56 +- ...odernReservationTransactionProperties.java | 20 +- .../models/ModernUsageDetailProperties.java | 20 +- .../fluent/models/OperationInner.java | 30 +- .../fluent/models/OperationStatusInner.java | 111 +++ .../fluent/models/PriceSheetModel.java | 18 +- .../fluent/models/PriceSheetResultInner.java | 38 +- .../models/PricesheetDownloadProperties.java | 92 +++ .../fluent/models/ReservationDetailInner.java | 32 +- .../models/ReservationDetailProperties.java | 12 +- ...vationRecommendationDetailsModelInner.java | 77 +- ...vationRecommendationDetailsProperties.java | 64 +- .../ReservationRecommendationInner.java | 175 +++-- .../models/ReservationSummaryInner.java | 32 +- .../models/ReservationSummaryProperties.java | 12 +- .../models/ReservationTransactionInner.java | 56 +- .../fluent/models/TagProperties.java | 30 +- .../fluent/models/TagsResultInner.java | 52 +- .../fluent/models/UsageDetailInner.java | 40 +- .../fluent/models/package-info.java | 4 +- .../consumption/fluent/package-info.java | 4 +- .../AggregatedCostsClientImpl.java | 162 ++-- .../implementation/AggregatedCostsImpl.java | 18 +- .../implementation/BalanceImpl.java | 11 +- .../implementation/BalancesClientImpl.java | 119 +-- .../implementation/BalancesImpl.java | 18 +- .../implementation/BudgetImpl.java | 7 +- .../implementation/BudgetsClientImpl.java | 718 +++++------------- .../implementation/BudgetsImpl.java | 30 +- .../implementation/ChargesClientImpl.java | 145 +--- .../implementation/ChargesImpl.java | 10 +- .../implementation/ChargesListResultImpl.java | 2 +- .../ConsumptionManagementClientBuilder.java | 28 +- .../ConsumptionManagementClientImpl.java | 186 +++-- .../implementation/CreditSummaryImpl.java | 22 +- .../implementation/CreditsClientImpl.java | 75 +- .../implementation/CreditsImpl.java | 10 +- .../implementation/EventSummaryImpl.java | 19 +- .../EventsOperationsClientImpl.java | 327 ++++---- .../implementation/EventsOperationsImpl.java | 2 +- .../implementation/LotSummaryImpl.java | 20 +- .../LotsOperationsClientImpl.java | 454 ++++++----- .../implementation/LotsOperationsImpl.java | 2 +- ...nagementGroupAggregatedCostResultImpl.java | 7 +- .../implementation/MarketplaceImpl.java | 12 +- .../MarketplacesClientImpl.java | 235 +++--- .../implementation/MarketplacesImpl.java | 2 +- .../ModernReservationTransactionImpl.java | 10 +- .../implementation/OperationImpl.java | 2 +- .../implementation/OperationStatusImpl.java | 42 + .../implementation/OperationsClientImpl.java | 134 ++-- .../implementation/OperationsImpl.java | 2 +- .../implementation/PriceSheetResultImpl.java | 7 +- .../implementation/PriceSheetsClientImpl.java | 368 ++++++--- .../implementation/PriceSheetsImpl.java | 43 +- .../implementation/ReservationDetailImpl.java | 7 +- ...vationRecommendationDetailsClientImpl.java | 126 +-- .../ReservationRecommendationDetailsImpl.java | 16 +- ...rvationRecommendationDetailsModelImpl.java | 20 +- .../ReservationRecommendationImpl.java | 27 +- .../ReservationRecommendationsClientImpl.java | 212 +++--- .../ReservationRecommendationsImpl.java | 2 +- .../ReservationSummaryImpl.java | 7 +- .../ReservationTransactionImpl.java | 10 +- .../ReservationTransactionsClientImpl.java | 412 +++++----- .../ReservationTransactionsImpl.java | 9 +- .../ReservationsDetailsClientImpl.java | 648 ++++++++-------- .../ReservationsDetailsImpl.java | 2 +- .../ReservationsSummariesClientImpl.java | 640 ++++++++-------- .../ReservationsSummariesImpl.java | 2 +- .../implementation/ResourceManagerUtils.java | 2 +- .../implementation/TagsClientImpl.java | 93 +-- .../consumption/implementation/TagsImpl.java | 10 +- .../implementation/TagsResultImpl.java | 7 +- .../implementation/UsageDetailImpl.java | 7 +- .../UsageDetailsClientImpl.java | 342 ++++----- .../implementation/UsageDetailsImpl.java | 2 +- .../models/BudgetsListResult.java | 17 +- .../{ => implementation}/models/Events.java | 17 +- .../{ => implementation}/models/Lots.java | 21 +- .../models/MarketplacesListResult.java | 17 +- ...dernReservationTransactionsListResult.java | 17 +- .../models/OperationListResult.java | 17 +- .../models/ReservationDetailsListResult.java | 17 +- .../ReservationRecommendationsListResult.java | 17 +- .../ReservationSummariesListResult.java | 17 +- .../ReservationTransactionsListResult.java | 17 +- .../models/UsageDetailsListResult.java | 17 +- .../implementation/package-info.java | 4 +- .../consumption/models/AggregatedCosts.java | 15 +- .../consumption/models/Amount.java | 12 +- .../models/AmountWithExchangeRate.java | 13 +- .../consumption/models/Balance.java | 17 +- ...alancePropertiesAdjustmentDetailsItem.java | 12 +- ...ancePropertiesNewPurchasesDetailsItem.java | 12 +- .../consumption/models/Balances.java | 2 +- .../consumption/models/BillingFrequency.java | 2 +- .../consumption/models/Budget.java | 24 +- .../models/BudgetComparisonExpression.java | 28 +- .../consumption/models/BudgetFilter.java | 19 +- .../models/BudgetFilterProperties.java | 16 +- .../models/BudgetOperatorType.java | 2 +- .../consumption/models/BudgetTimePeriod.java | 17 +- .../consumption/models/Budgets.java | 116 +-- .../consumption/models/CategoryType.java | 2 +- .../consumption/models/ChargeSummary.java | 46 +- .../consumption/models/ChargeSummaryKind.java | 2 +- .../consumption/models/Charges.java | 34 +- .../consumption/models/ChargesListResult.java | 2 +- .../models/CreditBalanceSummary.java | 21 +- .../consumption/models/CreditSummary.java | 26 +- .../consumption/models/Credits.java | 2 +- .../consumption/models/CultureCode.java | 2 +- .../consumption/models/CurrentSpend.java | 12 +- .../consumption/models/Datagrain.java | 10 +- .../consumption/models/EventSummary.java | 41 +- .../consumption/models/EventType.java | 2 +- .../consumption/models/EventsOperations.java | 2 +- .../consumption/models/ForecastSpend.java | 12 +- .../models/LegacyChargeSummary.java | 75 +- ...peReservationRecommendationProperties.java | 168 ++++ .../LegacyReservationRecommendation.java | 110 ++- ...cyReservationRecommendationProperties.java | 95 ++- .../models/LegacyReservationTransaction.java | 373 --------- ...peReservationRecommendationProperties.java | 30 +- ...peReservationRecommendationProperties.java | 36 +- .../consumption/models/LegacyUsageDetail.java | 46 +- .../consumption/models/LookBackPeriod.java | 10 +- .../consumption/models/LotSource.java | 2 +- .../consumption/models/LotSummary.java | 38 +- .../consumption/models/LotsOperations.java | 2 +- .../ManagementGroupAggregatedCostResult.java | 10 +- .../consumption/models/Marketplace.java | 15 +- .../consumption/models/Marketplaces.java | 22 +- .../consumption/models/MeterDetails.java | 12 +- .../models/MeterDetailsResponse.java | 12 +- .../consumption/models/Metrictype.java | 14 +- .../models/ModernChargeSummary.java | 75 +- ...peReservationRecommendationProperties.java | 172 +++++ .../ModernReservationRecommendation.java | 110 ++- ...rnReservationRecommendationProperties.java | 104 ++- .../models/ModernReservationTransaction.java | 13 +- ...peReservationRecommendationProperties.java | 39 +- ...peReservationRecommendationProperties.java | 45 +- .../consumption/models/ModernUsageDetail.java | 46 +- .../consumption/models/Notification.java | 25 +- .../consumption/models/Operation.java | 2 +- .../consumption/models/OperationDisplay.java | 12 +- .../consumption/models/OperationStatus.java | 41 + .../models/OperationStatusType.java | 56 ++ .../consumption/models/Operations.java | 6 +- .../consumption/models/OperatorType.java | 11 +- .../consumption/models/OrganizationType.java | 51 ++ .../models/PriceSheetProperties.java | 29 +- .../consumption/models/PriceSheetResult.java | 13 +- .../consumption/models/PriceSheets.java | 59 +- .../consumption/models/PricingModelType.java | 2 +- .../consumption/models/Reseller.java | 12 +- .../consumption/models/ReservationDetail.java | 10 +- .../models/ReservationRecommendation.java | 46 +- .../ReservationRecommendationDetails.java | 9 +- ...ionDetailsCalculatedSavingsProperties.java | 76 +- ...ReservationRecommendationDetailsModel.java | 32 +- ...dationDetailsProjectedUsageProperties.java | 78 ++ ...commendationDetailsResourceProperties.java | 33 +- ...ecommendationDetailsSavingsProperties.java | 41 +- ...nRecommendationDetailsUsageProperties.java | 18 +- .../models/ReservationRecommendationKind.java | 2 +- .../models/ReservationRecommendations.java | 16 +- .../models/ReservationSummary.java | 10 +- .../models/ReservationTransaction.java | 13 +- .../ReservationTransactionResource.java | 147 ---- .../models/ReservationTransactions.java | 20 +- .../models/ReservationsDetails.java | 52 +- .../models/ReservationsSummaries.java | 36 +- .../models/ResourceAttributes.java | 119 --- .../consumption/models/SavingsPlan.java | 108 +++ .../consumption/models/Scope.java | 7 +- .../consumption/models/SkuProperty.java | 12 +- .../consumption/models/Status.java | 2 +- .../consumption/models/Tag.java | 38 +- .../consumption/models/Tags.java | 18 +- .../consumption/models/TagsResult.java | 10 +- .../consumption/models/Term.java | 11 +- .../consumption/models/ThresholdType.java | 7 +- .../consumption/models/TimeGrainType.java | 2 +- .../consumption/models/UsageDetail.java | 10 +- .../consumption/models/UsageDetails.java | 48 +- .../consumption/models/UsageDetailsKind.java | 2 +- .../consumption/models/package-info.java | 4 +- .../consumption/package-info.java | 4 +- .../src/main/java/module-info.java | 3 +- ...-resourcemanager-consumption_metadata.json | 1 + ...ure-resourcemanager-consumption.properties | 1 + ...egatedCostGetByManagementGroupSamples.java | 8 +- ...BillingPeriodByManagementGroupSamples.java | 5 +- .../BalancesGetByBillingAccountSamples.java | 5 +- ...rBillingPeriodByBillingAccountSamples.java | 5 +- .../BudgetsCreateOrUpdateSamples.java | 6 +- .../generated/BudgetsDeleteSamples.java | 5 +- .../generated/BudgetsGetSamples.java | 5 +- .../generated/BudgetsListSamples.java | 5 +- .../generated/ChargesListSamples.java | 41 +- .../generated/CreditsGetSamples.java | 5 +- ...sOperationListByBillingAccountSamples.java | 66 +- ...sOperationListByBillingProfileSamples.java | 5 +- ...sOperationListByBillingAccountSamples.java | 64 +- ...sOperationListByBillingProfileSamples.java | 5 +- .../LotsOperationListByCustomerSamples.java | 9 +- .../generated/MarketplacesListSamples.java | 32 +- .../generated/OperationsListSamples.java | 5 +- ...DownloadByBillingAccountPeriodSamples.java | 22 + .../PriceSheetGetByBillingPeriodSamples.java | 8 +- .../generated/PriceSheetGetSamples.java | 5 +- ...vationRecommendationDetailsGetSamples.java | 60 +- ...ReservationRecommendationsListSamples.java | 48 +- ...ansactionsListByBillingProfileSamples.java | 5 +- .../ReservationTransactionsListSamples.java | 11 +- ...ReservationOrderAndReservationSamples.java | 5 +- ...sDetailsListByReservationOrderSamples.java | 6 +- .../ReservationsDetailsListSamples.java | 11 +- ...ReservationOrderAndReservationSamples.java | 13 +- ...ummariesListByReservationOrderSamples.java | 12 +- .../ReservationsSummariesListSamples.java | 35 +- .../consumption/generated/TagsGetSamples.java | 5 +- .../generated/UsageDetailsListSamples.java | 86 +-- ...yManagementGroupWithResponseMockTests.java | 18 +- ...yManagementGroupWithResponseMockTests.java | 19 +- .../consumption/generated/AmountTests.java | 11 +- .../AmountWithExchangeRateTests.java | 14 +- .../generated/BalanceInnerTests.java | 11 +- ...ePropertiesAdjustmentDetailsItemTests.java | 11 +- ...ropertiesNewPurchasesDetailsItemTests.java | 13 +- .../generated/BalancePropertiesTests.java | 13 +- ...ByBillingAccountWithResponseMockTests.java | 15 +- ...ByBillingAccountWithResponseMockTests.java | 13 +- .../BudgetComparisonExpressionTests.java | 20 +- .../BudgetFilterPropertiesTests.java | 28 +- .../generated/BudgetFilterTests.java | 75 +- .../generated/BudgetInnerTests.java | 181 +++-- .../generated/BudgetPropertiesTests.java | 154 ++-- .../generated/BudgetTimePeriodTests.java | 16 +- ...tsCreateOrUpdateWithResponseMockTests.java | 127 ++++ ...eByResourceGroupWithResponseMockTests.java | 8 +- .../BudgetsGetWithResponseMockTests.java | 50 +- .../generated/BudgetsListMockTests.java | 57 +- .../generated/BudgetsListResultTests.java | 12 +- .../generated/ChargeSummaryTests.java | 13 +- .../ChargesListResultInnerTests.java | 10 +- .../ChargesListWithResponseMockTests.java | 10 +- .../generated/CreditBalanceSummaryTests.java | 10 +- .../generated/CreditSummaryInnerTests.java | 14 +- .../CreditSummaryPropertiesTests.java | 10 +- .../CreditsGetWithResponseMockTests.java | 13 +- .../generated/CurrentSpendTests.java | 11 +- .../generated/EventPropertiesTests.java | 13 +- .../generated/EventSummaryInnerTests.java | 16 +- ...erationsListByBillingAccountMockTests.java | 13 +- ...erationsListByBillingProfileMockTests.java | 13 +- .../consumption/generated/EventsTests.java | 12 +- .../generated/ForecastSpendTests.java | 11 +- .../LegacyChargeSummaryPropertiesTests.java | 10 +- .../generated/LegacyChargeSummaryTests.java | 13 +- ...ervationRecommendationPropertiesTests.java | 17 + ...ervationRecommendationPropertiesTests.java | 10 +- .../LegacyReservationRecommendationTests.java | 12 +- ...ReservationTransactionPropertiesTests.java | 10 +- .../LegacyReservationTransactionTests.java | 23 - ...ervationRecommendationPropertiesTests.java | 11 +- ...ervationRecommendationPropertiesTests.java | 11 +- .../LegacyUsageDetailPropertiesTests.java | 10 +- .../generated/LegacyUsageDetailTests.java | 10 +- .../generated/LotPropertiesTests.java | 10 +- .../generated/LotSummaryInnerTests.java | 13 +- ...erationsListByBillingAccountMockTests.java | 14 +- ...erationsListByBillingProfileMockTests.java | 14 +- ...LotsOperationsListByCustomerMockTests.java | 12 +- .../consumption/generated/LotsTests.java | 12 +- ...entGroupAggregatedCostPropertiesTests.java | 30 +- ...ntGroupAggregatedCostResultInnerTests.java | 29 +- .../generated/MarketplaceInnerTests.java | 10 +- .../generated/MarketplacePropertiesTests.java | 10 +- .../generated/MarketplacesListMockTests.java | 12 +- .../MarketplacesListResultTests.java | 12 +- .../generated/MeterDetailsResponseTests.java | 10 +- .../generated/MeterDetailsTests.java | 10 +- .../ModernChargeSummaryPropertiesTests.java | 10 +- .../generated/ModernChargeSummaryTests.java | 13 +- ...ervationRecommendationPropertiesTests.java | 17 + ...ervationRecommendationPropertiesTests.java | 10 +- .../ModernReservationRecommendationTests.java | 12 +- ...odernReservationTransactionInnerTests.java | 10 +- ...ReservationTransactionPropertiesTests.java | 10 +- ...eservationTransactionsListResultTests.java | 12 +- ...ervationRecommendationPropertiesTests.java | 11 +- ...ervationRecommendationPropertiesTests.java | 11 +- .../generated/NotificationTests.java | 44 +- .../generated/OperationDisplayTests.java | 10 +- .../generated/OperationInnerTests.java | 11 +- .../generated/OperationListResultTests.java | 12 +- .../generated/OperationStatusInnerTests.java | 20 + .../generated/OperationsListMockTests.java | 8 +- ...wnloadByBillingAccountPeriodMockTests.java | 39 + .../PricesheetDownloadPropertiesTests.java | 17 + .../consumption/generated/ResellerTests.java | 10 +- .../ReservationDetailInnerTests.java | 10 +- .../ReservationDetailPropertiesTests.java | 10 +- .../ReservationDetailsListResultTests.java | 12 +- ...tailsCalculatedSavingsPropertiesTests.java | 15 +- ...dationDetailsGetWithResponseMockTests.java | 16 +- ...nRecommendationDetailsModelInnerTests.java | 17 +- ...nDetailsProjectedUsagePropertiesTests.java | 17 + ...nRecommendationDetailsPropertiesTests.java | 10 +- ...ndationDetailsResourcePropertiesTests.java | 11 +- ...endationDetailsSavingsPropertiesTests.java | 18 +- ...mmendationDetailsUsagePropertiesTests.java | 10 +- .../ReservationRecommendationInnerTests.java | 10 +- ...servationRecommendationsListMockTests.java | 10 +- ...rvationRecommendationsListResultTests.java | 12 +- .../ReservationSummariesListResultTests.java | 12 +- .../ReservationSummaryInnerTests.java | 10 +- .../ReservationSummaryPropertiesTests.java | 10 +- .../ReservationTransactionInnerTests.java | 10 +- .../ReservationTransactionResourceTests.java | 23 - ...sactionsListByBillingProfileMockTests.java | 10 +- .../ReservationTransactionsListMockTests.java | 14 +- ...eservationTransactionsListResultTests.java | 12 +- ...servationOrderAndReservationMockTests.java | 10 +- ...etailsListByReservationOrderMockTests.java | 10 +- .../ReservationsDetailsListMockTests.java | 11 +- ...servationOrderAndReservationMockTests.java | 10 +- ...mariesListByReservationOrderMockTests.java | 11 +- .../ReservationsSummariesListMockTests.java | 12 +- .../generated/ResourceAttributesTests.java | 22 - .../generated/SavingsPlanTests.java | 18 + .../generated/SkuPropertyTests.java | 10 +- .../generated/UsageDetailInnerTests.java | 10 +- .../generated/UsageDetailsListMockTests.java | 10 +- .../UsageDetailsListResultTests.java | 12 +- .../tsp-location.yaml | 4 + 383 files changed, 7898 insertions(+), 8045 deletions(-) create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/OperationStatusInner.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/PricesheetDownloadProperties.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/OperationStatusImpl.java rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/BudgetsListResult.java (87%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/Events.java (86%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/Lots.java (82%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/MarketplacesListResult.java (87%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/ModernReservationTransactionsListResult.java (88%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/OperationListResult.java (88%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/ReservationDetailsListResult.java (87%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/ReservationRecommendationsListResult.java (89%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/ReservationSummariesListResult.java (87%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/ReservationTransactionsListResult.java (87%) rename sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/{ => implementation}/models/UsageDetailsListResult.java (87%) create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyManagementGroupScopeReservationRecommendationProperties.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/LegacyReservationTransaction.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ModernManagementGroupScopeReservationRecommendationProperties.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationStatus.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OperationStatusType.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/OrganizationType.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationRecommendationDetailsProjectedUsageProperties.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ReservationTransactionResource.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/ResourceAttributes.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/models/SavingsPlan.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/resources/META-INF/azure-resourcemanager-consumption_metadata.json create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/main/resources/azure-resourcemanager-consumption.properties create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/samples/java/com/azure/resourcemanager/consumption/generated/PriceSheetDownloadByBillingAccountPeriodSamples.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/BudgetsCreateOrUpdateWithResponseMockTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/LegacyManagementGroupScopeReservationRecommendationPropertiesTests.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/LegacyReservationTransactionTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/ModernManagementGroupScopeReservationRecommendationPropertiesTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/OperationStatusInnerTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/PriceSheetsDownloadByBillingAccountPeriodMockTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/PricesheetDownloadPropertiesTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/ReservationRecommendationDetailsProjectedUsagePropertiesTests.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/ReservationTransactionResourceTests.java delete mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/ResourceAttributesTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/src/test/java/com/azure/resourcemanager/consumption/generated/SavingsPlanTests.java create mode 100644 sdk/consumption/azure-resourcemanager-consumption/tsp-location.yaml diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index eac33d616ea06..70b9b9f671996 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -343,7 +343,7 @@ com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.3;1.0.0-b com.azure.resourcemanager:azure-resourcemanager-azurestack;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azurestackhci;1.1.0;1.2.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-avs;1.4.0;1.5.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0;1.1.0 com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.3;1.0.0-beta.4 com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0;1.1.0-beta.1 diff --git a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md index 4304d271b6c3a..9cac86e0f3162 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md +++ b/sdk/consumption/azure-resourcemanager-consumption/CHANGELOG.md @@ -1,14 +1,447 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0 (2026-08-14) -### Features Added +- Azure Resource Manager Consumption client library for Java. This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package api-version 2026-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.MarketplacesListResult` was removed + +#### `models.BudgetsListResult` was removed + +#### `models.OperationListResult` was removed + +#### `models.ReservationDetailsListResult` was removed + +#### `models.LegacyReservationTransaction` was removed + +#### `models.Events` was removed + +#### `models.ResourceAttributes` was removed + +#### `models.ReservationRecommendationsListResult` was removed + +#### `models.UsageDetailsListResult` was removed + +#### `models.ModernReservationTransactionsListResult` was removed + +#### `models.ReservationTransactionResource` was removed + +#### `models.ReservationTransactionsListResult` was removed + +#### `models.Lots` was removed + +#### `models.ReservationSummariesListResult` was removed + +#### `models.ForecastSpend` was modified + +* `ForecastSpend()` was changed to private access +* `validate()` was removed + +#### `models.ReservationRecommendationDetailsUsageProperties` was modified + +* `ReservationRecommendationDetailsUsageProperties()` was changed to private access +* `validate()` was removed + +#### `models.BudgetTimePeriod` was modified + +* `validate()` was removed + +#### `models.ModernChargeSummary` was modified + +* `ModernChargeSummary()` was changed to private access +* `withEtag(java.lang.String)` was removed +* `validate()` was removed + +#### `models.ModernSingleScopeReservationRecommendationProperties` was modified + +* `ModernSingleScopeReservationRecommendationProperties()` was changed to private access +* `java.util.UUID subscriptionId()` -> `java.lang.String subscriptionId()` +* `validate()` was removed + +#### `models.ModernReservationTransaction` was modified + +* `java.util.UUID purchasingSubscriptionGuid()` -> `java.lang.String purchasingSubscriptionGuid()` + +#### `models.ChargeSummary` was modified + +* `validate()` was removed +* `models.ChargeSummary withEtag(java.lang.String)` -> `models.ChargeSummary withEtag(java.lang.String)` + +#### `models.ReservationRecommendationDetailsSavingsProperties` was modified + +* `ReservationRecommendationDetailsSavingsProperties()` was changed to private access +* `java.lang.Float recommendedQuantity()` -> `java.lang.Double recommendedQuantity()` +* `withCalculatedSavings(java.util.List)` was removed +* `validate()` was removed + +#### `models.BudgetFilter` was modified + +* `validate()` was removed + +#### `models.BalancePropertiesAdjustmentDetailsItem` was modified + +* `BalancePropertiesAdjustmentDetailsItem()` was changed to private access +* `validate()` was removed + +#### `models.MeterDetails` was modified + +* `MeterDetails()` was changed to private access +* `validate()` was removed + +#### `models.Amount` was modified + +* `validate()` was removed + +#### `models.ModernSharedScopeReservationRecommendationProperties` was modified + +* `ModernSharedScopeReservationRecommendationProperties()` was changed to private access +* `validate()` was removed + +#### `models.LegacyUsageDetail` was modified + +* `LegacyUsageDetail()` was changed to private access +* `java.util.UUID meterId()` -> `java.lang.String meterId()` +* `validate()` was removed + +#### `models.LookBackPeriod` was modified + +* `LAST7DAYS` was removed + +#### `models.PriceSheetProperties` was modified + +* `PriceSheetProperties()` was changed to private access +* `java.util.UUID meterId()` -> `java.lang.String meterId()` +* `validate()` was removed + +#### `models.ModernUsageDetail` was modified + +* `ModernUsageDetail()` was changed to private access +* `validate()` was removed +* `java.util.UUID meterId()` -> `java.lang.String meterId()` + +#### `models.BudgetFilterProperties` was modified + +* `validate()` was removed + +#### `models.LegacyChargeSummary` was modified + +* `LegacyChargeSummary()` was changed to private access +* `validate()` was removed +* `withEtag(java.lang.String)` was removed + +#### `models.ReservationRecommendationDetails` was modified + +* `getWithResponse(java.lang.String,models.Scope,java.lang.String,models.Term,models.LookBackPeriod,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.ReservationRecommendationDetailsResourceProperties` was modified + +* `ReservationRecommendationDetailsResourceProperties()` was changed to private access +* `java.lang.Float onDemandRate()` -> `java.lang.Double onDemandRate()` +* `java.lang.Float reservationRate()` -> `java.lang.Double reservationRate()` +* `validate()` was removed + +#### `models.AmountWithExchangeRate` was modified + +* `AmountWithExchangeRate()` was changed to private access +* `validate()` was removed + +#### `models.SkuProperty` was modified + +* `SkuProperty()` was changed to private access +* `validate()` was removed + +#### `models.MeterDetailsResponse` was modified + +* `MeterDetailsResponse()` was changed to private access +* `validate()` was removed + +#### `models.BalancePropertiesNewPurchasesDetailsItem` was modified + +* `BalancePropertiesNewPurchasesDetailsItem()` was changed to private access +* `validate()` was removed + +#### `models.LegacySharedScopeReservationRecommendationProperties` was modified + +* `LegacySharedScopeReservationRecommendationProperties()` was changed to private access +* `validate()` was removed + +#### `models.BudgetComparisonExpression` was modified + +* `validate()` was removed + +#### `models.CreditBalanceSummary` was modified + +* `CreditBalanceSummary()` was changed to private access +* `validate()` was removed + +#### `models.CurrentSpend` was modified + +* `CurrentSpend()` was changed to private access +* `validate()` was removed + +#### `models.ReservationRecommendationDetailsCalculatedSavingsProperties` was modified + +* `ReservationRecommendationDetailsCalculatedSavingsProperties()` was changed to private access +* `java.lang.Float reservationCost()` -> `java.lang.Double reservationCost()` +* `java.lang.Float reservedUnitCount()` -> `java.lang.Double reservedUnitCount()` +* `java.lang.Float overageCost()` -> `java.lang.Double overageCost()` +* `withReservedUnitCount(java.lang.Float)` was removed +* `java.lang.Float quantity()` -> `java.lang.Double quantity()` +* `java.lang.Float onDemandCost()` -> `java.lang.Double onDemandCost()` +* `java.lang.Float totalReservationCost()` -> `java.lang.Double totalReservationCost()` +* `validate()` was removed +* `java.lang.Float savings()` -> `java.lang.Double savings()` + +#### `models.Marketplace` was modified + +* `java.util.UUID meterId()` -> `java.lang.String meterId()` +* `java.util.UUID subscriptionGuid()` -> `java.lang.String subscriptionGuid()` + +#### `models.LegacyReservationRecommendation` was modified + +* `LegacyReservationRecommendation()` was changed to private access +* `validate()` was removed +* `withProperties(models.LegacyReservationRecommendationProperties)` was removed + +#### `models.Reseller` was modified + +* `Reseller()` was changed to private access +* `validate()` was removed + +#### `models.Notification` was modified + +* `validate()` was removed + +#### `models.ReservationTransactions` was modified + +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.ReservationTransaction` was modified + +* `java.util.UUID purchasingSubscriptionGuid()` -> `java.lang.String purchasingSubscriptionGuid()` + +#### `models.Datagrain` was modified + +* `DAILY` was removed +* `MONTHLY` was removed + +#### `models.ModernReservationRecommendationProperties` was modified + +* `java.util.UUID meterId()` -> `java.lang.String meterId()` +* `java.lang.Float instanceFlexibilityRatio()` -> `java.lang.Double instanceFlexibilityRatio()` +* `validate()` was removed +* `java.lang.Float recommendedQuantityNormalized()` -> `java.lang.Double recommendedQuantityNormalized()` + +#### `models.ModernReservationRecommendation` was modified + +* `ModernReservationRecommendation()` was changed to private access +* `withProperties(models.ModernReservationRecommendationProperties)` was removed +* `validate()` was removed + +#### `models.LegacySingleScopeReservationRecommendationProperties` was modified + +* `LegacySingleScopeReservationRecommendationProperties()` was changed to private access +* `validate()` was removed +* `java.util.UUID subscriptionId()` -> `java.lang.String subscriptionId()` + +#### `models.Tag` was modified + +* `Tag()` was changed to private access +* `validate()` was removed +* `withValue(java.util.List)` was removed +* `withKey(java.lang.String)` was removed + +#### `models.Metrictype` was modified + +* `USAGE` was removed +* `AMORTIZEDCOST` was removed +* `ACTUALCOST` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `validate()` was removed + +#### `models.LegacyReservationRecommendationProperties` was modified + +* `validate()` was removed +* `java.lang.Float instanceFlexibilityRatio()` -> `java.lang.Double instanceFlexibilityRatio()` +* `java.util.UUID meterId()` -> `java.lang.String meterId()` +* `java.lang.Float recommendedQuantityNormalized()` -> `java.lang.Double recommendedQuantityNormalized()` + +### Features Added + +* `models.SavingsPlan` was added + +* `models.LegacyManagementGroupScopeReservationRecommendationProperties` was added + +* `models.ModernManagementGroupScopeReservationRecommendationProperties` was added + +* `models.OrganizationType` was added + +* `models.OperationStatus` was added + +* `models.OperationStatusType` was added + +* `models.ReservationRecommendationDetailsProjectedUsageProperties` was added + +#### `models.ModernChargeSummary` was modified + +* `systemData()` was added +* `etag()` was added + +#### `models.ReservationSummary` was modified + +* `systemData()` was added + +#### `models.LotSummary` was modified + +* `systemData()` was added +* `organizationType()` was added +* `isEstimatedBalance()` was added +* `usedAmount()` was added + +#### `models.ModernReservationTransaction` was modified + +* `systemData()` was added + +#### `models.ChargeSummary` was modified + +* `systemData()` was added + +#### `models.Term` was modified + +* `P1M` was added + +#### `models.LegacyUsageDetail` was modified + +* `systemData()` was added + +#### `models.LookBackPeriod` was modified + +* `LAST07DAYS` was added + +#### `models.PriceSheetProperties` was modified + +* `savingsPlan()` was added + +#### `models.ModernUsageDetail` was modified + +* `systemData()` was added + +#### `models.LegacyChargeSummary` was modified + +* `etag()` was added +* `systemData()` was added + +#### `models.ReservationRecommendationDetails` was modified + +* `getWithResponse(java.lang.String,models.Scope,java.lang.String,models.Term,models.LookBackPeriod,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.Balance` was modified + +* `systemData()` was added +* `overageRefund()` was added + +#### `models.EventSummary` was modified + +* `systemData()` was added +* `billingAccountId()` was added +* `billingAccountDisplayName()` was added +* `isEstimatedBalance()` was added + +#### `models.ReservationDetail` was modified + +* `systemData()` was added + +#### `models.PriceSheetResult` was modified + +* `systemData()` was added + +#### `models.ReservationRecommendation` was modified + +* `systemData()` was added + +#### `models.Marketplace` was modified + +* `systemData()` was added + +#### `models.Budget` was modified + +* `systemData()` was added + +#### `models.LegacyReservationRecommendation` was modified + +* `systemData()` was added + +#### `models.ReservationTransactions` was modified + +* `list(java.lang.String,java.lang.String,java.lang.Boolean,java.math.BigDecimal,com.azure.core.util.Context)` was added + +#### `models.ManagementGroupAggregatedCostResult` was modified + +* `systemData()` was added + +#### `models.ReservationTransaction` was modified + +* `systemData()` was added + +#### `models.Datagrain` was modified + +* `DAILY_GRAIN` was added +* `MONTHLY_GRAIN` was added + +#### `models.ModernReservationRecommendationProperties` was modified + +* `lastUsageDate()` was added +* `totalHours()` was added + +#### `models.TagsResult` was modified + +* `systemData()` was added + +#### `models.Scope` was modified + +* `MANAGEMENT_GROUP` was added + +#### `models.UsageDetail` was modified + +* `systemData()` was added + +#### `models.ModernReservationRecommendation` was modified + +* `systemData()` was added + +#### `models.ReservationRecommendationDetailsModel` was modified + +* `projectedUsage()` was added +* `managementGroupId()` was added +* `tenantId()` was added +* `systemData()` was added + +#### `models.PriceSheets` was modified + +* `downloadByBillingAccountPeriod(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `downloadByBillingAccountPeriod(java.lang.String,java.lang.String)` was added + +#### `models.CreditSummary` was modified + +* `tags()` was added +* `isEstimatedBalance()` was added +* `systemData()` was added + +#### `models.Metrictype` was modified + +* `USAGE_METRIC_TYPE` was added +* `ACTUAL_COST_METRIC_TYPE` was added +* `AMORTIZED_COST_METRIC_TYPE` was added + +#### `models.LegacyReservationRecommendationProperties` was modified -### Other Changes +* `totalHours()` was added +* `lastUsageDate()` was added ## 1.0.0 (2024-12-24) diff --git a/sdk/consumption/azure-resourcemanager-consumption/README.md b/sdk/consumption/azure-resourcemanager-consumption/README.md index 339faa32331ac..4898304df5d37 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/README.md +++ b/sdk/consumption/azure-resourcemanager-consumption/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Consumption client library for Java. -This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Consumption Management SDK. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package api-version 2026-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-consumption - 1.1.0-beta.1 + 1.1.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ConsumptionManager manager = ConsumptionManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md index 7508874cf3ac9..a9b970a539fbe 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md +++ b/sdk/consumption/azure-resourcemanager-consumption/SAMPLE.md @@ -47,6 +47,7 @@ ## PriceSheet +- [DownloadByBillingAccountPeriod](#pricesheet_downloadbybillingaccountperiod) - [Get](#pricesheet_get) - [GetByBillingPeriod](#pricesheet_getbybillingperiod) @@ -90,8 +91,7 @@ */ public final class AggregatedCostGetByManagementGroupSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * AggregatedCostByManagementGroupFilterByDate.json + * x-ms-original-file: 2026-06-01/AggregatedCostByManagementGroupFilterByDate.json */ /** * Sample code: AggregatedCostByManagementGroupFilterByDate. @@ -107,8 +107,7 @@ public final class AggregatedCostGetByManagementGroupSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * AggregatedCostByManagementGroup.json + * x-ms-original-file: 2026-06-01/AggregatedCostByManagementGroup.json */ /** * Sample code: AggregatedCostByManagementGroup. @@ -131,8 +130,7 @@ public final class AggregatedCostGetByManagementGroupSamples { */ public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * AggregatedCostForBillingPeriodByManagementGroup.json + * x-ms-original-file: 2026-06-01/AggregatedCostForBillingPeriodByManagementGroup.json */ /** * Sample code: AggregatedCostListForBillingPeriodByManagementGroup. @@ -156,8 +154,7 @@ public final class AggregatedCostGetForBillingPeriodByManagementGroupSamples { */ public final class BalancesGetByBillingAccountSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * BalancesByBillingAccount.json + * x-ms-original-file: 2026-06-01/BalancesByBillingAccount.json */ /** * Sample code: Balances. @@ -178,8 +175,7 @@ public final class BalancesGetByBillingAccountSamples { */ public final class BalancesGetForBillingPeriodByBillingAccountSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * BalancesByBillingAccountForBillingPeriod.json + * x-ms-original-file: 2026-06-01/BalancesByBillingAccountForBillingPeriod.json */ /** * Sample code: Balances. @@ -218,9 +214,7 @@ import java.util.Map; */ public final class BudgetsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreateOrUpdateBudget. - * json + * x-ms-original-file: 2026-06-01/CreateOrUpdateBudget.json */ /** * Sample code: CreateOrUpdateBudget. @@ -283,8 +277,7 @@ public final class BudgetsCreateOrUpdateSamples { */ public final class BudgetsDeleteSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/DeleteBudget.json + * x-ms-original-file: 2026-06-01/DeleteBudget.json */ /** * Sample code: DeleteBudget. @@ -307,8 +300,7 @@ public final class BudgetsDeleteSamples { */ public final class BudgetsGetSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Budget.json + * x-ms-original-file: 2026-06-01/Budget.json */ /** * Sample code: Budget. @@ -331,8 +323,7 @@ public final class BudgetsGetSamples { */ public final class BudgetsListSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BudgetsList.json + * x-ms-original-file: 2026-06-01/BudgetsList.json */ /** * Sample code: BudgetsList. @@ -353,8 +344,7 @@ public final class BudgetsListSamples { */ public final class ChargesListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingAccount.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccount.json */ /** * Sample code: ChargesListByBillingAccount-Modern. @@ -369,8 +359,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesForBillingPeriodByEnrollmentAccount.json + * x-ms-original-file: 2026-06-01/ChargesForBillingPeriodByEnrollmentAccount.json */ /** * Sample code: ChangesForBillingPeriodByEnrollmentAccount-Legacy. @@ -385,8 +374,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingAccountGroupByCustomerId.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccountGroupByCustomerId.json */ /** * Sample code: ChargesListByBillingAccountGroupByCustomerId-Modern. @@ -401,8 +389,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingProfile.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingProfile.json */ /** * Sample code: ChargesListByBillingProfile-Modern. @@ -417,8 +404,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingProfileInvoiceSection.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingProfileInvoiceSection.json */ /** * Sample code: ChargesListByBillingProfileInvoiceSection-Modern. @@ -434,8 +420,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernCustomer.json + * x-ms-original-file: 2026-06-01/ChargesListByModernCustomer.json */ /** * Sample code: ChargesListByCustomer-Modern. @@ -449,8 +434,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListForDepartmentFilterByStartEndDate.json + * x-ms-original-file: 2026-06-01/ChargesListForDepartmentFilterByStartEndDate.json */ /** * Sample code: ChargesListByDepartment-Legacy. @@ -464,8 +448,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListForEnrollmentAccountFilterByStartEndDate.json + * x-ms-original-file: 2026-06-01/ChargesListForEnrollmentAccountFilterByStartEndDate.json */ /** * Sample code: ChargesListForEnrollmentAccount-Legacy. @@ -480,8 +463,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingProfileGroupByInvoiceSectionId.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json */ /** * Sample code: ChargesListByBillingProfileGroupByInvoiceSectionId-Modern. @@ -497,8 +479,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingAccountGroupByBillingProfileId.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccountGroupByBillingProfileId.json */ /** * Sample code: ChargesListByBillingAccountGroupByBillingProfileId-Modern. @@ -513,8 +494,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernBillingAccountGroupByInvoiceSectionId.json + * x-ms-original-file: 2026-06-01/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json */ /** * Sample code: ChargesListByBillingAccountGroupByInvoiceSectionId-Modern. @@ -530,8 +510,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesForBillingPeriodByDepartment.json + * x-ms-original-file: 2026-06-01/ChargesForBillingPeriodByDepartment.json */ /** * Sample code: ChangesForBillingPeriodByDepartment-Legacy. @@ -546,8 +525,7 @@ public final class ChargesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ChargesListByModernInvoiceSectionId.json + * x-ms-original-file: 2026-06-01/ChargesListByModernInvoiceSectionId.json */ /** * Sample code: ChargesListByInvoiceSectionId-Modern. @@ -571,8 +549,7 @@ public final class ChargesListSamples { */ public final class CreditsGetSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * CreditSummaryByBillingProfile.json + * x-ms-original-file: 2026-06-01/CreditSummaryByBillingProfile.json */ /** * Sample code: CreditSummaryByBillingProfile. @@ -593,8 +570,36 @@ public final class CreditsGetSamples { */ public final class EventsOperationListByBillingAccountSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * EventsGetByBillingAccount.json + * x-ms-original-file: 2026-06-01/EventsGetByBillingAccount-Primary.json + */ + /** + * Sample code: EventsGetByBillingAccount-Primary. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void + eventsGetByBillingAccountPrimary(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.eventsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/EventsGetByBillingAccountWithFilters-Primary.json + */ + /** + * Sample code: EventsGetByBillingAccountWithFilters-Primary. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void + eventsGetByBillingAccountWithFiltersPrimary(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.eventsOperations() + .listByBillingAccount("1234:5678", + "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/EventsGetByBillingAccount.json */ /** * Sample code: EventsGetByBillingAccount. @@ -606,8 +611,7 @@ public final class EventsOperationListByBillingAccountSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * EventsGetByBillingAccountWithFilters.json + * x-ms-original-file: 2026-06-01/EventsGetByBillingAccountWithFilters.json */ /** * Sample code: EventsGetByBillingAccountWithFilters. @@ -621,6 +625,35 @@ public final class EventsOperationListByBillingAccountSamples { "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-06-01/EventsGetByBillingAccountWithFilters-Contributor.json + */ + /** + * Sample code: EventsGetByBillingAccountWithFilters-Contributor.json. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void eventsGetByBillingAccountWithFiltersContributorJson( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.eventsOperations() + .listByBillingAccount("1234:5678", + "lotid eq 'G202001083926600XXXXX' AND lotsource eq 'consumptioncommitment'", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/EventsGetByBillingAccount-Contributor.json + */ + /** + * Sample code: EventsGetByBillingAccount-Contributor. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void + eventsGetByBillingAccountContributor(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.eventsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE); + } } ``` @@ -632,8 +665,7 @@ public final class EventsOperationListByBillingAccountSamples { */ public final class EventsOperationListByBillingProfileSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * EventsListByBillingProfile.json + * x-ms-original-file: 2026-06-01/EventsListByBillingProfile.json */ /** * Sample code: EventsListByBillingProfile. @@ -655,8 +687,20 @@ public final class EventsOperationListByBillingProfileSamples { */ public final class LotsOperationListByBillingAccountSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * LotsListByBillingAccount.json + * x-ms-original-file: 2026-06-01/LotsListByBillingAccount-Primary.json + */ + /** + * Sample code: LotsListByBillingAccount-Primary. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void + lotsListByBillingAccountPrimary(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.lotsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/LotsListByBillingAccount.json */ /** * Sample code: LotsListByBillingAccount. @@ -668,8 +712,7 @@ public final class LotsOperationListByBillingAccountSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * LotsListByBillingAccountWithFilters.json + * x-ms-original-file: 2026-06-01/LotsListByBillingAccountWithFilters.json */ /** * Sample code: LotsListByBillingAccountWithStatusFilter. @@ -682,6 +725,49 @@ public final class LotsOperationListByBillingAccountSamples { .listByBillingAccount("1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-06-01/LotsListByBillingAccount-Contributor.json + */ + /** + * Sample code: LotsListByBillingAccount-Contributor. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void + lotsListByBillingAccountContributor(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.lotsOperations().listByBillingAccount("1234:5678", null, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/LotsListByBillingAccountWithFilters-Primary.json + */ + /** + * Sample code: LotsListByBillingAccountWithStatusFilter-Primary. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void lotsListByBillingAccountWithStatusFilterPrimary( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.lotsOperations() + .listByBillingAccount("1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/LotsListByBillingAccountWithFilters-Contributor.json + */ + /** + * Sample code: LotsListByBillingAccountWithStatusFilter-Contributor. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void lotsListByBillingAccountWithStatusFilterContributor( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.lotsOperations() + .listByBillingAccount("1234:5678", "status eq 'active' AND source eq 'consumptioncommitment'", + com.azure.core.util.Context.NONE); + } } ``` @@ -693,8 +779,7 @@ public final class LotsOperationListByBillingAccountSamples { */ public final class LotsOperationListByBillingProfileSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * LotsListByBillingProfile.json + * x-ms-original-file: 2026-06-01/LotsListByBillingProfile.json */ /** * Sample code: LotsListByBillingProfile. @@ -715,9 +800,7 @@ public final class LotsOperationListByBillingProfileSamples { */ public final class LotsOperationListByCustomerSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByCustomer. - * json + * x-ms-original-file: 2026-06-01/LotsListByCustomer.json */ /** * Sample code: LotsListByCustomer. @@ -729,8 +812,7 @@ public final class LotsOperationListByCustomerSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * LotsListByCustomerWithFilters.json + * x-ms-original-file: 2026-06-01/LotsListByCustomerWithFilters.json */ /** * Sample code: LotsListByCustomerWithFilter. @@ -753,8 +835,7 @@ public final class LotsOperationListByCustomerSamples { */ public final class MarketplacesListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByBillingAccountListForBillingPeriod.json + * x-ms-original-file: 2026-06-01/MarketplacesByBillingAccountListForBillingPeriod.json */ /** * Sample code: BillingAccountMarketplacesListForBillingPeriod. @@ -769,8 +850,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json + * x-ms-original-file: 2026-06-01/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json */ /** * Sample code: EnrollmentAccountMarketplacesListForBillingPeriod. @@ -785,8 +865,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesList.json + * x-ms-original-file: 2026-06-01/MarketplacesList.json */ /** * Sample code: SubscriptionMarketplacesList. @@ -800,8 +879,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByEnrollmentAccountList.json + * x-ms-original-file: 2026-06-01/MarketplacesByEnrollmentAccountList.json */ /** * Sample code: EnrollmentAccountMarketplacesList. @@ -816,8 +894,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByDepartment_ListByBillingPeriod.json + * x-ms-original-file: 2026-06-01/MarketplacesByDepartment_ListByBillingPeriod.json */ /** * Sample code: DepartmentMarketplacesListForBillingPeriod. @@ -831,8 +908,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByManagementGroupList.json + * x-ms-original-file: 2026-06-01/MarketplacesByManagementGroupList.json */ /** * Sample code: ManagementGroupMarketplacesList. @@ -847,8 +923,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesListForBillingPeriod.json + * x-ms-original-file: 2026-06-01/MarketplacesListForBillingPeriod.json */ /** * Sample code: SubscriptionMarketplacesListForBillingPeriod. @@ -863,8 +938,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByDepartmentList.json + * x-ms-original-file: 2026-06-01/MarketplacesByDepartmentList.json */ /** * Sample code: DepartmentMarketplacesList. @@ -877,8 +951,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByManagementGroup_ListForBillingPeriod.json + * x-ms-original-file: 2026-06-01/MarketplacesByManagementGroup_ListForBillingPeriod.json */ /** * Sample code: ManagementGroupMarketplacesListForBillingPeriod. @@ -893,8 +966,7 @@ public final class MarketplacesListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * MarketplacesByBillingAccountList.json + * x-ms-original-file: 2026-06-01/MarketplacesByBillingAccountList.json */ /** * Sample code: BillingAccountMarketplacesList. @@ -918,8 +990,7 @@ public final class MarketplacesListSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/OperationList.json + * x-ms-original-file: 2026-06-01/OperationList.json */ /** * Sample code: OperationList. @@ -932,6 +1003,27 @@ public final class OperationsListSamples { } ``` +### PriceSheet_DownloadByBillingAccountPeriod + +```java +/** + * Samples for PriceSheet DownloadByBillingAccountPeriod. + */ +public final class PriceSheetDownloadByBillingAccountPeriodSamples { + /* + * x-ms-original-file: 2026-06-01/EAPriceSheetForBillingPeriod.json + */ + /** + * Sample code: EAPriceSheetForBillingPeriod. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void eAPriceSheetForBillingPeriod(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.priceSheets().downloadByBillingAccountPeriod("0000000", "202305", com.azure.core.util.Context.NONE); + } +} +``` + ### PriceSheet_Get ```java @@ -940,8 +1032,7 @@ public final class OperationsListSamples { */ public final class PriceSheetGetSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheet.json + * x-ms-original-file: 2026-06-01/PriceSheet.json */ /** * Sample code: PriceSheet. @@ -962,8 +1053,7 @@ public final class PriceSheetGetSamples { */ public final class PriceSheetGetByBillingPeriodSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * PriceSheetForBillingPeriod.json + * x-ms-original-file: 2026-06-01/PriceSheetForBillingPeriod.json */ /** * Sample code: PriceSheetForBillingPeriod. @@ -976,8 +1066,7 @@ public final class PriceSheetGetByBillingPeriodSamples { } /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetExpand.json + * x-ms-original-file: 2026-06-01/PriceSheetExpand.json */ /** * Sample code: PriceSheetExpand. @@ -1003,8 +1092,7 @@ import com.azure.resourcemanager.consumption.models.Term; */ public final class ReservationRecommendationDetailsGetSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationDetailsBySubscription.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsBySubscription.json */ /** * Sample code: ReservationRecommendationsBySubscription-Legacy. @@ -1015,12 +1103,11 @@ public final class ReservationRecommendationDetailsGetSamples { com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationRecommendationDetails() .getWithResponse("subscriptions/00000000-0000-0000-0000-00000000", Scope.SINGLE, "westus", Term.P3Y, - LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", com.azure.core.util.Context.NONE); + LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationDetailsByBillingProfile.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByBillingProfile.json */ /** * Sample code: ReservationRecommendationsByBillingProfile-Modern. @@ -1032,13 +1119,13 @@ public final class ReservationRecommendationDetailsGetSamples { manager.reservationRecommendationDetails() .getWithResponse( "providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-00000000:00000000-0000-0000-0000-00000000/billingProfiles/00000000-0000-0000-0000-00000000", - Scope.SHARED, "australiaeast", Term.P1Y, LookBackPeriod.LAST7DAYS, "Standard_B2s", + Scope.SHARED, "australiaeast", Term.P1Y, LookBackPeriod.LAST07DAYS, "Standard_B2s", + "properties/subscriptionId eq 00000000-0000-0000-0000-00000000", null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationDetailsByResourceGroup.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByResourceGroup.json */ /** * Sample code: ReservationRecommendationsByResourceGroup-Legacy. @@ -1049,12 +1136,27 @@ public final class ReservationRecommendationDetailsGetSamples { com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationRecommendationDetails() .getWithResponse("subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/testGroup", Scope.SINGLE, - "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", com.azure.core.util.Context.NONE); + "westus", Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsPrePurchasePlanBySubscription.json + */ + /** + * Sample code: ReservationRecommendationDetailsPrePurchasePlanBySubscription. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void reservationRecommendationDetailsPrePurchasePlanBySubscription( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.reservationRecommendationDetails() + .getWithResponse("subscriptions/00000000-0000-0000-0000-000000000000", Scope.SINGLE, "westus", Term.P3Y, + LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationDetailsByBillingAccount.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByBillingAccount.json */ /** * Sample code: ReservationRecommendationsByBillingAccount-Legacy. @@ -1064,8 +1166,27 @@ public final class ReservationRecommendationDetailsGetSamples { public static void reservationRecommendationsByBillingAccountLegacy( com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationRecommendationDetails() - .getWithResponse("providers/Microsoft.Billing/billingAccounts/000000", Scope.SHARED, "eastus", Term.P1Y, - LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", com.azure.core.util.Context.NONE); + .getWithResponse("providers/Microsoft.Billing/billingAccounts/00000000", Scope.SHARED, "eastus", Term.P1Y, + LookBackPeriod.LAST60DAYS, "Standard_DS14_v2", + "properties/subscriptionId eq 00000000-0000-0000-0000-00000000", null, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/ReservationRecommendationDetailsByBillingAccountForManagementGroup.json + */ + /** + * Sample code: ReservationRecommendationDetailsByBillingAccountForManagementGroup. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void reservationRecommendationDetailsByBillingAccountForManagementGroup( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.reservationRecommendationDetails() + .getWithResponse("providers/Microsoft.Billing/billingAccounts/00000000", Scope.MANAGEMENT_GROUP, "westus", + Term.P3Y, LookBackPeriod.LAST30DAYS, "Standard_DS13_v2", null, + "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000", + com.azure.core.util.Context.NONE); } } ``` @@ -1078,8 +1199,7 @@ public final class ReservationRecommendationDetailsGetSamples { */ public final class ReservationRecommendationsListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationsBySubscription.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationsBySubscription.json */ /** * Sample code: ReservationRecommendationsBySubscription-Legacy. @@ -1093,8 +1213,7 @@ public final class ReservationRecommendationsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationsByBillingProfile.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingProfile.json */ /** * Sample code: ReservationRecommendationsByBillingProfile-Modern. @@ -1109,8 +1228,7 @@ public final class ReservationRecommendationsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationsByResourceGroup.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationsByResourceGroup.json */ /** * Sample code: ReservationRecommendationsByResourceGroup-Legacy. @@ -1125,8 +1243,7 @@ public final class ReservationRecommendationsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json */ /** * Sample code: ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod-Legacy. @@ -1142,8 +1259,7 @@ public final class ReservationRecommendationsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationRecommendationsByBillingAccount.json + * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingAccount.json */ /** * Sample code: ReservationRecommendationsByBillingAccount-Legacy. @@ -1155,19 +1271,51 @@ public final class ReservationRecommendationsListSamples { manager.reservationRecommendations() .list("providers/Microsoft.Billing/billingAccounts/123456", null, com.azure.core.util.Context.NONE); } + + /* + * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingAccountForManagementGroup.json + */ + /** + * Sample code: ReservationRecommendationsByBillingAccountForManagementGroup. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void reservationRecommendationsByBillingAccountForManagementGroup( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.reservationRecommendations() + .list("providers/Microsoft.Billing/billingAccounts/00000000", + "properties/scope eq 'ManagementGroup' and properties/managementGroupId eq '/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000'", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2026-06-01/ReservationRecommendationsByBillingAccountFilterByScope.json + */ + /** + * Sample code: ReservationRecommendationsByBillingAccountFilterForScope. + * + * @param manager Entry point to ConsumptionManager. + */ + public static void reservationRecommendationsByBillingAccountFilterForScope( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { + manager.reservationRecommendations() + .list("providers/Microsoft.Billing/billingAccounts/123456", "properties/scope eq 'Single'", + com.azure.core.util.Context.NONE); + } } ``` ### ReservationTransactions_List ```java +import java.math.BigDecimal; + /** * Samples for ReservationTransactions List. */ public final class ReservationTransactionsListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationTransactionsListByEnrollmentNumber.json + * x-ms-original-file: 2026-06-01/ReservationTransactionsListByEnrollmentNumber.json */ /** * Sample code: ReservationTransactionsByEnrollmentNumber. @@ -1177,8 +1325,8 @@ public final class ReservationTransactionsListSamples { public static void reservationTransactionsByEnrollmentNumber(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationTransactions() - .list("123456", "properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30", - com.azure.core.util.Context.NONE); + .list("123456", "properties/eventDate ge 2020-05-20 AND properties/eventDate le 2020-05-30", true, + new BigDecimal("15.5"), com.azure.core.util.Context.NONE); } } ``` @@ -1191,8 +1339,7 @@ public final class ReservationTransactionsListSamples { */ public final class ReservationTransactionsListByBillingProfileSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationTransactionsListByBillingProfileId.json + * x-ms-original-file: 2026-06-01/ReservationTransactionsListByBillingProfileId.json */ /** * Sample code: ReservationTransactionsByBillingProfileId. @@ -1218,8 +1365,7 @@ public final class ReservationTransactionsListByBillingProfileSamples { */ public final class ReservationsDetailsListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationDetailsByBillingProfileIdReservationId.json + * x-ms-original-file: 2026-06-01/ReservationDetailsByBillingProfileIdReservationId.json */ /** * Sample code: ReservationDetailsByBillingProfileIdReservationId. @@ -1235,8 +1381,7 @@ public final class ReservationsDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationDetailsByBillingAccountId.json + * x-ms-original-file: 2026-06-01/ReservationDetailsByBillingAccountId.json */ /** * Sample code: ReservationDetailsByBillingAccountId. @@ -1252,8 +1397,7 @@ public final class ReservationsDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationDetailsByBillingProfileId.json + * x-ms-original-file: 2026-06-01/ReservationDetailsByBillingProfileId.json */ /** * Sample code: ReservationDetailsByBillingProfileId. @@ -1277,9 +1421,7 @@ public final class ReservationsDetailsListSamples { */ public final class ReservationsDetailsListByReservationOrderSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetails. - * json + * x-ms-original-file: 2026-06-01/ReservationDetails.json */ /** * Sample code: ReservationDetails. @@ -1303,8 +1445,7 @@ public final class ReservationsDetailsListByReservationOrderSamples { */ public final class ReservationsDetailsListByReservationOrderAndReservationSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationDetailsWithReservationId.json + * x-ms-original-file: 2026-06-01/ReservationDetailsWithReservationId.json */ /** * Sample code: ReservationDetailsWithReservationId. @@ -1332,8 +1473,7 @@ import com.azure.resourcemanager.consumption.models.Datagrain; */ public final class ReservationsSummariesListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesDailyWithBillingAccountId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesDailyWithBillingAccountId.json */ /** * Sample code: ReservationSummariesDailyWithBillingAccountId. @@ -1343,14 +1483,13 @@ public final class ReservationsSummariesListSamples { public static void reservationSummariesDailyWithBillingAccountId( com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .list("providers/Microsoft.Billing/billingAccounts/12345", Datagrain.DAILY, null, null, + .list("providers/Microsoft.Billing/billingAccounts/12345", Datagrain.DAILY_GRAIN, null, null, "properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20", null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesDailyWithBillingProfileId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesDailyWithBillingProfileId.json */ /** * Sample code: ReservationSummariesDailyWithBillingProfileId. @@ -1360,13 +1499,12 @@ public final class ReservationsSummariesListSamples { public static void reservationSummariesDailyWithBillingProfileId( com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .list("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", Datagrain.DAILY, + .list("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", Datagrain.DAILY_GRAIN, "2017-10-01", "2017-11-20", null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesMonthlyWithBillingAccountId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithBillingAccountId.json */ /** * Sample code: ReservationSummariesMonthlyWithBillingAccountId. @@ -1376,13 +1514,12 @@ public final class ReservationsSummariesListSamples { public static void reservationSummariesMonthlyWithBillingAccountId( com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .list("providers/Microsoft.Billing/billingAccounts/12345", Datagrain.MONTHLY, null, null, null, null, null, - com.azure.core.util.Context.NONE); + .list("providers/Microsoft.Billing/billingAccounts/12345", Datagrain.MONTHLY_GRAIN, null, null, null, null, + null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesMonthlyWithBillingProfileId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithBillingProfileId.json */ /** * Sample code: ReservationSummariesMonthlyWithBillingProfileId. @@ -1392,13 +1529,12 @@ public final class ReservationsSummariesListSamples { public static void reservationSummariesMonthlyWithBillingProfileId( com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .list("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", Datagrain.MONTHLY, - null, null, null, null, null, com.azure.core.util.Context.NONE); + .list("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", + Datagrain.MONTHLY_GRAIN, null, null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesMonthlyWithBillingProfileIdReservationId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json */ /** * Sample code: ReservationSummariesMonthlyWithBillingProfileIdReservationId. @@ -1408,9 +1544,9 @@ public final class ReservationsSummariesListSamples { public static void reservationSummariesMonthlyWithBillingProfileIdReservationId( com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .list("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", Datagrain.MONTHLY, - null, null, null, "1c6b6358-709f-484c-85f1-72e862a0cf3b", "9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc", - com.azure.core.util.Context.NONE); + .list("providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579", + Datagrain.MONTHLY_GRAIN, null, null, null, "1c6b6358-709f-484c-85f1-72e862a0cf3b", + "9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc", com.azure.core.util.Context.NONE); } } ``` @@ -1425,8 +1561,7 @@ import com.azure.resourcemanager.consumption.models.Datagrain; */ public final class ReservationsSummariesListByReservationOrderSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesMonthly.json + * x-ms-original-file: 2026-06-01/ReservationSummariesMonthly.json */ /** * Sample code: ReservationSummariesMonthly. @@ -1435,13 +1570,12 @@ public final class ReservationsSummariesListByReservationOrderSamples { */ public static void reservationSummariesMonthly(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .listByReservationOrder("00000000-0000-0000-0000-000000000000", Datagrain.MONTHLY, null, + .listByReservationOrder("00000000-0000-0000-0000-000000000000", Datagrain.MONTHLY_GRAIN, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesDaily.json + * x-ms-original-file: 2026-06-01/ReservationSummariesDaily.json */ /** * Sample code: ReservationSummariesDaily. @@ -1450,7 +1584,7 @@ public final class ReservationsSummariesListByReservationOrderSamples { */ public static void reservationSummariesDaily(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() - .listByReservationOrder("00000000-0000-0000-0000-000000000000", Datagrain.DAILY, + .listByReservationOrder("00000000-0000-0000-0000-000000000000", Datagrain.DAILY_GRAIN, "properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20", com.azure.core.util.Context.NONE); } @@ -1467,8 +1601,7 @@ import com.azure.resourcemanager.consumption.models.Datagrain; */ public final class ReservationsSummariesListByReservationOrderAndReservationSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesDailyWithReservationId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesDailyWithReservationId.json */ /** * Sample code: ReservationSummariesDailyWithReservationId. @@ -1479,14 +1612,13 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp reservationSummariesDailyWithReservationId(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() .listByReservationOrderAndReservation("00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", Datagrain.DAILY, + "00000000-0000-0000-0000-000000000000", Datagrain.DAILY_GRAIN, "properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * ReservationSummariesMonthlyWithReservationId.json + * x-ms-original-file: 2026-06-01/ReservationSummariesMonthlyWithReservationId.json */ /** * Sample code: ReservationSummariesMonthlyWithReservationId. @@ -1497,7 +1629,8 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp reservationSummariesMonthlyWithReservationId(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.reservationsSummaries() .listByReservationOrderAndReservation("00000000-0000-0000-0000-000000000000", - "00000000-0000-0000-0000-000000000000", Datagrain.MONTHLY, null, com.azure.core.util.Context.NONE); + "00000000-0000-0000-0000-000000000000", Datagrain.MONTHLY_GRAIN, null, + com.azure.core.util.Context.NONE); } } ``` @@ -1510,8 +1643,7 @@ public final class ReservationsSummariesListByReservationOrderAndReservationSamp */ public final class TagsGetSamples { /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Tags.json + * x-ms-original-file: 2026-06-01/Tags.json */ /** * Sample code: Tags_Get. @@ -1536,8 +1668,7 @@ import com.azure.resourcemanager.consumption.models.Metrictype; */ public final class UsageDetailsListSamples { /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListForBillingPeriodByBillingAccount.json + * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByBillingAccount.json */ /** * Sample code: BillingAccountUsageDetailsListForBillingPeriod-Legacy. @@ -1552,8 +1683,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMCAInvoiceSection.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMCAInvoiceSection.json */ /** * Sample code: InvoiceSectionUsageDetailsList-Modern. @@ -1568,8 +1698,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsList.json + * x-ms-original-file: 2026-06-01/UsageDetailsList.json */ /** * Sample code: UsageDetailsList-Legacy. @@ -1583,8 +1712,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListFilterByTag.json + * x-ms-original-file: 2026-06-01/UsageDetailsListFilterByTag.json */ /** * Sample code: UsageDetailsListFilterByTag-Legacy. @@ -1599,8 +1727,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByBillingAccount.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByBillingAccount.json */ /** * Sample code: BillingAccountUsageDetailsList-Legacy. @@ -1615,8 +1742,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMCABillingProfile.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMCABillingProfile.json */ /** * Sample code: BillingProfileUsageDetailsList-Modern. @@ -1631,8 +1757,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListForBillingPeriodByDepartment.json + * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByDepartment.json */ /** * Sample code: DepartmentUsageDetailsListForBillingPeriod-Legacy. @@ -1647,8 +1772,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListForBillingPeriodByManagementGroup.json + * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByManagementGroup.json */ /** * Sample code: ManagementGroupUsageDetailsListForBillingPeriod-Legacy. @@ -1663,8 +1787,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMetricAmortizedCost.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMetricAmortizedCost.json */ /** * Sample code: UsageDetailsListByMetricAmortizedCost-Legacy. @@ -1675,12 +1798,11 @@ public final class UsageDetailsListSamples { usageDetailsListByMetricAmortizedCostLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.usageDetails() .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, - Metrictype.AMORTIZEDCOST, com.azure.core.util.Context.NONE); + Metrictype.AMORTIZED_COST_METRIC_TYPE, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMetricUsage.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMetricUsage.json */ /** * Sample code: UsageDetailsListByMetricUsage-Legacy. @@ -1690,13 +1812,12 @@ public final class UsageDetailsListSamples { public static void usageDetailsListByMetricUsageLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.usageDetails() - .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, Metrictype.USAGE, - com.azure.core.util.Context.NONE); + .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, + Metrictype.USAGE_METRIC_TYPE, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByManagementGroup.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByManagementGroup.json */ /** * Sample code: ManagementGroupUsageDetailsList-Legacy. @@ -1711,8 +1832,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByDepartment.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByDepartment.json */ /** * Sample code: DepartmentUsageDetailsList-Legacy. @@ -1727,8 +1847,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMetricActualCost.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMetricActualCost.json */ /** * Sample code: UsageDetailsListByMetricActualCost-Legacy. @@ -1738,13 +1857,12 @@ public final class UsageDetailsListSamples { public static void usageDetailsListByMetricActualCostLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.usageDetails() - .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, Metrictype.ACTUALCOST, - com.azure.core.util.Context.NONE); + .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, + Metrictype.ACTUAL_COST_METRIC_TYPE, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByEnrollmentAccount.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByEnrollmentAccount.json */ /** * Sample code: EnrollmentAccountUsageDetailsList-Legacy. @@ -1759,8 +1877,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMCABillingAccount.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMCABillingAccount.json */ /** * Sample code: BillingAccountUsageDetailsList-Modern. @@ -1775,8 +1892,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListByMCACustomer.json + * x-ms-original-file: 2026-06-01/UsageDetailsListByMCACustomer.json */ /** * Sample code: CustomerUsageDetailsList-Modern. @@ -1792,9 +1908,7 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: - * specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsExpand. - * json + * x-ms-original-file: 2026-06-01/UsageDetailsExpand.json */ /** * Sample code: UsageDetailsExpand-Legacy. @@ -1808,34 +1922,32 @@ public final class UsageDetailsListSamples { } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListForBillingPeriodByEnrollmentAccount.json + * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriod.json */ /** - * Sample code: EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy. + * Sample code: UsageDetailsListForBillingPeriod-Legacy. * * @param manager Entry point to ConsumptionManager. */ - public static void enrollmentAccountUsageDetailsListForBillingPeriodLegacy( - com.azure.resourcemanager.consumption.ConsumptionManager manager) { + public static void + usageDetailsListForBillingPeriodLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.usageDetails() - .list("providers/Microsoft.Billing/EnrollmentAccounts/1234", null, null, null, null, null, + .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ - * UsageDetailsListForBillingPeriod.json + * x-ms-original-file: 2026-06-01/UsageDetailsListForBillingPeriodByEnrollmentAccount.json */ /** - * Sample code: UsageDetailsListForBillingPeriod-Legacy. + * Sample code: EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy. * * @param manager Entry point to ConsumptionManager. */ - public static void - usageDetailsListForBillingPeriodLegacy(com.azure.resourcemanager.consumption.ConsumptionManager manager) { + public static void enrollmentAccountUsageDetailsListForBillingPeriodLegacy( + com.azure.resourcemanager.consumption.ConsumptionManager manager) { manager.usageDetails() - .list("subscriptions/00000000-0000-0000-0000-000000000000", null, null, null, null, null, + .list("providers/Microsoft.Billing/EnrollmentAccounts/1234", null, null, null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml index b9fc52e3b4842..79cb47dc54ef1 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/pom.xml +++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-consumption - 1.1.0-beta.1 + 1.1.0 jar Microsoft Azure SDK for Consumption Management - This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package tag package-2021-10. + This package contains Microsoft Azure SDK for Consumption Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. Package api-version 2026-06-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + false diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java index 598132d35f3aa..f089e39689cc8 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/ConsumptionManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption; @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.consumption.fluent.ConsumptionManagementClient; import com.azure.resourcemanager.consumption.implementation.AggregatedCostsImpl; @@ -63,6 +64,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -71,12 +73,18 @@ * Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions. */ public final class ConsumptionManager { - private UsageDetails usageDetails; + private Operations operations; - private Marketplaces marketplaces; + private PriceSheets priceSheets; private Budgets budgets; + private Credits credits; + + private UsageDetails usageDetails; + + private Marketplaces marketplaces; + private Tags tags; private Charges charges; @@ -93,18 +101,12 @@ public final class ConsumptionManager { private ReservationTransactions reservationTransactions; - private PriceSheets priceSheets; - - private Operations operations; - private AggregatedCosts aggregatedCosts; private EventsOperations eventsOperations; private LotsOperations lotsOperations; - private Credits credits; - private final ConsumptionManagementClient clientObject; private ConsumptionManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -157,6 +159,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-consumption.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -264,12 +269,14 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.consumption") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -316,27 +323,27 @@ public ConsumptionManager authenticate(TokenCredential credential, AzureProfile } /** - * Gets the resource collection API of UsageDetails. + * Gets the resource collection API of Operations. * - * @return Resource collection API of UsageDetails. + * @return Resource collection API of Operations. */ - public UsageDetails usageDetails() { - if (this.usageDetails == null) { - this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this); + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); } - return usageDetails; + return operations; } /** - * Gets the resource collection API of Marketplaces. + * Gets the resource collection API of PriceSheets. * - * @return Resource collection API of Marketplaces. + * @return Resource collection API of PriceSheets. */ - public Marketplaces marketplaces() { - if (this.marketplaces == null) { - this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this); + public PriceSheets priceSheets() { + if (this.priceSheets == null) { + this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this); } - return marketplaces; + return priceSheets; } /** @@ -351,6 +358,42 @@ public Budgets budgets() { return budgets; } + /** + * Gets the resource collection API of Credits. + * + * @return Resource collection API of Credits. + */ + public Credits credits() { + if (this.credits == null) { + this.credits = new CreditsImpl(clientObject.getCredits(), this); + } + return credits; + } + + /** + * Gets the resource collection API of UsageDetails. + * + * @return Resource collection API of UsageDetails. + */ + public UsageDetails usageDetails() { + if (this.usageDetails == null) { + this.usageDetails = new UsageDetailsImpl(clientObject.getUsageDetails(), this); + } + return usageDetails; + } + + /** + * Gets the resource collection API of Marketplaces. + * + * @return Resource collection API of Marketplaces. + */ + public Marketplaces marketplaces() { + if (this.marketplaces == null) { + this.marketplaces = new MarketplacesImpl(clientObject.getMarketplaces(), this); + } + return marketplaces; + } + /** * Gets the resource collection API of Tags. * @@ -450,30 +493,6 @@ public ReservationTransactions reservationTransactions() { return reservationTransactions; } - /** - * Gets the resource collection API of PriceSheets. - * - * @return Resource collection API of PriceSheets. - */ - public PriceSheets priceSheets() { - if (this.priceSheets == null) { - this.priceSheets = new PriceSheetsImpl(clientObject.getPriceSheets(), this); - } - return priceSheets; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of AggregatedCosts. * @@ -510,18 +529,6 @@ public LotsOperations lotsOperations() { return lotsOperations; } - /** - * Gets the resource collection API of Credits. - * - * @return Resource collection API of Credits. - */ - public Credits credits() { - if (this.credits == null) { - this.credits = new CreditsImpl(clientObject.getCredits(), this); - } - return credits; - } - /** * Gets wrapped service client ConsumptionManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java index 6bf61ca519550..0ddf182937ed5 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/AggregatedCostsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -17,10 +17,9 @@ public interface AggregatedCostsClient { /** * Provides the aggregate cost of a management group and all child management groups by current billing period. * - * @param managementGroupId Azure Management Group ID. - * @param filter May be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc - * time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or - * 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). + * @param managementGroupId Order Id of the reservation. + * @param filter Required only for daily grain. The properties/UsageDate for start date and end date. The filter + * supports 'le' and 'ge'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -34,7 +33,7 @@ Response getByManagementGroupWithRespo /** * Provides the aggregate cost of a management group and all child management groups by current billing period. * - * @param managementGroupId Azure Management Group ID. + * @param managementGroupId Order Id of the reservation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -46,7 +45,7 @@ Response getByManagementGroupWithRespo /** * Provides the aggregate cost of a management group and all child management groups by specified billing period. * - * @param managementGroupId Azure Management Group ID. + * @param managementGroupId Order Id of the reservation. * @param billingPeriodName Billing Period Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,7 +60,7 @@ Response getForBillingPeriodByManageme /** * Provides the aggregate cost of a management group and all child management groups by specified billing period. * - * @param managementGroupId Azure Management Group ID. + * @param managementGroupId Order Id of the reservation. * @param billingPeriodName Billing Period Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java index 0e8cc73c081cf..41edd275676c2 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BalancesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java index 2d81f64659bc9..04302c2a8f420 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/BudgetsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -15,65 +15,10 @@ * An instance of this class provides access to all the operations defined in BudgetsClient. */ public interface BudgetsClient { - /** - * Lists all budgets for the defined scope. - * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing budgets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope); - - /** - * Lists all budgets for the defined scope. - * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of listing budgets as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String scope, Context context); - /** * Gets the budget for the scope by budget name. * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param budgetName Budget Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,17 +32,7 @@ public interface BudgetsClient { /** * Gets the budget for the scope by budget name. * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param budgetName Budget Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,17 +47,7 @@ public interface BudgetsClient { * concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put * operation. * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param context The context to associate with this operation. @@ -140,17 +65,7 @@ Response createOrUpdateWithResponse(String scope, String budgetName * concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put * operation. * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,17 +79,7 @@ Response createOrUpdateWithResponse(String scope, String budgetName /** * The operation to delete a budget. * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param budgetName Budget Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -188,17 +93,7 @@ Response createOrUpdateWithResponse(String scope, String budgetName /** * The operation to delete a budget. * - * @param scope The scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for - * invoiceSection scope. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param budgetName Budget Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -206,4 +101,29 @@ Response createOrUpdateWithResponse(String scope, String budgetName */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String scope, String budgetName); + + /** + * Lists all budgets for the defined scope. + * + * @param scope The fully qualified Azure Resource manager identifier of the resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing budgets as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String scope); + + /** + * Lists all budgets for the defined scope. + * + * @param scope The fully qualified Azure Resource manager identifier of the resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of listing budgets as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String scope, Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java index 93f311441dd96..0aa84c4181670 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ChargesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -17,21 +17,7 @@ public interface ChargesClient { /** * Lists the charges based for the defined scope. * - * @param scope The scope associated with charges operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for - * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope - * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at - * department scope use - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. - * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - * billingAccount scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - * for invoiceSection scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param startDate Start date. * @param endDate End date. * @param filter May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). @@ -53,21 +39,7 @@ Response listWithResponse(String scope, String startDate /** * Lists the charges based for the defined scope. * - * @param scope The scope associated with charges operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for - * EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope - * using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at - * department scope use - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. - * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - * billingAccount scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - * for invoiceSection scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java index 9d4e04161fbf0..7198102208001 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ConsumptionManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -12,26 +12,26 @@ */ public interface ConsumptionManagementClient { /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -47,18 +47,18 @@ public interface ConsumptionManagementClient { Duration getDefaultPollInterval(); /** - * Gets the UsageDetailsClient object to access its operations. + * Gets the OperationsClient object to access its operations. * - * @return the UsageDetailsClient object. + * @return the OperationsClient object. */ - UsageDetailsClient getUsageDetails(); + OperationsClient getOperations(); /** - * Gets the MarketplacesClient object to access its operations. + * Gets the PriceSheetsClient object to access its operations. * - * @return the MarketplacesClient object. + * @return the PriceSheetsClient object. */ - MarketplacesClient getMarketplaces(); + PriceSheetsClient getPriceSheets(); /** * Gets the BudgetsClient object to access its operations. @@ -67,6 +67,27 @@ public interface ConsumptionManagementClient { */ BudgetsClient getBudgets(); + /** + * Gets the CreditsClient object to access its operations. + * + * @return the CreditsClient object. + */ + CreditsClient getCredits(); + + /** + * Gets the UsageDetailsClient object to access its operations. + * + * @return the UsageDetailsClient object. + */ + UsageDetailsClient getUsageDetails(); + + /** + * Gets the MarketplacesClient object to access its operations. + * + * @return the MarketplacesClient object. + */ + MarketplacesClient getMarketplaces(); + /** * Gets the TagsClient object to access its operations. * @@ -123,20 +144,6 @@ public interface ConsumptionManagementClient { */ ReservationTransactionsClient getReservationTransactions(); - /** - * Gets the PriceSheetsClient object to access its operations. - * - * @return the PriceSheetsClient object. - */ - PriceSheetsClient getPriceSheets(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - /** * Gets the AggregatedCostsClient object to access its operations. * @@ -157,11 +164,4 @@ public interface ConsumptionManagementClient { * @return the LotsOperationsClient object. */ LotsOperationsClient getLotsOperations(); - - /** - * Gets the CreditsClient object to access its operations. - * - * @return the CreditsClient object. - */ - CreditsClient getCredits(); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java index 5d7990e373e3b..098f1e3ba9e8a 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/CreditsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java index 7a5b5cfb072dd..283b01b8a242d 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/EventsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java index 606ef1d8020ac..ca0e700ec7d55 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/LotsOperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java index 1e84c1962e60d..f8ecb310af47d 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/MarketplacesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -18,15 +18,7 @@ public interface MarketplacesClient { * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, * 2014 or later. * - * @param scope The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' - * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account - * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, - * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For - * subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing - * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify - * billing period at department scope use - * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -39,15 +31,7 @@ public interface MarketplacesClient { * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, * 2014 or later. * - * @param scope The scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' - * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account - * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, - * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For - * subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing - * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify - * billing period at department scope use - * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param filter May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc * time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', * 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java index f3c685991cc8b..b10c80bffab68 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Lists all of the available consumption REST API operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,7 +25,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all of the available consumption REST API operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java index e7abf9164225c..bbb98dde1abf1 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/PriceSheetsClient.java @@ -1,19 +1,56 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.consumption.fluent.models.OperationStatusInner; import com.azure.resourcemanager.consumption.fluent.models.PriceSheetResultInner; /** * An instance of this class provides access to all the operations defined in PriceSheetsClient. */ public interface PriceSheetsClient { + /** + * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only + * for May 1, 2014 or later. + * + * @param billingPeriodName Billing Period Name. + * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields + * are not included when returning price sheet. + * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response + * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies + * a starting point to use for subsequent calls. + * @param top May be used to limit the number of results to the top N results. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByBillingPeriodWithResponse(String billingPeriodName, String expand, + String skiptoken, Integer top, Context context); + + /** + * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only + * for May 1, 2014 or later. + * + * @param billingPeriodName Billing Period Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the price sheet for a scope by subscriptionId and billing period. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PriceSheetResultInner getByBillingPeriod(String billingPeriodName); + /** * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * @@ -43,36 +80,59 @@ public interface PriceSheetsClient { PriceSheetResultInner get(); /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only - * for May 1, 2014 or later. + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id. * + * @param billingAccountId BillingAccount ID. + * @param billingPeriodName Billing Period Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the status of the long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusInner> + beginDownloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName); + + /** + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id. + * + * @param billingAccountId BillingAccount ID. * @param billingPeriodName Billing Period Name. - * @param expand May be used to expand the properties/meterDetails within a price sheet. By default, these fields - * are not included when returning price sheet. - * @param skiptoken Skiptoken is only used if a previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies - * a starting point to use for subsequent calls. - * @param top May be used to limit the number of results to the top N results. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period along with {@link Response}. + * @return the {@link SyncPoller} for polling of the status of the long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationStatusInner> + beginDownloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName, Context context); + + /** + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id. + * + * @param billingAccountId BillingAccount ID. + * @param billingPeriodName Billing Period Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of the long running operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByBillingPeriodWithResponse(String billingPeriodName, String expand, - String skiptoken, Integer top, Context context); + OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName); /** - * Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only - * for May 1, 2014 or later. + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id. * + * @param billingAccountId BillingAccount ID. * @param billingPeriodName Billing Period Name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the price sheet for a scope by subscriptionId and billing period. + * @return the status of the long running operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - PriceSheetResultInner getByBillingPeriod(String billingPeriodName); + OperationStatusInner downloadByBillingAccountPeriod(String billingAccountId, String billingPeriodName, + Context context); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java index 83291fbf99313..660d6ceac41bf 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationDetailsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -32,6 +32,10 @@ public interface ReservationRecommendationDetailsClient { * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. * @param product Filter the products for which reservation recommendation results are generated. Examples: * Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks). + * @param filter Used to filter reservation recommendation details by: properties/subscriptionId can be specified + * for billing account and billing profile paths. + * @param managementGroupId Specify the management group ID. Required when recommendation scope is + * 'ManagementGroup'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -40,7 +44,8 @@ public interface ReservationRecommendationDetailsClient { */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse(String resourceScope, Scope scope, - String region, Term term, LookBackPeriod lookBackPeriod, String product, Context context); + String region, Term term, LookBackPeriod lookBackPeriod, String product, String filter, + String managementGroupId, Context context); /** * Details of a reservation recommendation for what-if analysis of reserved instances. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java index 91e1aa4368a78..d33eec340edd9 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationRecommendationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -17,12 +17,7 @@ public interface ReservationRecommendationsClient { /** * List of recommendations for purchasing reserved instances. * - * @param resourceScope The scope associated with reservation recommendations operations. This includes - * '/subscriptions/{subscriptionId}/' for subscription scope, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope. + * @param resourceScope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -34,12 +29,7 @@ public interface ReservationRecommendationsClient { /** * List of recommendations for purchasing reserved instances. * - * @param resourceScope The scope associated with reservation recommendations operations. This includes - * '/subscriptions/{subscriptionId}/' for subscription scope, - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope. + * @param resourceScope The fully qualified Azure Resource manager identifier of the resource. * @param filter May be used to filter reservationRecommendations by: properties/scope with allowed values * ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values ['VirtualMachines', * 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java index e63cb24a41b4c..3dccc10f2d063 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationTransactionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -10,6 +10,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.consumption.fluent.models.ModernReservationTransactionInner; import com.azure.resourcemanager.consumption.fluent.models.ReservationTransactionInner; +import java.math.BigDecimal; /** * An instance of this class provides access to all the operations defined in ReservationTransactionsClient. @@ -19,7 +20,8 @@ public interface ReservationTransactionsClient { * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the - * reservation purchase was made. + * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the + * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges. * * @param billingAccountId BillingAccount ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,13 +36,16 @@ public interface ReservationTransactionsClient { * List of transactions for reserved instances on billing account scope. Note: The refund transactions are posted * along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in * May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the - * reservation purchase was made. + * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the + * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges. * * @param billingAccountId BillingAccount ID. * @param filter Filter reservation transactions by date range. The properties/EventDate for start date and end * date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's * billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will * include data for the entire December 2020 month (i.e. will contain records for dates December 30 and 31). + * @param useMarkupIfPartner Applies mark up to the transactions if the caller is a partner. + * @param previewMarkupPercentage Preview markup percentage to be applied. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -48,13 +53,15 @@ public interface ReservationTransactionsClient { * @return result of listing reservation recommendations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String billingAccountId, String filter, Context context); + PagedIterable list(String billingAccountId, String filter, Boolean useMarkupIfPartner, + BigDecimal previewMarkupPercentage, Context context); /** * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the - * reservation purchase was made. + * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the + * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges. * * @param billingAccountId BillingAccount ID. * @param billingProfileId Azure Billing Profile ID. @@ -71,7 +78,8 @@ PagedIterable listByBillingProfile(String bil * List of transactions for reserved instances on billing profile scope. The refund transactions are posted along * with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May * 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the - * reservation purchase was made. + * reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the + * response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges. * * @param billingAccountId BillingAccount ID. * @param billingProfileId Azure Billing Profile ID. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java index ecbb1d1c92c82..68329bdb7b7f0 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsDetailsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -16,8 +16,10 @@ public interface ReservationsDetailsClient { /** * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently - * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller - * date ranges. + * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also + * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges + * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into + * response size time outs. * * @param reservationOrderId Order Id of the reservation. * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The @@ -32,8 +34,10 @@ public interface ReservationsDetailsClient { /** * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently - * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller - * date ranges. + * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also + * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges + * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into + * response size time outs. * * @param reservationOrderId Order Id of the reservation. * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The @@ -50,8 +54,10 @@ PagedIterable listByReservationOrder(String reservationO /** * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently - * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller - * date ranges. + * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also + * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges + * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into + * response size time outs. * * @param reservationOrderId Order Id of the reservation. * @param reservationId Id of the reservation. @@ -68,8 +74,10 @@ PagedIterable listByReservationOrderAndReservation(Strin /** * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently - * callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller - * date ranges. + * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also + * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges + * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into + * response size time outs. * * @param reservationOrderId Order Id of the reservation. * @param reservationId Id of the reservation. @@ -86,14 +94,13 @@ PagedIterable listByReservationOrderAndReservation(Strin String reservationId, String filter, Context context); /** - * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit - * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call - * should be made with smaller date ranges. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently + * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also + * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges + * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into + * response size time outs. * - * @param resourceScope The scope associated with reservations details operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * BillingProfile scope (modern). + * @param resourceScope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -103,14 +110,13 @@ PagedIterable listByReservationOrderAndReservation(Strin PagedIterable list(String resourceScope); /** - * Lists the reservations details for the defined scope and provided date range. Note: ARM has a payload size limit - * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call - * should be made with smaller date ranges. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently + * callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also + * get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges + * or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into + * response size time outs. * - * @param resourceScope The scope associated with reservations details operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * BillingProfile scope (modern). + * @param resourceScope The fully qualified Azure Resource manager identifier of the resource. * @param startDate Start date. Only applicable when querying with billing profile. * @param endDate End date. Only applicable when querying with billing profile. * @param filter Filter reservation details by date range. The properties/UsageDate for start date and end date. The diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java index 3fff9471d4c96..ade975936d9a1 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/ReservationsSummariesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -16,7 +16,9 @@ */ public interface ReservationsSummariesClient { /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so + * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made + * with smaller date ranges. * * @param reservationOrderId Order Id of the reservation. * @param grain Can be daily or monthly. @@ -29,7 +31,9 @@ public interface ReservationsSummariesClient { PagedIterable listByReservationOrder(String reservationOrderId, Datagrain grain); /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so + * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made + * with smaller date ranges. * * @param reservationOrderId Order Id of the reservation. * @param grain Can be daily or monthly. @@ -46,7 +50,9 @@ PagedIterable listByReservationOrder(String reservation String filter, Context context); /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so + * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made + * with smaller date ranges. * * @param reservationOrderId Order Id of the reservation. * @param reservationId Id of the reservation. @@ -61,7 +67,9 @@ PagedIterable listByReservationOrderAndReservation(Stri String reservationId, Datagrain grain); /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of 12MB, so + * currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made + * with smaller date ranges. * * @param reservationOrderId Order Id of the reservation. * @param reservationId Id of the reservation. @@ -79,12 +87,11 @@ PagedIterable listByReservationOrderAndReservation(Stri String reservationId, Datagrain grain, String filter, Context context); /** - * Lists the reservations summaries for the defined scope daily or monthly grain. + * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit + * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call + * should be made with smaller date ranges. * - * @param resourceScope The scope associated with reservations summaries operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * BillingProfile scope (modern). + * @param resourceScope The fully qualified Azure Resource manager identifier of the resource. * @param grain Can be daily or monthly. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -95,12 +102,11 @@ PagedIterable listByReservationOrderAndReservation(Stri PagedIterable list(String resourceScope, Datagrain grain); /** - * Lists the reservations summaries for the defined scope daily or monthly grain. + * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit + * of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call + * should be made with smaller date ranges. * - * @param resourceScope The scope associated with reservations summaries operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * BillingProfile scope (modern). + * @param resourceScope The fully qualified Azure Resource manager identifier of the resource. * @param grain Can be daily or monthly. * @param startDate Start date. Only applicable when querying with billing profile. * @param endDate End date. Only applicable when querying with billing profile. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java index 381907adfc027..2e5fe1899dd05 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/TagsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -17,13 +17,7 @@ public interface TagsClient { /** * Get all available tag keys for the defined scope. * - * @param scope The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope.. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -36,13 +30,7 @@ public interface TagsClient { /** * Get all available tag keys for the defined scope. * - * @param scope The scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for - * subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department - * scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' - * for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for - * Management Group scope.. + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java index afe79cbe4a9f1..515dbde6d3853 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/UsageDetailsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent; @@ -19,22 +19,13 @@ public interface UsageDetailsClient { * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or * later. * - * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' - * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account - * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, - * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For - * subscription, billing account, department, enrollment account and management group, you can also add billing - * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify - * billing period at department scope use - * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. - * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - * billingAccount scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - * for invoiceSection scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. + * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not + * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify + * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report - + * Create + * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**. + * + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -47,22 +38,13 @@ public interface UsageDetailsClient { * Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or * later. * - * @param scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' - * for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account - * scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, - * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and - * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For - * subscription, billing account, department, enrollment account and management group, you can also add billing - * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify - * billing period at department scope use - * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. - * Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for - * billingAccount scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for - * billingProfile scope, - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' - * for invoiceSection scope, and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. + * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We do not + * recommend that you take a new dependency on this API. Please use the Cost Details API instead. We will notify + * customers once a date for retirement has been determined.For Learn more,see [Generate Cost Details Report - + * Create + * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)**. + * + * @param scope The fully qualified Azure Resource manager identifier of the resource. * @param expand May be used to expand the properties/additionalInfo or properties/meterDetails within a list of * usage details. By default, these fields are not included when listing usage details. * @param filter May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java index 2fb5e95a7b548..6be4abedac898 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,7 +21,7 @@ /** * A balance resource. */ -@Fluent +@Immutable public final class BalanceInner extends ProxyResource { /* * The properties of the balance. @@ -37,6 +38,11 @@ public final class BalanceInner extends ProxyResource { */ private Map tags; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -55,7 +61,7 @@ public final class BalanceInner extends ProxyResource { /** * Creates an instance of BalanceInner class. */ - public BalanceInner() { + private BalanceInner() { } /** @@ -85,6 +91,15 @@ public Map tags() { return this.tags; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -224,20 +239,6 @@ public BillingFrequency billingFrequency() { return this.innerProperties() == null ? null : this.innerProperties().billingFrequency(); } - /** - * Set the billingFrequency property: The billing frequency. - * - * @param billingFrequency the billingFrequency value to set. - * @return the BalanceInner object itself. - */ - public BalanceInner withBillingFrequency(BillingFrequency billingFrequency) { - if (this.innerProperties() == null) { - this.innerProperties = new BalanceProperties(); - } - this.innerProperties().withBillingFrequency(billingFrequency); - return this; - } - /** * Get the priceHidden property: Price is hidden or not. * @@ -247,6 +248,15 @@ public Boolean priceHidden() { return this.innerProperties() == null ? null : this.innerProperties().priceHidden(); } + /** + * Get the overageRefund property: Overage Refunds. + * + * @return the overageRefund value. + */ + public BigDecimal overageRefund() { + return this.innerProperties() == null ? null : this.innerProperties().overageRefund(); + } + /** * Get the newPurchasesDetails property: List of new purchases. * @@ -265,17 +275,6 @@ public List adjustmentDetails() { return this.innerProperties() == null ? null : this.innerProperties().adjustmentDetails(); } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - /** * {@inheritDoc} */ @@ -315,6 +314,8 @@ public static BalanceInner fromJson(JsonReader jsonReader) throws IOException { } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedBalanceInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedBalanceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java index 29fa359005faf..001e57c9cb6b5 100644 --- a/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java +++ b/sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/fluent/models/BalanceProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.consumption.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,7 +19,7 @@ /** * The properties of the balance. */ -@Fluent +@Immutable public final class BalanceProperties implements JsonSerializable { /* * The ISO currency in which the meter is charged, for example, USD. @@ -86,6 +86,11 @@ public final class BalanceProperties implements JsonSerializable