From f740e94d65283b8a907a74d9ab87625985c731cb Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Sep 2021 18:11:31 +0000 Subject: [PATCH] CodeGen from PR 16123 in Azure/azure-rest-api-specs Merge 839983bb2ddf09f1a76337b15fc6c36fac5a29df into 06a504c2ecd7e580bfbd67adf4a1cdbeb49eba77 --- sdk/consumption/arm-consumption/README.md | 28 +- sdk/consumption/arm-consumption/package.json | 2 +- .../src/consumptionManagementClientContext.ts | 2 +- .../arm-consumption/src/models/index.ts | 522 +++++++++++------- .../arm-consumption/src/models/mappers.ts | 335 +++++------ .../arm-consumption/src/models/parameters.ts | 15 +- .../src/operations/aggregatedCost.ts | 2 +- .../src/operations/balances.ts | 2 +- .../arm-consumption/src/operations/budgets.ts | 8 +- .../arm-consumption/src/operations/charges.ts | 2 +- .../arm-consumption/src/operations/credits.ts | 38 +- .../src/operations/eventsOperations.ts | 174 ++++-- .../src/operations/lotsOperations.ts | 178 ++++-- .../src/operations/marketplaces.ts | 2 +- .../src/operations/priceSheet.ts | 4 +- .../reservationRecommendationDetails.ts | 32 +- .../operations/reservationRecommendations.ts | 2 +- .../src/operations/reservationsDetails.ts | 2 +- .../src/operations/reservationsSummaries.ts | 2 +- .../arm-consumption/src/operations/tags.ts | 2 +- .../src/operations/usageDetails.ts | 10 +- 21 files changed, 856 insertions(+), 508 deletions(-) diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index ddcd05d27ed5..b7e09d98951e 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -55,13 +55,7 @@ const filter = "testfilter"; const skiptoken = "testskiptoken"; const top = 1; const metric = "actualcost"; -client.usageDetails.list(scope,{ - expand: expand, - filter: filter, - skiptoken: skiptoken, - top: top, - metric: metric -}).then((result) => { +client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -104,19 +98,13 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const skiptoken = "testskiptoken"; const top = 1; const metric = "actualcost"; - client.usageDetails.list(scope,{ - expand: expand, - filter: filter, - skiptoken: skiptoken, - top: top, - metric: metric - }).then((result) => { - console.log("The result is:"); - console.log(result); - }).catch((err) => { - console.log("An error occurred:"); - console.error(err); - }); + client.usageDetails.list(scope, expand, filter, skiptoken, top, metric).then((result) => { + console.log("The result is:"); + console.log(result); + }).catch((err) => { + console.log("An error occurred:"); + console.error(err); + }); diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index 24a6d73bfeed..0d19d61dde74 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/consumption/arm-consumption", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/consumption/arm-consumption", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts index 634ac502d476..81d554fafbba 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClientContext.ts @@ -49,7 +49,7 @@ export class ConsumptionManagementClientContext extends msRestAzure.AzureService super(credentials, options); - this.apiVersion = '2019-10-01'; + this.apiVersion = '2021-05-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index b7c6dbc94ab4..4265545ebe76 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -67,12 +67,12 @@ export interface MeterDetails { */ export interface Resource extends BaseResource { /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -82,7 +82,7 @@ export interface Resource extends BaseResource { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -107,12 +107,12 @@ export interface UsageDetail { */ kind: "UsageDetail"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -122,7 +122,7 @@ export interface UsageDetail { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -173,12 +173,12 @@ export interface LegacyUsageDetail { */ kind: "legacy"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -188,7 +188,7 @@ export interface LegacyUsageDetail { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -313,7 +313,7 @@ export interface LegacyUsageDetail { */ readonly consumedService?: string; /** - * Azure resource manager resource identifier. + * Unique identifier of the Azure Resource Manager usage detail resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resourceId?: string; @@ -323,12 +323,12 @@ export interface LegacyUsageDetail { */ readonly resourceName?: string; /** - * Service Info 1. + * Service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo1?: string; /** - * Service Info 2. + * Legacy field with optional service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo2?: string; @@ -430,12 +430,12 @@ export interface ModernUsageDetail { */ kind: "modern"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -445,7 +445,7 @@ export interface ModernUsageDetail { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -585,12 +585,12 @@ export interface ModernUsageDetail { */ readonly consumedService?: string; /** - * Service Info 1. + * Service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo1?: string; /** - * Service Info 2. + * Legacy field with optional service-specific metadata. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serviceInfo2?: string; @@ -815,7 +815,7 @@ export interface ModernUsageDetail { } /** - * An marketplace resource. + * A marketplace resource. */ export interface Marketplace extends Resource { /** @@ -1377,10 +1377,6 @@ export interface ReservationRecommendationDetailsModel extends Resource { * Resource sku */ sku?: string; - /** - * Resource eTag. - */ - eTag?: string; /** * An ISO 4217 currency code identifier for the costs and savings * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1427,12 +1423,12 @@ export interface ReservationRecommendation { */ kind: "ReservationRecommendation"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -1442,7 +1438,7 @@ export interface ReservationRecommendation { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -1488,12 +1484,12 @@ export interface LegacyReservationRecommendation { */ kind: "legacy"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -1503,7 +1499,7 @@ export interface LegacyReservationRecommendation { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -1624,12 +1620,12 @@ export interface ModernReservationRecommendation { */ kind: "modern"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -1639,7 +1635,7 @@ export interface ModernReservationRecommendation { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -1738,21 +1734,6 @@ export interface ModernReservationRecommendation { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly skuName?: string; - /** - * The Azure resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: string; - /** - * The Azure subscription ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly subscriptionId?: string; - /** - * Resource eTag. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly eTag?: string; } /** @@ -2183,13 +2164,6 @@ export interface Notification { * The type of threshold. Possible values include: 'Actual'. Default value: 'Actual'. */ thresholdType?: ThresholdType; - /** - * Language in which the recipient will receive the notification. Possible values include: - * 'en-us', 'ja-jp', 'zh-cn', 'de-de', 'es-es', 'fr-fr', 'it-it', 'ko-kr', 'pt-br', 'ru-ru', - * 'zh-tw', 'cs-cz', 'pl-pl', 'tr-tr', 'da-dk', 'en-gb', 'hu-hu', 'nb-no', 'nl-nl', 'pt-pt', - * 'sv-se' - */ - locale?: CultureCode; } /** @@ -2467,12 +2441,12 @@ export interface ChargeSummary { */ kind: "ChargeSummary"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -2482,7 +2456,7 @@ export interface ChargeSummary { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -2513,12 +2487,12 @@ export interface LegacyChargeSummary { */ kind: "legacy"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -2528,7 +2502,7 @@ export interface LegacyChargeSummary { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -2583,12 +2557,12 @@ export interface ModernChargeSummary { */ kind: "modern"; /** - * Resource Id. + * The full qualified ARM ID of an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * Resource name. + * The ID that uniquely identifies an event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; @@ -2598,7 +2572,7 @@ export interface ModernChargeSummary { */ readonly type?: string; /** - * Resource etag. + * The etag for the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly etag?: string; @@ -2781,35 +2755,35 @@ export interface Operation { } /** - * Reseller details + * The reseller properties. */ -export interface AmountWithExchangeRate extends Amount { +export interface Reseller { /** - * Exchange Rate. + * The reseller property ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly exchangeRate?: number; + readonly resellerId?: string; /** - * Exchange rate month. + * The reseller property description. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly exchangeRateMonth?: number; + readonly resellerDescription?: string; } /** - * Reseller details + * The amount with exchange rate. */ -export interface Reseller { +export interface AmountWithExchangeRate extends Amount { /** - * Reseller id. + * The exchange rate. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resellerId?: string; + readonly exchangeRate?: number; /** - * Reseller Description. + * The exchange rate month. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly resellerDescription?: string; + readonly exchangeRateMonth?: number; } /** @@ -2817,90 +2791,127 @@ export interface Reseller { */ export interface EventSummary extends Resource { /** - * Credit Currency + * The date of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditCurrency?: string; + readonly transactionDate?: Date; /** - * Billing Currency. + * The description of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingCurrency?: string; + readonly description?: string; /** - * Transaction date. + * The amount of new credit or commitment for NewCredit or SettleCharges event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly transactionDate?: Date; + readonly newCredit?: Amount; /** - * Transaction description. + * The amount of balance adjustment. The property is not available for ConsumptionCommitment + * lots. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly description?: string; + readonly adjustments?: Amount; /** - * New Credit. + * The amount of expired credit or commitment for NewCredit or SettleCharges event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newCredit?: Amount; + readonly creditExpired?: Amount; /** - * Current balance. + * The amount of charges for events of type SettleCharges and PendingEligibleCharges. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly newCreditInBillingCurrency?: AmountWithExchangeRate; + readonly charges?: Amount; /** - * Adjustments amount. + * The balance after the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly adjustments?: Amount; + readonly closedBalance?: Amount; /** - * Current balance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Identifies the type of the event. Possible values include: 'SettledCharges', 'PendingCharges', + * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' */ - readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; + eventType?: EventType; /** - * Credit expired. + * The number which uniquely identifies the invoice on which the event was billed. This will be + * empty for unbilled events. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditExpired?: Amount; + readonly invoiceNumber?: string; /** - * Current balance. + * The ID that uniquely identifies the billing profile for which the event happened. The property + * is only available for billing account of type MicrosoftCustomerAgreement. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditExpiredInBillingCurrency?: AmountWithExchangeRate; + readonly billingProfileId?: string; /** - * Charges amount. + * The display name of the billing profile for which the event happened. The property is only + * available for billing account of type MicrosoftCustomerAgreement. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly charges?: Amount; + readonly billingProfileDisplayName?: string; /** - * Current balance. + * The ID that uniquely identifies the lot for which the event happened. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly chargesInBillingCurrency?: AmountWithExchangeRate; + readonly lotId?: string; /** - * Closed balance. + * Identifies the source of the lot for which the event happened. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalance?: Amount; + readonly lotSource?: string; /** - * Current balance. + * Amount of canceled credit. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; + readonly canceledCredit?: Amount; /** - * The type of event. Possible values include: 'SettledCharges', 'PendingCharges', - * 'PendingAdjustments', 'PendingNewCredit', 'PendingExpiredCredit', 'UnKnown', 'NewCredit' + * The credit currency of the event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - eventType?: EventType; + readonly creditCurrency?: string; /** - * Invoice number. + * The billing currency of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly invoiceNumber?: string; + readonly billingCurrency?: string; /** - * Reseller details. + * The reseller of the event. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reseller?: Reseller; + /** + * The amount of expired credit or commitment for NewCredit or SettleCharges event in billing + * currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditExpiredInBillingCurrency?: AmountWithExchangeRate; + /** + * The amount of new credit or commitment for NewCredit or SettleCharges event in billing + * currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly newCreditInBillingCurrency?: AmountWithExchangeRate; + /** + * The amount of balance adjustment in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; + /** + * The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing + * currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly chargesInBillingCurrency?: AmountWithExchangeRate; + /** + * The balance in billing currency after the event. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; + /** + * The eTag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eTag?: string; } /** @@ -2908,60 +2919,78 @@ export interface EventSummary extends Resource { */ export interface LotSummary extends Resource { /** - * Credit Currency + * The original amount of a lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly creditCurrency?: string; + readonly originalAmount?: Amount; /** - * Billing Currency. + * The balance as of the last invoice. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly billingCurrency?: string; + readonly closedBalance?: Amount; /** - * Original amount. + * The source of the lot. Possible values include: 'PurchasedCredit', 'PromotionalCredit', + * 'ConsumptionCommitment' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly originalAmount?: Amount; + readonly source?: LotSource; /** - * Current balance. + * The date when the lot became effective. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; + readonly startDate?: Date; /** - * Closed balance. + * The expiration date of a lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalance?: Amount; + readonly expirationDate?: Date; /** - * Current balance. + * The po number of the invoice on which the lot was added. This property is not available for + * ConsumptionCommitment lots. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; + readonly poNumber?: string; /** - * Lot source. Possible values include: 'PurchasedCredit', 'PromotionalCredit' + * The date when the lot was added. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly source?: LotSource; + readonly purchasedDate?: Date; /** - * Start date. + * The status of the lot. Possible values include: 'None', 'Active', 'Inactive', 'Expired', + * 'Complete', 'Canceled' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly startDate?: Date; + readonly status?: Status; /** - * Expiration date. + * The currency of the lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly expirationDate?: Date; + readonly creditCurrency?: string; /** - * PO number. + * The billing currency of the lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly poNumber?: string; + readonly billingCurrency?: string; + /** + * The original amount of a lot in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; + /** + * The balance as of the last invoice in billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; /** - * Reseller details. + * The reseller of the lot. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reseller?: Reseller; + /** + * The eTag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eTag?: string; } /** @@ -2979,31 +3008,16 @@ export interface CreditBalanceSummary { */ readonly currentBalance?: Amount; /** - * Current balance. + * Estimated balance in billing currency. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly estimatedBalanceInBillingCurrency?: AmountWithExchangeRate; - /** - * Current balance. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly currentBalanceInBillingCurrency?: AmountWithExchangeRate; } /** * A credit summary resource. */ export interface CreditSummary extends Resource { - /** - * Credit Currency - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly creditCurrency?: string; - /** - * Billing Currency. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly billingCurrency?: string; /** * Summary of balances associated with this credit summary. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -3025,10 +3039,25 @@ export interface CreditSummary extends Resource { */ readonly pendingEligibleCharges?: Amount; /** - * Reseller details. + * The credit currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly creditCurrency?: string; + /** + * The billing currency. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly billingCurrency?: string; + /** + * Credit's reseller. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reseller?: Reseller; + /** + * The eTag for the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eTag?: string; } /** @@ -3057,7 +3086,7 @@ export interface UsageDetailsListOptionalParams extends msRest.RequestOptionsBas */ expand?: string; /** - * May be used to filter usageDetails by properties/resourceGroup, properties/instanceName, + * May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, * properties/resourceId, properties/chargeType, properties/reservationId, * properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. * It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string @@ -3092,7 +3121,7 @@ export interface UsageDetailsListNextOptionalParams extends msRest.RequestOption */ expand?: string; /** - * May be used to filter usageDetails by properties/resourceGroup, properties/instanceName, + * May be used to filter usageDetails by properties/resourceGroup, properties/resourceName, * properties/resourceId, properties/chargeType, properties/reservationId, * properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. * It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string @@ -3217,16 +3246,16 @@ export interface ReservationsSummariesListByReservationOrderAndReservationOption */ export interface ReservationsSummariesListOptionalParams extends msRest.RequestOptionsBase { /** - * Start date. Required only when querying with billing profile + * Start date. Only applicable when querying with billing profile */ startDate?: string; /** - * End date. Required only when querying with billing profile + * End date. Only applicable when querying with billing profile */ endDate?: string; /** - * The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not - * required when querying with billing profile + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge'. Not applicable when querying with billing profile */ filter?: string; /** @@ -3268,16 +3297,16 @@ export interface ReservationsSummariesListByReservationOrderAndReservationNextOp */ export interface ReservationsSummariesListNextOptionalParams extends msRest.RequestOptionsBase { /** - * Start date. Required only when querying with billing profile + * Start date. Only applicable when querying with billing profile */ startDate?: string; /** - * End date. Required only when querying with billing profile + * End date. Only applicable when querying with billing profile */ endDate?: string; /** - * The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not - * required when querying with billing profile + * Required only for daily grain. The properties/UsageDate for start date and end date. The + * filter supports 'le' and 'ge'. Not applicable when querying with billing profile */ filter?: string; /** @@ -3493,6 +3522,54 @@ export interface AggregatedCostGetByManagementGroupOptionalParams extends msRest filter?: string; } +/** + * Optional Parameters. + */ +export interface EventsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the events by lotId, lotSource etc. The filter supports 'eq', 'lt', + * 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is + * a key value pair string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface EventsListByBillingAccountNextOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the events by lotId, lotSource etc. The filter supports 'eq', 'lt', + * 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is + * a key value pair string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LotsListByBillingAccountOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', + * 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key + * value pair string where key and value is separated by a colon (:). + */ + filter?: string; +} + +/** + * Optional Parameters. + */ +export interface LotsListByBillingAccountNextOptionalParams extends msRest.RequestOptionsBase { + /** + * May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', + * 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key + * value pair string where key and value is separated by a colon (:). + */ + filter?: string; +} + /** * An interface representing ConsumptionManagementClientOptions. */ @@ -3583,11 +3660,6 @@ export interface ReservationRecommendationsListResult extends Array */ - get(scope: string, options?: msRest.RequestOptionsBase): Promise; + get(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param callback The callback */ - get(scope: string, callback: msRest.ServiceCallback): void; + get(billingAccountId: string, billingProfileId: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope associated with credits operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param options The optional parameters * @param callback The callback */ - get(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(billingAccountId: string, billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - scope, + billingAccountId, + billingProfileId, options }, getOperationSpec, @@ -70,9 +62,10 @@ export class Credits { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{scope}/providers/Microsoft.Consumption/credits/balanceSummary", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary", urlParameters: [ - Parameters.scope0 + Parameters.billingAccountId, + Parameters.billingProfileId ], queryParameters: [ Parameters.apiVersion @@ -84,6 +77,7 @@ const getOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.CreditSummary }, + 204: {}, default: { bodyMapper: Mappers.ErrorResponse } diff --git a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts index 4dce0454fb19..ea46dee4f1ce 100644 --- a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts @@ -26,69 +26,92 @@ export class EventsOperations { } /** - * Lists the events by billingAccountId and billingProfileId for given start and end date. + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date * @param endDate End date - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(startDate: string, endDate: string, scope: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date * @param endDate End date - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. * @param callback The callback */ - list(startDate: string, endDate: string, scope: string, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; /** + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param startDate Start date * @param endDate End date - * @param scope The scope associated with events operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. * @param options The optional parameters * @param callback The callback */ - list(startDate: string, endDate: string, scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(startDate: string, endDate: string, scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + billingAccountId, + billingProfileId, startDate, endDate, - scope, options }, - listOperationSpec, - callback) as Promise; + listByBillingProfileOperationSpec, + callback) as Promise; } /** - * Lists the events by billingAccountId and billingProfileId for given start and end date. + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. + * @param billingAccountId BillingAccount ID + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountId: string, options?: Models.EventsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, options: Models.EventsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountId: string, options?: Models.EventsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param startDate Start date * @param endDate End date * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param startDate Start date * @param endDate End date * @param callback The callback */ - listNext(nextPageLink: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param startDate Start date @@ -96,8 +119,8 @@ export class EventsOperations { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, startDate: string, endDate: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -105,18 +128,48 @@ export class EventsOperations { endDate, options }, - listNextOperationSpec, - callback) as Promise; + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a + * billing account or a billing profile for a given start and end date. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: Models.EventsListByBillingAccountNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: Models.EventsListByBillingAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: Models.EventsListByBillingAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{scope}/providers/Microsoft.Consumption/events", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events", urlParameters: [ - Parameters.scope0 + Parameters.billingAccountId, + Parameters.billingProfileId ], queryParameters: [ Parameters.apiVersion, @@ -137,7 +190,31 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events", + urlParameters: [ + Parameters.billingAccountId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -162,3 +239,28 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Events + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts index e1ca09a3f203..e09becbfe188 100644 --- a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts @@ -26,81 +26,138 @@ export class LotsOperations { } /** - * Lists the lots by billingAccountId and billingProfileId. - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(scope: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param callback The callback */ - list(scope: string, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, callback: msRest.ServiceCallback): void; /** - * @param scope The scope associated with Lots operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' - * for Billing Profile scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific - * for partners. + * @param billingAccountId BillingAccount ID + * @param billingProfileId Azure Billing Profile ID. * @param options The optional parameters * @param callback The callback */ - list(scope: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(scope: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfile(billingAccountId: string, billingProfileId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - scope, + billingAccountId, + billingProfileId, options }, - listOperationSpec, - callback) as Promise; + listByBillingProfileOperationSpec, + callback) as Promise; } /** - * Lists the lots by billingAccountId and billingProfileId. + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. + * @param billingAccountId BillingAccount ID + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccount(billingAccountId: string, options?: Models.LotsListByBillingAccountOptionalParams): Promise; + /** + * @param billingAccountId BillingAccount ID + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, callback: msRest.ServiceCallback): void; + /** + * @param billingAccountId BillingAccount ID + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccount(billingAccountId: string, options: Models.LotsListByBillingAccountOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccount(billingAccountId: string, options?: Models.LotsListByBillingAccountOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + billingAccountId, + options + }, + listByBillingAccountOperationSpec, + callback) as Promise; + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByBillingProfileNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByBillingProfileNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listByBillingProfileNextOperationSpec, + callback) as Promise; + } + + /** + * Lists all Azure credits and Microsoft Azure consumption commitments for a billing account or a + * billing profile. Microsoft Azure consumption commitments are only supported for the billing + * account scope. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByBillingAccountNext(nextPageLink: string, options?: Models.LotsListByBillingAccountNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByBillingAccountNext(nextPageLink: string, options: Models.LotsListByBillingAccountNextOptionalParams, callback: msRest.ServiceCallback): void; + listByBillingAccountNext(nextPageLink: string, options?: Models.LotsListByBillingAccountNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByBillingAccountNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listOperationSpec: msRest.OperationSpec = { +const listByBillingProfileOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{scope}/providers/Microsoft.Consumption/lots", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots", urlParameters: [ - Parameters.scope0 + Parameters.billingAccountId, + Parameters.billingProfileId ], queryParameters: [ Parameters.apiVersion @@ -119,7 +176,31 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listByBillingAccountOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots", + urlParameters: [ + Parameters.billingAccountId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Lots + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByBillingProfileNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", @@ -142,3 +223,28 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listByBillingAccountNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Lots + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts index 375c3dcea57c..94299dc9fc92 100644 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts @@ -120,7 +120,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/marketplaces", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.filter0, diff --git a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts index 062fb980d41a..6d5c3c12a33d 100644 --- a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts +++ b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts @@ -26,8 +26,8 @@ export class PriceSheet { } /** - * Gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only - * for May 1, 2014 or later. + * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, + * 2014 or later. * @param [options] The optional parameters * @returns Promise */ diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts index 2a4a6c4da6f4..7012e4e57671 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts @@ -27,13 +27,13 @@ export class ReservationRecommendationDetails { /** * Details of a reservation recommendation for what-if analysis of reserved instances. - * @param billingScope The scope associated with reservation recommendation details operations. - * This includes '/subscriptions/{subscriptionId}/' for subscription scope, + * @param scope The scope associated with reservation recommendation details operations. This + * includes '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope - * @param scope Scope of the reservation. Possible values include: 'Single', 'Shared' + * @param scope1 Scope of the reservation. Possible values include: 'Single', 'Shared' * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', * 'P3Y' @@ -44,15 +44,15 @@ export class ReservationRecommendationDetails { * @param [options] The optional parameters * @returns Promise */ - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase): Promise; + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param billingScope The scope associated with reservation recommendation details operations. - * This includes '/subscriptions/{subscriptionId}/' for subscription scope, + * @param scope The scope associated with reservation recommendation details operations. This + * includes '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope - * @param scope Scope of the reservation. Possible values include: 'Single', 'Shared' + * @param scope1 Scope of the reservation. Possible values include: 'Single', 'Shared' * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', * 'P3Y' @@ -62,15 +62,15 @@ export class ReservationRecommendationDetails { * Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks) * @param callback The callback */ - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, callback: msRest.ServiceCallback): void; + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, callback: msRest.ServiceCallback): void; /** - * @param billingScope The scope associated with reservation recommendation details operations. - * This includes '/subscriptions/{subscriptionId}/' for subscription scope, + * @param scope The scope associated with reservation recommendation details operations. This + * includes '/subscriptions/{subscriptionId}/' for subscription scope, * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, * /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope - * @param scope Scope of the reservation. Possible values include: 'Single', 'Shared' + * @param scope1 Scope of the reservation. Possible values include: 'Single', 'Shared' * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. Possible values include: 'P1Y', * 'P3Y' @@ -81,12 +81,12 @@ export class ReservationRecommendationDetails { * @param options The optional parameters * @param callback The callback */ - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(billingScope: string, scope: Models.Scope14, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(scope: string, scope1: Models.Scope12, region: string, term: Models.Term, lookBackPeriod: Models.LookBackPeriod, product: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - billingScope, scope, + scope1, region, term, lookBackPeriod, @@ -102,9 +102,9 @@ export class ReservationRecommendationDetails { const serializer = new msRest.Serializer(Mappers); const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "{billingScope}/providers/Microsoft.Consumption/reservationRecommendationDetails", + path: "{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails", urlParameters: [ - Parameters.billingScope + Parameters.scope ], queryParameters: [ Parameters.apiVersion, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts index cee0975a8a80..68a0748eb829 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts @@ -103,7 +103,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/reservationRecommendations", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.filter0, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts index 6bc783602872..54231efe08f3 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts @@ -293,7 +293,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/reservationDetails", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.startDate0, diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts index c8364aa700b9..12455eefb0c6 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts @@ -291,7 +291,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/reservationSummaries", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.grain, diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts index 52c6d0d481f9..ba9375de145f 100644 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ b/sdk/consumption/arm-consumption/src/operations/tags.ts @@ -87,7 +87,7 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/tags", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.apiVersion diff --git a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts index 024b9007fb21..30030ca62a14 100644 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts @@ -27,9 +27,7 @@ export class UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for - * May 1, 2014 or later. For more information on using this API, including how to specify a date - * range, please see: - * https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation + * May 1, 2014 or later. * @param scope The scope associated with usage details operations. This includes * '/subscriptions/{subscriptionId}/' for subscription scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, @@ -112,9 +110,7 @@ export class UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for - * May 1, 2014 or later. For more information on using this API, including how to specify a date - * range, please see: - * https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation + * May 1, 2014 or later. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -148,7 +144,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{scope}/providers/Microsoft.Consumption/usageDetails", urlParameters: [ - Parameters.scope0 + Parameters.scope ], queryParameters: [ Parameters.expand,