diff --git a/sdk/consumption/arm-consumption/LICENSE.txt b/sdk/consumption/arm-consumption/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/consumption/arm-consumption/LICENSE.txt +++ b/sdk/consumption/arm-consumption/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index 60dbbae03bb7..a86d6b2d28b3 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for ConsumptionManagementClient. ### How to Install -``` +```bash npm install @azure/arm-consumption ``` @@ -19,13 +19,13 @@ npm install @azure/arm-consumption ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -34,12 +34,13 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { const client = new ConsumptionManagementClient(creds, subscriptionId); + const scope = "testscope"; const expand = "testexpand"; const filter = "testfilter"; const skiptoken = "testskiptoken"; const top = 1; - const apply = "testapply"; - client.usageDetails.list(expand, filter, skiptoken, top, apply).then((result) => { + const metric = "actualcost"; + client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { console.log("The result is:"); console.log(result); }); @@ -52,7 +53,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -82,12 +83,13 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to authManager.login(); } const client = new Azure.ArmConsumption.ConsumptionManagementClient(res.creds, subscriptionId); + const scope = "testscope"; const expand = "testexpand"; const filter = "testfilter"; const skiptoken = "testskiptoken"; const top = 1; - const apply = "testapply"; - client.usageDetails.list(expand, filter, skiptoken, top, apply).then((result) => { + const metric = "actualcost"; + client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -104,6 +106,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/consumption/arm-consumption/README.png) diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index d43ed96f88a0..b1ee952ea5f4 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -4,8 +4,8 @@ "description": "ConsumptionManagementClient Library with typescript type definitions for node.js and browser.", "version": "6.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/consumption/arm-consumption/rollup.config.js b/sdk/consumption/arm-consumption/rollup.config.js index e434910415dd..c28e7f73316a 100644 --- a/sdk/consumption/arm-consumption/rollup.config.js +++ b/sdk/consumption/arm-consumption/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/consumptionManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/consumptionManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-consumption.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts index 6157a62a09ab..69cf15fc8a2e 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -19,17 +19,17 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext { // Operation groups usageDetails: operations.UsageDetails; marketplaces: operations.Marketplaces; + budgets: operations.Budgets; + tags: operations.Tags; + charges: operations.Charges; balances: operations.Balances; reservationsSummaries: operations.ReservationsSummaries; reservationsDetails: operations.ReservationsDetails; reservationRecommendations: operations.ReservationRecommendations; - budgets: operations.Budgets; priceSheet: operations.PriceSheet; - tags: operations.Tags; forecasts: operations.Forecasts; operations: operations.Operations; aggregatedCost: operations.AggregatedCost; - charges: operations.Charges; /** * Initializes a new instance of the ConsumptionManagementClient class. @@ -41,17 +41,17 @@ class ConsumptionManagementClient extends ConsumptionManagementClientContext { super(credentials, subscriptionId, options); this.usageDetails = new operations.UsageDetails(this); this.marketplaces = new operations.Marketplaces(this); + this.budgets = new operations.Budgets(this); + this.tags = new operations.Tags(this); + this.charges = new operations.Charges(this); this.balances = new operations.Balances(this); this.reservationsSummaries = new operations.ReservationsSummaries(this); this.reservationsDetails = new operations.ReservationsDetails(this); this.reservationRecommendations = new operations.ReservationRecommendations(this); - this.budgets = new operations.Budgets(this); this.priceSheet = new operations.PriceSheet(this); - this.tags = new operations.Tags(this); this.forecasts = new operations.Forecasts(this); this.operations = new operations.Operations(this); this.aggregatedCost = new operations.AggregatedCost(this); - this.charges = new operations.Charges(this); } } diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts index ae3c432891eb..273c0680ae50 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-consumption"; -const packageVersion = "0.1.0"; +const packageVersion = "6.3.0"; export class ConsumptionManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; @@ -44,7 +44,7 @@ export class ConsumptionManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2018-10-01'; + this.apiVersion = '2019-04-01-preview'; 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 e520a3af90a2..3aae35180f80 100644 --- a/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/aggregatedCostMappers.ts @@ -1,39 +1,38 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ManagementGroupAggregatedCostResult, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, - ChargeSummary, + ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts index 036eb9055a36..3aae35180f80 100644 --- a/sdk/consumption/arm-consumption/src/models/balancesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/balancesMappers.ts @@ -1,39 +1,38 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { Balance, - Resource, - BaseResource, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ErrorResponse, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts index 5e4b32df6314..a9647b96f764 100644 --- a/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/budgetsMappers.ts @@ -1,40 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - BudgetsListResult, - Budget, - ProxyResource, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, BaseResource, + Budget, + BudgetsListResult, BudgetTimePeriod, - Filters, + ChargeSummary, CurrentSpend, - Notification, - ErrorResponse, ErrorDetails, - TagsResult, - Tag, - Resource, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + Resource, + Tag, + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts index af91eeda052f..3aae35180f80 100644 --- a/sdk/consumption/arm-consumption/src/models/chargesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/chargesMappers.ts @@ -1,40 +1,38 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ChargesListResult, - ChargeSummary, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts b/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts index 1a70ad016741..1b25b4c5042c 100644 --- a/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/forecastsMappers.ts @@ -1,40 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ForecastsListResult, - Forecast, - Resource, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, BaseResource, - ForecastPropertiesConfidenceLevelsItem, - ErrorResponse, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, ErrorDetails, - UsageDetail, - MeterDetails, + ErrorResponse, + Filters, + Forecast, + ForecastPropertiesConfidenceLevelsItem, + ForecastsListResult, + ManagementGroupAggregatedCostResult, Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, + MeterDetails, + MeterDetailsResponse, + Notification, PriceSheetProperties, - ManagementGroupAggregatedCostResult, - ChargeSummary, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index a0df6be94f6f..251dc752655f 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,3376 +11,1673 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing MeterDetails. * The properties of the meter detail. - * */ export interface MeterDetails { /** - * @member {string} [meterName] The name of the meter, within the given meter - * category - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the meter, within the given meter category + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterName?: string; /** - * @member {string} [meterCategory] The category of the meter, for example, - * 'Cloud services', 'Networking', etc.. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The category of the meter, for example, 'Cloud services', 'Networking', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterCategory?: string; /** - * @member {string} [meterSubCategory] The subcategory of the meter, for - * example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterSubCategory?: string; /** - * @member {string} [unit] The unit in which the meter consumption is - * charged, for example, 'Hours', 'GB', etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unit?: string; /** - * @member {string} [meterLocation] The location in which the Azure service - * is available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The location in which the Azure service is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterLocation?: string; /** - * @member {number} [totalIncludedQuantity] The total included quantity - * associated with the offer. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total included quantity associated with the offer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalIncludedQuantity?: number; /** - * @member {number} [pretaxStandardRate] The pretax listing price. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The pretax listing price. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly pretaxStandardRate?: number; /** - * @member {string} [serviceName] The name of the service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceName?: string; /** - * @member {string} [serviceTier] The service tier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The service tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceTier?: string; } /** - * @interface - * An interface representing Resource. + * The properties of the meter detail. + */ +export interface MeterDetailsResponse { + /** + * The name of the meter, within the given meter category + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterName?: string; + /** + * The category of the meter, for example, 'Cloud services', 'Networking', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterCategory?: string; + /** + * The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc.. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly meterSubCategory?: string; + /** + * The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly unitOfMeasure?: string; + /** + * The service family. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceFamily?: string; +} + +/** * The Resource model definition. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing UsageDetail. * An usage detail resource. - * - * @extends Resource */ export interface UsageDetail extends Resource { /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the usage belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Account identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingPeriodId?: string; + readonly billingAccountId?: string; /** - * @member {string} [invoiceId] The id of the invoice resource that the usage - * belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Account Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceId?: string; + readonly billingAccountName?: string; /** - * @member {Date} [usageStart] The start of the date time range covered by - * the usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The billing period start date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageStart?: Date; + readonly billingPeriodStartDate?: Date; /** - * @member {Date} [usageEnd] The end of the date time range covered by the - * usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The billing period end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageEnd?: Date; + readonly billingPeriodEndDate?: Date; /** - * @member {string} [instanceName] The name of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Profile identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceName?: string; + readonly billingProfileId?: string; /** - * @member {string} [instanceId] The uri of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Profile Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceId?: string; + readonly billingProfileName?: string; /** - * @member {string} [instanceLocation] The location of the resource instance - * that the usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Account Owner Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly instanceLocation?: string; + readonly accountOwnerId?: string; /** - * @member {string} [currency] 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.** + * Account Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly currency?: string; + readonly accountName?: string; /** - * @member {number} [usageQuantity] The quantity of usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription guid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly usageQuantity?: number; + readonly subscriptionId?: string; /** - * @member {number} [billableQuantity] The billable usage quantity. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billableQuantity?: number; + readonly subscriptionName?: string; /** - * @member {number} [pretaxCost] The amount of cost before tax. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Date for the usage record. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly pretaxCost?: number; + readonly date?: Date; /** - * @member {boolean} [isEstimated] The estimated usage is subject to change. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product name for the consumed service or purchase. Not available for Marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly isEstimated?: boolean; + readonly product?: string; + /** + * Part Number of the service used. Can be used to join with the price sheet. Not available for + * marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly partNumber?: string; /** - * @member {string} [meterId] The meter id (GUID). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id (GUID). Not available for marketplace. For reserved instance this represents the + * primary meter for which the reservation was purchased. For the actual VM Size for which the + * reservation is purchased see productOrderName. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {MeterDetails} [meterDetails] The details about the meter. By - * default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The details about the meter. By default this is not populated, unless it's specified in + * $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly meterDetails?: MeterDetails; + readonly meterDetails?: MeterDetailsResponse; /** - * @member {string} [subscriptionGuid] Subscription guid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The usage quantity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionGuid?: string; + readonly quantity?: number; /** - * @member {string} [subscriptionName] Subscription name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Effective Price that’s charged for the usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly subscriptionName?: string; + readonly effectivePrice?: number; /** - * @member {string} [accountName] Account name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The amount of cost before tax. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly accountName?: string; + readonly cost?: number; /** - * @member {string} [departmentName] Department name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unit Price is the price applicable to you. (your EA or other contract price). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly departmentName?: string; + readonly unitPrice?: number; /** - * @member {string} [product] Product name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Billing Currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly product?: string; + readonly billingCurrency?: string; + /** + * Resource Location. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceLocation?: string; /** - * @member {string} [consumedService] Consumed service name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Consumed service name. Name of the azure resource provider that emits the usage or was + * purchased. This value is not provided for marketplace usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly consumedService?: string; /** - * @member {string} [costCenter] The cost center of this department if it is - * a department and a costcenter exists - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure resource manager resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceId?: string; + /** + * Resource Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resourceName?: string; + /** + * Service Info 1. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceInfo1?: string; + /** + * Service Info 2. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceInfo2?: string; + /** + * Additional details of this usage item. By default this is not populated, unless it's specified + * in $expand. Use this field to get usage line item specific details such as the actual VM Size + * (ServiceType) or the ratio in which the reservation discount is applied. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: string; + /** + * Invoice Section Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly invoiceSection?: string; + /** + * The cost center of this department if it is a department and a cost center is provided. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly costCenter?: string; /** - * @member {string} [partNumber] Part Number - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Group Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly partNumber?: string; + readonly resourceGroup?: string; + /** + * ARM resource id of the reservation. Only applies to records relevant to reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservationId?: string; + /** + * User provided display name of the reservation. Last known name for a particular day is + * populated in the daily data. Only applies to records relevant to reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly reservationName?: string; /** - * @member {string} [resourceGuid] Resource Guid - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product Order Id. For reservations this is the Reservation Order ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resourceGuid?: string; + readonly productOrderId?: string; /** - * @member {string} [offerId] Offer Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Product Order Name. For reservations this is the SKU that was purchased. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly productOrderName?: string; + /** + * Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly offerId?: string; /** - * @member {boolean} [chargesBilledSeparately] Charges billed separately - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Is Azure Credit Eligible. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesBilledSeparately?: boolean; + readonly isAzureCreditEligible?: boolean; /** - * @member {string} [location] Resource Location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. + * 36 months for a 3 year reservation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly location?: string; + readonly term?: string; /** - * @member {string} [additionalProperties] Additional details of this usage - * item. By default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Publisher Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly additionalProperties?: string; + readonly publisherName?: string; + /** + * Publisher Type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly publisherType?: string; + /** + * Plan Name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly planName?: string; + /** + * Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a + * refund. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly chargeType?: string; + /** + * Indicates how frequently this charge will occur. OneTime for purchases which only happen once, + * Monthly for fees which recur every month, and UsageBased for charges based on how much a + * service is used. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly frequency?: string; +} + +/** + * Download response of Usage Details. + */ +export interface UsageDetailsDownloadResponse extends Resource { + /** + * The URL to the csv file. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly downloadUrl?: string; + /** + * The time in UTC at which this download URL will expire. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly validTill?: string; } /** - * @interface - * An interface representing Marketplace. * An marketplace resource. - * - * @extends Resource */ export interface Marketplace extends Resource { /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the usage belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The id of the billing period resource that the usage belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly billingPeriodId?: string; /** - * @member {Date} [usageStart] The start of the date time range covered by - * the usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The start of the date time range covered by the usage detail. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageStart?: Date; /** - * @member {Date} [usageEnd] The end of the date time range covered by the - * usage detail. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The end of the date time range covered by the usage detail. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageEnd?: Date; /** - * @member {number} [resourceRate] The marketplace resource rate. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The marketplace resource rate. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceRate?: number; /** - * @member {string} [offerName] The type of offer. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of offer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly offerName?: string; /** - * @member {string} [resourceGroup] The name of resource group. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of resource group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceGroup?: string; /** - * @member {string} [orderNumber] The order number. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The order number. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly orderNumber?: string; /** - * @member {string} [instanceName] The name of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource instance that the usage is about. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly instanceName?: string; /** - * @member {string} [instanceId] The uri of the resource instance that the - * usage is about. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The uri of the resource instance that the usage is about. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly instanceId?: string; /** - * @member {string} [currency] 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.** + * 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; /** - * @member {number} [consumedQuantity] The quantity of usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The quantity of usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly consumedQuantity?: number; /** - * @member {string} [unitOfMeasure] The unit of measure. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit of measure. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unitOfMeasure?: string; /** - * @member {number} [pretaxCost] The amount of cost before tax. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The amount of cost before tax. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly pretaxCost?: number; /** - * @member {boolean} [isEstimated] The estimated usage is subject to change. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The estimated usage is subject to change. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isEstimated?: boolean; /** - * @member {string} [meterId] The meter id (GUID). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id (GUID). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {string} [subscriptionGuid] Subscription guid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription guid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly subscriptionGuid?: string; /** - * @member {string} [subscriptionName] Subscription name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Subscription name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly subscriptionName?: string; /** - * @member {string} [accountName] Account name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Account name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly accountName?: string; /** - * @member {string} [departmentName] Department name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Department name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly departmentName?: string; /** - * @member {string} [consumedService] Consumed service name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Consumed service name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly consumedService?: string; /** - * @member {string} [costCenter] The cost center of this department if it is - * a department and a costcenter exists - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The cost center of this department if it is a department and a costcenter exists + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly costCenter?: string; /** - * @member {string} [additionalProperties] Additional details of this usage - * item. By default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Additional details of this usage item. By default this is not populated, unless it's specified + * in $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly additionalProperties?: string; /** - * @member {string} [publisherName] The name of publisher. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of publisher. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly publisherName?: string; /** - * @member {string} [planName] The name of plan. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of plan. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly planName?: string; /** - * @member {boolean} [isRecurringCharge] Flag indicating whether this is a - * recurring charge or not. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Flag indicating whether this is a recurring charge or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isRecurringCharge?: boolean; } /** - * @interface * An interface representing BalancePropertiesNewPurchasesDetailsItem. */ export interface BalancePropertiesNewPurchasesDetailsItem { /** - * @member {string} [name] the name of new purchase. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the name of new purchase. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {number} [value] the value of new purchase. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the value of new purchase. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: number; } /** - * @interface * An interface representing BalancePropertiesAdjustmentDetailsItem. */ export interface BalancePropertiesAdjustmentDetailsItem { /** - * @member {string} [name] the name of new adjustment. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the name of new adjustment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {number} [value] the value of new adjustment. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the value of new adjustment. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: number; } /** - * @interface - * An interface representing Balance. * A balance resource. - * - * @extends Resource */ export interface Balance extends Resource { /** - * @member {string} [currency] 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.** + * 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; /** - * @member {number} [beginningBalance] The beginning balance for the billing - * period. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The beginning balance for the billing period. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly beginningBalance?: number; /** - * @member {number} [endingBalance] The ending balance for the billing period - * (for open periods this will be updated daily). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ending balance for the billing period (for open periods this will be updated daily). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly endingBalance?: number; /** - * @member {number} [newPurchases] Total new purchase amount. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total new purchase amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly newPurchases?: number; /** - * @member {number} [adjustments] Total adjustment amount. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total adjustment amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly adjustments?: number; /** - * @member {number} [utilized] Total Commitment usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total Commitment usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly utilized?: number; /** - * @member {number} [serviceOverage] Overage for Azure services. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Overage for Azure services. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceOverage?: number; /** - * @member {number} [chargesBilledSeparately] Charges Billed separately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Charges Billed separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chargesBilledSeparately?: number; /** - * @member {number} [totalOverage] serviceOverage + chargesBilledSeparately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * serviceOverage + chargesBilledSeparately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalOverage?: number; /** - * @member {number} [totalUsage] Azure service commitment + total Overage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure service commitment + total Overage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalUsage?: number; /** - * @member {number} [azureMarketplaceServiceCharges] Total charges for Azure - * Marketplace. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total charges for Azure Marketplace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly azureMarketplaceServiceCharges?: number; /** - * @member {BillingFrequency} [billingFrequency] The billing frequency. - * Possible values include: 'Month', 'Quarter', 'Year' + * The billing frequency. Possible values include: 'Month', 'Quarter', 'Year' */ billingFrequency?: BillingFrequency; /** - * @member {boolean} [priceHidden] Price is hidden or not. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Price is hidden or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly priceHidden?: boolean; /** - * @member {BalancePropertiesNewPurchasesDetailsItem[]} [newPurchasesDetails] * List of new purchases. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; /** - * @member {BalancePropertiesAdjustmentDetailsItem[]} [adjustmentDetails] * List of Adjustments (Promo credit, SIE credit etc.). - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly adjustmentDetails?: BalancePropertiesAdjustmentDetailsItem[]; } /** - * @interface - * An interface representing ReservationSummary. * reservation summary resource. - * - * @extends Resource */ export interface ReservationSummary extends Resource { /** - * @member {string} [reservationOrderId] The reservation order ID is the - * identifier for a reservation purchase. Each reservation order ID - * represents a single purchase transaction. A reservation order contains - * reservations. The reservation order specifies the VM size and region for - * the reservations. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation order ID is the identifier for a reservation purchase. Each reservation order + * ID represents a single purchase transaction. A reservation order contains reservations. The + * reservation order specifies the VM size and region for the reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservationOrderId?: string; /** - * @member {string} [reservationId] The reservation ID is the identifier of a - * reservation within a reservation order. Each reservation is the grouping - * for applying the benefit scope and also specifies the number of instances - * to which the reservation benefit can be applied to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation ID is the identifier of a reservation within a reservation order. Each + * reservation is the grouping for applying the benefit scope and also specifies the number of + * instances to which the reservation benefit can be applied to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservationId?: string; /** - * @member {string} [skuName] This is the ARM Sku name. It can be used to - * join with the servicetype field in additoinalinfo in usage records. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the ARM Sku name. It can be used to join with the serviceType field in additional info + * in usage records. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly skuName?: string; /** - * @member {number} [reservedHours] This is the total hours reserved. E.g. if - * reservation for 1 instance was made on 1 PM, this will be 11 hours for - * that day and 24 hours from subsequent days - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this + * will be 11 hours for that day and 24 hours from subsequent days + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservedHours?: number; /** - * @member {Date} [usageDate] Data corresponding to the utilization record. - * If the grain of data is monthly, it will be first day of month. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Data corresponding to the utilization record. If the grain of data is monthly, it will be + * first day of month. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageDate?: Date; /** - * @member {number} [usedHours] Total used hours by the reservation - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total used hours by the reservation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usedHours?: number; /** - * @member {number} [minUtilizationPercentage] This is the minimum hourly - * utilization in the usage time (day or month). E.g. if usage record - * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was - * 10%, this field will return 10% for that day - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record + * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will + * return 10% for that day + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly minUtilizationPercentage?: number; /** - * @member {number} [avgUtilizationPercentage] This is average utilization - * for the entire time range. (day or month depending on the grain) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is average utilization for the entire time range. (day or month depending on the grain) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly avgUtilizationPercentage?: number; /** - * @member {number} [maxUtilizationPercentage] This is the maximum hourly - * utilization in the usage time (day or month). E.g. if usage record - * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was - * 100%, this field will return 100% for that day. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record + * corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will + * return 100% for that day. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly maxUtilizationPercentage?: number; } /** - * @interface - * An interface representing ReservationDetail. * reservation detail resource. - * - * @extends Resource */ export interface ReservationDetail extends Resource { /** - * @member {string} [reservationOrderId] The reservation order ID is the - * identifier for a reservation purchase. Each reservation order ID - * represents a single purchase transaction. A reservation order contains - * reservations. The reservation order specifies the VM size and region for - * the reservations. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation order ID is the identifier for a reservation purchase. Each reservation order + * ID represents a single purchase transaction. A reservation order contains reservations. The + * reservation order specifies the VM size and region for the reservations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservationOrderId?: string; /** - * @member {string} [reservationId] The reservation ID is the identifier of a - * reservation within a reservation order. Each reservation is the grouping - * for applying the benefit scope and also specifies the number of instances - * to which the reservation benefit can be applied to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reservation ID is the identifier of a reservation within a reservation order. Each + * reservation is the grouping for applying the benefit scope and also specifies the number of + * instances to which the reservation benefit can be applied to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservationId?: string; /** - * @member {string} [skuName] This is the ARM Sku name. It can be used to - * join with the servicetype field in additoinalinfo in usage records. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the ARM Sku name. It can be used to join with the serviceType field in additional info + * in usage records. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly skuName?: string; /** - * @member {number} [reservedHours] This is the total hours reserved for the - * day. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 - * hours for that day and 24 hours from subsequent days. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 + * PM, this will be 11 hours for that day and 24 hours from subsequent days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservedHours?: number; /** - * @member {Date} [usageDate] The date on which consumption occurred. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The date on which consumption occurred. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageDate?: Date; /** - * @member {number} [usedHours] This is the total hours used by the instance. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the total hours used by the instance. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usedHours?: number; /** - * @member {string} [instanceId] This identifier is the name of the resource - * or the fully qualified Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This identifier is the name of the resource or the fully qualified Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly instanceId?: string; /** - * @member {number} [totalReservedQuantity] This is the total count of - * instances that are reserved for the reservationid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * This is the total count of instances that are reserved for the reservationId. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalReservedQuantity?: number; } /** - * @interface - * An interface representing ReservationRecommendation. * Reservation recommendation resource. - * */ export interface ReservationRecommendation { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: { [propertyName: string]: string }; /** - * @member {string} [location] Resource location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; /** - * @member {string} [sku] Resource sku - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly sku?: string; /** - * @member {string} [lookBackPeriod] The number of days of usage to look back - * for recommendation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The number of days of usage to look back for recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lookBackPeriod?: string; /** - * @member {string} [meterId] The meter id (GUID) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {string} [term] RI recommendations in one or three year terms. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * RI recommendations in one or three year terms. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly term?: string; /** - * @member {number} [costWithNoReservedInstances] The total amount of cost - * without reserved instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total amount of cost without reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly costWithNoReservedInstances?: number; /** - * @member {number} [recommendedQuantity] Recomended quality for reserved - * instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Recommended quality for reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recommendedQuantity?: number; /** - * @member {number} [totalCostWithReservedInstances] The total amount of cost - * with reserved instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total amount of cost with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly totalCostWithReservedInstances?: number; /** - * @member {number} [netSavings] Total estimated savings with reserved - * instances. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total estimated savings with reserved instances. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly netSavings?: number; /** - * @member {Date} [firstUsageDate] The usage date for looking back. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The usage date for looking back. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly firstUsageDate?: Date; /** - * @member {string} [scope] Shared or single recommendation. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Shared or single recommendation. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly scope?: string; } /** - * @interface - * An interface representing Tag. * The tag resource. - * */ export interface Tag { /** - * @member {string} [key] Tag key. + * Tag key. */ key?: string; } /** - * @interface - * An interface representing ProxyResource. * The Resource model definition. - * - * @extends BaseResource */ export interface ProxyResource extends BaseResource { /** - * @member {string} [id] Resource Id. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [eTag] eTag of the resource. To handle concurrent update - * scenarion, this field will be used to determine whether the user is - * updating the latest version or not. + * eTag of the resource. To handle concurrent update scenario, this field will be used to + * determine whether the user is updating the latest version or not. */ eTag?: string; } /** - * @interface - * An interface representing TagsResult. * A resource listing all tags. - * - * @extends ProxyResource */ export interface TagsResult extends ProxyResource { /** - * @member {Tag[]} [tags] A list of Tag. + * A list of Tag. */ tags?: Tag[]; } /** - * @interface - * An interface representing BudgetTimePeriod. * The start and end date for a budget. - * */ export interface BudgetTimePeriod { /** - * @member {Date} startDate The start date for the budget. + * The start date for the budget. */ startDate: Date; /** - * @member {Date} [endDate] The end date for the budget. If not provided, we - * default this to 10 years from the start date. + * The end date for the budget. If not provided, we default this to 10 years from the start date. */ endDate?: Date; } /** - * @interface - * An interface representing Filters. * May be used to filter budgets by resource group, resource, or meter. - * */ export interface Filters { /** - * @member {string[]} [resourceGroups] The list of filters on resource - * groups, allowed at subscription level only. + * The list of filters on resource groups, allowed at subscription level only. */ resourceGroups?: string[]; /** - * @member {string[]} [resources] The list of filters on resources. + * The list of filters on resources. */ resources?: string[]; /** - * @member {string[]} [meters] The list of filters on meters (GUID), - * mandatory for budgets of usage category. + * The list of filters on meters (GUID), mandatory for budgets of usage category. */ meters?: string[]; /** - * @member {{ [propertyName: string]: string[] }} [tags] The dictionary of - * filters on tags. + * The dictionary of filters on tags. */ tags?: { [propertyName: string]: string[] }; } /** - * @interface - * An interface representing CurrentSpend. * The current amount of cost which is being tracked for a budget. - * */ export interface CurrentSpend { /** - * @member {number} [amount] The total amount of cost which is being tracked - * by the budget. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The total amount of cost which is being tracked by the budget. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly amount?: number; /** - * @member {string} [unit] The unit of measure for the budget amount. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The unit of measure for the budget amount. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unit?: string; } /** - * @interface - * An interface representing Notification. * The notification associated with a budget. - * */ export interface Notification { /** - * @member {boolean} enabled The notification is enabled or not. + * The notification is enabled or not. */ enabled: boolean; /** - * @member {OperatorType} operator The comparison operator. Possible values - * include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + * The comparison operator. Possible values include: 'EqualTo', 'GreaterThan', + * 'GreaterThanOrEqualTo' */ operator: OperatorType; /** - * @member {number} threshold Threshold value associated with a notification. - * Notification is sent when the cost exceeded the threshold. It is always - * percent and has to be between 0 and 1000. + * Threshold value associated with a notification. Notification is sent when the cost exceeded + * the threshold. It is always percent and has to be between 0 and 1000. */ threshold: number; /** - * @member {string[]} contactEmails Email addresses to send the budget - * notification to when the threshold is exceeded. + * Email addresses to send the budget notification to when the threshold is exceeded. */ contactEmails: string[]; /** - * @member {string[]} [contactRoles] Contact roles to send the budget - * notification to when the threshold is exceeded. + * Contact roles to send the budget notification to when the threshold is exceeded. */ contactRoles?: string[]; /** - * @member {string[]} [contactGroups] Action groups to send the budget - * notification to when the threshold is exceeded. + * Action groups to send the budget notification to when the threshold is exceeded. */ contactGroups?: string[]; } /** - * @interface - * An interface representing Budget. * A budget resource. - * - * @extends ProxyResource */ export interface Budget extends ProxyResource { /** - * @member {CategoryType} category The category of the budget, whether the - * budget tracks cost or usage. Possible values include: 'Cost', 'Usage' + * The category of the budget, whether the budget tracks cost or usage. Possible values include: + * 'Cost', 'Usage' */ category: CategoryType; /** - * @member {number} amount The total amount of cost to track with the budget + * The total amount of cost to track with the budget */ amount: number; /** - * @member {TimeGrainType} timeGrain The time covered by a budget. Tracking - * of the amount will be reset based on the time grain. Possible values - * include: 'Monthly', 'Quarterly', 'Annually' + * The time covered by a budget. Tracking of the amount will be reset based on the time grain. + * Possible values include: 'Monthly', 'Quarterly', 'Annually' */ timeGrain: TimeGrainType; /** - * @member {BudgetTimePeriod} timePeriod Has start and end date of the - * budget. The start date must be first of the month and should be less than - * the end date. Budget start date must be on or after June 1, 2017. Future - * start date should not be more than three months. Past start date should - * be selected within the timegrain preiod. There are no restrictions on the - * end date. + * Has start and end date of the budget. The start date must be first of the month and should be + * less than the end date. Budget start date must be on or after June 1, 2017. Future start date + * should not be more than three months. Past start date should be selected within the timegrain + * period. There are no restrictions on the end date. */ timePeriod: BudgetTimePeriod; /** - * @member {Filters} [filters] May be used to filter budgets by resource - * group, resource, or meter. + * May be used to filter budgets by resource group, resource, or meter. */ filters?: Filters; /** - * @member {CurrentSpend} [currentSpend] The current amount of cost which is - * being tracked for a budget. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The current amount of cost which is being tracked for a budget. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly currentSpend?: CurrentSpend; /** - * @member {{ [propertyName: string]: Notification }} [notifications] - * Dictionary of notifications associated with the budget. Budget can have up - * to five notifications. + * Dictionary of notifications associated with the budget. Budget can have up to five + * notifications. */ notifications?: { [propertyName: string]: Notification }; } /** - * @interface - * An interface representing PriceSheetProperties. * The properties of the price sheet. - * */ export interface PriceSheetProperties { /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the usage belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The id of the billing period resource that the usage belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly billingPeriodId?: string; /** - * @member {string} [meterId] The meter id (GUID) - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The meter id (GUID) + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterId?: string; /** - * @member {MeterDetails} [meterDetails] The details about the meter. By - * default this is not populated, unless it's specified in $expand. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The details about the meter. By default this is not populated, unless it's specified in + * $expand. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly meterDetails?: MeterDetails; /** - * @member {string} [unitOfMeasure] Unit of measure - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unit of measure + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unitOfMeasure?: string; /** - * @member {number} [includedQuantity] Included quality for an offer - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Included quality for an offer + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly includedQuantity?: number; /** - * @member {string} [partNumber] Part Number - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Part Number + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly partNumber?: string; /** - * @member {number} [unitPrice] Unit Price - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Unit Price + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly unitPrice?: number; /** - * @member {string} [currencyCode] Currency Code - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Currency Code + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly currencyCode?: string; /** - * @member {string} [offerId] Offer Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Offer Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly offerId?: string; } /** - * @interface - * An interface representing PriceSheetResult. * An pricesheet resource. - * - * @extends Resource */ export interface PriceSheetResult extends Resource { /** - * @member {PriceSheetProperties[]} [pricesheets] Price sheet - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Price sheet + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly pricesheets?: PriceSheetProperties[]; /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** - * @interface * An interface representing ForecastPropertiesConfidenceLevelsItem. */ export interface ForecastPropertiesConfidenceLevelsItem { /** - * @member {number} [percentage] The percentage level of the confidence - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The percentage level of the confidence + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly percentage?: number; /** - * @member {Bound} [bound] The boundary of the percentage, values could be - * 'Upper' or 'Lower'. Possible values include: 'Upper', 'Lower' + * The boundary of the percentage, values could be 'Upper' or 'Lower'. Possible values include: + * 'Upper', 'Lower' */ bound?: Bound; /** - * @member {number} [value] The amount of forecast within the percentage - * level - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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; } /** - * @interface - * An interface representing Forecast. * A forecast resource. - * - * @extends Resource */ export interface Forecast extends Resource { /** - * @member {string} [usageDate] The usage date of the forecast. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The usage date of the forecast. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageDate?: string; /** - * @member {Grain} [grain] The granularity of forecast. Possible values - * include: 'Daily', 'Monthly', 'Yearly' + * The granularity of forecast. Possible values include: 'Daily', 'Monthly', 'Yearly' */ grain?: Grain; /** - * @member {number} [charge] The amount of charge - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The amount of charge + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly charge?: number; /** - * @member {string} [currency] 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.** + * 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; /** - * @member {ChargeType} [chargeType] The type of the charge. Could be actual - * or forecast. Possible values include: 'Actual', 'Forecast' + * The type of the charge. Could be actual or forecast. Possible values include: 'Actual', + * 'Forecast' */ chargeType?: ChargeType; /** - * @member {ForecastPropertiesConfidenceLevelsItem[]} [confidenceLevels] 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.** + * 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[]; } /** - * @interface - * An interface representing ManagementGroupAggregatedCostResult. * A management group aggregated cost resource. - * - * @extends Resource */ export interface ManagementGroupAggregatedCostResult extends Resource { /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the aggregated cost belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The id of the billing period resource that the aggregated cost belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly billingPeriodId?: string; /** - * @member {Date} [usageStart] The start of the date time range covered by - * aggregated cost. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The start of the date time range covered by aggregated cost. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageStart?: Date; /** - * @member {Date} [usageEnd] The end of the date time range covered by the - * aggregated cost. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The end of the date time range covered by the aggregated cost. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageEnd?: Date; /** - * @member {number} [azureCharges] Azure Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly azureCharges?: number; /** - * @member {number} [marketplaceCharges] Marketplace Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Marketplace Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly marketplaceCharges?: number; /** - * @member {number} [chargesBilledSeparately] Charges Billed Separately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Charges Billed Separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chargesBilledSeparately?: number; /** - * @member {string} [currency] 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.** + * 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; /** - * @member {ManagementGroupAggregatedCostResult[]} [children] Children of a - * management group + * Children of a management group */ children?: ManagementGroupAggregatedCostResult[]; /** - * @member {string[]} [includedSubscriptions] List of subscription Guids - * included in the calculation of aggregated cost + * List of subscription Guids included in the calculation of aggregated cost */ includedSubscriptions?: string[]; /** - * @member {string[]} [excludedSubscriptions] List of subscription Guids - * excluded from the calculation of aggregated cost + * List of subscription Guids excluded from the calculation of aggregated cost */ excludedSubscriptions?: string[]; } /** - * @interface - * An interface representing ChargeSummary. * A charge summary resource. - * - * @extends Resource */ export interface ChargeSummary extends Resource { /** - * @member {string} [billingPeriodId] The id of the billing period resource - * that the charge belongs to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The id of the billing period resource that the charge belongs to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly billingPeriodId?: string; /** - * @member {string} [usageStart] Usage start date. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Usage start date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageStart?: string; /** - * @member {string} [usageEnd] Usage end date. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Usage end date. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly usageEnd?: string; /** - * @member {number} [azureCharges] Azure Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Azure Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly azureCharges?: number; /** - * @member {number} [chargesBilledSeparately] Charges Billed separately. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Charges Billed separately. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly chargesBilledSeparately?: number; /** - * @member {number} [marketplaceCharges] Marketplace Charges. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Marketplace Charges. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly marketplaceCharges?: number; /** - * @member {string} [currency] Currency Code - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Currency Code + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly currency?: string; } /** - * @interface - * An interface representing ChargesListResult. * Result of listing charge summary. - * */ export interface ChargesListResult { /** - * @member {ChargeSummary[]} [value] The list of charge summary - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of charge summary + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly value?: ChargeSummary[]; } /** - * @interface - * An interface representing ErrorDetails. * The details of the error. - * */ export interface ErrorDetails { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [message] Error message indicating why the operation - * failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing ErrorResponse. - * Error response indicates that the service is not able to process the - * incoming request. The reason is provided in the error message. - * + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. */ export interface ErrorResponse { /** - * @member {ErrorDetails} [error] The details of the error. + * The details of the error. */ error?: ErrorDetails; } /** - * @interface - * An interface representing OperationDisplay. * The object that represents the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft.Consumption. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service provider: Microsoft.Consumption. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [resource] Resource on which the operation is performed: - * UsageDetail, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource on which the operation is performed: UsageDetail, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [operation] Operation type: Read, write, delete, etc. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation type: Read, write, delete, etc. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; } /** - * @interface - * An interface representing Operation. * A Consumption REST API operation. - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The object that represents the operation. */ display?: OperationDisplay; } /** - * @interface - * An interface representing ResourceAttributes. * The Resource model definition. - * */ export interface ResourceAttributes { /** - * @member {string} [location] Resource location - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource location + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly location?: string; /** - * @member {string} [sku] Resource sku - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource sku + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly sku?: string; } /** - * @interface - * An interface representing QueryOptions. - * Additional parameters for a set of operations. - * - */ -export interface QueryOptions { - /** - * @member {string} [apply] OData apply expression to aggregate usageDetails - * by tags or (tags and properties/usageStart) - */ - apply?: string; -} - -/** - * @interface - * An interface representing UsageDetailsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * May be used to expand the properties/additionalInfo or properties/meterDetails within a list + * of usage details. By default, these fields are not included when listing usage details. */ expand?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * 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 where key and value is separated by a colon (:). + * May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, + * properties/resourceId, properties/chargeType, properties/reservationId 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 where key and value is separated by a colon (:). */ filter?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. */ skiptoken?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * May be used to limit the number of results to the most recent N usageDetails. */ top?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Allows to select different type of cost/usage records. Possible values include: + * 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' */ - queryOptions?: QueryOptions; + metric?: Metrictype; } /** - * @interface - * An interface representing UsageDetailsListByBillingPeriodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. - */ - expand?: string; - /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). - */ - filter?: string; +export interface UsageDetailsDownloadOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Allows to select different type of cost/usage records. Possible values include: + * 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. - */ - top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; + metric?: Metrictype; } /** - * @interface - * An interface representing UsageDetailsListByBillingAccountOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { +export interface UsageDetailsBeginDownloadOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * Allows to select different type of cost/usage records. Possible values include: + * 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' */ - expand?: string; + metric?: Metrictype; +} + +/** + * Optional Parameters. + */ +export interface MarketplacesListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * 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 where key and value is separated by a colon (:). + * May be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart + * (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The + * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', + * 'or', or 'not'. */ filter?: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * May be used to limit the number of results to the most recent N marketplaces. */ top?: number; /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. */ - queryOptions?: QueryOptions; + skiptoken?: string; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByBillingAccountOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListForBillingPeriodByBillingAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. - */ - expand?: string; +export interface ChargesListByScopeOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * May be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (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; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. - */ - top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** - * @interface - * An interface representing UsageDetailsListByDepartmentOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. - */ - expand?: string; +export interface ReservationsSummariesListByReservationOrderOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * 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 where key and value is separated by a colon (:). + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' */ filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. - */ - top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByDepartmentOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. - */ - expand?: string; +export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge' */ filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. - */ - top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** - * @interface - * An interface representing UsageDetailsListByEnrollmentAccountOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. - */ - expand?: string; +export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * 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 where key and value is separated by a colon (:). + * May be used to filter reservationRecommendations by properties/scope and + * properties/lookBackPeriod. */ filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. - */ - top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { +export interface PriceSheetGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * May be used to expand the properties/meterDetails within a price sheet. By default, these + * fields are not included when returning price sheet. */ expand?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). - */ - filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. */ skiptoken?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * May be used to limit the number of results to the top N results. */ top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** - * @interface - * An interface representing UsageDetailsListByManagementGroupOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { +export interface PriceSheetGetByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. + * May be used to expand the properties/meterDetails within a price sheet. By default, these + * fields are not included when returning price sheet. */ expand?: string; /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName, properties/instanceId - * 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 where key and value is separated by a colon (:). - */ - filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * Skiptoken is only used if a previous operation returned a partial result. If a previous + * response contains a nextLink element, the value of the nextLink element will include a + * skiptoken parameter that specifies a starting point to use for subsequent calls. */ skiptoken?: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * May be used to limit the number of results to the top N results. */ top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** - * @interface - * An interface representing UsageDetailsListForBillingPeriodByManagementGroupOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface UsageDetailsListForBillingPeriodByManagementGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/additionalProperties or properties/meterDetails within a list - * of usage details. By default, these fields are not included when listing - * usage details. - */ - expand?: string; +export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * 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'. */ filter?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. - */ - top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; -} - -/** - * @interface - * An interface representing MarketplacesListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface MarketplacesListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; } /** - * @interface - * An interface representing MarketplacesListByBillingPeriodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface MarketplacesListByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { +export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * 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; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; } /** - * @interface - * An interface representing MarketplacesListByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * An interface representing ConsumptionManagementClientOptions. */ -export interface MarketplacesListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; +export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; } /** - * @interface - * An interface representing MarketplacesListForBillingPeriodByBillingAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines headers for Download operation. */ -export interface MarketplacesListForBillingPeriodByBillingAccountOptionalParams extends msRest.RequestOptionsBase { +export interface UsageDetailsDownloadHeaders { /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. + * GET this URL to retrieve the status of the asynchronous operation. */ - filter?: string; + location: string; /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. + * The amount of delay to use while the status of the operation is checked. The value is + * expressed in seconds. */ - top?: number; + retryAfter: string; /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * To get the progress of the operation, call GET operation on the URL in Azure-AsyncOperation + * header field. */ - skiptoken?: string; + azureAsyncOperation: string; } /** * @interface - * An interface representing MarketplacesListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing usage details. It contains a list of available usage details in reverse + * chronological order by billing period. + * @extends Array */ -export interface MarketplacesListByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface UsageDetailsListResult extends Array { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing marketplaces. It contains a list of available marketplaces in reverse + * chronological order by billing period. + * @extends Array */ -export interface MarketplacesListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface MarketplacesListResult extends Array { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing budgets. It contains a list of available budgets in the scope provided. + * @extends Array */ -export interface MarketplacesListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface BudgetsListResult extends Array { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing reservation summaries. + * @extends Array */ -export interface MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface ReservationSummariesListResult extends Array { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing reservation details. + * @extends Array */ -export interface MarketplacesListByManagementGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface ReservationDetailsListResult extends Array { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListForBillingPeriodByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing reservation recommendations. + * @extends Array */ -export interface MarketplacesListForBillingPeriodByManagementGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter marketplaces by - * properties/usageEnd (Utc time), properties/usageStart (Utc time), - * properties/resourceGroup, properties/instanceName or - * properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', - * and 'and'. It does not currently support 'ne', 'or', or 'not'. - */ - filter?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * most recent N marketplaces. - */ - top?: number; +export interface ReservationRecommendationsListResult extends Array { /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. + * The link (url) to the next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing ReservationsSummariesListByReservationOrderOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing forecasts. It contains a list of available forecasts. + * @extends Array */ -export interface ReservationsSummariesListByReservationOrderOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] Required only for daily grain. The - * properties/UsageDate for start date and end date. The filter supports 'le' - * and 'ge' - */ - filter?: string; +export interface ForecastsListResult extends Array { } /** * @interface - * An interface representing ReservationsSummariesListByReservationOrderAndReservationOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Result of listing consumption operations. It contains a list of operations and a URL link to get + * the next set of results. + * @extends Array */ -export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams extends msRest.RequestOptionsBase { +export interface OperationListResult extends Array { /** - * @member {string} [filter] Required only for daily grain. The - * properties/UsageDate for start date and end date. The filter supports 'le' - * and 'ge' + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - filter?: string; + readonly nextLink?: string; } /** - * @interface - * An interface representing ReservationRecommendationsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for BillingFrequency. + * Possible values include: 'Month', 'Quarter', 'Year' + * @readonly + * @enum {string} */ -export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter reservationRecommendations - * by properties/scope and properties/lookBackPeriod. - */ - filter?: string; -} +export type BillingFrequency = 'Month' | 'Quarter' | 'Year'; /** - * @interface - * An interface representing PriceSheetGetOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for CategoryType. + * Possible values include: 'Cost', 'Usage' + * @readonly + * @enum {string} */ -export interface PriceSheetGetOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/meterDetails within a price sheet. By default, these fields are - * not included when returning price sheet. - */ - expand?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * top N results. - */ - top?: number; -} +export type CategoryType = 'Cost' | 'Usage'; /** - * @interface - * An interface representing PriceSheetGetByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for TimeGrainType. + * Possible values include: 'Monthly', 'Quarterly', 'Annually' + * @readonly + * @enum {string} */ -export interface PriceSheetGetByBillingPeriodOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [expand] May be used to expand the - * properties/meterDetails within a price sheet. By default, these fields are - * not included when returning price sheet. - */ - expand?: string; - /** - * @member {string} [skiptoken] Skiptoken is only used if a previous - * operation returned a partial result. If a previous response contains a - * nextLink element, the value of the nextLink element will include a - * skiptoken parameter that specifies a starting point to use for subsequent - * calls. - */ - skiptoken?: string; - /** - * @member {number} [top] May be used to limit the number of results to the - * top N results. - */ - top?: number; -} +export type TimeGrainType = 'Monthly' | 'Quarterly' | 'Annually'; /** - * @interface - * An interface representing ForecastsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for OperatorType. + * Possible values include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + * @readonly + * @enum {string} */ -export interface ForecastsListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] 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'. - */ - filter?: string; -} +export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; /** - * @interface - * An interface representing AggregatedCostGetByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for Grain. + * Possible values include: 'Daily', 'Monthly', 'Yearly' + * @readonly + * @enum {string} */ -export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter aggregated cost by - * properties/usageStart (Utc time), properties/usageEnd (Utc time). The - * filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not - * currently support 'ne', 'or', or 'not'. Tag filter is a key value pair - * string where key and value is separated by a colon (:). - */ - filter?: string; -} +export type Grain = 'Daily' | 'Monthly' | 'Yearly'; /** - * @interface - * An interface representing ChargesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for ChargeType. + * Possible values include: 'Actual', 'Forecast' + * @readonly + * @enum {string} */ -export interface ChargesListByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (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; -} +export type ChargeType = 'Actual' | 'Forecast'; /** - * @interface - * An interface representing ChargesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for Bound. + * Possible values include: 'Upper', 'Lower' + * @readonly + * @enum {string} */ -export interface ChargesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (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; -} - -/** - * @interface - * An interface representing ChargesListByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ChargesListByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (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; -} - -/** - * @interface - * An interface representing ChargesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ChargesListForBillingPeriodByDepartmentOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter charges by - * properties/usageEnd (Utc time), properties/usageStart (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; -} - -/** - * @interface - * An interface representing ConsumptionManagementClientOptions. - * @extends AzureServiceClientOptions - */ -export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ - baseUri?: string; -} - - -/** - * @interface - * An interface representing the UsageDetailsListResult. - * Result of listing usage details. It contains a list of available usage - * details in reverse chronological order by billing period. - * - * @extends Array - */ -export interface UsageDetailsListResult extends Array { - /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the MarketplacesListResult. - * Result of listing marketplaces. It contains a list of available marketplaces - * in reverse chronological order by billing period. - * - * @extends Array - */ -export interface MarketplacesListResult extends Array { - /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the ReservationSummariesListResult. - * Result of listing reservation summaries. - * - * @extends Array - */ -export interface ReservationSummariesListResult extends Array { - /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the ReservationDetailsListResult. - * Result of listing reservation details. - * - * @extends Array - */ -export interface ReservationDetailsListResult extends Array { - /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the ReservationRecommendationsListResult. - * Result of listing reservation recommendations. - * - * @extends Array - */ -export interface ReservationRecommendationsListResult extends Array { - /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the BudgetsListResult. - * Result of listing budgets. It contains a list of available budgets in the - * scope provided. - * - * @extends Array - */ -export interface BudgetsListResult extends Array { - /** - * @member {string} [nextLink] The link (url) to the next page of results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * @interface - * An interface representing the ForecastsListResult. - * Result of listing forecasts. It contains a list of available forecasts. - * - * @extends Array - */ -export interface ForecastsListResult extends Array { -} - -/** - * @interface - * An interface representing the OperationListResult. - * Result of listing consumption operations. It contains a list of operations - * and a URL link to get the next set of results. - * - * @extends Array - */ -export interface OperationListResult extends Array { - /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly nextLink?: string; -} - -/** - * Defines values for BillingFrequency. - * Possible values include: 'Month', 'Quarter', 'Year' - * @readonly - * @enum {string} - */ -export type BillingFrequency = 'Month' | 'Quarter' | 'Year'; - -/** - * Defines values for CategoryType. - * Possible values include: 'Cost', 'Usage' - * @readonly - * @enum {string} - */ -export type CategoryType = 'Cost' | 'Usage'; - -/** - * Defines values for TimeGrainType. - * Possible values include: 'Monthly', 'Quarterly', 'Annually' - * @readonly - * @enum {string} - */ -export type TimeGrainType = 'Monthly' | 'Quarterly' | 'Annually'; - -/** - * Defines values for OperatorType. - * Possible values include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' - * @readonly - * @enum {string} - */ -export type OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; - -/** - * 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'; +export type Bound = 'Upper' | 'Lower'; /** * Defines values for Datagrain. * Possible values include: 'DailyGrain', 'MonthlyGrain' * @readonly - * @enum {string} - */ -export type Datagrain = 'daily' | 'monthly'; - -/** - * Contains response data for the list operation. - */ -export type UsageDetailsListResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByBillingPeriod operation. - */ -export type UsageDetailsListByBillingPeriodResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByBillingAccount operation. - */ -export type UsageDetailsListByBillingAccountResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByBillingAccount operation. - */ -export type UsageDetailsListForBillingPeriodByBillingAccountResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByDepartment operation. - */ -export type UsageDetailsListByDepartmentResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByDepartment operation. - */ -export type UsageDetailsListForBillingPeriodByDepartmentResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByEnrollmentAccount operation. - */ -export type UsageDetailsListByEnrollmentAccountResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. - */ -export type UsageDetailsListForBillingPeriodByEnrollmentAccountResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByManagementGroup operation. - */ -export type UsageDetailsListByManagementGroupResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByManagementGroup operation. - */ -export type UsageDetailsListForBillingPeriodByManagementGroupResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type UsageDetailsListNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByBillingPeriodNext operation. - */ -export type UsageDetailsListByBillingPeriodNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByBillingAccountNext operation. - */ -export type UsageDetailsListByBillingAccountNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByBillingAccountNext operation. - */ -export type UsageDetailsListForBillingPeriodByBillingAccountNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByDepartmentNext operation. - */ -export type UsageDetailsListByDepartmentNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByDepartmentNext operation. - */ -export type UsageDetailsListForBillingPeriodByDepartmentNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByEnrollmentAccountNext operation. - */ -export type UsageDetailsListByEnrollmentAccountNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByEnrollmentAccountNext operation. - */ -export type UsageDetailsListForBillingPeriodByEnrollmentAccountNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listByManagementGroupNext operation. - */ -export type UsageDetailsListByManagementGroupNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. - */ -export type UsageDetailsListForBillingPeriodByManagementGroupNextResponse = UsageDetailsListResult & { - /** - * 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: UsageDetailsListResult; - }; -}; - -/** - * Contains response data for the list operation. - */ -export type MarketplacesListResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByBillingPeriod operation. - */ -export type MarketplacesListByBillingPeriodResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByBillingAccount operation. - */ -export type MarketplacesListByBillingAccountResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByBillingAccount operation. - */ -export type MarketplacesListForBillingPeriodByBillingAccountResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByDepartment operation. - */ -export type MarketplacesListByDepartmentResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByDepartment operation. - */ -export type MarketplacesListForBillingPeriodByDepartmentResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByEnrollmentAccount operation. - */ -export type MarketplacesListByEnrollmentAccountResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. - */ -export type MarketplacesListForBillingPeriodByEnrollmentAccountResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByManagementGroup operation. - */ -export type MarketplacesListByManagementGroupResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByManagementGroup operation. - */ -export type MarketplacesListForBillingPeriodByManagementGroupResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type MarketplacesListNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByBillingPeriodNext operation. - */ -export type MarketplacesListByBillingPeriodNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByBillingAccountNext operation. - */ -export type MarketplacesListByBillingAccountNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByBillingAccountNext operation. - */ -export type MarketplacesListForBillingPeriodByBillingAccountNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listByDepartmentNext operation. - */ -export type MarketplacesListByDepartmentNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByDepartmentNext operation. - */ -export type MarketplacesListForBillingPeriodByDepartmentNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; + * @enum {string} + */ +export type Datagrain = 'daily' | 'monthly'; /** - * Contains response data for the listByEnrollmentAccountNext operation. + * Defines values for Metrictype. + * Possible values include: 'ActualCostMetricType', 'AmortizedCostMetricType', 'UsageMetricType' + * @readonly + * @enum {string} */ -export type MarketplacesListByEnrollmentAccountNextResponse = MarketplacesListResult & { - /** - * 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: MarketplacesListResult; - }; -}; +export type Metrictype = 'actualcost' | 'amortizedcost' | 'usage'; /** - * Contains response data for the listForBillingPeriodByEnrollmentAccountNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListForBillingPeriodByEnrollmentAccountNextResponse = MarketplacesListResult & { +export type UsageDetailsListResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3391,36 +1686,43 @@ export type MarketplacesListForBillingPeriodByEnrollmentAccountNextResponse = Ma * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsListResult; }; }; /** - * Contains response data for the listByManagementGroupNext operation. + * Contains response data for the download operation. */ -export type MarketplacesListByManagementGroupNextResponse = MarketplacesListResult & { +export type UsageDetailsDownloadResponse2 = UsageDetailsDownloadResponse & UsageDetailsDownloadHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: UsageDetailsDownloadHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsDownloadResponse; }; }; /** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = MarketplacesListResult & { +export type UsageDetailsListNextResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3429,17 +1731,18 @@ export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = Mark * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsListResult; }; }; /** - * Contains response data for the getByBillingAccount operation. + * Contains response data for the list operation. */ -export type BalancesGetByBillingAccountResponse = Balance & { +export type MarketplacesListResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3448,17 +1751,18 @@ export type BalancesGetByBillingAccountResponse = Balance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Balance; + parsedBody: MarketplacesListResult; }; }; /** - * Contains response data for the getForBillingPeriodByBillingAccount operation. + * Contains response data for the listNext operation. */ -export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { +export type MarketplacesListNextResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3467,17 +1771,18 @@ export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Balance; + parsedBody: MarketplacesListResult; }; }; /** - * Contains response data for the listByReservationOrder operation. + * Contains response data for the list operation. */ -export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult & { +export type BudgetsListResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3486,17 +1791,18 @@ export type ReservationsSummariesListByReservationOrderResponse = ReservationSum * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: BudgetsListResult; }; }; /** - * Contains response data for the listByReservationOrderAndReservation operation. + * Contains response data for the get operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult & { +export type BudgetsGetResponse = Budget & { /** * The underlying HTTP response. */ @@ -3505,17 +1811,18 @@ export type ReservationsSummariesListByReservationOrderAndReservationResponse = * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: Budget; }; }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the createOrUpdate operation. */ -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { +export type BudgetsCreateOrUpdateResponse = Budget & { /** * The underlying HTTP response. */ @@ -3524,17 +1831,18 @@ export type ReservationsSummariesListByReservationOrderNextResponse = Reservatio * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: Budget; }; }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the listNext operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { +export type BudgetsListNextResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3543,17 +1851,18 @@ export type ReservationsSummariesListByReservationOrderAndReservationNextRespons * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: BudgetsListResult; }; }; /** - * Contains response data for the listByReservationOrder operation. + * Contains response data for the get operation. */ -export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult & { +export type TagsGetResponse = TagsResult & { /** * The underlying HTTP response. */ @@ -3562,17 +1871,18 @@ export type ReservationsDetailsListByReservationOrderResponse = ReservationDetai * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: TagsResult; }; }; /** - * Contains response data for the listByReservationOrderAndReservation operation. + * Contains response data for the listByScope operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult & { +export type ChargesListByScopeResponse = ChargeSummary & { /** * The underlying HTTP response. */ @@ -3581,17 +1891,18 @@ export type ReservationsDetailsListByReservationOrderAndReservationResponse = Re * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: ChargeSummary; }; }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the getByBillingAccount operation. */ -export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { +export type BalancesGetByBillingAccountResponse = Balance & { /** * The underlying HTTP response. */ @@ -3600,17 +1911,18 @@ export type ReservationsDetailsListByReservationOrderNextResponse = ReservationD * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: Balance; }; }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the getForBillingPeriodByBillingAccount operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { +export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { /** * The underlying HTTP response. */ @@ -3619,17 +1931,18 @@ export type ReservationsDetailsListByReservationOrderAndReservationNextResponse * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: Balance; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByReservationOrder operation. */ -export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { +export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3638,17 +1951,18 @@ export type ReservationRecommendationsListResponse = ReservationRecommendationsL * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationRecommendationsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByReservationOrderAndReservation operation. */ -export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { +export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3657,17 +1971,18 @@ export type ReservationRecommendationsListNextResponse = ReservationRecommendati * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ReservationRecommendationsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type BudgetsListResponse = BudgetsListResult & { +export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3676,17 +1991,18 @@ export type BudgetsListResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listByResourceGroupName operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { +export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3695,17 +2011,18 @@ export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByReservationOrder operation. */ -export type BudgetsGetResponse = Budget & { +export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3714,17 +2031,18 @@ export type BudgetsGetResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByReservationOrderAndReservation operation. */ -export type BudgetsCreateOrUpdateResponse = Budget & { +export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3733,17 +2051,18 @@ export type BudgetsCreateOrUpdateResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the getByResourceGroupName operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type BudgetsGetByResourceGroupNameResponse = Budget & { +export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3752,17 +2071,18 @@ export type BudgetsGetByResourceGroupNameResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the createOrUpdateByResourceGroupName operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { +export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3771,17 +2091,18 @@ export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the list operation. */ -export type BudgetsListNextResponse = BudgetsListResult & { +export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3790,17 +2111,18 @@ export type BudgetsListNextResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationRecommendationsListResult; }; }; /** - * Contains response data for the listByResourceGroupNameNext operation. + * Contains response data for the listNext operation. */ -export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { +export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3809,10 +2131,11 @@ export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationRecommendationsListResult; }; }; @@ -3828,6 +2151,7 @@ export type PriceSheetGetResponse = PriceSheetResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3847,29 +2171,11 @@ export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult & { * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: PriceSheetResult; - }; -}; -/** - * Contains response data for the get operation. - */ -export type TagsGetResponse = TagsResult & { - /** - * 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: TagsResult; + parsedBody: PriceSheetResult; }; }; @@ -3885,6 +2191,7 @@ export type ForecastsListResponse = ForecastsListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3904,6 +2211,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3923,6 +2231,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3942,6 +2251,7 @@ export type AggregatedCostGetByManagementGroupResponse = ManagementGroupAggregat * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -3961,85 +2271,10 @@ export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = Managem * The response body as text (string format) */ bodyAsText: string; - /** - * The response body as parsed JSON or XML - */ - parsedBody: ManagementGroupAggregatedCostResult; - }; -}; - -/** - * Contains response data for the listByEnrollmentAccount operation. - */ -export type ChargesListByEnrollmentAccountResponse = ChargesListResult & { - /** - * 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: ChargesListResult; - }; -}; - -/** - * Contains response data for the listForBillingPeriodByEnrollmentAccount operation. - */ -export type ChargesListForBillingPeriodByEnrollmentAccountResponse = ChargeSummary & { - /** - * 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: ChargeSummary; - }; -}; - -/** - * Contains response data for the listByDepartment operation. - */ -export type ChargesListByDepartmentResponse = ChargesListResult & { - /** - * 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: ChargesListResult; - }; -}; -/** - * Contains response data for the listForBillingPeriodByDepartment operation. - */ -export type ChargesListForBillingPeriodByDepartmentResponse = ChargeSummary & { - /** - * 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: ChargeSummary; + parsedBody: ManagementGroupAggregatedCostResult; }; }; diff --git a/sdk/consumption/arm-consumption/src/models/mappers.ts b/sdk/consumption/arm-consumption/src/models/mappers.ts index 69f5bcfaaee2..30ce0c0d022a 100644 --- a/sdk/consumption/arm-consumption/src/models/mappers.ts +++ b/sdk/consumption/arm-consumption/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -87,6 +85,51 @@ export const MeterDetails: msRest.CompositeMapper = { } }; +export const MeterDetailsResponse: msRest.CompositeMapper = { + serializedName: "MeterDetailsResponse", + type: { + name: "Composite", + className: "MeterDetailsResponse", + modelProperties: { + meterName: { + readOnly: true, + serializedName: "meterName", + type: { + name: "String" + } + }, + meterCategory: { + readOnly: true, + serializedName: "meterCategory", + type: { + name: "String" + } + }, + meterSubCategory: { + readOnly: true, + serializedName: "meterSubCategory", + type: { + name: "String" + } + }, + unitOfMeasure: { + readOnly: true, + serializedName: "unitOfMeasure", + type: { + name: "String" + } + }, + serviceFamily: { + readOnly: true, + serializedName: "serviceFamily", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -137,88 +180,95 @@ export const UsageDetail: msRest.CompositeMapper = { className: "UsageDetail", modelProperties: { ...Resource.type.modelProperties, - billingPeriodId: { + billingAccountId: { readOnly: true, - serializedName: "properties.billingPeriodId", + serializedName: "properties.billingAccountId", type: { name: "String" } }, - invoiceId: { + billingAccountName: { readOnly: true, - serializedName: "properties.invoiceId", + serializedName: "properties.billingAccountName", type: { name: "String" } }, - usageStart: { + billingPeriodStartDate: { readOnly: true, - serializedName: "properties.usageStart", + serializedName: "properties.billingPeriodStartDate", type: { name: "DateTime" } }, - usageEnd: { + billingPeriodEndDate: { readOnly: true, - serializedName: "properties.usageEnd", + serializedName: "properties.billingPeriodEndDate", type: { name: "DateTime" } }, - instanceName: { + billingProfileId: { readOnly: true, - serializedName: "properties.instanceName", + serializedName: "properties.billingProfileId", type: { name: "String" } }, - instanceId: { + billingProfileName: { readOnly: true, - serializedName: "properties.instanceId", + serializedName: "properties.billingProfileName", type: { name: "String" } }, - instanceLocation: { + accountOwnerId: { readOnly: true, - serializedName: "properties.instanceLocation", + serializedName: "properties.accountOwnerId", type: { name: "String" } }, - currency: { + accountName: { readOnly: true, - serializedName: "properties.currency", + serializedName: "properties.accountName", type: { name: "String" } }, - usageQuantity: { + subscriptionId: { readOnly: true, - serializedName: "properties.usageQuantity", + serializedName: "properties.subscriptionId", type: { - name: "Number" + name: "String" } }, - billableQuantity: { + subscriptionName: { readOnly: true, - serializedName: "properties.billableQuantity", + serializedName: "properties.subscriptionName", type: { - name: "Number" + name: "String" } }, - pretaxCost: { + date: { readOnly: true, - serializedName: "properties.pretaxCost", + serializedName: "properties.date", type: { - name: "Number" + name: "DateTime" } }, - isEstimated: { + product: { readOnly: true, - serializedName: "properties.isEstimated", + serializedName: "properties.product", type: { - name: "Boolean" + name: "String" + } + }, + partNumber: { + readOnly: true, + serializedName: "properties.partNumber", + type: { + name: "String" } }, meterId: { @@ -233,40 +283,47 @@ export const UsageDetail: msRest.CompositeMapper = { serializedName: "properties.meterDetails", type: { name: "Composite", - className: "MeterDetails" + className: "MeterDetailsResponse" } }, - subscriptionGuid: { + quantity: { readOnly: true, - serializedName: "properties.subscriptionGuid", + serializedName: "properties.quantity", type: { - name: "Uuid" + name: "Number" } }, - subscriptionName: { + effectivePrice: { readOnly: true, - serializedName: "properties.subscriptionName", + serializedName: "properties.effectivePrice", type: { - name: "String" + name: "Number" } }, - accountName: { + cost: { readOnly: true, - serializedName: "properties.accountName", + serializedName: "properties.cost", type: { - name: "String" + name: "Number" } }, - departmentName: { + unitPrice: { readOnly: true, - serializedName: "properties.departmentName", + serializedName: "properties.unitPrice", + type: { + name: "Number" + } + }, + billingCurrency: { + readOnly: true, + serializedName: "properties.billingCurrency", type: { name: "String" } }, - product: { + resourceLocation: { readOnly: true, - serializedName: "properties.product", + serializedName: "properties.resourceLocation", type: { name: "String" } @@ -278,6 +335,48 @@ export const UsageDetail: msRest.CompositeMapper = { name: "String" } }, + resourceId: { + readOnly: true, + serializedName: "properties.resourceId", + type: { + name: "String" + } + }, + resourceName: { + readOnly: true, + serializedName: "properties.resourceName", + type: { + name: "String" + } + }, + serviceInfo1: { + readOnly: true, + serializedName: "properties.serviceInfo1", + type: { + name: "String" + } + }, + serviceInfo2: { + readOnly: true, + serializedName: "properties.serviceInfo2", + type: { + name: "String" + } + }, + additionalInfo: { + readOnly: true, + serializedName: "properties.additionalInfo", + type: { + name: "String" + } + }, + invoiceSection: { + readOnly: true, + serializedName: "properties.invoiceSection", + type: { + name: "String" + } + }, costCenter: { readOnly: true, serializedName: "properties.costCenter", @@ -285,16 +384,37 @@ export const UsageDetail: msRest.CompositeMapper = { name: "String" } }, - partNumber: { + resourceGroup: { readOnly: true, - serializedName: "properties.partNumber", + serializedName: "properties.resourceGroup", type: { name: "String" } }, - resourceGuid: { + reservationId: { readOnly: true, - serializedName: "properties.resourceGuid", + serializedName: "properties.reservationId", + type: { + name: "String" + } + }, + reservationName: { + readOnly: true, + serializedName: "properties.reservationName", + type: { + name: "String" + } + }, + productOrderId: { + readOnly: true, + serializedName: "properties.productOrderId", + type: { + name: "String" + } + }, + productOrderName: { + readOnly: true, + serializedName: "properties.productOrderName", type: { name: "String" } @@ -306,23 +426,76 @@ export const UsageDetail: msRest.CompositeMapper = { name: "String" } }, - chargesBilledSeparately: { + isAzureCreditEligible: { readOnly: true, - serializedName: "properties.chargesBilledSeparately", + serializedName: "properties.isAzureCreditEligible", type: { name: "Boolean" } }, - location: { + term: { readOnly: true, - serializedName: "properties.location", + serializedName: "properties.term", type: { name: "String" } }, - additionalProperties: { + publisherName: { readOnly: true, - serializedName: "properties.additionalProperties", + serializedName: "properties.publisherName", + type: { + name: "String" + } + }, + publisherType: { + readOnly: true, + serializedName: "properties.publisherType", + type: { + name: "String" + } + }, + planName: { + readOnly: true, + serializedName: "properties.planName", + type: { + name: "String" + } + }, + chargeType: { + readOnly: true, + serializedName: "properties.chargeType", + type: { + name: "String" + } + }, + frequency: { + readOnly: true, + serializedName: "properties.frequency", + type: { + name: "String" + } + } + } + } +}; + +export const UsageDetailsDownloadResponse: msRest.CompositeMapper = { + serializedName: "UsageDetailsDownloadResponse", + type: { + name: "Composite", + className: "UsageDetailsDownloadResponse", + modelProperties: { + ...Resource.type.modelProperties, + downloadUrl: { + readOnly: true, + serializedName: "properties.downloadUrl", + type: { + name: "String" + } + }, + validTill: { + readOnly: true, + serializedName: "properties.validTill", type: { name: "String" } @@ -1776,12 +1949,26 @@ export const ResourceAttributes: msRest.CompositeMapper = { } }; -export const QueryOptions: msRest.CompositeMapper = { +export const UsageDetailsDownloadHeaders: msRest.CompositeMapper = { + serializedName: "usagedetails-download-headers", type: { name: "Composite", - className: "QueryOptions", + className: "UsageDetailsDownloadHeaders", modelProperties: { - apply: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String" } @@ -1850,11 +2037,11 @@ export const MarketplacesListResult: msRest.CompositeMapper = { } }; -export const ReservationSummariesListResult: msRest.CompositeMapper = { - serializedName: "ReservationSummariesListResult", +export const BudgetsListResult: msRest.CompositeMapper = { + serializedName: "BudgetsListResult", type: { name: "Composite", - className: "ReservationSummariesListResult", + className: "BudgetsListResult", modelProperties: { value: { readOnly: true, @@ -1864,7 +2051,7 @@ export const ReservationSummariesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationSummary" + className: "Budget" } } } @@ -1880,11 +2067,11 @@ export const ReservationSummariesListResult: msRest.CompositeMapper = { } }; -export const ReservationDetailsListResult: msRest.CompositeMapper = { - serializedName: "ReservationDetailsListResult", +export const ReservationSummariesListResult: msRest.CompositeMapper = { + serializedName: "ReservationSummariesListResult", type: { name: "Composite", - className: "ReservationDetailsListResult", + className: "ReservationSummariesListResult", modelProperties: { value: { readOnly: true, @@ -1894,7 +2081,7 @@ export const ReservationDetailsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationDetail" + className: "ReservationSummary" } } } @@ -1910,11 +2097,11 @@ export const ReservationDetailsListResult: msRest.CompositeMapper = { } }; -export const ReservationRecommendationsListResult: msRest.CompositeMapper = { - serializedName: "ReservationRecommendationsListResult", +export const ReservationDetailsListResult: msRest.CompositeMapper = { + serializedName: "ReservationDetailsListResult", type: { name: "Composite", - className: "ReservationRecommendationsListResult", + className: "ReservationDetailsListResult", modelProperties: { value: { readOnly: true, @@ -1924,7 +2111,7 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationRecommendation" + className: "ReservationDetail" } } } @@ -1940,11 +2127,11 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { } }; -export const BudgetsListResult: msRest.CompositeMapper = { - serializedName: "BudgetsListResult", +export const ReservationRecommendationsListResult: msRest.CompositeMapper = { + serializedName: "ReservationRecommendationsListResult", type: { name: "Composite", - className: "BudgetsListResult", + className: "ReservationRecommendationsListResult", modelProperties: { value: { readOnly: true, @@ -1954,7 +2141,7 @@ export const BudgetsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Budget" + className: "ReservationRecommendation" } } } diff --git a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts index 785130c039b3..efea3e6b6b1b 100644 --- a/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/marketplacesMappers.ts @@ -1,40 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - MarketplacesListResult, - Marketplace, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MarketplacesListResult, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/operationsMappers.ts b/sdk/consumption/arm-consumption/src/models/operationsMappers.ts index 22478f5be09f..c22b051e72cc 100644 --- a/sdk/consumption/arm-consumption/src/models/operationsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/operationsMappers.ts @@ -1,18 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetails, + ErrorResponse, Operation, OperationDisplay, - ErrorResponse, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/parameters.ts b/sdk/consumption/arm-consumption/src/models/parameters.ts index 307ad6cae657..53a562490137 100644 --- a/sdk/consumption/arm-consumption/src/models/parameters.ts +++ b/sdk/consumption/arm-consumption/src/models/parameters.ts @@ -30,19 +30,6 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const apply: msRest.OperationQueryParameter = { - parameterPath: [ - "options", - "queryOptions", - "apply" - ], - mapper: { - serializedName: "$apply", - type: { - name: "String" - } - } -}; export const billingAccountId: msRest.OperationURLParameter = { parameterPath: "billingAccountId", mapper: { @@ -73,26 +60,6 @@ export const budgetName: msRest.OperationURLParameter = { } } }; -export const departmentId: msRest.OperationURLParameter = { - parameterPath: "departmentId", - mapper: { - required: true, - serializedName: "departmentId", - type: { - name: "String" - } - } -}; -export const enrollmentAccountId: msRest.OperationURLParameter = { - parameterPath: "enrollmentAccountId", - mapper: { - required: true, - serializedName: "enrollmentAccountId", - type: { - name: "String" - } - } -}; export const expand: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -147,6 +114,18 @@ export const managementGroupId: msRest.OperationURLParameter = { } } }; +export const metric: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "metric" + ], + mapper: { + serializedName: "metric", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -178,15 +157,16 @@ export const reservationOrderId: msRest.OperationURLParameter = { } } }; -export const resourceGroupName: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", +export const scope: msRest.OperationURLParameter = { + parameterPath: "scope", mapper: { required: true, - serializedName: "resourceGroupName", + serializedName: "scope", type: { name: "String" } - } + }, + skipEncoding: true }; export const skiptoken: msRest.OperationQueryParameter = { parameterPath: [ diff --git a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts index 4e3fbf038eea..3aae35180f80 100644 --- a/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/priceSheetMappers.ts @@ -1,39 +1,38 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - PriceSheetResult, - Resource, - BaseResource, - PriceSheetProperties, - MeterDetails, - ErrorResponse, - ErrorDetails, - UsageDetail, - Marketplace, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts index 14979c923c67..81672b2366e7 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationRecommendationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ReservationRecommendationsListResult, - ReservationRecommendation, + ErrorDetails, ErrorResponse, - ErrorDetails + ReservationRecommendation, + ReservationRecommendationsListResult } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts index 419858b006e4..5306e0c616d4 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsDetailsMappers.ts @@ -1,40 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ReservationDetailsListResult, - ReservationDetail, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationDetailsListResult, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts index 0017619e2588..7e25115f4455 100644 --- a/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/reservationsSummariesMappers.ts @@ -1,40 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ReservationSummariesListResult, - ReservationSummary, - Resource, - BaseResource, - ErrorResponse, - ErrorDetails, - UsageDetail, - MeterDetails, - Marketplace, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummariesListResult, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts index 6f5638472fd8..3aae35180f80 100644 --- a/sdk/consumption/arm-consumption/src/models/tagsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/tagsMappers.ts @@ -1,39 +1,38 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - TagsResult, - ProxyResource, + Balance, + BalancePropertiesAdjustmentDetailsItem, + BalancePropertiesNewPurchasesDetailsItem, BaseResource, - Tag, - ErrorResponse, - ErrorDetails, Budget, BudgetTimePeriod, - Filters, + ChargeSummary, CurrentSpend, - Notification, - Resource, - UsageDetail, - MeterDetails, - Marketplace, - Balance, - BalancePropertiesNewPurchasesDetailsItem, - BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, + ProxyResource, + ReservationDetail, + ReservationSummary, + Resource, + Tag, + TagsResult, + UsageDetail, + UsageDetailsDownloadResponse } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts index bae331383d71..fc3ffc0bb25a 100644 --- a/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts +++ b/sdk/consumption/arm-consumption/src/models/usageDetailsMappers.ts @@ -1,40 +1,40 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - UsageDetailsListResult, - UsageDetail, - Resource, - BaseResource, - MeterDetails, - ErrorResponse, - ErrorDetails, - Marketplace, Balance, - BalancePropertiesNewPurchasesDetailsItem, BalancePropertiesAdjustmentDetailsItem, - ReservationSummary, - ReservationDetail, - PriceSheetResult, - PriceSheetProperties, + BalancePropertiesNewPurchasesDetailsItem, + BaseResource, + Budget, + BudgetTimePeriod, + ChargeSummary, + CurrentSpend, + ErrorDetails, + ErrorResponse, + Filters, Forecast, ForecastPropertiesConfidenceLevelsItem, ManagementGroupAggregatedCostResult, - ChargeSummary, + Marketplace, + MeterDetails, + MeterDetailsResponse, + Notification, + PriceSheetProperties, + PriceSheetResult, ProxyResource, - TagsResult, + ReservationDetail, + ReservationSummary, + Resource, Tag, - Budget, - BudgetTimePeriod, - Filters, - CurrentSpend, - Notification + TagsResult, + UsageDetail, + UsageDetailsDownloadHeaders, + UsageDetailsDownloadResponse, + UsageDetailsListResult } from "../models/mappers"; - diff --git a/sdk/consumption/arm-consumption/src/operations/budgets.ts b/sdk/consumption/arm-consumption/src/operations/budgets.ts index ea97f7785722..445f41c5ee03 100644 --- a/sdk/consumption/arm-consumption/src/operations/budgets.ts +++ b/sdk/consumption/arm-consumption/src/operations/budgets.ts @@ -27,23 +27,66 @@ export class Budgets { } /** - * Lists all budgets for a subscription. + * Lists all budgets for the defined scope. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param [options] The optional parameters * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(scope: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, options }, listOperationSpec, @@ -51,54 +94,69 @@ export class Budgets { } /** - * Lists all budgets for a resource group under a subscription. - * @param resourceGroupName Azure Resource Group Name. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupName(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param callback The callback - */ - listByResourceGroupName(resourceGroupName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param options The optional parameters - * @param callback The callback - */ - listByResourceGroupName(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupName(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - options - }, - listByResourceGroupNameOperationSpec, - callback) as Promise; - } - - /** - * Gets the budget for a subscription by budget name. + * Gets the budget for the scope by budget name. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param [options] The optional parameters * @returns Promise */ - get(budgetName: string, options?: msRest.RequestOptionsBase): Promise; + get(scope: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param callback The callback */ - get(budgetName: string, callback: msRest.ServiceCallback): void; + get(scope: string, budgetName: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param options The optional parameters * @param callback The callback */ - get(budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(scope: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, budgetName, options }, @@ -110,28 +168,71 @@ export class Budgets { * The operation to create or update a budget. Update operation requires latest eTag to be set in * the request mandatorily. You may obtain the latest eTag by performing a get operation. Create * operation does not require eTag. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param callback The callback */ - createOrUpdate(budgetName: string, parameters: Models.Budget, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(budgetName: string, parameters: Models.Budget, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(scope: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, budgetName, parameters, options @@ -142,25 +243,68 @@ export class Budgets { /** * The operation to delete a budget. + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(budgetName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(scope: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param callback The callback */ - deleteMethod(budgetName: string, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, budgetName: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with budget operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope, + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for billingProfile scope, + * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * for invoiceSection scope. * @param budgetName Budget Name. * @param options The optional parameters * @param callback The callback */ - deleteMethod(budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(scope: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(scope: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, budgetName, options }, @@ -169,109 +313,7 @@ export class Budgets { } /** - * Gets the budget for a resource group under a subscription by budget name. - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param [options] The optional parameters - * @returns Promise - */ - getByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param callback The callback - */ - getByResourceGroupName(resourceGroupName: string, budgetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param options The optional parameters - * @param callback The callback - */ - getByResourceGroupName(resourceGroupName: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - budgetName, - options - }, - getByResourceGroupNameOperationSpec, - callback) as Promise; - } - - /** - * The operation to create or update a budget. Update operation requires latest eTag to be set in - * the request mandatorily. You may obtain the latest eTag by performing a get operation. Create - * operation does not require eTag. - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param callback The callback - */ - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param parameters Parameters supplied to the Create Budget operation. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdateByResourceGroupName(resourceGroupName: string, budgetName: string, parameters: Models.Budget, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - budgetName, - parameters, - options - }, - createOrUpdateByResourceGroupNameOperationSpec, - callback) as Promise; - } - - /** - * The operation to delete a budget. - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param [options] The optional parameters - * @returns Promise - */ - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param callback The callback - */ - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName Azure Resource Group Name. - * @param budgetName Budget Name. - * @param options The optional parameters - * @param callback The callback - */ - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteByResourceGroupName(resourceGroupName: string, budgetName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - budgetName, - options - }, - deleteByResourceGroupNameOperationSpec, - callback); - } - - /** - * Lists all budgets for a subscription. + * Lists all budgets for the defined scope. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -297,67 +339,15 @@ export class Budgets { listNextOperationSpec, callback) as Promise; } - - /** - * Lists all budgets for a resource group under a subscription. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByResourceGroupNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByResourceGroupNameNext(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 - */ - listByResourceGroupNameNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNameNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByResourceGroupNameNextOperationSpec, - callback) as Promise; - } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets", + path: "{scope}/providers/Microsoft.Consumption/budgets", urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.scope ], queryParameters: [ Parameters.apiVersion @@ -378,9 +368,9 @@ const listByResourceGroupNameOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.subscriptionId, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -402,9 +392,9 @@ const getOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.subscriptionId, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -436,92 +426,9 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/budgets/{budgetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.budgetName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const getByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.budgetName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.Budget - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", - urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.budgetName - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Budget, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.Budget - }, - 201: { - bodyMapper: Mappers.Budget - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteByResourceGroupNameOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Consumption/budgets/{budgetName}", + path: "{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", urlParameters: [ - Parameters.subscriptionId, - Parameters.resourceGroupName, + Parameters.scope, Parameters.budgetName ], queryParameters: [ @@ -559,24 +466,3 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listByResourceGroupNameNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.BudgetsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/charges.ts b/sdk/consumption/arm-consumption/src/operations/charges.ts index 8ba1f7efd45a..5017ce264f26 100644 --- a/sdk/consumption/arm-consumption/src/operations/charges.ts +++ b/sdk/consumption/arm-consumption/src/operations/charges.ts @@ -27,227 +27,62 @@ export class Charges { } /** - * Lists the charges by enrollmentAccountId. - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID + * Lists the charges based for the defined scope. + * @param scope The scope associated with usage details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing + * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + * e.g. to specify billing period at department scope use + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, options?: Models.ChargesListByEnrollmentAccountOptionalParams): Promise; + listByScope(scope: string, options?: Models.ChargesListByScopeOptionalParams): Promise; /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID + * @param scope The scope associated with usage details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing + * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + * e.g. to specify billing period at department scope use + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param callback The callback */ - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, callback: msRest.ServiceCallback): void; + listByScope(scope: string, callback: msRest.ServiceCallback): void; /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID + * @param scope The scope associated with usage details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing + * period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For + * e.g. to specify billing period at department scope use + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param options The optional parameters * @param callback The callback */ - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, options: Models.ChargesListByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, options?: Models.ChargesListByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByScope(scope: string, options: Models.ChargesListByScopeOptionalParams, callback: msRest.ServiceCallback): void; + listByScope(scope: string, options?: Models.ChargesListByScopeOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - billingAccountId, - enrollmentAccountId, + scope, options }, - listByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the charges based on enrollmentAccountId by billing period. - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByEnrollmentAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, options: Models.ChargesListForBillingPeriodByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccount(billingAccountId: string, enrollmentAccountId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - enrollmentAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the charges by departmentId. - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartment(billingAccountId: string, departmentId: string, options?: Models.ChargesListByDepartmentOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param callback The callback - */ - listByDepartment(billingAccountId: string, departmentId: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param options The optional parameters - * @param callback The callback - */ - listByDepartment(billingAccountId: string, departmentId: string, options: Models.ChargesListByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listByDepartment(billingAccountId: string, departmentId: string, options?: Models.ChargesListByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - departmentId, - options - }, - listByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the charges based on departmentId by billing period. - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByDepartmentOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, options: Models.ChargesListForBillingPeriodByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartment(billingAccountId: string, departmentId: string, billingPeriodName: string, options?: Models.ChargesListForBillingPeriodByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - departmentId, - billingPeriodName, - options - }, - listForBillingPeriodByDepartmentOperationSpec, - callback) as Promise; + listByScopeOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/charges", - urlParameters: [ - Parameters.billingAccountId, - Parameters.enrollmentAccountId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ChargesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/charges", - urlParameters: [ - Parameters.billingAccountId, - Parameters.enrollmentAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ChargeSummary - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Consumption/charges", - urlParameters: [ - Parameters.billingAccountId, - Parameters.departmentId - ], - queryParameters: [ - Parameters.apiVersion, - Parameters.filter0 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.ChargesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentOperationSpec: msRest.OperationSpec = { +const listByScopeOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/charges", + path: "{scope}/providers/Microsoft.Consumption/charges", urlParameters: [ - Parameters.billingAccountId, - Parameters.departmentId, - Parameters.billingPeriodName + Parameters.scope ], queryParameters: [ Parameters.apiVersion, diff --git a/sdk/consumption/arm-consumption/src/operations/index.ts b/sdk/consumption/arm-consumption/src/operations/index.ts index 77ea57064d73..b4213dfbf677 100644 --- a/sdk/consumption/arm-consumption/src/operations/index.ts +++ b/sdk/consumption/arm-consumption/src/operations/index.ts @@ -10,14 +10,14 @@ export * from "./usageDetails"; export * from "./marketplaces"; +export * from "./budgets"; +export * from "./tags"; +export * from "./charges"; export * from "./balances"; export * from "./reservationsSummaries"; export * from "./reservationsDetails"; export * from "./reservationRecommendations"; -export * from "./budgets"; export * from "./priceSheet"; -export * from "./tags"; export * from "./forecasts"; export * from "./operations"; export * from "./aggregatedCost"; -export * from "./charges"; diff --git a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts index b324d9f44a8f..e423551d66c6 100644 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts @@ -27,24 +27,61 @@ export class Marketplaces { } /** - * Lists the marketplaces for a scope by subscriptionId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. + * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API + * only for May 1, 2014 or later. + * @param scope The scope associated with marketplace operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and + * ManagementGroup, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param [options] The optional parameters * @returns Promise */ - list(options?: Models.MarketplacesListOptionalParams): Promise; + list(scope: string, options?: Models.MarketplacesListOptionalParams): Promise; /** + * @param scope The scope associated with marketplace operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and + * ManagementGroup, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with marketplace operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and + * ManagementGroup, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param options The optional parameters * @param callback The callback */ - list(options: Models.MarketplacesListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.MarketplacesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: Models.MarketplacesListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.MarketplacesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, options }, listOperationSpec, @@ -52,285 +89,8 @@ export class Marketplaces { } /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriod(billingPeriodName: string, options?: Models.MarketplacesListByBillingPeriodOptionalParams): Promise; - /** - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, options: Models.MarketplacesListByBillingPeriodOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingPeriod(billingPeriodName: string, options?: Models.MarketplacesListByBillingPeriodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingPeriodName, - options - }, - listByBillingPeriodOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billingAccountId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccount(billingAccountId: string, options?: Models.MarketplacesListByBillingAccountOptionalParams): 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.MarketplacesListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingAccount(billingAccountId: string, options?: Models.MarketplacesListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - options - }, - listByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and billingAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByBillingAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by departmentId and current billing period. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartment(departmentId: string, options?: Models.MarketplacesListByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param callback The callback - */ - listByDepartment(departmentId: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param options The optional parameters - * @param callback The callback - */ - listByDepartment(departmentId: string, options: Models.MarketplacesListByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listByDepartment(departmentId: string, options?: Models.MarketplacesListByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - options - }, - listByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and departmentId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - billingPeriodName, - options - }, - listForBillingPeriodByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by enrollmentAccountId and current billing period. - * Marketplaces are available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.MarketplacesListByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param options The optional parameters - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, options: Models.MarketplacesListByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.MarketplacesListByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - options - }, - listByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and enrollmentAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * current billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param managementGroupId Azure Management Group ID. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroup(managementGroupId: string, options?: Models.MarketplacesListByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param options The optional parameters - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, options: Models.MarketplacesListByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByManagementGroup(managementGroupId: string, options?: Models.MarketplacesListByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - options - }, - listByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * specified billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options: Models.MarketplacesListForBillingPeriodByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.MarketplacesListForBillingPeriodByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - billingPeriodName, - options - }, - listForBillingPeriodByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by subscriptionId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. + * Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API + * only for May 1, 2014 or later. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -356,535 +116,35 @@ export class Marketplaces { listNextOperationSpec, callback) as Promise; } +} - /** - * Lists the marketplaces for a scope by billing period and subscripotionId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByBillingPeriodNext(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 - */ - listByBillingPeriodNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingPeriodNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billingAccountId and current billing period. Marketplaces - * are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and billingAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByBillingAccountNext(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 - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by departmentId and current billing period. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDepartmentNext(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 - */ - listByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and departmentId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByDepartmentNext(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 - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by enrollmentAccountId and current billing period. - * Marketplaces are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByEnrollmentAccountNext(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 - */ - listByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplaces for a scope by billing period and enrollmentAccountId. Marketplaces are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccountNext(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 - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * current billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByManagementGroupNext(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 - */ - listByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByManagementGroupNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the marketplace records for all subscriptions belonging to a management group scope by - * specified billing period. Marketplaces are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByManagementGroupNext(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 - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByManagementGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingPeriodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.subscriptionId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.billingAccountId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.billingAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.departmentId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.departmentId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.enrollmentAccountId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.enrollmentAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.managementGroupId - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/marketplaces", - urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.filter0, - Parameters.top, - Parameters.skiptoken, - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{scope}/providers/Microsoft.Consumption/marketplaces", + urlParameters: [ + Parameters.scope + ], + queryParameters: [ + Parameters.filter0, + Parameters.top, + Parameters.skiptoken, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.MarketplacesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", @@ -906,192 +166,3 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; - -const listByBillingPeriodNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.MarketplacesListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts index 3f4787a580a9..861bbe4243b1 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts @@ -27,7 +27,7 @@ export class ReservationRecommendations { } /** - * List of recomendations for purchasing reserved instances. + * List of recommendations for purchasing reserved instances. * @param [options] The optional parameters * @returns Promise */ @@ -51,7 +51,7 @@ export class ReservationRecommendations { } /** - * List of recomendations for purchasing reserved instances. + * List of recommendations for purchasing reserved instances. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts index 81d26e09da89..3d2b5a4046e1 100644 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ b/sdk/consumption/arm-consumption/src/operations/tags.ts @@ -27,27 +27,54 @@ export class Tags { } /** - * Get all available tag keys for a billing account. - * @param billingAccountId BillingAccount ID + * Get all available tag keys for the defined scope + * @param scope The scope associated with tags operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope and + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope.. * @param [options] The optional parameters * @returns Promise */ - get(billingAccountId: string, options?: msRest.RequestOptionsBase): Promise; + get(scope: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param billingAccountId BillingAccount ID + * @param scope The scope associated with tags operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope and + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope.. * @param callback The callback */ - get(billingAccountId: string, callback: msRest.ServiceCallback): void; + get(scope: string, callback: msRest.ServiceCallback): void; /** - * @param billingAccountId BillingAccount ID + * @param scope The scope associated with tags operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for + * Department scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' + * for EnrollmentAccount scope and + * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group + * scope.. * @param options The optional parameters * @param callback The callback */ - get(billingAccountId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(billingAccountId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - billingAccountId, + scope, options }, getOperationSpec, @@ -59,9 +86,9 @@ export class Tags { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.CostManagement/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/tags", + path: "{scope}/providers/Microsoft.Consumption/tags", urlParameters: [ - Parameters.billingAccountId + 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 a35d44831b51..c422a93f3e48 100644 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/usageDetailsMappers"; import * as Parameters from "../models/parameters"; @@ -27,24 +28,61 @@ export class UsageDetails { } /** - * Lists the usage details for a scope by current billing period. Usage details are available via - * this API only for May 1, 2014 or later. + * Lists the usage details for the defined scope. Usage details are available via this API only for + * May 1, 2014 or later. + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param [options] The optional parameters * @returns Promise */ - list(options?: Models.UsageDetailsListOptionalParams): Promise; + list(scope: string, options?: Models.UsageDetailsListOptionalParams): Promise; /** + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(scope: string, callback: msRest.ServiceCallback): void; /** + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param options The optional parameters * @param callback The callback */ - list(options: Models.UsageDetailsListOptionalParams, callback: msRest.ServiceCallback): void; - list(options?: Models.UsageDetailsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(scope: string, options: Models.UsageDetailsListOptionalParams, callback: msRest.ServiceCallback): void; + list(scope: string, options?: Models.UsageDetailsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + scope, options }, listOperationSpec, @@ -52,810 +90,91 @@ export class UsageDetails { } /** - * Lists the usage details for a scope by billing period. Usage details are available via this API - * only for May 1, 2014 or later. - * @param billingPeriodName Billing Period Name. + * Download usage details data. + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByBillingPeriod(billingPeriodName: string, options?: Models.UsageDetailsListByBillingPeriodOptionalParams): Promise; - /** - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listByBillingPeriod(billingPeriodName: string, options: Models.UsageDetailsListByBillingPeriodOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingPeriod(billingPeriodName: string, options?: Models.UsageDetailsListByBillingPeriodOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingPeriodName, - options - }, - listByBillingPeriodOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by billingAccountId for a scope by current billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccount(billingAccountId: string, options?: Models.UsageDetailsListByBillingAccountOptionalParams): 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.UsageDetailsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByBillingAccount(billingAccountId: string, options?: Models.UsageDetailsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - options - }, - listByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on billingAccountId for a scope by billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByBillingAccountOptionalParams): Promise; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param billingAccountId BillingAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccount(billingAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - billingAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByBillingAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by departmentId for a scope by current billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartment(departmentId: string, options?: Models.UsageDetailsListByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param callback The callback - */ - listByDepartment(departmentId: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param options The optional parameters - * @param callback The callback - */ - listByDepartment(departmentId: string, options: Models.UsageDetailsListByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listByDepartment(departmentId: string, options?: Models.UsageDetailsListByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - options - }, - listByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on departmentId for a scope by billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByDepartmentOptionalParams): Promise; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param departmentId Department ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByDepartmentOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartment(departmentId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByDepartmentOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - departmentId, - billingPeriodName, - options - }, - listForBillingPeriodByDepartmentOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.UsageDetailsListByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param options The optional parameters - * @param callback The callback - */ - listByEnrollmentAccount(enrollmentAccountId: string, options: Models.UsageDetailsListByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listByEnrollmentAccount(enrollmentAccountId: string, options?: Models.UsageDetailsListByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - options - }, - listByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams): Promise; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param enrollmentAccountId EnrollmentAccount ID - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccount(enrollmentAccountId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - enrollmentAccountId, - billingPeriodName, - options - }, - listForBillingPeriodByEnrollmentAccountOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * current billing period. Usage details are available via this API only for May 1, 2014 or later. - * @param managementGroupId Azure Management Group ID. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroup(managementGroupId: string, options?: Models.UsageDetailsListByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param options The optional parameters - * @param callback The callback - */ - listByManagementGroup(managementGroupId: string, options: Models.UsageDetailsListByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listByManagementGroup(managementGroupId: string, options?: Models.UsageDetailsListByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - options - }, - listByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * specified billing period. Usage details are available via this API only for May 1, 2014 or - * later. - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByManagementGroupOptionalParams): Promise; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, callback: msRest.ServiceCallback): void; - /** - * @param managementGroupId Azure Management Group ID. - * @param billingPeriodName Billing Period Name. - * @param options The optional parameters - * @param callback The callback - */ - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options: Models.UsageDetailsListForBillingPeriodByManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroup(managementGroupId: string, billingPeriodName: string, options?: Models.UsageDetailsListForBillingPeriodByManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - managementGroupId, - billingPeriodName, - options - }, - listForBillingPeriodByManagementGroupOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details for a scope by current billing period. Usage details are available via - * this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listNext(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; - /** - * @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 { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details for a scope by billing period. Usage details are available via this API - * only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByBillingPeriodNext(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 - */ - listByBillingPeriodNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingPeriodNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingPeriodNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by billingAccountId for a scope by current billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): 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: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on billingAccountId for a scope by billing period. Usage details - * are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByBillingAccountNext(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 - */ - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByBillingAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByBillingAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by departmentId for a scope by current billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByDepartmentNext(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 - */ - listByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on departmentId for a scope by billing period. Usage details are - * available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByDepartmentNext(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 - */ - listForBillingPeriodByDepartmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByDepartmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByDepartmentNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details by enrollmentAccountId for a scope by current billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByEnrollmentAccountNext(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 - */ - listByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage details based on enrollmentAccountId for a scope by billing period. Usage - * details are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByEnrollmentAccountNext(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 - */ - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByEnrollmentAccountNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByEnrollmentAccountNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * current billing period. Usage details are available via this API only for May 1, 2014 or later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listByManagementGroupNext(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 - */ - listByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listByManagementGroupNextOperationSpec, - callback) as Promise; - } - - /** - * Lists the usage detail records for all subscriptions belonging to a management group scope by - * specified billing period. Usage details are available via this API only for May 1, 2014 or - * later. - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param [options] The optional parameters - * @returns Promise - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param callback The callback - */ - listForBillingPeriodByManagementGroupNext(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 - */ - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listForBillingPeriodByManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - nextPageLink, - options - }, - listForBillingPeriodByManagementGroupNextOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingPeriodOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.subscriptionId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.billingAccountId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.billingAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.departmentId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.departmentId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.enrollmentAccountId - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; + download(scope: string, options?: Models.UsageDetailsDownloadOptionalParams): Promise { + return this.beginDownload(scope,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } -const listForBillingPeriodByEnrollmentAccountOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.enrollmentAccountId, - Parameters.billingPeriodName - ], - queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; + /** + * Download usage details data. + * @param scope The scope associated with usage details operations. This includes + * '/subscriptions/{subscriptionId}/' for subscription scope, + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, + * '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, + * '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount + * scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management + * Group scope. For subscription, billing account, department, enrollment account and management + * group, you can also add billing period to the scope using + * '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing + * period at department scope use + * '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' + * @param [options] The optional parameters + * @returns Promise + */ + beginDownload(scope: string, options?: Models.UsageDetailsBeginDownloadOptionalParams): Promise { + return this.client.sendLRORequest( + { + scope, + options + }, + beginDownloadOperationSpec, + options); + } + + /** + * Lists the usage details for the defined scope. Usage details are available via this API only for + * May 1, 2014 or later. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(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; + /** + * @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 { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} -const listByManagementGroupOperationSpec: msRest.OperationSpec = { +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/usageDetails", + path: "{scope}/providers/Microsoft.Consumption/usageDetails", urlParameters: [ - Parameters.managementGroupId + Parameters.scope ], queryParameters: [ Parameters.expand, @@ -863,7 +182,7 @@ const listByManagementGroupOperationSpec: msRest.OperationSpec = { Parameters.skiptoken, Parameters.top, Parameters.apiVersion, - Parameters.apply + Parameters.metric ], headerParameters: [ Parameters.acceptLanguage @@ -879,216 +198,26 @@ const listByManagementGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", +const beginDownloadOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{scope}/providers/Microsoft.Consumption/usageDetails/download", urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName + Parameters.scope ], queryParameters: [ - Parameters.expand, - Parameters.filter0, - Parameters.skiptoken, - Parameters.top, Parameters.apiVersion, - Parameters.apply - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingPeriodNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByBillingAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByDepartmentNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listForBillingPeriodByEnrollmentAccountNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink + Parameters.metric ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.UsageDetailsListResult + bodyMapper: Mappers.UsageDetailsDownloadResponse, + headersMapper: Mappers.UsageDetailsDownloadHeaders }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - baseUrl: "https://management.azure.com", - path: "{nextLink}", - urlParameters: [ - Parameters.nextPageLink - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult + 202: { + headersMapper: Mappers.UsageDetailsDownloadHeaders }, default: { bodyMapper: Mappers.ErrorResponse @@ -1097,7 +226,7 @@ const listByManagementGroupNextOperationSpec: msRest.OperationSpec = { serializer }; -const listForBillingPeriodByManagementGroupNextOperationSpec: msRest.OperationSpec = { +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}",