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..52385950976d 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; @@ -1488,12 +1526,12 @@ export interface LegacyReservationRecommendation { */ 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; @@ -1503,7 +1541,7 @@ export interface LegacyReservationRecommendation { */ 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; @@ -1624,12 +1662,12 @@ export interface ModernReservationRecommendation { */ 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; @@ -1639,7 +1677,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; @@ -1738,21 +1776,6 @@ export interface ModernReservationRecommendation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly skuName?: string; - /** - * The Azure resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: string; - /** - * The Azure subscription ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly subscriptionId?: string; - /** - * Resource eTag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly eTag?: string; } /** @@ -2183,13 +2206,6 @@ export interface Notification { * The type of threshold. Possible values include: 'Actual'. Default value: 'Actual'. */ thresholdType?: ThresholdType; - /** - * Language in which the recipient will receive the notification. Possible values include: - * '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' - */ - locale?: CultureCode; } /** @@ -2341,65 +2357,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. */ @@ -2467,12 +2424,12 @@ export interface ChargeSummary { */ kind: "ChargeSummary"; /** - * 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; @@ -2482,7 +2439,7 @@ export interface ChargeSummary { */ 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; @@ -2513,12 +2470,12 @@ export interface LegacyChargeSummary { */ 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; @@ -2528,7 +2485,7 @@ export interface LegacyChargeSummary { */ 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; @@ -2583,12 +2540,12 @@ export interface ModernChargeSummary { */ 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; @@ -2598,7 +2555,7 @@ export interface ModernChargeSummary { */ 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; @@ -2781,35 +2738,35 @@ 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; } /** @@ -2817,90 +2774,127 @@ export interface Reseller { */ export interface EventSummary extends Resource { /** - * Credit Currency + * The date of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditCurrency?: string; + readonly transactionDate?: Date; /** - * Billing Currency. + * The description of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingCurrency?: string; + readonly description?: string; /** - * Transaction date. + * 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 transactionDate?: Date; + readonly newCredit?: Amount; /** - * Transaction description. + * 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 description?: string; + readonly adjustments?: Amount; /** - * New Credit. + * 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 newCredit?: Amount; + readonly creditExpired?: Amount; /** - * Current balance. + * 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 newCreditInBillingCurrency?: AmountWithExchangeRate; + readonly charges?: Amount; /** - * Adjustments amount. + * The balance after the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly adjustments?: Amount; + readonly closedBalance?: Amount; /** - * Current balance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Identifies the type of the event. Possible values include: 'SettledCharges', 'PendingCharges', + * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' */ - readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; + eventType?: EventType; /** - * Credit expired. + * 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 creditExpired?: Amount; + readonly invoiceNumber?: string; /** - * Current balance. + * 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 creditExpiredInBillingCurrency?: AmountWithExchangeRate; + readonly billingProfileId?: string; /** - * Charges amount. + * 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 charges?: Amount; + readonly billingProfileDisplayName?: string; /** - * Current balance. + * 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 chargesInBillingCurrency?: AmountWithExchangeRate; + readonly lotId?: string; /** - * Closed balance. + * 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 closedBalance?: 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 closedBalanceInBillingCurrency?: AmountWithExchangeRate; + readonly canceledCredit?: Amount; /** - * The type of event. Possible values include: 'SettledCharges', 'PendingCharges', - * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + * The credit currency of the event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - eventType?: EventType; + readonly creditCurrency?: string; /** - * Invoice number. + * The billing currency of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceNumber?: string; + readonly billingCurrency?: string; /** - * Reseller details. + * The reseller of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reseller?: Reseller; + /** + * 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; + /** + * 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 newCreditInBillingCurrency?: AmountWithExchangeRate; + /** + * The amount of balance adjustment in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; + /** + * 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 chargesInBillingCurrency?: AmountWithExchangeRate; + /** + * 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 eTag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eTag?: string; } /** @@ -2908,60 +2902,78 @@ export interface EventSummary extends Resource { */ export interface LotSummary extends Resource { /** - * 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; /** - * Reseller details. + * 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; + /** + * 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 eTag?: string; } /** @@ -2979,31 +2991,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 +3022,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 +3069,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 +3104,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 +3229,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 +3280,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 +3483,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 +3496,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 +3631,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 +3699,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' @@ -3697,40 +3740,6 @@ export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; */ export type ThresholdType = 'Actual'; -/** - * Defines values for CultureCode. - * Possible values include: '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' - * @readonly - * @enum {string} - */ -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 +3751,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'; +export type LotSource = 'PurchasedCredit' | 'PromotionalCredit' | 'ConsumptionCommitment'; + +/** + * Defines values for Status. + * Possible values include: 'None', 'Active', 'Inactive', 'Expired', 'Complete', 'Canceled' + * @readonly + * @enum {string} + */ +export type Status = 'None' | 'Active' | 'Inactive' | 'Expired' | 'Complete' | 'Canceled'; /** * Defines values for Datagrain. @@ -3781,20 +3798,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 +4468,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 +4481,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 +4506,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 +4521,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 +4546,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 +4561,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 +4586,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 +4606,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 +4646,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..e6d8618e6e3b 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", @@ -2231,27 +2281,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" - } } } } @@ -2947,12 +2976,6 @@ export const Notification: msRest.CompositeMapper = { type: { name: "String" } - }, - locale: { - serializedName: "locale", - type: { - name: "String" - } } } } @@ -3196,93 +3219,6 @@ export const DownloadProperties: msRest.CompositeMapper = { } }; -export const ForecastPropertiesConfidenceLevelsItem: msRest.CompositeMapper = { - serializedName: "ForecastProperties_confidenceLevelsItem", - type: { - name: "Composite", - className: "ForecastPropertiesConfidenceLevelsItem", - modelProperties: { - percentage: { - readOnly: true, - serializedName: "percentage", - type: { - name: "Number" - } - }, - bound: { - serializedName: "bound", - type: { - name: "String" - } - }, - value: { - 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: { @@ -3729,49 +3665,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" } } } @@ -3785,20 +3721,6 @@ export const EventSummary: msRest.CompositeMapper = { className: "EventSummary", modelProperties: { ...Resource.type.modelProperties, - creditCurrency: { - readOnly: true, - serializedName: "properties.creditCurrency", - type: { - name: "String" - } - }, - billingCurrency: { - readOnly: true, - serializedName: "properties.billingCurrency", - type: { - name: "String" - } - }, transactionDate: { readOnly: true, serializedName: "properties.transactionDate", @@ -3821,14 +3743,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 +3751,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 +3759,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 +3838,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 +3886,40 @@ export const LotSummary: msRest.CompositeMapper = { className: "AmountWithExchangeRate" } }, + eTag: { + readOnly: true, + serializedName: "properties.eTag", + type: { + name: "String" + } + } + } + } +}; + +export const LotSummary: msRest.CompositeMapper = { + serializedName: "LotSummary", + type: { + name: "Composite", + className: "LotSummary", + modelProperties: { + ...Resource.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 +3948,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 +3999,13 @@ export const LotSummary: msRest.CompositeMapper = { name: "Composite", className: "Reseller" } + }, + eTag: { + readOnly: true, + serializedName: "properties.eTag", + type: { + name: "String" + } } } } @@ -4040,14 +4040,6 @@ export const CreditBalanceSummary: msRest.CompositeMapper = { name: "Composite", className: "AmountWithExchangeRate" } - }, - currentBalanceInBillingCurrency: { - readOnly: true, - serializedName: "currentBalanceInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } } } } @@ -4060,20 +4052,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 +4084,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 +4105,13 @@ export const CreditSummary: msRest.CompositeMapper = { name: "Composite", className: "Reseller" } + }, + eTag: { + readOnly: true, + serializedName: "properties.eTag", + type: { + name: "String" + } } } } @@ -4324,13 +4323,6 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { type: { name: "String" } - }, - totalCost: { - readOnly: true, - serializedName: "totalCost", - type: { - name: "String" - } } } } @@ -4396,29 +4388,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: { 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,