diff --git a/packages/@azure/arm-consumption/LICENSE.txt b/packages/@azure/arm-consumption/LICENSE.txt index 5431ba98b936..8f3d856145c5 100644 --- a/packages/@azure/arm-consumption/LICENSE.txt +++ b/packages/@azure/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/packages/@azure/arm-consumption/README.md b/packages/@azure/arm-consumption/README.md index 733d35a9c5cf..d80811a5efc4 100644 --- a/packages/@azure/arm-consumption/README.md +++ b/packages/@azure/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) => { + client.usageDetails.list(scope, expand, filter, skiptoken, top, apply).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) => { + client.usageDetails.list(scope, expand, filter, skiptoken, top, apply).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/packages/@azure/arm-consumption/lib/consumptionManagementClient.ts b/packages/@azure/arm-consumption/lib/consumptionManagementClient.ts index 6157a62a09ab..69cf15fc8a2e 100644 --- a/packages/@azure/arm-consumption/lib/consumptionManagementClient.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/consumptionManagementClientContext.ts b/packages/@azure/arm-consumption/lib/consumptionManagementClientContext.ts index ae3c432891eb..8c0902362a35 100644 --- a/packages/@azure/arm-consumption/lib/consumptionManagementClientContext.ts +++ b/packages/@azure/arm-consumption/lib/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-01-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/packages/@azure/arm-consumption/lib/models/chargesMappers.ts b/packages/@azure/arm-consumption/lib/models/chargesMappers.ts index af91eeda052f..9785e708d051 100644 --- a/packages/@azure/arm-consumption/lib/models/chargesMappers.ts +++ b/packages/@azure/arm-consumption/lib/models/chargesMappers.ts @@ -9,7 +9,6 @@ */ export { - ChargesListResult, ChargeSummary, Resource, BaseResource, diff --git a/packages/@azure/arm-consumption/lib/models/index.ts b/packages/@azure/arm-consumption/lib/models/index.ts index a0df6be94f6f..69545546f276 100644 --- a/packages/@azure/arm-consumption/lib/models/index.ts +++ b/packages/@azure/arm-consumption/lib/models/index.ts @@ -641,7 +641,7 @@ export interface ReservationSummary extends Resource { 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. + * 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.** */ @@ -723,7 +723,7 @@ export interface ReservationDetail extends Resource { 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. + * 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.** */ @@ -757,7 +757,7 @@ export interface ReservationDetail extends Resource { readonly instanceId?: string; /** * @member {number} [totalReservedQuantity] This is the total count of - * instances that are reserved for the reservationid. + * instances that are reserved for the reservationId. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ @@ -834,7 +834,7 @@ export interface ReservationRecommendation { */ readonly costWithNoReservedInstances?: number; /** - * @member {number} [recommendedQuantity] Recomended quality for reserved + * @member {number} [recommendedQuantity] Recommended quality for reserved * instances. * **NOTE: This property will not be serialized. It can only be populated by * the server.** @@ -909,7 +909,7 @@ export interface ProxyResource extends BaseResource { 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 + * scenario, this field will be used to determine whether the user is * updating the latest version or not. */ eTag?: string; @@ -1064,7 +1064,7 @@ export interface Budget extends ProxyResource { * 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 + * be selected within the timegrain period. There are no restrictions on the * end date. */ timePeriod: BudgetTimePeriod; @@ -1494,7 +1494,7 @@ export interface ResourceAttributes { /** * @interface * An interface representing QueryOptions. - * Additional parameters for a set of operations. + * Additional parameters for list operation. * */ export interface QueryOptions { @@ -1551,29 +1551,25 @@ export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBas /** * @interface - * An interface representing UsageDetailsListByBillingPeriodOptionalParams. + * An interface representing MarketplacesListOptionalParams. * 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; +export interface MarketplacesListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] May be used to filter usageDetails by + * @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'. Tag filter - * is a key value pair string where key and value is separated by a colon - * (:). + * 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 @@ -1582,220 +1578,87 @@ export interface UsageDetailsListByBillingPeriodOptionalParams extends msRest.Re * 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 UsageDetailsListByBillingAccountOptionalParams. + * An interface representing ChargesListByScopeOptionalParams. * Optional Parameters. * * @extends RequestOptionsBase */ -export interface UsageDetailsListByBillingAccountOptionalParams 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, 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 (:). + * @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; - /** - * @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 UsageDetailsListForBillingPeriodByBillingAccountOptionalParams. + * An interface representing ReservationsSummariesListByReservationOrderOptionalParams. * 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 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 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 - * (:). + * @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; - /** - * @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. + * An interface representing ReservationsSummariesListByReservationOrderAndReservationOptionalParams. * 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 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, 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 (:). + * @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; - /** - * @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. + * An interface representing ReservationRecommendationsListOptionalParams. * 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 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 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 - * (:). + * @member {string} [filter] 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 UsageDetailsListByEnrollmentAccountOptionalParams. + * An interface representing PriceSheetGetOptionalParams. * Optional Parameters. * * @extends RequestOptionsBase */ -export interface UsageDetailsListByEnrollmentAccountOptionalParams 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. + * 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 @@ -1806,41 +1669,25 @@ export interface UsageDetailsListByEnrollmentAccountOptionalParams extends msRes skiptoken?: string; /** * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * top N results. */ top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** * @interface - * An interface representing UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams. + * An interface representing PriceSheetGetByBillingPeriodOptionalParams. * Optional Parameters. * * @extends RequestOptionsBase */ -export interface UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalParams 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. + * 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 @@ -1851,1538 +1698,254 @@ export interface UsageDetailsListForBillingPeriodByEnrollmentAccountOptionalPara skiptoken?: string; /** * @member {number} [top] May be used to limit the number of results to the - * most recent N usageDetails. + * top N results. */ top?: number; - /** - * @member {QueryOptions} [queryOptions] Additional parameters for the - * operation - */ - queryOptions?: QueryOptions; } /** * @interface - * An interface representing UsageDetailsListByManagementGroupOptionalParams. + * An interface representing ForecastsListOptionalParams. * Optional Parameters. * * @extends RequestOptionsBase */ -export interface UsageDetailsListByManagementGroupOptionalParams 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, 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 (:). + * @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; - /** - * @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 UsageDetailsListForBillingPeriodByManagementGroupOptionalParams. + * An interface representing AggregatedCostGetByManagementGroupOptionalParams. * 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 AggregatedCostGetByManagementGroupOptionalParams 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 - * (:). + * @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; +} + +/** + * @interface + * An interface representing ConsumptionManagementClientOptions. + * @extends AzureServiceClientOptions + */ +export interface ConsumptionManagementClientOptions extends AzureServiceClientOptions { /** - * @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 + * @member {string} [baseUri] */ - queryOptions?: QueryOptions; + baseUri?: string; } + /** * @interface - * An interface representing MarketplacesListOptionalParams. - * Optional Parameters. + * 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 RequestOptionsBase + * @extends Array */ -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; +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. + * @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.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListByBillingPeriodOptionalParams. - * Optional Parameters. + * An interface representing the MarketplacesListResult. + * Result of listing marketplaces. It contains a list of available marketplaces + * in reverse chronological order by billing period. * - * @extends RequestOptionsBase + * @extends Array */ -export interface MarketplacesListByBillingPeriodOptionalParams 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. + * @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.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListByBillingAccountOptionalParams. - * Optional Parameters. + * An interface representing the BudgetsListResult. + * Result of listing budgets. It contains a list of available budgets in the + * scope provided. * - * @extends RequestOptionsBase + * @extends Array */ -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; +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. + * @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.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListForBillingPeriodByBillingAccountOptionalParams. - * Optional Parameters. + * An interface representing the ReservationSummariesListResult. + * Result of listing reservation summaries. * - * @extends RequestOptionsBase + * @extends Array */ -export interface MarketplacesListForBillingPeriodByBillingAccountOptionalParams 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. + * @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.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListByDepartmentOptionalParams. - * Optional Parameters. + * An interface representing the ReservationDetailsListResult. + * Result of listing reservation details. * - * @extends RequestOptionsBase + * @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 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. + * @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.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListForBillingPeriodByDepartmentOptionalParams. - * Optional Parameters. + * An interface representing the ReservationRecommendationsListResult. + * Result of listing reservation recommendations. * - * @extends RequestOptionsBase + * @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 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. + * @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.** */ - skiptoken?: string; + readonly nextLink?: string; } /** * @interface - * An interface representing MarketplacesListByEnrollmentAccountOptionalParams. - * Optional Parameters. + * An interface representing the ForecastsListResult. + * Result of listing forecasts. It contains a list of available forecasts. * - * @extends RequestOptionsBase + * @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; - /** - * @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 ForecastsListResult extends Array { } /** * @interface - * An interface representing MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. + * 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 RequestOptionsBase + * @extends Array */ -export interface MarketplacesListForBillingPeriodByEnrollmentAccountOptionalParams extends msRest.RequestOptionsBase { +export interface OperationListResult extends Array { /** - * @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 MarketplacesListByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -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; - /** - * @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 MarketplacesListForBillingPeriodByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -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; - /** - * @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 ReservationsSummariesListByReservationOrderOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -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; -} - -/** - * @interface - * An interface representing ReservationsSummariesListByReservationOrderAndReservationOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ReservationsSummariesListByReservationOrderAndReservationOptionalParams 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; -} - -/** - * @interface - * An interface representing ReservationRecommendationsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -export interface ReservationRecommendationsListOptionalParams extends msRest.RequestOptionsBase { - /** - * @member {string} [filter] May be used to filter reservationRecommendations - * by properties/scope and properties/lookBackPeriod. + * @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.** */ - filter?: string; + readonly nextLink?: string; } /** - * @interface - * An interface representing PriceSheetGetOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for BillingFrequency. + * Possible values include: 'Month', 'Quarter', 'Year' + * @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 BillingFrequency = 'Month' | 'Quarter' | 'Year'; /** - * @interface - * An interface representing PriceSheetGetByBillingPeriodOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for CategoryType. + * Possible values include: 'Cost', 'Usage' + * @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 CategoryType = 'Cost' | 'Usage'; /** - * @interface - * An interface representing ForecastsListOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for TimeGrainType. + * Possible values include: 'Monthly', 'Quarterly', 'Annually' + * @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 TimeGrainType = 'Monthly' | 'Quarterly' | 'Annually'; /** - * @interface - * An interface representing AggregatedCostGetByManagementGroupOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for OperatorType. + * Possible values include: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' + * @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 OperatorType = 'EqualTo' | 'GreaterThan' | 'GreaterThanOrEqualTo'; /** - * @interface - * An interface representing ChargesListByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * Defines values for Grain. + * Possible values include: 'Daily', 'Monthly', 'Yearly' + * @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; -} - -/** - * @interface - * An interface representing ChargesListForBillingPeriodByEnrollmentAccountOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase - */ -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'; +export type Grain = 'Daily' | 'Monthly' | 'Yearly'; /** * Defines values for ChargeType. * Possible values include: 'Actual', 'Forecast' * @readonly * @enum {string} - */ -export type ChargeType = 'Actual' | 'Forecast'; - -/** - * Defines values for Bound. - * Possible values include: 'Upper', 'Lower' - * @readonly - * @enum {string} - */ -export type Bound = 'Upper' | 'Lower'; - -/** - * Defines values for 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; - }; -}; + */ +export type ChargeType = 'Actual' | 'Forecast'; /** - * Contains response data for the listForBillingPeriodByDepartmentNext operation. + * Defines values for Bound. + * Possible values include: 'Upper', 'Lower' + * @readonly + * @enum {string} */ -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; - }; -}; +export type Bound = 'Upper' | 'Lower'; /** - * Contains response data for the listByEnrollmentAccountNext operation. + * Defines values for Datagrain. + * Possible values include: 'DailyGrain', 'MonthlyGrain' + * @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 Datagrain = 'daily' | 'monthly'; /** - * 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. */ @@ -3394,14 +1957,14 @@ export type MarketplacesListForBillingPeriodByEnrollmentAccountNextResponse = Ma /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsListResult; }; }; /** - * Contains response data for the listByManagementGroupNext operation. + * Contains response data for the listNext operation. */ -export type MarketplacesListByManagementGroupNextResponse = MarketplacesListResult & { +export type UsageDetailsListNextResponse = UsageDetailsListResult & { /** * The underlying HTTP response. */ @@ -3413,14 +1976,14 @@ export type MarketplacesListByManagementGroupNextResponse = MarketplacesListResu /** * The response body as parsed JSON or XML */ - parsedBody: MarketplacesListResult; + parsedBody: UsageDetailsListResult; }; }; /** - * Contains response data for the listForBillingPeriodByManagementGroupNext operation. + * Contains response data for the list operation. */ -export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = MarketplacesListResult & { +export type MarketplacesListResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3437,9 +2000,9 @@ export type MarketplacesListForBillingPeriodByManagementGroupNextResponse = Mark }; /** - * Contains response data for the getByBillingAccount operation. + * Contains response data for the listNext operation. */ -export type BalancesGetByBillingAccountResponse = Balance & { +export type MarketplacesListNextResponse = MarketplacesListResult & { /** * The underlying HTTP response. */ @@ -3451,14 +2014,14 @@ export type BalancesGetByBillingAccountResponse = Balance & { /** * The response body as parsed JSON or XML */ - parsedBody: Balance; + parsedBody: MarketplacesListResult; }; }; /** - * Contains response data for the getForBillingPeriodByBillingAccount operation. + * Contains response data for the list operation. */ -export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { +export type BudgetsListResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3470,14 +2033,14 @@ export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { /** * The response body as parsed JSON or XML */ - parsedBody: Balance; + parsedBody: BudgetsListResult; }; }; /** - * Contains response data for the listByReservationOrder operation. + * Contains response data for the get operation. */ -export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult & { +export type BudgetsGetResponse = Budget & { /** * The underlying HTTP response. */ @@ -3489,14 +2052,14 @@ export type ReservationsSummariesListByReservationOrderResponse = ReservationSum /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: Budget; }; }; /** - * Contains response data for the listByReservationOrderAndReservation operation. + * Contains response data for the createOrUpdate operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult & { +export type BudgetsCreateOrUpdateResponse = Budget & { /** * The underlying HTTP response. */ @@ -3508,14 +2071,14 @@ export type ReservationsSummariesListByReservationOrderAndReservationResponse = /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: Budget; }; }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the listNext operation. */ -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { +export type BudgetsListNextResponse = BudgetsListResult & { /** * The underlying HTTP response. */ @@ -3527,14 +2090,14 @@ export type ReservationsSummariesListByReservationOrderNextResponse = Reservatio /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: BudgetsListResult; }; }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the get operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { +export type TagsGetResponse = TagsResult & { /** * The underlying HTTP response. */ @@ -3546,14 +2109,14 @@ export type ReservationsSummariesListByReservationOrderAndReservationNextRespons /** * The response body as parsed JSON or XML */ - parsedBody: ReservationSummariesListResult; + parsedBody: TagsResult; }; }; /** - * Contains response data for the listByReservationOrder operation. + * Contains response data for the listByScope operation. */ -export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult & { +export type ChargesListByScopeResponse = ChargeSummary & { /** * The underlying HTTP response. */ @@ -3565,14 +2128,14 @@ export type ReservationsDetailsListByReservationOrderResponse = ReservationDetai /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: ChargeSummary; }; }; /** - * Contains response data for the listByReservationOrderAndReservation operation. + * Contains response data for the getByBillingAccount operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult & { +export type BalancesGetByBillingAccountResponse = Balance & { /** * The underlying HTTP response. */ @@ -3584,14 +2147,14 @@ export type ReservationsDetailsListByReservationOrderAndReservationResponse = Re /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: Balance; }; }; /** - * Contains response data for the listByReservationOrderNext operation. + * Contains response data for the getForBillingPeriodByBillingAccount operation. */ -export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { +export type BalancesGetForBillingPeriodByBillingAccountResponse = Balance & { /** * The underlying HTTP response. */ @@ -3603,14 +2166,14 @@ export type ReservationsDetailsListByReservationOrderNextResponse = ReservationD /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: Balance; }; }; /** - * Contains response data for the listByReservationOrderAndReservationNext operation. + * Contains response data for the listByReservationOrder operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { +export type ReservationsSummariesListByReservationOrderResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3622,14 +2185,14 @@ export type ReservationsDetailsListByReservationOrderAndReservationNextResponse /** * The response body as parsed JSON or XML */ - parsedBody: ReservationDetailsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByReservationOrderAndReservation operation. */ -export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { +export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3641,14 +2204,14 @@ export type ReservationRecommendationsListResponse = ReservationRecommendationsL /** * The response body as parsed JSON or XML */ - parsedBody: ReservationRecommendationsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { +export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3660,14 +2223,14 @@ export type ReservationRecommendationsListNextResponse = ReservationRecommendati /** * The response body as parsed JSON or XML */ - parsedBody: ReservationRecommendationsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type BudgetsListResponse = BudgetsListResult & { +export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult & { /** * The underlying HTTP response. */ @@ -3679,14 +2242,14 @@ export type BudgetsListResponse = BudgetsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationSummariesListResult; }; }; /** - * Contains response data for the listByResourceGroupName operation. + * Contains response data for the listByReservationOrder operation. */ -export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { +export type ReservationsDetailsListByReservationOrderResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3698,14 +2261,14 @@ export type BudgetsListByResourceGroupNameResponse = BudgetsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByReservationOrderAndReservation operation. */ -export type BudgetsGetResponse = Budget & { +export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3717,14 +2280,14 @@ export type BudgetsGetResponse = Budget & { /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByReservationOrderNext operation. */ -export type BudgetsCreateOrUpdateResponse = Budget & { +export type ReservationsDetailsListByReservationOrderNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3736,14 +2299,14 @@ export type BudgetsCreateOrUpdateResponse = Budget & { /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the getByResourceGroupName operation. + * Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type BudgetsGetByResourceGroupNameResponse = Budget & { +export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult & { /** * The underlying HTTP response. */ @@ -3755,14 +2318,14 @@ export type BudgetsGetByResourceGroupNameResponse = Budget & { /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationDetailsListResult; }; }; /** - * Contains response data for the createOrUpdateByResourceGroupName operation. + * Contains response data for the list operation. */ -export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { +export type ReservationRecommendationsListResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3774,33 +2337,14 @@ export type BudgetsCreateOrUpdateByResourceGroupNameResponse = Budget & { /** * The response body as parsed JSON or XML */ - parsedBody: Budget; + parsedBody: ReservationRecommendationsListResult; }; }; /** * Contains response data for the listNext operation. */ -export type BudgetsListNextResponse = BudgetsListResult & { - /** - * 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: BudgetsListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroupNameNext operation. - */ -export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { +export type ReservationRecommendationsListNextResponse = ReservationRecommendationsListResult & { /** * The underlying HTTP response. */ @@ -3812,7 +2356,7 @@ export type BudgetsListByResourceGroupNameNextResponse = BudgetsListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: BudgetsListResult; + parsedBody: ReservationRecommendationsListResult; }; }; @@ -3854,25 +2398,6 @@ export type PriceSheetGetByBillingPeriodResponse = 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; - }; -}; - /** * Contains response data for the list operation. */ @@ -3967,79 +2492,3 @@ export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = Managem 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; - }; -}; diff --git a/packages/@azure/arm-consumption/lib/models/mappers.ts b/packages/@azure/arm-consumption/lib/models/mappers.ts index 69f5bcfaaee2..9f842702a585 100644 --- a/packages/@azure/arm-consumption/lib/models/mappers.ts +++ b/packages/@azure/arm-consumption/lib/models/mappers.ts @@ -1850,11 +1850,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 +1864,7 @@ export const ReservationSummariesListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationSummary" + className: "Budget" } } } @@ -1880,11 +1880,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 +1894,7 @@ export const ReservationDetailsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationDetail" + className: "ReservationSummary" } } } @@ -1910,11 +1910,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 +1924,7 @@ export const ReservationRecommendationsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationRecommendation" + className: "ReservationDetail" } } } @@ -1940,11 +1940,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 +1954,7 @@ export const BudgetsListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Budget" + className: "ReservationRecommendation" } } } diff --git a/packages/@azure/arm-consumption/lib/models/parameters.ts b/packages/@azure/arm-consumption/lib/models/parameters.ts index 307ad6cae657..e774dc88b79a 100644 --- a/packages/@azure/arm-consumption/lib/models/parameters.ts +++ b/packages/@azure/arm-consumption/lib/models/parameters.ts @@ -73,26 +73,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", @@ -178,15 +158,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/packages/@azure/arm-consumption/lib/operations/budgets.ts b/packages/@azure/arm-consumption/lib/operations/budgets.ts index ea97f7785722..532b982fab1e 100644 --- a/packages/@azure/arm-consumption/lib/operations/budgets.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/operations/charges.ts b/packages/@azure/arm-consumption/lib/operations/charges.ts index 8ba1f7efd45a..5017ce264f26 100644 --- a/packages/@azure/arm-consumption/lib/operations/charges.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/operations/index.ts b/packages/@azure/arm-consumption/lib/operations/index.ts index 77ea57064d73..b4213dfbf677 100644 --- a/packages/@azure/arm-consumption/lib/operations/index.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/operations/marketplaces.ts b/packages/@azure/arm-consumption/lib/operations/marketplaces.ts index b324d9f44a8f..e423551d66c6 100644 --- a/packages/@azure/arm-consumption/lib/operations/marketplaces.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/operations/reservationRecommendations.ts b/packages/@azure/arm-consumption/lib/operations/reservationRecommendations.ts index 3f4787a580a9..861bbe4243b1 100644 --- a/packages/@azure/arm-consumption/lib/operations/reservationRecommendations.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/operations/tags.ts b/packages/@azure/arm-consumption/lib/operations/tags.ts index 81d26e09da89..3d2b5a4046e1 100644 --- a/packages/@azure/arm-consumption/lib/operations/tags.ts +++ b/packages/@azure/arm-consumption/lib/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/packages/@azure/arm-consumption/lib/operations/usageDetails.ts b/packages/@azure/arm-consumption/lib/operations/usageDetails.ts index a35d44831b51..8ac25d10ca27 100644 --- a/packages/@azure/arm-consumption/lib/operations/usageDetails.ts +++ b/packages/@azure/arm-consumption/lib/operations/usageDetails.ts @@ -27,24 +27,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,839 +89,42 @@ 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. - * @param [options] The optional parameters - * @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 -}; - -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 -}; - -const listByManagementGroupOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/usageDetails", - urlParameters: [ - Parameters.managementGroupId - ], - 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 -}; + * 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 listForBillingPeriodByManagementGroupOperationSpec: msRest.OperationSpec = { +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/usageDetails", + path: "{scope}/providers/Microsoft.Consumption/usageDetails", urlParameters: [ - Parameters.managementGroupId, - Parameters.billingPeriodName + Parameters.scope ], queryParameters: [ Parameters.expand, @@ -928,192 +168,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.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 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.UsageDetailsListResult - }, - 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 - }, - 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.UsageDetailsListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/packages/@azure/arm-consumption/package.json b/packages/@azure/arm-consumption/package.json index 68a1069939c3..86fc92a4325e 100644 --- a/packages/@azure/arm-consumption/package.json +++ b/packages/@azure/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.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "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/packages/@azure/arm-consumption", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-consumption.js.map'\" -o ./dist/arm-consumption.min.js ./dist/arm-consumption.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-consumption/rollup.config.js b/packages/@azure/arm-consumption/rollup.config.js index e434910415dd..c28e7f73316a 100644 --- a/packages/@azure/arm-consumption/rollup.config.js +++ b/packages/@azure/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;