From 583868f6c73e82db26211f41175da510daad1040 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 22 Nov 2021 06:14:29 +0000 Subject: [PATCH] CodeGen from PR 16767 in Azure/azure-rest-api-specs Merge c15c0092f0d0ddf9f8abe96d2b42799d32e238e1 into 972507baffd480eff639840a27ce83dd1bc432ae --- sdk/consumption/arm-consumption/README.md | 28 +- sdk/consumption/arm-consumption/package.json | 2 +- .../src/consumptionManagementClient.ts | 2 - .../src/consumptionManagementClientContext.ts | 2 +- .../src/models/aggregatedCostMappers.ts | 2 - .../src/models/balancesMappers.ts | 2 - .../src/models/budgetsMappers.ts | 2 - .../src/models/chargesMappers.ts | 2 - .../src/models/creditsMappers.ts | 2 - .../src/models/eventsOperationsMappers.ts | 2 - .../src/models/forecastsMappers.ts | 62 - .../arm-consumption/src/models/index.ts | 1212 +++++++++++------ .../src/models/lotsOperationsMappers.ts | 2 - .../arm-consumption/src/models/mappers.ts | 736 ++++++---- .../src/models/marketplacesMappers.ts | 2 - .../arm-consumption/src/models/parameters.ts | 23 +- .../src/models/priceSheetMappers.ts | 2 - ...reservationRecommendationDetailsMappers.ts | 2 - .../models/reservationTransactionsMappers.ts | 2 - .../src/models/reservationsDetailsMappers.ts | 2 - .../models/reservationsSummariesMappers.ts | 2 - .../arm-consumption/src/models/tagsMappers.ts | 2 - .../src/models/usageDetailsMappers.ts | 2 - .../src/operations/aggregatedCost.ts | 2 +- .../src/operations/balances.ts | 2 +- .../arm-consumption/src/operations/budgets.ts | 8 +- .../arm-consumption/src/operations/charges.ts | 2 +- .../arm-consumption/src/operations/credits.ts | 38 +- .../src/operations/eventsOperations.ts | 174 ++- .../src/operations/forecasts.ts | 79 -- .../arm-consumption/src/operations/index.ts | 1 - .../src/operations/lotsOperations.ts | 178 ++- .../src/operations/marketplaces.ts | 2 +- .../src/operations/priceSheet.ts | 4 +- .../reservationRecommendationDetails.ts | 29 +- .../operations/reservationRecommendations.ts | 2 +- .../src/operations/reservationsDetails.ts | 2 +- .../src/operations/reservationsSummaries.ts | 2 +- .../arm-consumption/src/operations/tags.ts | 2 +- .../src/operations/usageDetails.ts | 10 +- 40 files changed, 1557 insertions(+), 1077 deletions(-) delete mode 100644 sdk/consumption/arm-consumption/src/models/forecastsMappers.ts delete mode 100644 sdk/consumption/arm-consumption/src/operations/forecasts.ts diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index ddcd05d27ed5..b7e09d98951e 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -55,13 +55,7 @@ const filter = "testfilter"; const skiptoken = "testskiptoken"; const top = 1; const metric = "actualcost"; -client.usageDetails.list(scope,{ - expand: expand, - filter: filter, - skiptoken: skiptoken, - top: top, - metric: metric -}).then((result) => { +client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -104,19 +98,13 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const skiptoken = "testskiptoken"; const top = 1; const metric = "actualcost"; - client.usageDetails.list(scope,{ - expand: expand, - filter: filter, - skiptoken: skiptoken, - top: top, - metric: metric - }).then((result) => { - console.log("The result is:"); - console.log(result); - }).catch((err) => { - console.log("An error occurred:"); - console.error(err); - }); + client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { + console.log("The result is:"); + console.log(result); + }).catch((err) => { + console.log("An error occurred:"); + console.error(err); + }); diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index 24a6d73bfeed..0d19d61dde74 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/consumption/arm-consumption", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts index c2d8b3402f0a..e2b76641bdd2 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -29,7 +29,6 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext { reservationRecommendationDetails: operations.ReservationRecommendationDetails; reservationTransactions: operations.ReservationTransactions; priceSheet: operations.PriceSheet; - forecasts: operations.Forecasts; operations: operations.Operations; aggregatedCost: operations.AggregatedCost; events: operations.EventsOperations; @@ -61,7 +60,6 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext { this.reservationRecommendationDetails = new operations.ReservationRecommendationDetails(this); this.reservationTransactions = new operations.ReservationTransactions(this); this.priceSheet = new operations.PriceSheet(this); - this.forecasts = new operations.Forecasts(this); this.operations = new operations.Operations(this); this.aggregatedCost = new operations.AggregatedCost(this); this.events = new operations.EventsOperations(this); diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts index 634ac502d476..42785f72bcdc 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts @@ -49,7 +49,7 @@ export class ConsumptionManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2019-10-01'; + this.apiVersion = '2021-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts b/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts index b7125b2b0484..739298fa672d 100644 --- a/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts index b7125b2b0484..739298fa672d 100644 --- a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts index fb1f5d5fa4a7..f7b1370cd736 100644 --- a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts @@ -27,8 +27,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts index 8f62d3c1ceb5..6ab8646ef10e 100644 --- a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts @@ -27,8 +27,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/creditsMappers.ts b/sdk/consumption/arm-consumption/src/models/creditsMappers.ts index b7125b2b0484..739298fa672d 100644 --- a/sdk/consumption/arm-consumption/src/models/creditsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/creditsMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts b/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts index 296045cbb5e4..099a7cf94aed 100644 --- a/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/eventsOperationsMappers.ts @@ -27,8 +27,6 @@ export { ErrorResponse, Events, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts b/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts deleted file mode 100644 index f2e46bb5ce69..000000000000 --- a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -export { - discriminators, - Amount, - AmountWithExchangeRate, - Balance, - BalancePropertiesAdjustmentDetailsItem, - BalancePropertiesNewPurchasesDetailsItem, - BaseResource, - Budget, - BudgetComparisonExpression, - BudgetFilter, - BudgetFilterProperties, - BudgetTimePeriod, - ChargeSummary, - CreditBalanceSummary, - CreditSummary, - CurrentSpend, - ErrorDetails, - ErrorResponse, - EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, - ForecastsListResult, - ForecastSpend, - LegacyChargeSummary, - LegacyReservationTransaction, - LegacyUsageDetail, - LotSummary, - ManagementGroupAggregatedCostResult, - Marketplace, - MeterDetails, - MeterDetailsResponse, - ModernChargeSummary, - ModernReservationTransaction, - ModernUsageDetail, - Notification, - PriceSheetProperties, - PriceSheetResult, - ProxyResource, - Reseller, - ReservationDetail, - ReservationRecommendationDetailsCalculatedSavingsProperties, - ReservationRecommendationDetailsModel, - ReservationRecommendationDetailsResourceProperties, - ReservationRecommendationDetailsSavingsProperties, - ReservationRecommendationDetailsUsageProperties, - ReservationSummary, - ReservationTransaction, - ReservationTransactionResource, - Resource, - Tag, - TagsResult, - UsageDetail -} from "../models/mappers"; diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index b7c6dbc94ab4..2e3842238fb8 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -67,12 +67,12 @@ export interface MeterDetails { */ export interface Resource extends BaseResource { /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -82,7 +82,7 @@ export interface Resource extends BaseResource { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -107,12 +107,12 @@ export interface UsageDetail { */ kind: "UsageDetail"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -122,7 +122,7 @@ export interface UsageDetail { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -173,12 +173,12 @@ export interface LegacyUsageDetail { */ kind: "legacy"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -188,7 +188,7 @@ export interface LegacyUsageDetail { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -313,7 +313,7 @@ export interface LegacyUsageDetail { */ readonly consumedService?: string; /** - * Azure resource manager resource identifier. + * Unique identifier of the Azure Resource Manager usage detail resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceId?: string; @@ -323,12 +323,12 @@ export interface LegacyUsageDetail { */ readonly resourceName?: string; /** - * Service Info 1. + * Service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo1?: string; /** - * Service Info 2. + * Legacy field with optional service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo2?: string; @@ -419,6 +419,17 @@ export interface LegacyUsageDetail { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly frequency?: string; + /** + * Retail price for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly payGPrice?: number; + /** + * Identifier that indicates how the meter is priced. Possible values include: 'On Demand', + * 'Reservation', 'Spot' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pricingModel?: PricingModelType; } /** @@ -430,12 +441,12 @@ export interface ModernUsageDetail { */ kind: "modern"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -445,7 +456,7 @@ export interface ModernUsageDetail { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -459,6 +470,17 @@ export interface ModernUsageDetail { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly billingAccountId?: string; + /** + * Effective Price that's charged for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly effectivePrice?: number; + /** + * Identifier that indicates how the meter is priced. Possible values include: 'On Demand', + * 'Reservation', 'Spot' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly pricingModel?: PricingModelType; /** * Name of the Billing Account. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -585,12 +607,12 @@ export interface ModernUsageDetail { */ readonly consumedService?: string; /** - * Service Info 1. + * Service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo1?: string; /** - * Service Info 2. + * Legacy field with optional service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo2?: string; @@ -812,10 +834,30 @@ export interface ModernUsageDetail { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly payGPrice?: number; + /** + * Unique identifier for the applicable benefit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly benefitId?: string; + /** + * Name of the applicable benefit. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly benefitName?: string; + /** + * Identifier for Product Category or Line Of Business, Ex - Azure, Microsoft 365, AWS e.t.c + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * Name for Cost Allocation Rule. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly costAllocationRuleName?: string; } /** - * An marketplace resource. + * A marketplace resource. */ export interface Marketplace extends Resource { /** @@ -1377,10 +1419,6 @@ export interface ReservationRecommendationDetailsModel extends Resource { * Resource sku */ sku?: string; - /** - * Resource eTag. - */ - eTag?: string; /** * An ISO 4217 currency code identifier for the costs and savings * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1427,12 +1465,12 @@ export interface ReservationRecommendation { */ kind: "ReservationRecommendation"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -1442,7 +1480,7 @@ export interface ReservationRecommendation { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -1480,48 +1518,18 @@ export interface SkuProperty { } /** - * Legacy reservation recommendation. + * Contains the possible cases for LegacyReservationRecommendationProperties. */ -export interface LegacyReservationRecommendation { +export type LegacyReservationRecommendationPropertiesUnion = LegacyReservationRecommendationProperties | LegacySingleScopeReservationRecommendationProperties | LegacySharedScopeReservationRecommendationProperties; + +/** + * The properties of the reservation recommendation. + */ +export interface LegacyReservationRecommendationProperties { /** * Polymorphic Discriminator */ - kind: "legacy"; - /** - * Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; - /** - * Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly tags?: { [propertyName: string]: string }; - /** - * Resource location - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly location?: string; - /** - * Resource sku - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly sku?: string; + scope: "LegacyReservationRecommendationProperties"; /** * The number of days of usage to look back for recommendation. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1587,11 +1595,6 @@ export interface LegacyReservationRecommendation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly firstUsageDate?: Date; - /** - * Shared or single recommendation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scope?: string; /** * List of sku properties * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1600,36 +1603,20 @@ export interface LegacyReservationRecommendation { } /** - * The amount plus currency . - */ -export interface Amount { - /** - * Amount currency. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly currency?: string; - /** - * Amount. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: number; -} - -/** - * Modern reservation recommendation. + * Legacy reservation recommendation. */ -export interface ModernReservationRecommendation { +export interface LegacyReservationRecommendation { /** * Polymorphic Discriminator */ - kind: "modern"; + kind: "legacy"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -1639,7 +1626,7 @@ export interface ModernReservationRecommendation { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -1658,16 +1645,11 @@ export interface ModernReservationRecommendation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly sku?: string; - /** - * Resource Location. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly modernReservationRecommendationLocation?: string; /** * The number of days of usage to look back for recommendation. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly lookBackPeriod?: number; + readonly lookBackPeriod?: string; /** * The instance Flexibility Ratio. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1693,6 +1675,11 @@ export interface ModernReservationRecommendation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; + /** + * The azure resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceType?: string; /** * RI recommendations in one or three year terms. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1702,7 +1689,7 @@ export interface ModernReservationRecommendation { * The total amount of cost without reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly costWithNoReservedInstances?: Amount; + readonly costWithNoReservedInstances?: number; /** * Recommended quality for reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1712,172 +1699,457 @@ export interface ModernReservationRecommendation { * The total amount of cost with reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly totalCostWithReservedInstances?: Amount; + readonly totalCostWithReservedInstances?: number; /** * Total estimated savings with reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly netSavings?: Amount; + readonly netSavings?: number; /** * The usage date for looking back. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly firstUsageDate?: Date; - /** - * Shared or single recommendation. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly scope?: string; /** * List of sku properties * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly skuProperties?: SkuProperty[]; /** - * This is the ARM Sku name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Polymorphic Discriminator */ - readonly skuName?: string; + scope: string; +} + +/** + * The properties of the legacy reservation recommendation for single scope. + */ +export interface LegacySingleScopeReservationRecommendationProperties { /** - * The Azure resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Polymorphic Discriminator */ - readonly resourceType?: string; + scope: "Single"; /** - * The Azure subscription ID. + * The number of days of usage to look back for recommendation. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionId?: string; + readonly lookBackPeriod?: string; /** - * Resource eTag. + * The instance Flexibility Ratio. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly eTag?: string; -} - -/** - * The Resource model definition. - */ -export interface ReservationTransactionResource extends BaseResource { + readonly instanceFlexibilityRatio?: number; /** - * Resource Id. + * The instance Flexibility Group. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly instanceFlexibilityGroup?: string; /** - * Resource name. + * The normalized Size. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly name?: string; + readonly normalizedSize?: string; /** - * Resource type. + * The recommended Quantity Normalized. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly type?: string; + readonly recommendedQuantityNormalized?: number; /** - * Resource tags. + * The meter id (GUID) * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly tags?: string[]; -} - -/** - * Modern Reservation transaction resource. - */ -export interface ModernReservationTransaction extends ReservationTransactionResource { + readonly meterId?: string; /** - * The charge of the transaction. + * The azure resource type. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly amount?: number; + readonly resourceType?: string; /** - * This is the ARM Sku name. It can be used to join with the serviceType field in additional info - * in usage records. + * RI recommendations in one or three year terms. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly armSkuName?: string; + readonly term?: string; /** - * The billing frequency, which can be either one-time or recurring. + * The total amount of cost without reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingFrequency?: string; + readonly costWithNoReservedInstances?: number; /** - * Billing profile Id. + * Recommended quality for reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingProfileId?: string; + readonly recommendedQuantity?: number; /** - * Billing profile name. + * The total amount of cost with reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingProfileName?: string; + readonly totalCostWithReservedInstances?: number; /** - * The ISO currency in which the transaction is charged, for example, USD. + * Total estimated savings with reserved instances. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly netSavings?: number; /** - * The description of the transaction. + * The usage date for looking back. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly description?: string; + readonly firstUsageDate?: Date; /** - * The date of the transaction + * List of sku properties * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly eventDate?: Date; + readonly skuProperties?: SkuProperty[]; /** - * The type of the transaction (Purchase, Cancel, etc.) + * Subscription id associated with single scoped recommendation. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly eventType?: string; + readonly subscriptionId?: string; +} + +/** + * The properties of the legacy reservation recommendation for shared scope. + */ +export interface LegacySharedScopeReservationRecommendationProperties { /** - * Invoice Number - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Polymorphic Discriminator */ - readonly invoice?: string; + scope: "Shared"; /** - * Invoice Id as on the invoice where the specific transaction appears. + * The number of days of usage to look back for recommendation. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceId?: string; + readonly lookBackPeriod?: string; /** - * Invoice Section Id + * The instance Flexibility Ratio. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceSectionId?: string; + readonly instanceFlexibilityRatio?: number; /** - * Invoice Section Name. + * The instance Flexibility Group. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceSectionName?: string; + readonly instanceFlexibilityGroup?: string; /** - * The subscription guid that makes the transaction. + * The normalized Size. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly purchasingSubscriptionGuid?: string; + readonly normalizedSize?: string; /** - * The subscription name that makes the transaction. + * The recommended Quantity Normalized. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly purchasingSubscriptionName?: string; + readonly recommendedQuantityNormalized?: number; /** - * The quantity of the transaction. + * The meter id (GUID) * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly quantity?: number; + readonly meterId?: string; /** - * The region of the transaction. + * The azure resource type. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly region?: string; + readonly resourceType?: string; /** - * The reservation order ID is the identifier for a reservation purchase. Each reservation order - * ID represents a single purchase transaction. A reservation order contains reservations. The - * reservation order specifies the VM size and region for the reservations. + * RI recommendations in one or three year terms. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly reservationOrderId?: string; + readonly term?: string; + /** + * The total amount of cost without reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly costWithNoReservedInstances?: number; + /** + * Recommended quality for reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendedQuantity?: number; + /** + * The total amount of cost with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalCostWithReservedInstances?: number; + /** + * Total estimated savings with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly netSavings?: number; + /** + * The usage date for looking back. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly firstUsageDate?: Date; + /** + * List of sku properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuProperties?: SkuProperty[]; +} + +/** + * The amount plus currency . + */ +export interface Amount { + /** + * Amount currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * Amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly value?: number; +} + +/** + * Modern reservation recommendation. + */ +export interface ModernReservationRecommendation { + /** + * Polymorphic Discriminator + */ + kind: "modern"; + /** + * The full qualified ARM ID of an event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The ID that uniquely identifies an event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The etag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: { [propertyName: string]: string }; + /** + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly location?: string; + /** + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly sku?: string; + /** + * Resource Location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly modernReservationRecommendationLocation?: string; + /** + * The number of days of usage to look back for recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lookBackPeriod?: number; + /** + * The instance Flexibility Ratio. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceFlexibilityRatio?: number; + /** + * The instance Flexibility Group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly instanceFlexibilityGroup?: string; + /** + * The normalized Size. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly normalizedSize?: string; + /** + * The recommended Quantity Normalized. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendedQuantityNormalized?: number; + /** + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterId?: string; + /** + * RI recommendations in one or three year terms. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly term?: string; + /** + * The total amount of cost without reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly costWithNoReservedInstances?: Amount; + /** + * Recommended quality for reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly recommendedQuantity?: number; + /** + * The total amount of cost with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly totalCostWithReservedInstances?: Amount; + /** + * Total estimated savings with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly netSavings?: Amount; + /** + * The usage date for looking back. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly firstUsageDate?: Date; + /** + * Shared or single recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly scope?: string; + /** + * List of sku properties + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuProperties?: SkuProperty[]; + /** + * This is the ARM Sku name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly skuName?: string; +} + +/** + * The Resource model definition. + */ +export interface ReservationTransactionResource extends BaseResource { + /** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tags?: string[]; +} + +/** + * Modern Reservation transaction resource. + */ +export interface ModernReservationTransaction extends ReservationTransactionResource { + /** + * The charge of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly amount?: number; + /** + * This is the ARM Sku name. It can be used to join with the serviceType field in additional info + * in usage records. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly armSkuName?: string; + /** + * The billing frequency, which can be either one-time or recurring. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingFrequency?: string; + /** + * Billing profile Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileId?: string; + /** + * Billing profile name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingProfileName?: string; + /** + * The ISO currency in which the transaction is charged, for example, USD. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly currency?: string; + /** + * The description of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The date of the transaction + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventDate?: Date; + /** + * The type of the transaction (Purchase, Cancel, etc.) + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventType?: string; + /** + * Invoice Number + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoice?: string; + /** + * Invoice Id as on the invoice where the specific transaction appears. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceId?: string; + /** + * Invoice Section Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionId?: string; + /** + * Invoice Section Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSectionName?: string; + /** + * The subscription guid that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingSubscriptionGuid?: string; + /** + * The subscription name that makes the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly purchasingSubscriptionName?: string; + /** + * The quantity of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly quantity?: number; + /** + * The region of the transaction. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly region?: string; + /** + * The reservation order ID is the identifier for a reservation purchase. Each reservation order + * ID represents a single purchase transaction. A reservation order contains reservations. The + * reservation order specifies the VM size and region for the reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservationOrderId?: string; /** * The name of the reservation order. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1997,6 +2269,21 @@ export interface ReservationTransaction extends ReservationTransactionResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly billingFrequency?: string; + /** + * The billing month(yyyyMMdd), on which the event initiated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingMonth?: number; + /** + * The monetary commitment amount at the enrollment scope. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly monetaryCommitment?: number; + /** + * The overage amount at the enrollment scope. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly overage?: number; } /** @@ -2180,7 +2467,8 @@ export interface Notification { */ contactGroups?: string[]; /** - * The type of threshold. Possible values include: 'Actual'. Default value: 'Actual'. + * The type of threshold. Possible values include: 'Actual', 'Forecasted'. Default value: + * 'Actual'. */ thresholdType?: ThresholdType; /** @@ -2341,65 +2629,6 @@ export interface DownloadProperties { readonly validTill?: string; } -/** - * An interface representing ForecastPropertiesConfidenceLevelsItem. - */ -export interface ForecastPropertiesConfidenceLevelsItem { - /** - * The percentage level of the confidence - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly percentage?: number; - /** - * The boundary of the percentage, values could be 'Upper' or 'Lower'. Possible values include: - * 'Upper', 'Lower' - */ - bound?: Bound; - /** - * The amount of forecast within the percentage level - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly value?: number; -} - -/** - * A forecast resource. - */ -export interface Forecast extends Resource { - /** - * The usage date of the forecast. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly usageDate?: string; - /** - * The granularity of forecast. Please note that Yearly is not currently supported in this API. - * The API will provide responses in the Monthly grain if Yearly is selected. To get yearly grain - * data, please use our newer Forecast API. Possible values include: 'Daily', 'Monthly', 'Yearly' - */ - grain?: Grain; - /** - * The amount of charge - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly charge?: number; - /** - * The ISO currency in which the meter is charged, for example, USD. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly currency?: string; - /** - * The type of the charge. Could be actual or forecast. Possible values include: 'Actual', - * 'Forecast' - */ - chargeType?: ChargeType; - /** - * The details about the forecast confidence levels. This is populated only when chargeType is - * Forecast. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly confidenceLevels?: ForecastPropertiesConfidenceLevelsItem[]; -} - /** * A management group aggregated cost resource. */ @@ -2482,15 +2711,10 @@ export interface ChargeSummary { */ readonly type?: string; /** - * Resource etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; - /** - * Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * eTag of the resource. To handle concurrent update scenario, this field will be used to + * determine whether the user is updating the latest version or not. */ - readonly tags?: { [propertyName: string]: string }; + eTag?: string; } /** @@ -2528,15 +2752,10 @@ export interface LegacyChargeSummary { */ readonly type?: string; /** - * Resource etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; - /** - * Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * eTag of the resource. To handle concurrent update scenario, this field will be used to + * determine whether the user is updating the latest version or not. */ - readonly tags?: { [propertyName: string]: string }; + eTag?: string; /** * The id of the billing period resource that the charge belongs to. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -2598,15 +2817,10 @@ export interface ModernChargeSummary { */ readonly type?: string; /** - * Resource etag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly etag?: string; - /** - * Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * eTag of the resource. To handle concurrent update scenario, this field will be used to + * determine whether the user is updating the latest version or not. */ - readonly tags?: { [propertyName: string]: string }; + eTag?: string; /** * The id of the billing period resource that the charge belongs to. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -2781,187 +2995,242 @@ export interface Operation { } /** - * Reseller details + * The reseller properties. */ -export interface AmountWithExchangeRate extends Amount { +export interface Reseller { /** - * Exchange Rate. + * The reseller property ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly exchangeRate?: number; + readonly resellerId?: string; /** - * Exchange rate month. + * The reseller property description. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly exchangeRateMonth?: number; + readonly resellerDescription?: string; } /** - * Reseller details + * The amount with exchange rate. */ -export interface Reseller { +export interface AmountWithExchangeRate extends Amount { /** - * Reseller id. + * The exchange rate. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resellerId?: string; + readonly exchangeRate?: number; /** - * Reseller Description. + * The exchange rate month. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resellerDescription?: string; + readonly exchangeRateMonth?: number; } /** * An event summary resource. */ -export interface EventSummary extends Resource { +export interface EventSummary extends ProxyResource { + /** + * The date of the event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly transactionDate?: Date; + /** + * The description of the event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; + /** + * The amount of new credit or commitment for NewCredit or SettleCharges event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly newCredit?: Amount; + /** + * The amount of balance adjustment. The property is not available for ConsumptionCommitment + * lots. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly adjustments?: Amount; + /** + * The amount of expired credit or commitment for NewCredit or SettleCharges event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditExpired?: Amount; + /** + * The amount of charges for events of type SettleCharges and PendingEligibleCharges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly charges?: Amount; + /** + * The balance after the event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly closedBalance?: Amount; + /** + * Identifies the type of the event. Possible values include: 'SettledCharges', 'PendingCharges', + * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + */ + eventType?: EventType; /** - * Credit Currency + * The number which uniquely identifies the invoice on which the event was billed. This will be + * empty for unbilled events. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditCurrency?: string; + readonly invoiceNumber?: string; /** - * Billing Currency. + * The ID that uniquely identifies the billing profile for which the event happened. The property + * is only available for billing account of type MicrosoftCustomerAgreement. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingCurrency?: string; + readonly billingProfileId?: string; /** - * Transaction date. + * The display name of the billing profile for which the event happened. The property is only + * available for billing account of type MicrosoftCustomerAgreement. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly transactionDate?: Date; + readonly billingProfileDisplayName?: string; /** - * Transaction description. + * The ID that uniquely identifies the lot for which the event happened. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly description?: string; + readonly lotId?: string; /** - * New Credit. + * Identifies the source of the lot for which the event happened. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newCredit?: Amount; + readonly lotSource?: string; /** - * Current balance. + * Amount of canceled credit. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newCreditInBillingCurrency?: AmountWithExchangeRate; + readonly canceledCredit?: Amount; /** - * Adjustments amount. + * The credit currency of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly adjustments?: Amount; + readonly creditCurrency?: string; /** - * Current balance. + * The billing currency of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; + readonly billingCurrency?: string; /** - * Credit expired. + * The reseller of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditExpired?: Amount; + readonly reseller?: Reseller; /** - * Current balance. + * The amount of expired credit or commitment for NewCredit or SettleCharges event in billing + * currency. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly creditExpiredInBillingCurrency?: AmountWithExchangeRate; /** - * Charges amount. + * The amount of new credit or commitment for NewCredit or SettleCharges event in billing + * currency. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly charges?: Amount; + readonly newCreditInBillingCurrency?: AmountWithExchangeRate; /** - * Current balance. + * The amount of balance adjustment in billing currency. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesInBillingCurrency?: AmountWithExchangeRate; + readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; /** - * Closed balance. + * The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing + * currency. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalance?: Amount; + readonly chargesInBillingCurrency?: AmountWithExchangeRate; /** - * Current balance. + * The balance in billing currency after the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; /** - * The type of event. Possible values include: 'SettledCharges', 'PendingCharges', - * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' - */ - eventType?: EventType; - /** - * Invoice number. + * The eTag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceNumber?: string; - /** - * Reseller details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly reseller?: Reseller; + readonly eventSummaryETag?: string; } /** * A lot summary resource. */ -export interface LotSummary extends Resource { +export interface LotSummary extends ProxyResource { /** - * Credit Currency + * The original amount of a lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditCurrency?: string; + readonly originalAmount?: Amount; /** - * Billing Currency. + * The balance as of the last invoice. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingCurrency?: string; + readonly closedBalance?: Amount; /** - * Original amount. + * The source of the lot. Possible values include: 'PurchasedCredit', 'PromotionalCredit', + * 'ConsumptionCommitment' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly originalAmount?: Amount; + readonly source?: LotSource; /** - * Current balance. + * The date when the lot became effective. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; + readonly startDate?: Date; /** - * Closed balance. + * The expiration date of a lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalance?: Amount; + readonly expirationDate?: Date; /** - * Current balance. + * The po number of the invoice on which the lot was added. This property is not available for + * ConsumptionCommitment lots. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; + readonly poNumber?: string; /** - * Lot source. Possible values include: 'PurchasedCredit', 'PromotionalCredit' + * The date when the lot was added. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly source?: LotSource; + readonly purchasedDate?: Date; /** - * Start date. + * The status of the lot. Possible values include: 'None', 'Active', 'Inactive', 'Expired', + * 'Complete', 'Canceled' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly startDate?: Date; + readonly status?: Status; /** - * Expiration date. + * The currency of the lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly expirationDate?: Date; + readonly creditCurrency?: string; /** - * PO number. + * The billing currency of the lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly poNumber?: string; + readonly billingCurrency?: string; + /** + * The original amount of a lot in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; + /** + * The balance as of the last invoice in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; /** - * Reseller details. + * The reseller of the lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reseller?: Reseller; + /** + * The eTag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lotSummaryETag?: string; } /** @@ -2979,31 +3248,16 @@ export interface CreditBalanceSummary { */ readonly currentBalance?: Amount; /** - * Current balance. + * Estimated balance in billing currency. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly estimatedBalanceInBillingCurrency?: AmountWithExchangeRate; - /** - * Current balance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly currentBalanceInBillingCurrency?: AmountWithExchangeRate; } /** * A credit summary resource. */ export interface CreditSummary extends Resource { - /** - * Credit Currency - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly creditCurrency?: string; - /** - * Billing Currency. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly billingCurrency?: string; /** * Summary of balances associated with this credit summary. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -3025,10 +3279,25 @@ export interface CreditSummary extends Resource { */ readonly pendingEligibleCharges?: Amount; /** - * Reseller details. + * The credit currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditCurrency?: string; + /** + * The billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCurrency?: string; + /** + * Credit's reseller. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reseller?: Reseller; + /** + * The eTag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eTag?: string; } /** @@ -3057,7 +3326,7 @@ export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBas */ expand?: string; /** - * May be used to filter usageDetails by properties/resourceGroup, properties/instanceName, + * May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, * properties/resourceId, properties/chargeType, properties/reservationId, * properties/publisherType or tags. 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 @@ -3092,7 +3361,7 @@ export interface UsageDetailsListNextOptionalParams extends msRest.RequestOption */ expand?: string; /** - * May be used to filter usageDetails by properties/resourceGroup, properties/instanceName, + * May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, * properties/resourceId, properties/chargeType, properties/reservationId, * properties/publisherType or tags. 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 @@ -3217,16 +3486,16 @@ export interface ReservationsSummariesListByReservationOrderAndReservationOption */ export interface ReservationsSummariesListOptionalParams extends msRest.RequestOptionsBase { /** - * Start date. Required only when querying with billing profile + * Start date. Only applicable when querying with billing profile */ startDate?: string; /** - * End date. Required only when querying with billing profile + * End date. Only applicable when querying with billing profile */ endDate?: string; /** - * The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not - * required when querying with billing profile + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge'. Not applicable when querying with billing profile */ filter?: string; /** @@ -3268,16 +3537,16 @@ export interface ReservationsSummariesListByReservationOrderAndReservationNextOp */ export interface ReservationsSummariesListNextOptionalParams extends msRest.RequestOptionsBase { /** - * Start date. Required only when querying with billing profile + * Start date. Only applicable when querying with billing profile */ startDate?: string; /** - * End date. Required only when querying with billing profile + * End date. Only applicable when querying with billing profile */ endDate?: string; /** - * The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not - * required when querying with billing profile + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge'. Not applicable when querying with billing profile */ filter?: string; /** @@ -3471,11 +3740,12 @@ export interface PriceSheetGetByBillingPeriodOptionalParams extends msRest.Reque /** * Optional Parameters. */ -export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { +export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** - * May be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or - * properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. + * 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 (:). */ filter?: string; } @@ -3483,12 +3753,47 @@ export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { /** * Optional Parameters. */ -export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { +export interface EventsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { /** - * 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 (:). + * May be used to filter the events by lotId, lotSource etc. 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 (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface EventsListByBillingAccountNextOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the events by lotId, lotSource etc. 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 (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LotsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the lots by Status, Source etc. 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 (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LotsListByBillingAccountNextOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the lots by Status, Source etc. 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 (:). */ filter?: string; } @@ -3583,11 +3888,6 @@ export interface ReservationRecommendationsListResult extends Array - */ -export interface ForecastsListResult extends Array { -} - /** * @interface * Result of listing consumption operations. It contains a list of operations and a URL link to get @@ -3664,6 +3956,14 @@ export interface Lots extends Array { readonly nextLink?: string; } +/** + * Defines values for PricingModelType. + * Possible values include: 'On Demand', 'Reservation', 'Spot' + * @readonly + * @enum {string} + */ +export type PricingModelType = 'On Demand' | 'Reservation' | 'Spot'; + /** * Defines values for BillingFrequency. * Possible values include: 'Month', 'Quarter', 'Year' @@ -3691,11 +3991,11 @@ export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; /** * Defines values for ThresholdType. - * Possible values include: 'Actual' + * Possible values include: 'Actual', 'Forecasted' * @readonly * @enum {string} */ -export type ThresholdType = 'Actual'; +export type ThresholdType = 'Actual' | 'Forecasted'; /** * Defines values for CultureCode. @@ -3707,30 +4007,6 @@ export type ThresholdType = 'Actual'; */ export type CultureCode = 'en-us' | 'ja-jp' | 'zh-cn' | 'de-de' | 'es-es' | 'fr-fr' | 'it-it' | 'ko-kr' | 'pt-br' | 'ru-ru' | 'zh-tw' | 'cs-cz' | 'pl-pl' | 'tr-tr' | 'da-dk' | 'en-gb' | 'hu-hu' | 'nb-no' | 'nl-nl' | 'pt-pt' | 'sv-se'; -/** - * Defines values for Grain. - * Possible values include: 'Daily', 'Monthly', 'Yearly' - * @readonly - * @enum {string} - */ -export type Grain = 'Daily' | 'Monthly' | 'Yearly'; - -/** - * Defines values for ChargeType. - * Possible values include: 'Actual', 'Forecast' - * @readonly - * @enum {string} - */ -export type ChargeType = 'Actual' | 'Forecast'; - -/** - * Defines values for Bound. - * Possible values include: 'Upper', 'Lower' - * @readonly - * @enum {string} - */ -export type Bound = 'Upper' | 'Lower'; - /** * Defines values for EventType. * Possible values include: 'SettledCharges', 'PendingCharges', 'PendingAdjustments', @@ -3742,11 +4018,19 @@ export type EventType = 'SettledCharges' | 'PendingCharges' | 'PendingAdjustment /** * Defines values for LotSource. - * Possible values include: 'PurchasedCredit', 'PromotionalCredit' + * Possible values include: 'PurchasedCredit', 'PromotionalCredit', 'ConsumptionCommitment' + * @readonly + * @enum {string} + */ +export type LotSource = 'PurchasedCredit' | 'PromotionalCredit' | 'ConsumptionCommitment'; + +/** + * Defines values for Status. + * Possible values include: 'None', 'Active', 'Inactive', 'Expired', 'Complete', 'Canceled' * @readonly * @enum {string} */ -export type LotSource = 'PurchasedCredit' | 'PromotionalCredit'; +export type Status = 'None' | 'Active' | 'Inactive' | 'Expired' | 'Complete' | 'Canceled'; /** * Defines values for Datagrain. @@ -3781,20 +4065,12 @@ export type Term = 'P1Y' | 'P3Y'; export type LookBackPeriod = 'Last7Days' | 'Last30Days' | 'Last60Days'; /** - * Defines values for Scope12. + * Defines values for Scope10. * Possible values include: 'Single', 'Shared' * @readonly * @enum {string} */ -export type Scope12 = 'Single' | 'Shared'; - -/** - * Defines values for Scope14. - * Possible values include: 'Single', 'Shared' - * @readonly - * @enum {string} - */ -export type Scope14 = 'Single' | 'Shared'; +export type Scope10 = 'Single' | 'Shared'; /** * Contains response data for the list operation. @@ -4459,7 +4735,7 @@ export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult & { /** * Contains response data for the list operation. */ -export type ForecastsListResponse = ForecastsListResult & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -4472,14 +4748,14 @@ export type ForecastsListResponse = ForecastsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: ForecastsListResult; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listNext operation. */ -export type OperationsListResponse = OperationListResult & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -4497,9 +4773,9 @@ export type OperationsListResponse = OperationListResult & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the getByManagementGroup operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregatedCostResult & { /** * The underlying HTTP response. */ @@ -4512,14 +4788,14 @@ export type OperationsListNextResponse = OperationListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: ManagementGroupAggregatedCostResult; }; }; /** - * Contains response data for the getByManagementGroup operation. + * Contains response data for the getForBillingPeriodByManagementGroup operation. */ -export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregatedCostResult & { +export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult & { /** * The underlying HTTP response. */ @@ -4537,9 +4813,9 @@ export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregat }; /** - * Contains response data for the getForBillingPeriodByManagementGroup operation. + * Contains response data for the listByBillingProfile operation. */ -export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult & { +export type EventsListByBillingProfileResponse = Events & { /** * The underlying HTTP response. */ @@ -4552,14 +4828,14 @@ export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = Managem /** * The response body as parsed JSON or XML */ - parsedBody: ManagementGroupAggregatedCostResult; + parsedBody: Events; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccount operation. */ -export type EventsListResponse = Events & { +export type EventsListByBillingAccountResponse = Events & { /** * The underlying HTTP response. */ @@ -4577,9 +4853,9 @@ export type EventsListResponse = Events & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByBillingProfileNext operation. */ -export type EventsListNextResponse = Events & { +export type EventsListByBillingProfileNextResponse = Events & { /** * The underlying HTTP response. */ @@ -4597,9 +4873,29 @@ export type EventsListNextResponse = Events & { }; /** - * Contains response data for the list operation. + * Contains response data for the listByBillingAccountNext operation. + */ +export type EventsListByBillingAccountNextResponse = Events & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Events; + }; +}; + +/** + * Contains response data for the listByBillingProfile operation. */ -export type LotsListResponse = Lots & { +export type LotsListByBillingProfileResponse = Lots & { /** * The underlying HTTP response. */ @@ -4617,9 +4913,49 @@ export type LotsListResponse = Lots & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByBillingAccount operation. + */ +export type LotsListByBillingAccountResponse = Lots & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Lots; + }; +}; + +/** + * Contains response data for the listByBillingProfileNext operation. + */ +export type LotsListByBillingProfileNextResponse = Lots & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Lots; + }; +}; + +/** + * Contains response data for the listByBillingAccountNext operation. */ -export type LotsListNextResponse = Lots & { +export type LotsListByBillingAccountNextResponse = Lots & { /** * The underlying HTTP response. */ diff --git a/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts b/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts index dda6a2c4dd7a..57777ee0d0c1 100644 --- a/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/lotsOperationsMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/mappers.ts b/sdk/consumption/arm-consumption/src/models/mappers.ts index 439d971f1952..63a41f425f2c 100644 --- a/sdk/consumption/arm-consumption/src/models/mappers.ts +++ b/sdk/consumption/arm-consumption/src/models/mappers.ts @@ -506,6 +506,20 @@ export const LegacyUsageDetail: msRest.CompositeMapper = { type: { name: "String" } + }, + payGPrice: { + readOnly: true, + serializedName: "properties.payGPrice", + type: { + name: "Number" + } + }, + pricingModel: { + readOnly: true, + serializedName: "properties.pricingModel", + type: { + name: "String" + } } } } @@ -527,6 +541,20 @@ export const ModernUsageDetail: msRest.CompositeMapper = { name: "String" } }, + effectivePrice: { + readOnly: true, + serializedName: "properties.effectivePrice", + type: { + name: "Number" + } + }, + pricingModel: { + readOnly: true, + serializedName: "properties.pricingModel", + type: { + name: "String" + } + }, billingAccountName: { readOnly: true, serializedName: "properties.billingAccountName", @@ -594,7 +622,7 @@ export const ModernUsageDetail: msRest.CompositeMapper = { readOnly: true, serializedName: "properties.meterId", type: { - name: "String" + name: "Uuid" } }, meterName: { @@ -981,6 +1009,34 @@ export const ModernUsageDetail: msRest.CompositeMapper = { type: { name: "Number" } + }, + benefitId: { + readOnly: true, + serializedName: "properties.benefitId", + type: { + name: "String" + } + }, + benefitName: { + readOnly: true, + serializedName: "properties.benefitName", + type: { + name: "String" + } + }, + provider: { + readOnly: true, + serializedName: "properties.provider", + type: { + name: "String" + } + }, + costAllocationRuleName: { + readOnly: true, + serializedName: "properties.costAllocationRuleName", + type: { + name: "String" + } } } } @@ -1799,12 +1855,6 @@ export const ReservationRecommendationDetailsModel: msRest.CompositeMapper = { name: "String" } }, - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, currency: { readOnly: true, serializedName: "properties.currency", @@ -1954,6 +2004,132 @@ export const SkuProperty: msRest.CompositeMapper = { } }; +export const LegacyReservationRecommendationProperties: msRest.CompositeMapper = { + serializedName: "LegacyReservationRecommendationProperties", + type: { + name: "Composite", + polymorphicDiscriminator: { + serializedName: "scope", + clientName: "scope" + }, + uberParent: "LegacyReservationRecommendationProperties", + className: "LegacyReservationRecommendationProperties", + modelProperties: { + lookBackPeriod: { + readOnly: true, + serializedName: "lookBackPeriod", + type: { + name: "String" + } + }, + instanceFlexibilityRatio: { + readOnly: true, + serializedName: "instanceFlexibilityRatio", + type: { + name: "Number" + } + }, + instanceFlexibilityGroup: { + readOnly: true, + serializedName: "instanceFlexibilityGroup", + type: { + name: "String" + } + }, + normalizedSize: { + readOnly: true, + serializedName: "normalizedSize", + type: { + name: "String" + } + }, + recommendedQuantityNormalized: { + readOnly: true, + serializedName: "recommendedQuantityNormalized", + type: { + name: "Number" + } + }, + meterId: { + readOnly: true, + serializedName: "meterId", + type: { + name: "Uuid" + } + }, + resourceType: { + readOnly: true, + serializedName: "resourceType", + type: { + name: "String" + } + }, + term: { + readOnly: true, + serializedName: "term", + type: { + name: "String" + } + }, + costWithNoReservedInstances: { + readOnly: true, + serializedName: "costWithNoReservedInstances", + type: { + name: "Number" + } + }, + recommendedQuantity: { + readOnly: true, + serializedName: "recommendedQuantity", + type: { + name: "Number" + } + }, + totalCostWithReservedInstances: { + readOnly: true, + serializedName: "totalCostWithReservedInstances", + type: { + name: "Number" + } + }, + netSavings: { + readOnly: true, + serializedName: "netSavings", + type: { + name: "Number" + } + }, + firstUsageDate: { + readOnly: true, + serializedName: "firstUsageDate", + type: { + name: "DateTime" + } + }, + skuProperties: { + readOnly: true, + serializedName: "skuProperties", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuProperty" + } + } + } + }, + scope: { + required: true, + serializedName: "scope", + type: { + name: "String" + } + } + } + } +}; + export const LegacyReservationRecommendation: msRest.CompositeMapper = { serializedName: "legacy", type: { @@ -2054,13 +2230,6 @@ export const LegacyReservationRecommendation: msRest.CompositeMapper = { name: "DateTime" } }, - scope: { - readOnly: true, - serializedName: "properties.scope", - type: { - name: "String" - } - }, skuProperties: { readOnly: true, serializedName: "properties.skuProperties", @@ -2073,11 +2242,51 @@ export const LegacyReservationRecommendation: msRest.CompositeMapper = { } } } + }, + scope: { + required: true, + serializedName: "properties.scope", + type: { + name: "String" + } } } } }; +export const LegacySingleScopeReservationRecommendationProperties: msRest.CompositeMapper = { + serializedName: "Single", + type: { + name: "Composite", + polymorphicDiscriminator: LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, + uberParent: "LegacyReservationRecommendationProperties", + className: "LegacySingleScopeReservationRecommendationProperties", + modelProperties: { + ...LegacyReservationRecommendationProperties.type.modelProperties, + subscriptionId: { + readOnly: true, + serializedName: "subscriptionId", + type: { + name: "Uuid" + } + } + } + } +}; + +export const LegacySharedScopeReservationRecommendationProperties: msRest.CompositeMapper = { + serializedName: "Shared", + type: { + name: "Composite", + polymorphicDiscriminator: LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, + uberParent: "LegacyReservationRecommendationProperties", + className: "LegacySharedScopeReservationRecommendationProperties", + modelProperties: { + ...LegacyReservationRecommendationProperties.type.modelProperties + } + } +}; + export const Amount: msRest.CompositeMapper = { serializedName: "amount", type: { @@ -2231,27 +2440,6 @@ export const ModernReservationRecommendation: msRest.CompositeMapper = { type: { name: "String" } - }, - resourceType: { - readOnly: true, - serializedName: "properties.resourceType", - type: { - name: "String" - } - }, - subscriptionId: { - readOnly: true, - serializedName: "properties.subscriptionId", - type: { - name: "String" - } - }, - eTag: { - readOnly: true, - serializedName: "eTag", - type: { - name: "String" - } } } } @@ -2597,6 +2785,27 @@ export const ReservationTransaction: msRest.CompositeMapper = { type: { name: "String" } + }, + billingMonth: { + readOnly: true, + serializedName: "properties.billingMonth", + type: { + name: "Number" + } + }, + monetaryCommitment: { + readOnly: true, + serializedName: "properties.monetaryCommitment", + type: { + name: "Number" + } + }, + overage: { + readOnly: true, + serializedName: "properties.overage", + type: { + name: "Number" + } } } } @@ -3196,124 +3405,37 @@ export const DownloadProperties: msRest.CompositeMapper = { } }; -export const ForecastPropertiesConfidenceLevelsItem: msRest.CompositeMapper = { - serializedName: "ForecastProperties_confidenceLevelsItem", +export const ManagementGroupAggregatedCostResult: msRest.CompositeMapper = { + serializedName: "ManagementGroupAggregatedCostResult", type: { name: "Composite", - className: "ForecastPropertiesConfidenceLevelsItem", + className: "ManagementGroupAggregatedCostResult", modelProperties: { - percentage: { + ...Resource.type.modelProperties, + billingPeriodId: { readOnly: true, - serializedName: "percentage", + serializedName: "properties.billingPeriodId", type: { - name: "Number" + name: "String" } }, - bound: { - serializedName: "bound", + usageStart: { + readOnly: true, + serializedName: "properties.usageStart", type: { - name: "String" + name: "DateTime" } }, - value: { + usageEnd: { readOnly: true, - serializedName: "value", - type: { - name: "Number" - } - } - } - } -}; - -export const Forecast: msRest.CompositeMapper = { - serializedName: "Forecast", - type: { - name: "Composite", - className: "Forecast", - modelProperties: { - ...Resource.type.modelProperties, - usageDate: { - readOnly: true, - serializedName: "properties.usageDate", - type: { - name: "String" - } - }, - grain: { - serializedName: "properties.grain", - type: { - name: "String" - } - }, - charge: { - readOnly: true, - serializedName: "properties.charge", - type: { - name: "Number" - } - }, - currency: { - readOnly: true, - serializedName: "properties.currency", - type: { - name: "String" - } - }, - chargeType: { - serializedName: "properties.chargeType", - type: { - name: "String" - } - }, - confidenceLevels: { - readOnly: true, - serializedName: "properties.confidenceLevels", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ForecastPropertiesConfidenceLevelsItem" - } - } - } - } - } - } -}; - -export const ManagementGroupAggregatedCostResult: msRest.CompositeMapper = { - serializedName: "ManagementGroupAggregatedCostResult", - type: { - name: "Composite", - className: "ManagementGroupAggregatedCostResult", - modelProperties: { - ...Resource.type.modelProperties, - billingPeriodId: { - readOnly: true, - serializedName: "properties.billingPeriodId", - type: { - name: "String" - } - }, - usageStart: { - readOnly: true, - serializedName: "properties.usageStart", - type: { - name: "DateTime" - } - }, - usageEnd: { - readOnly: true, - serializedName: "properties.usageEnd", - type: { - name: "DateTime" - } - }, - azureCharges: { - readOnly: true, - serializedName: "properties.azureCharges", + serializedName: "properties.usageEnd", + type: { + name: "DateTime" + } + }, + azureCharges: { + readOnly: true, + serializedName: "properties.azureCharges", type: { name: "Number" } @@ -3388,7 +3510,7 @@ export const ChargeSummary: msRest.CompositeMapper = { uberParent: "ChargeSummary", className: "ChargeSummary", modelProperties: { - ...Resource.type.modelProperties, + ...ProxyResource.type.modelProperties, kind: { required: true, serializedName: "kind", @@ -3729,49 +3851,49 @@ export const Operation: msRest.CompositeMapper = { } }; -export const AmountWithExchangeRate: msRest.CompositeMapper = { - serializedName: "AmountWithExchangeRate", +export const Reseller: msRest.CompositeMapper = { + serializedName: "Reseller", type: { name: "Composite", - className: "AmountWithExchangeRate", + className: "Reseller", modelProperties: { - ...Amount.type.modelProperties, - exchangeRate: { + resellerId: { readOnly: true, - serializedName: "exchangeRate", + serializedName: "resellerId", type: { - name: "Number" + name: "String" } }, - exchangeRateMonth: { + resellerDescription: { readOnly: true, - serializedName: "exchangeRateMonth", + serializedName: "resellerDescription", type: { - name: "Number" + name: "String" } } } } }; -export const Reseller: msRest.CompositeMapper = { - serializedName: "Reseller", +export const AmountWithExchangeRate: msRest.CompositeMapper = { + serializedName: "AmountWithExchangeRate", type: { name: "Composite", - className: "Reseller", + className: "AmountWithExchangeRate", modelProperties: { - resellerId: { + ...Amount.type.modelProperties, + exchangeRate: { readOnly: true, - serializedName: "resellerId", + serializedName: "exchangeRate", type: { - name: "String" + name: "Number" } }, - resellerDescription: { + exchangeRateMonth: { readOnly: true, - serializedName: "resellerDescription", + serializedName: "exchangeRateMonth", type: { - name: "String" + name: "Number" } } } @@ -3784,21 +3906,7 @@ export const EventSummary: msRest.CompositeMapper = { name: "Composite", className: "EventSummary", modelProperties: { - ...Resource.type.modelProperties, - creditCurrency: { - readOnly: true, - serializedName: "properties.creditCurrency", - type: { - name: "String" - } - }, - billingCurrency: { - readOnly: true, - serializedName: "properties.billingCurrency", - type: { - name: "String" - } - }, + ...ProxyResource.type.modelProperties, transactionDate: { readOnly: true, serializedName: "properties.transactionDate", @@ -3821,14 +3929,6 @@ export const EventSummary: msRest.CompositeMapper = { className: "Amount" } }, - newCreditInBillingCurrency: { - readOnly: true, - serializedName: "properties.newCreditInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, adjustments: { readOnly: true, serializedName: "properties.adjustments", @@ -3837,14 +3937,6 @@ export const EventSummary: msRest.CompositeMapper = { className: "Amount" } }, - adjustmentsInBillingCurrency: { - readOnly: true, - serializedName: "properties.adjustmentsInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, creditExpired: { readOnly: true, serializedName: "properties.creditExpired", @@ -3853,78 +3945,71 @@ export const EventSummary: msRest.CompositeMapper = { className: "Amount" } }, - creditExpiredInBillingCurrency: { + charges: { readOnly: true, - serializedName: "properties.creditExpiredInBillingCurrency", + serializedName: "properties.charges", type: { name: "Composite", - className: "AmountWithExchangeRate" + className: "Amount" } }, - charges: { + closedBalance: { readOnly: true, - serializedName: "properties.charges", + serializedName: "properties.closedBalance", type: { name: "Composite", className: "Amount" } }, - chargesInBillingCurrency: { + eventType: { + serializedName: "properties.eventType", + type: { + name: "String" + } + }, + invoiceNumber: { readOnly: true, - serializedName: "properties.chargesInBillingCurrency", + serializedName: "properties.invoiceNumber", type: { - name: "Composite", - className: "AmountWithExchangeRate" + name: "String" } }, - closedBalance: { + billingProfileId: { readOnly: true, - serializedName: "properties.closedBalance", + serializedName: "properties.billingProfileId", type: { - name: "Composite", - className: "Amount" + name: "String" } }, - closedBalanceInBillingCurrency: { + billingProfileDisplayName: { readOnly: true, - serializedName: "properties.closedBalanceInBillingCurrency", + serializedName: "properties.billingProfileDisplayName", type: { - name: "Composite", - className: "AmountWithExchangeRate" + name: "String" } }, - eventType: { - serializedName: "properties.eventType", + lotId: { + readOnly: true, + serializedName: "properties.lotId", type: { name: "String" } }, - invoiceNumber: { + lotSource: { readOnly: true, - serializedName: "properties.invoiceNumber", + serializedName: "properties.lotSource", type: { name: "String" } }, - reseller: { + canceledCredit: { readOnly: true, - serializedName: "properties.reseller", + serializedName: "properties.canceledCredit", type: { name: "Composite", - className: "Reseller" + className: "Amount" } - } - } - } -}; - -export const LotSummary: msRest.CompositeMapper = { - serializedName: "LotSummary", - type: { - name: "Composite", - className: "LotSummary", - modelProperties: { - ...Resource.type.modelProperties, + }, creditCurrency: { readOnly: true, serializedName: "properties.creditCurrency", @@ -3939,28 +4024,44 @@ export const LotSummary: msRest.CompositeMapper = { name: "String" } }, - originalAmount: { + reseller: { readOnly: true, - serializedName: "properties.originalAmount", + serializedName: "properties.reseller", type: { name: "Composite", - className: "Amount" + className: "Reseller" } }, - originalAmountInBillingCurrency: { + creditExpiredInBillingCurrency: { readOnly: true, - serializedName: "properties.originalAmountInBillingCurrency", + serializedName: "properties.creditExpiredInBillingCurrency", type: { name: "Composite", className: "AmountWithExchangeRate" } }, - closedBalance: { + newCreditInBillingCurrency: { readOnly: true, - serializedName: "properties.closedBalance", + serializedName: "properties.newCreditInBillingCurrency", type: { name: "Composite", - className: "Amount" + className: "AmountWithExchangeRate" + } + }, + adjustmentsInBillingCurrency: { + readOnly: true, + serializedName: "properties.adjustmentsInBillingCurrency", + type: { + name: "Composite", + className: "AmountWithExchangeRate" + } + }, + chargesInBillingCurrency: { + readOnly: true, + serializedName: "properties.chargesInBillingCurrency", + type: { + name: "Composite", + className: "AmountWithExchangeRate" } }, closedBalanceInBillingCurrency: { @@ -3971,6 +4072,40 @@ export const LotSummary: msRest.CompositeMapper = { className: "AmountWithExchangeRate" } }, + eventSummaryETag: { + readOnly: true, + serializedName: "properties.eTag", + type: { + name: "String" + } + } + } + } +}; + +export const LotSummary: msRest.CompositeMapper = { + serializedName: "LotSummary", + type: { + name: "Composite", + className: "LotSummary", + modelProperties: { + ...ProxyResource.type.modelProperties, + originalAmount: { + readOnly: true, + serializedName: "properties.originalAmount", + type: { + name: "Composite", + className: "Amount" + } + }, + closedBalance: { + readOnly: true, + serializedName: "properties.closedBalance", + type: { + name: "Composite", + className: "Amount" + } + }, source: { readOnly: true, serializedName: "properties.source", @@ -3999,6 +4134,50 @@ export const LotSummary: msRest.CompositeMapper = { name: "String" } }, + purchasedDate: { + readOnly: true, + serializedName: "properties.purchasedDate", + type: { + name: "DateTime" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + }, + creditCurrency: { + readOnly: true, + serializedName: "properties.creditCurrency", + type: { + name: "String" + } + }, + billingCurrency: { + readOnly: true, + serializedName: "properties.billingCurrency", + type: { + name: "String" + } + }, + originalAmountInBillingCurrency: { + readOnly: true, + serializedName: "properties.originalAmountInBillingCurrency", + type: { + name: "Composite", + className: "AmountWithExchangeRate" + } + }, + closedBalanceInBillingCurrency: { + readOnly: true, + serializedName: "properties.closedBalanceInBillingCurrency", + type: { + name: "Composite", + className: "AmountWithExchangeRate" + } + }, reseller: { readOnly: true, serializedName: "properties.reseller", @@ -4006,6 +4185,13 @@ export const LotSummary: msRest.CompositeMapper = { name: "Composite", className: "Reseller" } + }, + lotSummaryETag: { + readOnly: true, + serializedName: "properties.eTag", + type: { + name: "String" + } } } } @@ -4040,14 +4226,6 @@ export const CreditBalanceSummary: msRest.CompositeMapper = { name: "Composite", className: "AmountWithExchangeRate" } - }, - currentBalanceInBillingCurrency: { - readOnly: true, - serializedName: "currentBalanceInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } } } } @@ -4060,20 +4238,6 @@ export const CreditSummary: msRest.CompositeMapper = { className: "CreditSummary", modelProperties: { ...Resource.type.modelProperties, - creditCurrency: { - readOnly: true, - serializedName: "properties.creditCurrency", - type: { - name: "String" - } - }, - billingCurrency: { - readOnly: true, - serializedName: "properties.billingCurrency", - type: { - name: "String" - } - }, balanceSummary: { readOnly: true, serializedName: "properties.balanceSummary", @@ -4106,6 +4270,20 @@ export const CreditSummary: msRest.CompositeMapper = { className: "Amount" } }, + creditCurrency: { + readOnly: true, + serializedName: "properties.creditCurrency", + type: { + name: "String" + } + }, + billingCurrency: { + readOnly: true, + serializedName: "properties.billingCurrency", + type: { + name: "String" + } + }, reseller: { readOnly: true, serializedName: "properties.reseller", @@ -4113,6 +4291,13 @@ export const CreditSummary: msRest.CompositeMapper = { name: "Composite", className: "Reseller" } + }, + eTag: { + readOnly: true, + serializedName: "properties.eTag", + type: { + name: "String" + } } } } @@ -4324,13 +4509,6 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { type: { name: "String" } - }, - totalCost: { - readOnly: true, - serializedName: "totalCost", - type: { - name: "String" - } } } } @@ -4396,29 +4574,6 @@ export const ModernReservationTransactionsListResult: msRest.CompositeMapper = { } }; -export const ForecastsListResult: msRest.CompositeMapper = { - serializedName: "ForecastsListResult", - type: { - name: "Composite", - className: "ForecastsListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Forecast" - } - } - } - } - } - } -}; - export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { @@ -4514,7 +4669,10 @@ export const discriminators = { 'UsageDetail.legacy' : LegacyUsageDetail, 'UsageDetail.modern' : ModernUsageDetail, 'ReservationRecommendation' : ReservationRecommendation, + 'LegacyReservationRecommendationProperties' : LegacyReservationRecommendationProperties, 'ReservationRecommendation.legacy' : LegacyReservationRecommendation, + 'LegacyReservationRecommendationProperties.Single' : LegacySingleScopeReservationRecommendationProperties, + 'LegacyReservationRecommendationProperties.Shared' : LegacySharedScopeReservationRecommendationProperties, 'ReservationRecommendation.modern' : ModernReservationRecommendation, 'ChargeSummary' : ChargeSummary, 'ChargeSummary.legacy' : LegacyChargeSummary, diff --git a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts index 765c6bc7694f..d08375396a6d 100644 --- a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/parameters.ts b/sdk/consumption/arm-consumption/src/models/parameters.ts index e4fe5aca2fe5..a8b6abd63486 100644 --- a/sdk/consumption/arm-consumption/src/models/parameters.ts +++ b/sdk/consumption/arm-consumption/src/models/parameters.ts @@ -71,17 +71,6 @@ export const billingProfileId: msRest.OperationURLParameter = { } } }; -export const billingScope: msRest.OperationURLParameter = { - parameterPath: "billingScope", - mapper: { - required: true, - serializedName: "billingScope", - type: { - name: "String" - } - }, - skipEncoding: true -}; export const budgetName: msRest.OperationURLParameter = { parameterPath: "budgetName", mapper: { @@ -265,7 +254,7 @@ export const reservationOrderId1: msRest.OperationQueryParameter = { } } }; -export const scope0: msRest.OperationURLParameter = { +export const scope: msRest.OperationURLParameter = { parameterPath: "scope", mapper: { required: true, @@ -276,16 +265,6 @@ export const scope0: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const scope1: msRest.OperationQueryParameter = { - parameterPath: "scope", - mapper: { - required: true, - serializedName: "scope", - type: { - name: "String" - } - } -}; export const skiptoken: msRest.OperationQueryParameter = { parameterPath: [ "options", diff --git a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts index b7125b2b0484..739298fa672d 100644 --- a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts index 2daa3b76de70..d1661cde4cde 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationRecommendationDetailsMappers.ts @@ -24,8 +24,6 @@ export { CreditSummary, CurrentSpend, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, HighCasedErrorDetails, HighCasedErrorResponse, diff --git a/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts index 6018f1dc3d2e..839bd2d79611 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationTransactionsMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts index a952e66c8f4c..09dac26f46ea 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts index eb92d9c68d7d..809a5a87bd86 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts index b7125b2b0484..739298fa672d 100644 --- a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts index 69fb766878b5..e23ee0c0108e 100644 --- a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts @@ -26,8 +26,6 @@ export { ErrorDetails, ErrorResponse, EventSummary, - Forecast, - ForecastPropertiesConfidenceLevelsItem, ForecastSpend, LegacyChargeSummary, LegacyReservationTransaction, diff --git a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts index abcc72958d3d..58608032abfe 100644 --- a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts +++ b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts @@ -116,7 +116,7 @@ const getByManagementGroupOperationSpec: msRest.OperationSpec = { const getForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/Microsoft.Consumption/aggregatedCost", + path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost", urlParameters: [ Parameters.managementGroupId, Parameters.billingPeriodName diff --git a/sdk/consumption/arm-consumption/src/operations/balances.ts b/sdk/consumption/arm-consumption/src/operations/balances.ts index 5796b1763d15..cf9ec7e63e9d 100644 --- a/sdk/consumption/arm-consumption/src/operations/balances.ts +++ b/sdk/consumption/arm-consumption/src/operations/balances.ts @@ -115,7 +115,7 @@ const getByBillingAccountOperationSpec: msRest.OperationSpec = { const getForBillingPeriodByBillingAccountOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", urlParameters: [ Parameters.billingAccountId, Parameters.billingPeriodName diff --git a/sdk/consumption/arm-consumption/src/operations/budgets.ts b/sdk/consumption/arm-consumption/src/operations/budgets.ts index bf81dcb4aefb..06c586da1d83 100644 --- a/sdk/consumption/arm-consumption/src/operations/budgets.ts +++ b/sdk/consumption/arm-consumption/src/operations/budgets.ts @@ -346,7 +346,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/budgets", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.apiVersion @@ -369,7 +369,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -393,7 +393,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -427,7 +427,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.scope0, + Parameters.scope, Parameters.budgetName ], queryParameters: [ diff --git a/sdk/consumption/arm-consumption/src/operations/charges.ts b/sdk/consumption/arm-consumption/src/operations/charges.ts index 7e6b71b6bb14..20e79ffc061c 100644 --- a/sdk/consumption/arm-consumption/src/operations/charges.ts +++ b/sdk/consumption/arm-consumption/src/operations/charges.ts @@ -105,7 +105,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/charges", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.apiVersion, diff --git a/sdk/consumption/arm-consumption/src/operations/credits.ts b/sdk/consumption/arm-consumption/src/operations/credits.ts index 1761eeff9cac..8578277671f2 100644 --- a/sdk/consumption/arm-consumption/src/operations/credits.ts +++ b/sdk/consumption/arm-consumption/src/operations/credits.ts @@ -27,38 +27,30 @@ export class Credits { /** * The credit summary by billingAccountId and billingProfileId. - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param [options] The optional parameters * @returns Promise */ - get(scope: string, options?: msRest.RequestOptionsBase): Promise; + get(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param callback The callback */ - get(scope: string, callback: msRest.ServiceCallback): void; + get(billingAccountId: string, billingProfileId: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param options The optional parameters * @param callback The callback */ - get(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(billingAccountId: string, billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - scope, + billingAccountId, + billingProfileId, options }, getOperationSpec, @@ -70,9 +62,10 @@ export class Credits { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{scope}/providers/Microsoft.Consumption/credits/balanceSummary", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary", urlParameters: [ - Parameters.scope0 + Parameters.billingAccountId, + Parameters.billingProfileId ], queryParameters: [ Parameters.apiVersion @@ -84,6 +77,7 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.CreditSummary }, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts index 4dce0454fb19..ea46dee4f1ce 100644 --- a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts @@ -26,69 +26,92 @@ export class EventsOperations { } /** - * Lists the events by billingAccountId and billingProfileId for given start and end date. + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date * @param endDate End date - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(startDate: string, endDate: string, scope: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date * @param endDate End date - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. * @param callback The callback */ - list(startDate: string, endDate: string, scope: string, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date * @param endDate End date - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. * @param options The optional parameters * @param callback The callback */ - list(startDate: string, endDate: string, scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(startDate: string, endDate: string, scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountId, + billingProfileId, startDate, endDate, - scope, options }, - listOperationSpec, - callback) as Promise; + listByBillingProfileOperationSpec, + callback) as Promise; } /** - * Lists the events by billingAccountId and billingProfileId for given start and end date. + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. + * @param billingAccountId BillingAccount ID + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountId: string, options?: Models.EventsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, options: Models.EventsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountId: string, options?: Models.EventsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param startDate Start date * @param endDate End date * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param startDate Start date * @param endDate End date * @param callback The callback */ - listNext(nextPageLink: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param startDate Start date @@ -96,8 +119,8 @@ export class EventsOperations { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -105,18 +128,48 @@ export class EventsOperations { endDate, options }, - listNextOperationSpec, - callback) as Promise; + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: Models.EventsListByBillingAccountNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: Models.EventsListByBillingAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: Models.EventsListByBillingAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{scope}/providers/Microsoft.Consumption/events", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events", urlParameters: [ - Parameters.scope0 + Parameters.billingAccountId, + Parameters.billingProfileId ], queryParameters: [ Parameters.apiVersion, @@ -137,7 +190,31 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events", + urlParameters: [ + Parameters.billingAccountId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -162,3 +239,28 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/forecasts.ts b/sdk/consumption/arm-consumption/src/operations/forecasts.ts deleted file mode 100644 index c813a7a2375d..000000000000 --- a/sdk/consumption/arm-consumption/src/operations/forecasts.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/forecastsMappers"; -import * as Parameters from "../models/parameters"; -import { ConsumptionManagementClientContext } from "../consumptionManagementClientContext"; - -/** Class representing a Forecasts. */ -export class Forecasts { - private readonly client: ConsumptionManagementClientContext; - - /** - * Create a Forecasts. - * @param {ConsumptionManagementClientContext} client Reference to the service client. - */ - constructor(client: ConsumptionManagementClientContext) { - this.client = client; - } - - /** - * Lists the forecast charges for scope defined. Please note that this API is no longer actively - * under development. We recommend using our new Forecast API moving forward: - * https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: Models.ForecastsListOptionalParams): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: Models.ForecastsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.ForecastsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.filter0, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ForecastsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/index.ts b/sdk/consumption/arm-consumption/src/operations/index.ts index 90515b9dfc4a..7681f7e489d6 100644 --- a/sdk/consumption/arm-consumption/src/operations/index.ts +++ b/sdk/consumption/arm-consumption/src/operations/index.ts @@ -19,7 +19,6 @@ export * from "./reservationRecommendations"; export * from "./reservationRecommendationDetails"; export * from "./reservationTransactions"; export * from "./priceSheet"; -export * from "./forecasts"; export * from "./operations"; export * from "./aggregatedCost"; export * from "./eventsOperations"; diff --git a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts index e1ca09a3f203..e09becbfe188 100644 --- a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts @@ -26,81 +26,138 @@ export class LotsOperations { } /** - * Lists the lots by billingAccountId and billingProfileId. - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(scope: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param callback The callback */ - list(scope: string, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param options The optional parameters * @param callback The callback */ - list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfile(billingAccountId: string, billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - scope, + billingAccountId, + billingProfileId, options }, - listOperationSpec, - callback) as Promise; + listByBillingProfileOperationSpec, + callback) as Promise; } /** - * Lists the lots by billingAccountId and billingProfileId. + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. + * @param billingAccountId BillingAccount ID + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountId: string, options?: Models.LotsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, options: Models.LotsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountId: string, options?: Models.LotsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: Models.LotsListByBillingAccountNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: Models.LotsListByBillingAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: Models.LotsListByBillingAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{scope}/providers/Microsoft.Consumption/lots", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots", urlParameters: [ - Parameters.scope0 + Parameters.billingAccountId, + Parameters.billingProfileId ], queryParameters: [ Parameters.apiVersion @@ -119,7 +176,31 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots", + urlParameters: [ + Parameters.billingAccountId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Lots + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -142,3 +223,28 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Lots + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts index 375c3dcea57c..94299dc9fc92 100644 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts @@ -120,7 +120,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/marketplaces", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.filter0, diff --git a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts index 062fb980d41a..6d5c3c12a33d 100644 --- a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts +++ b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts @@ -26,8 +26,8 @@ export class PriceSheet { } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only - * for May 1, 2014 or later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, + * 2014 or later. * @param [options] The optional parameters * @returns Promise */ diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts index 2a4a6c4da6f4..06d86a7dc6b3 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts @@ -27,13 +27,12 @@ export class ReservationRecommendationDetails { /** * Details of a reservation recommendation for what-if analysis of reserved instances. - * @param billingScope The scope associated with reservation recommendation details operations. - * This includes '/subscriptions/{subscriptionId}/' for subscription scope, + * @param scope The scope associated with reservation recommendation details 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 scope Scope of the reservation. Possible values include: 'Single', 'Shared' * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', * 'P3Y' @@ -44,15 +43,14 @@ export class ReservationRecommendationDetails { * @param [options] The optional parameters * @returns Promise */ - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase): Promise; + get(scope: string, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param billingScope The scope associated with reservation recommendation details operations. - * This includes '/subscriptions/{subscriptionId}/' for subscription scope, + * @param scope The scope associated with reservation recommendation details 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 scope Scope of the reservation. Possible values include: 'Single', 'Shared' * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', * 'P3Y' @@ -62,15 +60,14 @@ export class ReservationRecommendationDetails { * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks) * @param callback The callback */ - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, callback: msRest.ServiceCallback): void; + get(scope: string, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, callback: msRest.ServiceCallback): void; /** - * @param billingScope The scope associated with reservation recommendation details operations. - * This includes '/subscriptions/{subscriptionId}/' for subscription scope, + * @param scope The scope associated with reservation recommendation details 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 scope Scope of the reservation. Possible values include: 'Single', 'Shared' * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', * 'P3Y' @@ -81,11 +78,10 @@ export class ReservationRecommendationDetails { * @param options The optional parameters * @param callback The callback */ - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(scope: string, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - billingScope, scope, region, term, @@ -102,13 +98,12 @@ export class ReservationRecommendationDetails { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{billingScope}/providers/Microsoft.Consumption/reservationRecommendationDetails", + path: "{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails", urlParameters: [ - Parameters.billingScope + Parameters.scope ], queryParameters: [ Parameters.apiVersion, - Parameters.scope1, Parameters.region, Parameters.term, Parameters.lookBackPeriod, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts index cee0975a8a80..68a0748eb829 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts @@ -103,7 +103,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/reservationRecommendations", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.filter0, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts index 6bc783602872..54231efe08f3 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts @@ -293,7 +293,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/reservationDetails", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.startDate0, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts index c8364aa700b9..12455eefb0c6 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts @@ -291,7 +291,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/reservationSummaries", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.grain, diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts index 52c6d0d481f9..ba9375de145f 100644 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ b/sdk/consumption/arm-consumption/src/operations/tags.ts @@ -87,7 +87,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/tags", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.apiVersion diff --git a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts index 024b9007fb21..30030ca62a14 100644 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts @@ -27,9 +27,7 @@ export class UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for - * May 1, 2014 or later. For more information on using this API, including how to specify a date - * range, please see: - * https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation + * 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, @@ -112,9 +110,7 @@ export class UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for - * May 1, 2014 or later. For more information on using this API, including how to specify a date - * range, please see: - * https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation + * May 1, 2014 or later. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -148,7 +144,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/usageDetails", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.expand,