diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index effaa47f703e..cb7e09e67abd 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1021,9 +1021,6 @@ importers: '@rush-temp/iot-modelsrepository': specifier: file:./projects/iot-modelsrepository.tgz version: file:projects/iot-modelsrepository.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) - '@rush-temp/mcp-server': - specifier: file:./projects/mcp-server.tgz - version: file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1) '@rush-temp/keyvault-admin': specifier: file:./projects/keyvault-admin.tgz version: file:projects/keyvault-admin.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) @@ -1063,6 +1060,9 @@ importers: '@rush-temp/maps-timezone': specifier: file:./projects/maps-timezone.tgz version: file:projects/maps-timezone.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) + '@rush-temp/mcp-server': + specifier: file:./projects/mcp-server.tgz + version: file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1) '@rush-temp/microsoft-playwright-testing': specifier: file:./projects/microsoft-playwright-testing.tgz version: file:projects/microsoft-playwright-testing.tgz(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1) @@ -2598,7 +2598,7 @@ packages: version: 0.0.0 '@rush-temp/arm-consumption@file:projects/arm-consumption.tgz': - resolution: {integrity: sha512-VLX9kulwJfx0iCR1rja+QBTIuaf7k+LaXqc1xVTBTh0juaIQwb8OQIsZXn/JQb2Coop1r3JsQl583sDRqPzjig==, tarball: file:projects/arm-consumption.tgz} + resolution: {integrity: sha512-apTGTlmW3hzAWZJPACwbMdSo5VkUOvYlD+Qbpg0qWelk9Lk+cYRQz1IMmhYqAGcO25juF+EDZ+dDJgMaBXpKLQ==, tarball: file:projects/arm-consumption.tgz} version: 0.0.0 '@rush-temp/arm-containerinstance@file:projects/arm-containerinstance.tgz': @@ -3669,10 +3669,6 @@ packages: resolution: {integrity: sha512-nVEawKXIhltEp1Zvua0E46Gdg0Hs5JJDFD7WPgqFBycYtQjRVsw60x49ZTi8ZxYXPJGQBJC2xLvj1fg/A5uhyQ==, tarball: file:projects/iot-modelsrepository.tgz} version: 0.0.0 - '@rush-temp/mcp-server@file:projects/mcp-server.tgz': - resolution: {integrity: sha512-DuCikdWUz6hleAR8EjUp7JD4VAGR1YMfNRAshvzJ7W20qAMV10dscYCo2wq8Eqt5TtEwLOrJFFfnbHwGIhNTZQ==, tarball: file:projects/mcp-server.tgz} - version: 0.0.0 - '@rush-temp/keyvault-admin@file:projects/keyvault-admin.tgz': resolution: {integrity: sha512-+pLp6hMMbEHRNWIWBJHEb3ovy65MoQthJRuwfDYdXDDYMYgiazL7j3CLleRz+WpDlI5kJ8gyD24pIqCoVZvQqg==, tarball: file:projects/keyvault-admin.tgz} version: 0.0.0 @@ -3725,6 +3721,10 @@ packages: resolution: {integrity: sha512-LLoNu/hOKIZ5/eLQ0io6I6kDPrnkiI1C3rDtG0DEQlP097B9CoeeaQ2E+qbGYUAPvvyo6QththExkcmgUENgEg==, tarball: file:projects/maps-timezone.tgz} version: 0.0.0 + '@rush-temp/mcp-server@file:projects/mcp-server.tgz': + resolution: {integrity: sha512-xVj0UA/iOcFZso/cQiQ1Ug5juexp+mJOhFwNBANfNb0bzXo9BRrgR2/0DxaTIIS0lest23qzU0nMQUiZPPetpA==, tarball: file:projects/mcp-server.tgz} + version: 0.0.0 + '@rush-temp/microsoft-playwright-testing@file:projects/microsoft-playwright-testing.tgz': resolution: {integrity: sha512-sVU4AhYy8i4VhihEGOHMZLmUggC15w2JvBfGUC+i+q7nxmE3sIbO+EzicltK811tg0QQML6lAzKonojrK4FO6g==, tarball: file:projects/microsoft-playwright-testing.tgz} version: 0.0.0 @@ -10983,6 +10983,7 @@ snapshots: '@rush-temp/arm-consumption@file:projects/arm-consumption.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: + '@azure/core-lro': 2.7.2 '@types/node': 18.19.87 '@vitest/browser': 3.1.2(playwright@1.52.0)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(vitest@3.1.2) '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) @@ -20462,37 +20463,6 @@ snapshots: - webdriverio - yaml - '@rush-temp/mcp-server@file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1)': - dependencies: - '@modelcontextprotocol/sdk': 1.11.0 - '@types/node': 18.19.87 - '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) - '@vitest/expect': 3.1.2 - dotenv: 16.5.0 - eslint: 9.26.0 - tsx: 4.19.3 - typescript: 5.8.3 - vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.87)(@vitest/browser@3.1.2)(tsx@4.19.3)(yaml@2.7.1) - zod: 3.24.4 - transitivePeerDependencies: - - '@edge-runtime/vm' - - '@types/debug' - - '@vitest/browser' - - '@vitest/ui' - - happy-dom - - jiti - - jsdom - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - yaml - '@rush-temp/keyvault-admin@file:projects/keyvault-admin.tgz(@types/debug@4.1.12)(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: '@azure/keyvault-keys': 4.9.0 @@ -20962,6 +20932,37 @@ snapshots: - webdriverio - yaml + '@rush-temp/mcp-server@file:projects/mcp-server.tgz(@types/debug@4.1.12)(@vitest/browser@3.1.2)(yaml@2.7.1)': + dependencies: + '@modelcontextprotocol/sdk': 1.11.0 + '@types/node': 18.19.87 + '@vitest/coverage-istanbul': 3.1.2(vitest@3.1.2) + '@vitest/expect': 3.1.2 + dotenv: 16.5.0 + eslint: 9.26.0 + tsx: 4.19.3 + typescript: 5.8.3 + vitest: 3.1.2(@types/debug@4.1.12)(@types/node@18.19.87)(@vitest/browser@3.1.2)(tsx@4.19.3)(yaml@2.7.1) + zod: 3.24.4 + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/debug' + - '@vitest/browser' + - '@vitest/ui' + - happy-dom + - jiti + - jsdom + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - yaml + '@rush-temp/microsoft-playwright-testing@file:projects/microsoft-playwright-testing.tgz(tsx@4.19.4)(vite@6.3.5(@types/node@22.7.9)(tsx@4.19.4)(yaml@2.7.1))(yaml@2.7.1)': dependencies: '@playwright/test': 1.52.0 diff --git a/sdk/consumption/arm-consumption/CHANGELOG.md b/sdk/consumption/arm-consumption/CHANGELOG.md index 758af8bd6766..4f59b8e69104 100644 --- a/sdk/consumption/arm-consumption/CHANGELOG.md +++ b/sdk/consumption/arm-consumption/CHANGELOG.md @@ -1,15 +1,67 @@ # Release History - -## 9.2.1 (Unreleased) - + +## 10.0.0 (2025-05-12) + ### Features Added -### Breaking Changes - -### Bugs Fixed + - Added operation LotsOperations.listByCustomer + - Added operation PriceSheet.beginDownloadByBillingAccountPeriod + - Added operation PriceSheet.beginDownloadByBillingAccountPeriodAndWait + - Added Interface LotsListByCustomerNextOptionalParams + - Added Interface LotsListByCustomerOptionalParams + - Added Interface ModernReservationRecommendationProperties + - Added Interface ModernSharedScopeReservationRecommendationProperties + - Added Interface ModernSingleScopeReservationRecommendationProperties + - Added Interface OperationStatus + - Added Interface PriceSheetDownloadByBillingAccountPeriodHeaders + - Added Interface PriceSheetDownloadByBillingAccountPeriodOptionalParams + - Added Interface SavingsPlan + - Added Type Alias LotsListByCustomerNextResponse + - Added Type Alias LotsListByCustomerResponse + - Added Type Alias ModernReservationRecommendationPropertiesUnion + - Added Type Alias OperationStatusType + - Added Type Alias OrganizationType + - Added Type Alias PriceSheetDownloadByBillingAccountPeriodResponse + - Interface Balance has a new optional parameter overageRefund + - Interface CreditSummary has a new optional parameter eTagPropertiesETag + - Interface CreditSummary has a new optional parameter isEstimatedBalance + - Interface EventSummary has a new optional parameter billingAccountDisplayName + - Interface EventSummary has a new optional parameter billingAccountId + - Interface EventSummary has a new optional parameter chargesInLotCurrency + - Interface EventSummary has a new optional parameter closedBalanceInLotCurrency + - Interface EventSummary has a new optional parameter isEstimatedBalance + - Interface LegacyChargeSummary has a new optional parameter azureMarketplaceCharges + - Interface LegacyReservationRecommendation has a new optional parameter lastUsageDate + - Interface LegacyReservationRecommendation has a new optional parameter totalHours + - Interface LegacyReservationRecommendationProperties has a new optional parameter lastUsageDate + - Interface LegacyReservationRecommendationProperties has a new optional parameter totalHours + - Interface LegacyUsageDetail has a new optional parameter benefitId + - Interface LegacyUsageDetail has a new optional parameter benefitName + - Interface LotSummary has a new optional parameter isEstimatedBalance + - Interface LotSummary has a new optional parameter organizationType + - Interface LotSummary has a new optional parameter usedAmount + - Interface ModernChargeSummary has a new optional parameter subscriptionId + - Interface ModernReservationRecommendation has a new optional parameter lastUsageDate + - Interface ModernReservationRecommendation has a new optional parameter resourceType + - Interface ModernReservationRecommendation has a new optional parameter totalHours + - Interface PriceSheetProperties has a new optional parameter savingsPlan + - Interface ReservationRecommendationDetailsGetOptionalParams has a new optional parameter filter + - Interface ReservationTransactionsListOptionalParams has a new optional parameter previewMarkupPercentage + - Interface ReservationTransactionsListOptionalParams has a new optional parameter useMarkupIfPartner + - Added Enum KnownOperationStatusType + - Added Enum KnownOrganizationType + - Enum KnownEventType has a new value CreditExpired + - Enum KnownTerm has a new value P1M -### Other Changes +### Breaking Changes + - Operation ReservationRecommendationDetails.get has a new signature + - Class ConsumptionManagementClient has a new signature + - Interface BudgetFilter no longer has parameter not + - Interface LegacyChargeSummary no longer has parameter marketplaceCharges + - Parameter scope of interface ModernReservationRecommendation is now required + + ## 9.2.0 (2023-01-03) ### Features Added @@ -75,7 +127,7 @@ ## 9.0.1 (2022-04-11) -### Features Added +**features** - bug fix @@ -87,4 +139,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart). diff --git a/sdk/consumption/arm-consumption/LICENSE b/sdk/consumption/arm-consumption/LICENSE index b2f52a2bad4e..63447fd8bbbf 100644 --- a/sdk/consumption/arm-consumption/LICENSE +++ b/sdk/consumption/arm-consumption/LICENSE @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/README.md b/sdk/consumption/arm-consumption/README.md index a1b5f3bb16d3..1b07211123f0 100644 --- a/sdk/consumption/arm-consumption/README.md +++ b/sdk/consumption/arm-consumption/README.md @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure ConsumptionManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -64,16 +63,14 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur import { InteractiveBrowserCredential } from "@azure/identity"; import { ConsumptionManagementClient } from "@azure/arm-consumption"; -const subscriptionId = "00000000-0000-0000-0000-000000000000"; const credential = new InteractiveBrowserCredential({ tenantId: "", - clientId: "", -}); + clientId: "" + }); const client = new ConsumptionManagementClient(credential, subscriptionId); ``` ### JavaScript Bundle - To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts @@ -109,7 +106,6 @@ If you'd like to contribute to this library, please read the [contributing guide - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js) - [azure_cli]: https://learn.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [azure_sub]: https://azure.microsoft.com/free/ diff --git a/sdk/consumption/arm-consumption/_meta.json b/sdk/consumption/arm-consumption/_meta.json index 494fd8975a91..61be251221d0 100644 --- a/sdk/consumption/arm-consumption/_meta.json +++ b/sdk/consumption/arm-consumption/_meta.json @@ -1,8 +1,8 @@ { - "commit": "d600759c3516b61a7c353bc8682bccbab85a6f65", - "readme": "specification\\consumption\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\consumption\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.5.20221215.1 --generate-sample=true", + "commit": "b2a6fabe6eb292817a8bcfc4581b4f25e7161582", + "readme": "specification/consumption/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/consumption/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.5.20221215.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.27", + "use": "@autorest/typescript@^6.0.12" } diff --git a/sdk/consumption/arm-consumption/api-extractor.json b/sdk/consumption/arm-consumption/api-extractor.json index 7d04e43564d5..729dd4e799c5 100644 --- a/sdk/consumption/arm-consumption/api-extractor.json +++ b/sdk/consumption/arm-consumption/api-extractor.json @@ -28,4 +28,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index d3be2663eeac..54030ffd3847 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -3,15 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConsumptionManagementClient.", - "version": "9.2.1", + "version": "10.0.0", "engines": { "node": ">=18.0.0" }, "dependencies": { + "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", - "@azure/core-client": "^1.9.2", + "@azure/core-client": "^1.9.4", + "@azure/core-lro": "^2.5.4", "@azure/core-paging": "^1.6.2", - "@azure/core-rest-pipeline": "^1.18.2", + "@azure/core-rest-pipeline": "^1.20.0", "tslib": "^2.8.1" }, "keywords": [ @@ -26,18 +28,19 @@ "main": "./dist/commonjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/commonjs/index.d.ts", + "type": "module", "devDependencies": { "@azure-tools/test-credential": "^2.0.0", "@azure-tools/test-recorder": "^4.1.0", "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.6.0", - "@azure/logger": "^1.1.4", + "@azure/identity": "^4.9.1", + "@azure/logger": "^1.2.0", "@types/node": "^18.0.0", "@vitest/browser": "^3.0.9", "@vitest/coverage-istanbul": "^3.0.9", "dotenv": "^16.0.0", - "playwright": "^1.49.1", + "playwright": "^1.52.0", "typescript": "~5.8.2", "vitest": "^3.0.9" }, @@ -54,20 +57,30 @@ ], "scripts": { "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "build:browser": "echo skipped", + "build:node": "echo skipped", "build:samples": "echo skipped.", - "check-format": "echo skipped", + "build:test": "echo skipped", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "execute:samples": "echo skipped", "extract-api": "dev-tool run extract-api", - "format": "echo skipped", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" ", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "integration-test:browser": "echo skipped", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", + "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", "prepack": "npm run build", - "test": "npm run test:node && npm run test:browser", + "test": "npm run integration-test", "test:browser": "echo skipped", "test:node": "dev-tool run test:vitest", - "test:node:esm": "dev-tool run test:vitest --esm", - "update-snippets": "dev-tool run update-snippets" + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "echo skipped", + "unit-test:node": "dev-tool run test:vitest", + "update-snippets": "dev-tool run update-snippets", + "test:node:esm": "dev-tool run test:vitest --esm" }, "sideEffects": false, "//metadata": { @@ -79,16 +92,9 @@ ] }, "autoPublish": true, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/consumption/arm-consumption", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-consumption?view=azure-node-preview" - }, - "type": "module", "tshy": { "project": "./tsconfig.src.json", "exports": { @@ -105,8 +111,6 @@ ], "selfLink": false }, - "browser": "./dist/browser/index.js", - "react-native": "./dist/react-native/index.js", "exports": { "./package.json": "./package.json", ".": { @@ -128,4 +132,4 @@ } } } -} +} \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/review/arm-consumption.api.md b/sdk/consumption/arm-consumption/review/arm-consumption.api.md index e949327f5510..6b602409b744 100644 --- a/sdk/consumption/arm-consumption/review/arm-consumption.api.md +++ b/sdk/consumption/arm-consumption/review/arm-consumption.api.md @@ -6,7 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface AggregatedCost { @@ -53,6 +55,7 @@ export interface Balance extends Resource { readonly endingBalance?: number; readonly newPurchases?: number; readonly newPurchasesDetails?: BalancePropertiesNewPurchasesDetailsItem[]; + readonly overageRefund?: number; readonly priceHidden?: boolean; readonly serviceOverage?: number; readonly totalOverage?: number; @@ -120,7 +123,6 @@ export interface BudgetComparisonExpression { export interface BudgetFilter { and?: BudgetFilterProperties[]; dimensions?: BudgetComparisonExpression; - not?: BudgetFilterProperties; tags?: BudgetComparisonExpression; } @@ -225,6 +227,7 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: ConsumptionManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, options?: ConsumptionManagementClientOptionalParams); // (undocumented) aggregatedCost: AggregatedCost; // (undocumented) @@ -258,7 +261,7 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { // (undocumented) reservationTransactions: ReservationTransactions; // (undocumented) - subscriptionId: string; + subscriptionId?: string; // (undocumented) tags: Tags; // (undocumented) @@ -292,12 +295,13 @@ export interface CreditsGetOptionalParams extends coreClient.OperationOptions { export type CreditsGetResponse = CreditSummary; // @public -export interface CreditSummary extends Resource { +export interface CreditSummary extends ProxyResource { readonly balanceSummary?: CreditBalanceSummary; readonly billingCurrency?: string; readonly creditCurrency?: string; - readonly eTag?: string; + readonly eTagPropertiesETag?: string; readonly expiredCredit?: Amount; + readonly isEstimatedBalance?: boolean; readonly pendingCreditAdjustments?: Amount; readonly pendingEligibleCharges?: Amount; readonly reseller?: Reseller; @@ -377,14 +381,18 @@ export interface EventsOperations { export interface EventSummary extends ProxyResource { readonly adjustments?: Amount; readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; + readonly billingAccountDisplayName?: string; + readonly billingAccountId?: string; readonly billingCurrency?: string; readonly billingProfileDisplayName?: string; readonly billingProfileId?: string; readonly canceledCredit?: Amount; readonly charges?: Amount; readonly chargesInBillingCurrency?: AmountWithExchangeRate; + readonly chargesInLotCurrency?: Amount; readonly closedBalance?: Amount; readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; + readonly closedBalanceInLotCurrency?: Amount; readonly creditCurrency?: string; readonly creditExpired?: Amount; readonly creditExpiredInBillingCurrency?: AmountWithExchangeRate; @@ -392,6 +400,7 @@ export interface EventSummary extends ProxyResource { readonly eTagPropertiesETag?: string; eventType?: EventType; readonly invoiceNumber?: string; + readonly isEstimatedBalance?: boolean; readonly lotId?: string; readonly lotSource?: string; readonly newCredit?: Amount; @@ -479,6 +488,7 @@ export enum KnownDatagrain { // @public export enum KnownEventType { + CreditExpired = "CreditExpired", NewCredit = "NewCredit", PendingAdjustments = "PendingAdjustments", PendingCharges = "PendingCharges", @@ -509,6 +519,13 @@ export enum KnownMetrictype { UsageMetricType = "usage" } +// @public +export enum KnownOperationStatusType { + Completed = "Completed", + Failed = "Failed", + Running = "Running" +} + // @public export enum KnownOperatorType { EqualTo = "EqualTo", @@ -516,6 +533,12 @@ export enum KnownOperatorType { GreaterThanOrEqualTo = "GreaterThanOrEqualTo" } +// @public +export enum KnownOrganizationType { + ContributorOrganizationType = "Contributor", + PrimaryOrganizationType = "Primary" +} + // @public export enum KnownPricingModelType { OnDemand = "On Demand", @@ -547,6 +570,7 @@ export enum KnownStatus { // @public export enum KnownTerm { + P1M = "P1M", P1Y = "P1Y", P3Y = "P3Y" } @@ -576,11 +600,11 @@ export enum KnownUsageDetailsKind { // @public export interface LegacyChargeSummary extends ChargeSummary { readonly azureCharges?: number; + readonly azureMarketplaceCharges?: number; readonly billingPeriodId?: string; readonly chargesBilledSeparately?: number; readonly currency?: string; kind: "legacy"; - readonly marketplaceCharges?: number; readonly usageEnd?: string; readonly usageStart?: string; } @@ -592,6 +616,7 @@ export interface LegacyReservationRecommendation extends ReservationRecommendati readonly instanceFlexibilityGroup?: string; readonly instanceFlexibilityRatio?: number; kind: "legacy"; + readonly lastUsageDate?: Date; readonly lookBackPeriod?: string; readonly meterId?: string; readonly netSavings?: number; @@ -603,6 +628,7 @@ export interface LegacyReservationRecommendation extends ReservationRecommendati readonly skuProperties?: SkuProperty[]; readonly term?: string; readonly totalCostWithReservedInstances?: number; + readonly totalHours?: number; } // @public @@ -611,6 +637,7 @@ export interface LegacyReservationRecommendationProperties { readonly firstUsageDate?: Date; readonly instanceFlexibilityGroup?: string; readonly instanceFlexibilityRatio?: number; + readonly lastUsageDate?: Date; readonly lookBackPeriod?: string; readonly meterId?: string; readonly netSavings?: number; @@ -622,6 +649,7 @@ export interface LegacyReservationRecommendationProperties { readonly skuProperties?: SkuProperty[]; readonly term?: string; readonly totalCostWithReservedInstances?: number; + readonly totalHours?: number; } // @public (undocumented) @@ -647,6 +675,8 @@ export interface LegacyUsageDetail extends UsageDetail { readonly accountName?: string; readonly accountOwnerId?: string; readonly additionalInfo?: string; + readonly benefitId?: string; + readonly benefitName?: string; readonly billingAccountId?: string; readonly billingAccountName?: string; readonly billingCurrency?: string; @@ -729,10 +759,26 @@ export interface LotsListByBillingProfileOptionalParams extends coreClient.Opera // @public export type LotsListByBillingProfileResponse = Lots; +// @public +export interface LotsListByCustomerNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LotsListByCustomerNextResponse = Lots; + +// @public +export interface LotsListByCustomerOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type LotsListByCustomerResponse = Lots; + // @public export interface LotsOperations { listByBillingAccount(billingAccountId: string, options?: LotsListByBillingAccountOptionalParams): PagedAsyncIterableIterator; listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: LotsListByBillingProfileOptionalParams): PagedAsyncIterableIterator; + listByCustomer(billingAccountId: string, customerId: string, options?: LotsListByCustomerOptionalParams): PagedAsyncIterableIterator; } // @public @@ -746,6 +792,8 @@ export interface LotSummary extends ProxyResource { readonly creditCurrency?: string; readonly eTagPropertiesETag?: string; readonly expirationDate?: Date; + readonly isEstimatedBalance?: boolean; + readonly organizationType?: OrganizationType; readonly originalAmount?: Amount; readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; readonly poNumber?: string; @@ -754,6 +802,7 @@ export interface LotSummary extends ProxyResource { readonly source?: LotSource; readonly startDate?: Date; readonly status?: Status; + readonly usedAmount?: Amount; } // @public @@ -865,6 +914,7 @@ export interface ModernChargeSummary extends ChargeSummary { readonly isInvoiced?: boolean; kind: "modern"; readonly marketplaceCharges?: Amount; + readonly subscriptionId?: string; readonly usageEnd?: string; readonly usageStart?: string; } @@ -876,6 +926,7 @@ export interface ModernReservationRecommendation extends ReservationRecommendati readonly instanceFlexibilityGroup?: string; readonly instanceFlexibilityRatio?: number; kind: "modern"; + readonly lastUsageDate?: Date; readonly locationPropertiesLocation?: string; readonly lookBackPeriod?: number; readonly meterId?: string; @@ -883,13 +934,41 @@ export interface ModernReservationRecommendation extends ReservationRecommendati readonly normalizedSize?: string; readonly recommendedQuantity?: number; readonly recommendedQuantityNormalized?: number; - readonly scope?: string; + readonly resourceType?: string; + scope: string; readonly skuName?: string; readonly skuProperties?: SkuProperty[]; readonly term?: string; readonly totalCostWithReservedInstances?: Amount; + readonly totalHours?: number; } +// @public +export interface ModernReservationRecommendationProperties { + readonly costWithNoReservedInstances?: Amount; + readonly firstUsageDate?: Date; + readonly instanceFlexibilityGroup?: string; + readonly instanceFlexibilityRatio?: number; + readonly lastUsageDate?: Date; + readonly location?: string; + readonly lookBackPeriod?: number; + readonly meterId?: string; + readonly netSavings?: Amount; + readonly normalizedSize?: string; + readonly recommendedQuantity?: number; + readonly recommendedQuantityNormalized?: number; + readonly resourceType?: string; + scope: "Single" | "Shared"; + readonly skuName?: string; + readonly skuProperties?: SkuProperty[]; + readonly term?: string; + readonly totalCostWithReservedInstances?: Amount; + readonly totalHours?: number; +} + +// @public (undocumented) +export type ModernReservationRecommendationPropertiesUnion = ModernReservationRecommendationProperties | ModernSingleScopeReservationRecommendationProperties | ModernSharedScopeReservationRecommendationProperties; + // @public export interface ModernReservationTransaction extends ReservationTransactionResource { readonly amount?: number; @@ -920,6 +999,17 @@ export interface ModernReservationTransactionsListResult { readonly value?: ModernReservationTransaction[]; } +// @public +export interface ModernSharedScopeReservationRecommendationProperties extends ModernReservationRecommendationProperties { + scope: "Shared"; +} + +// @public +export interface ModernSingleScopeReservationRecommendationProperties extends ModernReservationRecommendationProperties { + scope: "Single"; + readonly subscriptionId?: string; +} + // @public export interface ModernUsageDetail extends UsageDetail { readonly additionalInfo?: string; @@ -1050,15 +1140,47 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationListResult; +// @public +export interface OperationStatus { + readonly downloadUrl?: string; + status?: OperationStatusType; + readonly validTill?: Date; +} + +// @public +export type OperationStatusType = string; + // @public export type OperatorType = string; +// @public +export type OrganizationType = string; + // @public export interface PriceSheet { + beginDownloadByBillingAccountPeriod(billingAccountId: string, billingPeriodName: string, options?: PriceSheetDownloadByBillingAccountPeriodOptionalParams): Promise, PriceSheetDownloadByBillingAccountPeriodResponse>>; + beginDownloadByBillingAccountPeriodAndWait(billingAccountId: string, billingPeriodName: string, options?: PriceSheetDownloadByBillingAccountPeriodOptionalParams): Promise; get(options?: PriceSheetGetOptionalParams): Promise; getByBillingPeriod(billingPeriodName: string, options?: PriceSheetGetByBillingPeriodOptionalParams): Promise; } +// @public +export interface PriceSheetDownloadByBillingAccountPeriodHeaders { + // (undocumented) + location?: string; + // (undocumented) + retryAfter?: number; +} + +// @public +export interface PriceSheetDownloadByBillingAccountPeriodOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PriceSheetDownloadByBillingAccountPeriodResponse = OperationStatus; + // @public export interface PriceSheetGetByBillingPeriodOptionalParams extends coreClient.OperationOptions { expand?: string; @@ -1088,6 +1210,7 @@ export interface PriceSheetProperties { readonly meterId?: string; readonly offerId?: string; readonly partNumber?: string; + readonly savingsPlan?: SavingsPlan; readonly unitOfMeasure?: string; readonly unitPrice?: number; } @@ -1144,7 +1267,7 @@ export interface ReservationRecommendation extends Resource, ResourceAttributes // @public export interface ReservationRecommendationDetails { - get(scope: string, region: string, term: Term, lookBackPeriod: LookBackPeriod, product: string, options?: ReservationRecommendationDetailsGetOptionalParams): Promise; + get(resourceScope: string, scope: Scope, region: string, term: Term, lookBackPeriod: LookBackPeriod, product: string, options?: ReservationRecommendationDetailsGetOptionalParams): Promise; } // @public @@ -1160,6 +1283,7 @@ export interface ReservationRecommendationDetailsCalculatedSavingsProperties { // @public export interface ReservationRecommendationDetailsGetOptionalParams extends coreClient.OperationOptions { + filter?: string; } // @public @@ -1211,7 +1335,7 @@ export type ReservationRecommendationKind = string; // @public export interface ReservationRecommendations { - list(scope: string, options?: ReservationRecommendationsListOptionalParams): PagedAsyncIterableIterator; + list(resourceScope: string, options?: ReservationRecommendationsListOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1241,7 +1365,7 @@ export type ReservationRecommendationUnion = ReservationRecommendation | LegacyR // @public export interface ReservationsDetails { - list(scope: string, options?: ReservationsDetailsListOptionalParams): PagedAsyncIterableIterator; + list(resourceScope: string, options?: ReservationsDetailsListOptionalParams): PagedAsyncIterableIterator; listByReservationOrder(reservationOrderId: string, filter: string, options?: ReservationsDetailsListByReservationOrderOptionalParams): PagedAsyncIterableIterator; listByReservationOrderAndReservation(reservationOrderId: string, reservationId: string, filter: string, options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams): PagedAsyncIterableIterator; } @@ -1295,7 +1419,7 @@ export type ReservationsDetailsListResponse = ReservationDetailsListResult; // @public export interface ReservationsSummaries { - list(scope: string, grain: Datagrain, options?: ReservationsSummariesListOptionalParams): PagedAsyncIterableIterator; + list(resourceScope: string, grain: Datagrain, options?: ReservationsSummariesListOptionalParams): PagedAsyncIterableIterator; listByReservationOrder(reservationOrderId: string, grain: Datagrain, options?: ReservationsSummariesListByReservationOrderOptionalParams): PagedAsyncIterableIterator; listByReservationOrderAndReservation(reservationOrderId: string, reservationId: string, grain: Datagrain, options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams): PagedAsyncIterableIterator; } @@ -1440,6 +1564,8 @@ export type ReservationTransactionsListNextResponse = ReservationTransactionsLis // @public export interface ReservationTransactionsListOptionalParams extends coreClient.OperationOptions { filter?: string; + previewMarkupPercentage?: number; + useMarkupIfPartner?: boolean; } // @public @@ -1468,6 +1594,13 @@ export interface ResourceAttributes { readonly sku?: string; } +// @public +export interface SavingsPlan { + readonly effectivePrice?: number; + readonly marketPrice?: number; + readonly term?: string; +} + // @public export type Scope = string; diff --git a/sdk/consumption/arm-consumption/sample.env b/sdk/consumption/arm-consumption/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/consumption/arm-consumption/sample.env +++ b/sdk/consumption/arm-consumption/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetByManagementGroupSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetByManagementGroupSample.ts index fbe283380c92..b0e8b52e1525 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetByManagementGroupSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetByManagementGroupSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Provides the aggregate cost of a management group and all child management groups by current billing period. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostByManagementGroup.json */ -async function aggregatedCostByManagementGroup() { +async function aggregatedCostByManagementGroup(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -37,7 +37,7 @@ async function aggregatedCostByManagementGroup() { * @summary Provides the aggregate cost of a management group and all child management groups by current billing period. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostByManagementGroupFilterByDate.json */ -async function aggregatedCostByManagementGroupFilterByDate() { +async function aggregatedCostByManagementGroupFilterByDate(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -54,7 +54,7 @@ async function aggregatedCostByManagementGroupFilterByDate() { console.log(result); } -async function main() { +async function main(): Promise { aggregatedCostByManagementGroup(); aggregatedCostByManagementGroupFilterByDate(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetForBillingPeriodByManagementGroupSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetForBillingPeriodByManagementGroupSample.ts index 85684d3ee6b1..26296231a397 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetForBillingPeriodByManagementGroupSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/aggregatedCostGetForBillingPeriodByManagementGroupSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Provides the aggregate cost of a management group and all child management groups by specified billing period * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/AggregatedCostForBillingPeriodByManagementGroup.json */ -async function aggregatedCostListForBillingPeriodByManagementGroup() { +async function aggregatedCostListForBillingPeriodByManagementGroup(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -30,7 +30,7 @@ async function aggregatedCostListForBillingPeriodByManagementGroup() { console.log(result); } -async function main() { +async function main(): Promise { aggregatedCostListForBillingPeriodByManagementGroup(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetByBillingAccountSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetByBillingAccountSample.ts index ef300e153e3c..517958a2f86d 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetByBillingAccountSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetByBillingAccountSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BalancesByBillingAccount.json */ -async function balances() { +async function balances(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -26,7 +26,7 @@ async function balances() { console.log(result); } -async function main() { +async function main(): Promise { balances(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetForBillingPeriodByBillingAccountSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetForBillingPeriodByBillingAccountSample.ts index ee0b8d0b2627..a3233ed8765c 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetForBillingPeriodByBillingAccountSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/balancesGetForBillingPeriodByBillingAccountSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BalancesByBillingAccountForBillingPeriod.json */ -async function balances() { +async function balances(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -30,7 +30,7 @@ async function balances() { console.log(result); } -async function main() { +async function main(): Promise { balances(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsCreateOrUpdateSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsCreateOrUpdateSample.ts index b2eee8e4b691..4e2c8f14873b 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsCreateOrUpdateSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsCreateOrUpdateSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary The operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreateOrUpdateBudget.json */ -async function createOrUpdateBudget() { +async function createOrUpdateBudget(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -77,7 +77,7 @@ async function createOrUpdateBudget() { console.log(result); } -async function main() { +async function main(): Promise { createOrUpdateBudget(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsDeleteSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsDeleteSample.ts index d16c7768a0e5..8f7abf9aea1f 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsDeleteSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsDeleteSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary The operation to delete a budget. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/DeleteBudget.json */ -async function deleteBudget() { +async function deleteBudget(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -27,7 +27,7 @@ async function deleteBudget() { console.log(result); } -async function main() { +async function main(): Promise { deleteBudget(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsGetSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsGetSample.ts index 9819619ef636..6702c8eb0ace 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsGetSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsGetSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Gets the budget for the scope by budget name. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Budget.json */ -async function budget() { +async function budget(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -27,7 +27,7 @@ async function budget() { console.log(result); } -async function main() { +async function main(): Promise { budget(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsListSample.ts index 4602cfb113bd..b0ea07c2621f 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/budgetsListSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Lists all budgets for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/BudgetsList.json */ -async function budgetsList() { +async function budgetsList(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -29,7 +29,7 @@ async function budgetsList() { console.log(resArray); } -async function main() { +async function main(): Promise { budgetsList(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/chargesListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/chargesListSample.ts index 1e41750f6b96..9d989d022b17 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/chargesListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/chargesListSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesForBillingPeriodByDepartment.json */ -async function changesForBillingPeriodByDepartmentLegacy() { +async function changesForBillingPeriodByDepartmentLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -36,7 +36,7 @@ async function changesForBillingPeriodByDepartmentLegacy() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesForBillingPeriodByEnrollmentAccount.json */ -async function changesForBillingPeriodByEnrollmentAccountLegacy() { +async function changesForBillingPeriodByEnrollmentAccountLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -54,7 +54,7 @@ async function changesForBillingPeriodByEnrollmentAccountLegacy() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccount.json */ -async function chargesListByBillingAccountModern() { +async function chargesListByBillingAccountModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -74,7 +74,7 @@ async function chargesListByBillingAccountModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByBillingProfileId.json */ -async function chargesListByBillingAccountGroupByBillingProfileIdModern() { +async function chargesListByBillingAccountGroupByBillingProfileIdModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -95,7 +95,7 @@ async function chargesListByBillingAccountGroupByBillingProfileIdModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByCustomerId.json */ -async function chargesListByBillingAccountGroupByCustomerIdModern() { +async function chargesListByBillingAccountGroupByCustomerIdModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -116,7 +116,7 @@ async function chargesListByBillingAccountGroupByCustomerIdModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingAccountGroupByInvoiceSectionId.json */ -async function chargesListByBillingAccountGroupByInvoiceSectionIdModern() { +async function chargesListByBillingAccountGroupByInvoiceSectionIdModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -138,7 +138,7 @@ async function chargesListByBillingAccountGroupByInvoiceSectionIdModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfile.json */ -async function chargesListByBillingProfileModern() { +async function chargesListByBillingProfileModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -156,7 +156,7 @@ async function chargesListByBillingProfileModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfileGroupByInvoiceSectionId.json */ -async function chargesListByBillingProfileGroupByInvoiceSectionIdModern() { +async function chargesListByBillingProfileGroupByInvoiceSectionIdModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -178,7 +178,7 @@ async function chargesListByBillingProfileGroupByInvoiceSectionIdModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernBillingProfileInvoiceSection.json */ -async function chargesListByBillingProfileInvoiceSectionModern() { +async function chargesListByBillingProfileInvoiceSectionModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -199,7 +199,7 @@ async function chargesListByBillingProfileInvoiceSectionModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernCustomer.json */ -async function chargesListByCustomerModern() { +async function chargesListByCustomerModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -217,7 +217,7 @@ async function chargesListByCustomerModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListForDepartmentFilterByStartEndDate.json */ -async function chargesListByDepartmentLegacy() { +async function chargesListByDepartmentLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -237,7 +237,7 @@ async function chargesListByDepartmentLegacy() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListByModernInvoiceSectionId.json */ -async function chargesListByInvoiceSectionIdModern() { +async function chargesListByInvoiceSectionIdModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -255,7 +255,7 @@ async function chargesListByInvoiceSectionIdModern() { * @summary Lists the charges based for the defined scope. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ChargesListForEnrollmentAccountFilterByStartEndDate.json */ -async function chargesListForEnrollmentAccountLegacy() { +async function chargesListForEnrollmentAccountLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -267,7 +267,7 @@ async function chargesListForEnrollmentAccountLegacy() { console.log(result); } -async function main() { +async function main(): Promise { changesForBillingPeriodByDepartmentLegacy(); changesForBillingPeriodByEnrollmentAccountLegacy(); chargesListByBillingAccountModern(); diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/creditsGetSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/creditsGetSample.ts index 877bce5eb08d..7551c533f5e0 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/creditsGetSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/creditsGetSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary The credit summary by billingAccountId and billingProfileId. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/CreditSummaryByBillingProfile.json */ -async function creditSummaryByBillingProfile() { +async function creditSummaryByBillingProfile(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -27,7 +27,7 @@ async function creditSummaryByBillingProfile() { console.log(result); } -async function main() { +async function main(): Promise { creditSummaryByBillingProfile(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingAccountSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingAccountSample.ts index 8778a5aa7cf1..1b53a3ecf720 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingAccountSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingAccountSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary 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. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsGetByBillingAccount.json */ -async function eventsGetByBillingAccount() { +async function eventsGetByBillingAccount(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -40,7 +40,7 @@ async function eventsGetByBillingAccount() { * @summary 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. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsGetByBillingAccountWithFilters.json */ -async function eventsGetByBillingAccountWithFilters() { +async function eventsGetByBillingAccountWithFilters(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -60,7 +60,7 @@ async function eventsGetByBillingAccountWithFilters() { console.log(resArray); } -async function main() { +async function main(): Promise { eventsGetByBillingAccount(); eventsGetByBillingAccountWithFilters(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingProfileSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingProfileSample.ts index 5bfa574710be..7409e255a5e4 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingProfileSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/eventsListByBillingProfileSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary 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. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/EventsListByBillingProfile.json */ -async function eventsListByBillingProfile() { +async function eventsListByBillingProfile(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -37,7 +37,7 @@ async function eventsListByBillingProfile() { console.log(resArray); } -async function main() { +async function main(): Promise { eventsListByBillingProfile(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingAccountSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingAccountSample.ts index e03ebabe15e0..27ddefbf3430 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingAccountSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingAccountSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary 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. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingAccount.json */ -async function lotsListByBillingAccount() { +async function lotsListByBillingAccount(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -40,7 +40,7 @@ async function lotsListByBillingAccount() { * @summary 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. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingAccountWithFilters.json */ -async function lotsListByBillingAccountWithStatusFilter() { +async function lotsListByBillingAccountWithStatusFilter(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -59,7 +59,7 @@ async function lotsListByBillingAccountWithStatusFilter() { console.log(resArray); } -async function main() { +async function main(): Promise { lotsListByBillingAccount(); lotsListByBillingAccountWithStatusFilter(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingProfileSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingProfileSample.ts index 820591e3d3af..aa276166961c 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingProfileSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/lotsListByBillingProfileSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary 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. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/LotsListByBillingProfile.json */ -async function lotsListByBillingProfile() { +async function lotsListByBillingProfile(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -33,7 +33,7 @@ async function lotsListByBillingProfile() { console.log(resArray); } -async function main() { +async function main(): Promise { lotsListByBillingProfile(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/marketplacesListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/marketplacesListSample.ts index 75fec13409fb..4e5d58666c54 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/marketplacesListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/marketplacesListSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByBillingAccountList.json */ -async function billingAccountMarketplacesList() { +async function billingAccountMarketplacesList(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -35,7 +35,7 @@ async function billingAccountMarketplacesList() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByBillingAccountListForBillingPeriod.json */ -async function billingAccountMarketplacesListForBillingPeriod() { +async function billingAccountMarketplacesListForBillingPeriod(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -55,7 +55,7 @@ async function billingAccountMarketplacesListForBillingPeriod() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByDepartmentList.json */ -async function departmentMarketplacesList() { +async function departmentMarketplacesList(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -75,7 +75,7 @@ async function departmentMarketplacesList() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByDepartment_ListByBillingPeriod.json */ -async function departmentMarketplacesListForBillingPeriod() { +async function departmentMarketplacesListForBillingPeriod(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -95,7 +95,7 @@ async function departmentMarketplacesListForBillingPeriod() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByEnrollmentAccountList.json */ -async function enrollmentAccountMarketplacesList() { +async function enrollmentAccountMarketplacesList(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -115,7 +115,7 @@ async function enrollmentAccountMarketplacesList() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByEnrollmentAccounts_ListByBillingPeriod.json */ -async function enrollmentAccountMarketplacesListForBillingPeriod() { +async function enrollmentAccountMarketplacesListForBillingPeriod(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -135,7 +135,7 @@ async function enrollmentAccountMarketplacesListForBillingPeriod() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByManagementGroupList.json */ -async function managementGroupMarketplacesList() { +async function managementGroupMarketplacesList(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -155,7 +155,7 @@ async function managementGroupMarketplacesList() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesByManagementGroup_ListForBillingPeriod.json */ -async function managementGroupMarketplacesListForBillingPeriod() { +async function managementGroupMarketplacesListForBillingPeriod(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -175,7 +175,7 @@ async function managementGroupMarketplacesListForBillingPeriod() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesList.json */ -async function subscriptionMarketplacesList() { +async function subscriptionMarketplacesList(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -195,7 +195,7 @@ async function subscriptionMarketplacesList() { * @summary Lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/MarketplacesListForBillingPeriod.json */ -async function subscriptionMarketplacesListForBillingPeriod() { +async function subscriptionMarketplacesListForBillingPeriod(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -209,7 +209,7 @@ async function subscriptionMarketplacesListForBillingPeriod() { console.log(resArray); } -async function main() { +async function main(): Promise { billingAccountMarketplacesList(); billingAccountMarketplacesListForBillingPeriod(); departmentMarketplacesList(); diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetByBillingPeriodSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetByBillingPeriodSample.ts index 044bda7d65fa..49415214bf3d 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetByBillingPeriodSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetByBillingPeriodSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetExpand.json */ -async function priceSheetExpand() { +async function priceSheetExpand(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -40,7 +40,7 @@ async function priceSheetExpand() { * @summary Get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheetForBillingPeriod.json */ -async function priceSheetForBillingPeriod() { +async function priceSheetForBillingPeriod(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -51,7 +51,7 @@ async function priceSheetForBillingPeriod() { console.log(result); } -async function main() { +async function main(): Promise { priceSheetExpand(); priceSheetForBillingPeriod(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetSample.ts index 1ef222b50c3a..5fd98360684e 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/priceSheetGetSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/PriceSheet.json */ -async function priceSheet() { +async function priceSheet(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -25,7 +25,7 @@ async function priceSheet() { console.log(result); } -async function main() { +async function main(): Promise { priceSheet(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationDetailsGetSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationDetailsGetSample.ts index c60c8d0961be..9e9ab916f7e1 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationDetailsGetSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationDetailsGetSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Details of a reservation recommendation for what-if analysis of reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByBillingAccount.json */ -async function reservationRecommendationsByBillingAccountLegacy() { +async function reservationRecommendationsByBillingAccountLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -42,7 +42,7 @@ async function reservationRecommendationsByBillingAccountLegacy() { * @summary Details of a reservation recommendation for what-if analysis of reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByBillingProfile.json */ -async function reservationRecommendationsByBillingProfileModern() { +async function reservationRecommendationsByBillingProfileModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -69,7 +69,7 @@ async function reservationRecommendationsByBillingProfileModern() { * @summary Details of a reservation recommendation for what-if analysis of reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsByResourceGroup.json */ -async function reservationRecommendationsByResourceGroupLegacy() { +async function reservationRecommendationsByResourceGroupLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -96,7 +96,7 @@ async function reservationRecommendationsByResourceGroupLegacy() { * @summary Details of a reservation recommendation for what-if analysis of reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationDetailsBySubscription.json */ -async function reservationRecommendationsBySubscriptionLegacy() { +async function reservationRecommendationsBySubscriptionLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -117,7 +117,7 @@ async function reservationRecommendationsBySubscriptionLegacy() { console.log(result); } -async function main() { +async function main(): Promise { reservationRecommendationsByBillingAccountLegacy(); reservationRecommendationsByBillingProfileModern(); reservationRecommendationsByResourceGroupLegacy(); diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationsListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationsListSample.ts index 51b4db047db4..2dae090e2422 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationsListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationRecommendationsListSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary List of recommendations for purchasing reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByBillingAccount.json */ -async function reservationRecommendationsByBillingAccountLegacy() { +async function reservationRecommendationsByBillingAccountLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -38,7 +38,7 @@ async function reservationRecommendationsByBillingAccountLegacy() { * @summary List of recommendations for purchasing reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByBillingProfile.json */ -async function reservationRecommendationsByBillingProfileModern() { +async function reservationRecommendationsByBillingProfileModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -59,7 +59,7 @@ async function reservationRecommendationsByBillingProfileModern() { * @summary List of recommendations for purchasing reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json */ -async function reservationRecommendationsByResourceGroupLegacy() { +async function reservationRecommendationsByResourceGroupLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -80,7 +80,7 @@ async function reservationRecommendationsByResourceGroupLegacy() { * @summary List of recommendations for purchasing reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json */ -async function reservationRecommendationsBySubscriptionLegacy() { +async function reservationRecommendationsBySubscriptionLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -100,7 +100,7 @@ async function reservationRecommendationsBySubscriptionLegacy() { * @summary List of recommendations for purchasing reserved instances. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json */ -async function reservationRecommendationsFilterBySubscriptionForScopeLookBackPeriodLegacy() { +async function reservationRecommendationsFilterBySubscriptionForScopeLookBackPeriodLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -120,7 +120,7 @@ async function reservationRecommendationsFilterBySubscriptionForScopeLookBackPer console.log(resArray); } -async function main() { +async function main(): Promise { reservationRecommendationsByBillingAccountLegacy(); reservationRecommendationsByBillingProfileModern(); reservationRecommendationsByResourceGroupLegacy(); diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListByBillingProfileSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListByBillingProfileSample.ts index 21b454b0caa6..5648a9da974a 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListByBillingProfileSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListByBillingProfileSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary List of transactions for reserved instances on billing account scope * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationTransactionsListByBillingProfileId.json */ -async function reservationTransactionsByBillingProfileId() { +async function reservationTransactionsByBillingProfileId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -43,7 +43,7 @@ async function reservationTransactionsByBillingProfileId() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationTransactionsByBillingProfileId(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListSample.ts index 35f1c6e73323..fd200d3750ba 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationTransactionsListSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary List of transactions for reserved instances on billing account scope * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationTransactionsListByEnrollmentNumber.json */ -async function reservationTransactionsByEnrollmentNumber() { +async function reservationTransactionsByEnrollmentNumber(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -38,7 +38,7 @@ async function reservationTransactionsByEnrollmentNumber() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationTransactionsByEnrollmentNumber(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderAndReservationSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderAndReservationSample.ts index c2b2e98431cb..b859956f51ca 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderAndReservationSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderAndReservationSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Lists the reservations details for provided date range. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsWithReservationId.json */ -async function reservationDetailsWithReservationId() { +async function reservationDetailsWithReservationId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -36,7 +36,7 @@ async function reservationDetailsWithReservationId() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationDetailsWithReservationId(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderSample.ts index e730b00431e8..a056ba2353ef 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListByReservationOrderSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Lists the reservations details for provided date range. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetails.json */ -async function reservationDetails() { +async function reservationDetails(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -34,7 +34,7 @@ async function reservationDetails() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationDetails(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListSample.ts index 244ec35f3ac0..f661203f453d 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsDetailsListSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Lists the reservations details for the defined scope and provided date range. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingAccountId.json */ -async function reservationDetailsByBillingAccountId() { +async function reservationDetailsByBillingAccountId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -41,7 +41,7 @@ async function reservationDetailsByBillingAccountId() { * @summary Lists the reservations details for the defined scope and provided date range. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingProfileId.json */ -async function reservationDetailsByBillingProfileId() { +async function reservationDetailsByBillingProfileId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -65,7 +65,7 @@ async function reservationDetailsByBillingProfileId() { * @summary Lists the reservations details for the defined scope and provided date range. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationDetailsByBillingProfileIdReservationId.json */ -async function reservationDetailsByBillingProfileIdReservationId() { +async function reservationDetailsByBillingProfileIdReservationId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -90,7 +90,7 @@ async function reservationDetailsByBillingProfileIdReservationId() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationDetailsByBillingAccountId(); reservationDetailsByBillingProfileId(); reservationDetailsByBillingProfileIdReservationId(); diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderAndReservationSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderAndReservationSample.ts index 361541636648..4a8bdb875f83 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderAndReservationSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderAndReservationSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Lists the reservations summaries for daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithReservationId.json */ -async function reservationSummariesDailyWithReservationId() { +async function reservationSummariesDailyWithReservationId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -50,7 +50,7 @@ async function reservationSummariesDailyWithReservationId() { * @summary Lists the reservations summaries for daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithReservationId.json */ -async function reservationSummariesMonthlyWithReservationId() { +async function reservationSummariesMonthlyWithReservationId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -70,7 +70,7 @@ async function reservationSummariesMonthlyWithReservationId() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationSummariesDailyWithReservationId(); reservationSummariesMonthlyWithReservationId(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderSample.ts index a05061d0ddce..1b1c3c5dfe11 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListByReservationOrderSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Lists the reservations summaries for daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDaily.json */ -async function reservationSummariesDaily() { +async function reservationSummariesDaily(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -48,7 +48,7 @@ async function reservationSummariesDaily() { * @summary Lists the reservations summaries for daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthly.json */ -async function reservationSummariesMonthly() { +async function reservationSummariesMonthly(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -66,7 +66,7 @@ async function reservationSummariesMonthly() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationSummariesDaily(); reservationSummariesMonthly(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListSample.ts index 11c10649183f..1e1453013a59 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/reservationsSummariesListSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Lists the reservations summaries for the defined scope daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithBillingAccountId.json */ -async function reservationSummariesDailyWithBillingAccountId() { +async function reservationSummariesDailyWithBillingAccountId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -46,7 +46,7 @@ async function reservationSummariesDailyWithBillingAccountId() { * @summary Lists the reservations summaries for the defined scope daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesDailyWithBillingProfileId.json */ -async function reservationSummariesDailyWithBillingProfileId() { +async function reservationSummariesDailyWithBillingProfileId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -78,7 +78,7 @@ async function reservationSummariesDailyWithBillingProfileId() { * @summary Lists the reservations summaries for the defined scope daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingAccountId.json */ -async function reservationSummariesMonthlyWithBillingAccountId() { +async function reservationSummariesMonthlyWithBillingAccountId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -99,7 +99,7 @@ async function reservationSummariesMonthlyWithBillingAccountId() { * @summary Lists the reservations summaries for the defined scope daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingProfileId.json */ -async function reservationSummariesMonthlyWithBillingProfileId() { +async function reservationSummariesMonthlyWithBillingProfileId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -121,7 +121,7 @@ async function reservationSummariesMonthlyWithBillingProfileId() { * @summary Lists the reservations summaries for the defined scope daily or monthly grain. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationSummariesMonthlyWithBillingProfileIdReservationId.json */ -async function reservationSummariesMonthlyWithBillingProfileIdReservationId() { +async function reservationSummariesMonthlyWithBillingProfileIdReservationId(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -147,7 +147,7 @@ async function reservationSummariesMonthlyWithBillingProfileIdReservationId() { console.log(resArray); } -async function main() { +async function main(): Promise { reservationSummariesDailyWithBillingAccountId(); reservationSummariesDailyWithBillingProfileId(); reservationSummariesMonthlyWithBillingAccountId(); diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/tagsGetSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/tagsGetSample.ts index b9ade76c74b0..26942f28bdd8 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/tagsGetSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/tagsGetSample.ts @@ -15,7 +15,7 @@ import "dotenv/config"; * @summary Get all available tag keys for the defined scope * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/Tags.json */ -async function tagsGet() { +async function tagsGet(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -26,7 +26,7 @@ async function tagsGet() { console.log(result); } -async function main() { +async function main(): Promise { tagsGet(); } diff --git a/sdk/consumption/arm-consumption/samples/v9/typescript/src/usageDetailsListSample.ts b/sdk/consumption/arm-consumption/samples/v9/typescript/src/usageDetailsListSample.ts index 3f132a8d39a0..403ebef2c3a9 100644 --- a/sdk/consumption/arm-consumption/samples/v9/typescript/src/usageDetailsListSample.ts +++ b/sdk/consumption/arm-consumption/samples/v9/typescript/src/usageDetailsListSample.ts @@ -18,7 +18,7 @@ import "dotenv/config"; * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByBillingAccount.json */ -async function billingAccountUsageDetailsListLegacy() { +async function billingAccountUsageDetailsListLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -38,7 +38,7 @@ async function billingAccountUsageDetailsListLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCABillingAccount.json */ -async function billingAccountUsageDetailsListModern() { +async function billingAccountUsageDetailsListModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -58,7 +58,7 @@ async function billingAccountUsageDetailsListModern() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByBillingAccount.json */ -async function billingAccountUsageDetailsListForBillingPeriodLegacy() { +async function billingAccountUsageDetailsListForBillingPeriodLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -78,7 +78,7 @@ async function billingAccountUsageDetailsListForBillingPeriodLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCABillingProfile.json */ -async function billingProfileUsageDetailsListModern() { +async function billingProfileUsageDetailsListModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -99,7 +99,7 @@ async function billingProfileUsageDetailsListModern() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCACustomer.json */ -async function customerUsageDetailsListModern() { +async function customerUsageDetailsListModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -120,7 +120,7 @@ async function customerUsageDetailsListModern() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByDepartment.json */ -async function departmentUsageDetailsListLegacy() { +async function departmentUsageDetailsListLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -140,7 +140,7 @@ async function departmentUsageDetailsListLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByDepartment.json */ -async function departmentUsageDetailsListForBillingPeriodLegacy() { +async function departmentUsageDetailsListForBillingPeriodLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -160,7 +160,7 @@ async function departmentUsageDetailsListForBillingPeriodLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByEnrollmentAccount.json */ -async function enrollmentAccountUsageDetailsListLegacy() { +async function enrollmentAccountUsageDetailsListLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -180,7 +180,7 @@ async function enrollmentAccountUsageDetailsListLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByEnrollmentAccount.json */ -async function enrollmentAccountUsageDetailsListForBillingPeriodLegacy() { +async function enrollmentAccountUsageDetailsListForBillingPeriodLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -200,7 +200,7 @@ async function enrollmentAccountUsageDetailsListForBillingPeriodLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMCAInvoiceSection.json */ -async function invoiceSectionUsageDetailsListModern() { +async function invoiceSectionUsageDetailsListModern(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -221,7 +221,7 @@ async function invoiceSectionUsageDetailsListModern() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByManagementGroup.json */ -async function managementGroupUsageDetailsListLegacy() { +async function managementGroupUsageDetailsListLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -241,7 +241,7 @@ async function managementGroupUsageDetailsListLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriodByManagementGroup.json */ -async function managementGroupUsageDetailsListForBillingPeriodLegacy() { +async function managementGroupUsageDetailsListForBillingPeriodLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -261,7 +261,7 @@ async function managementGroupUsageDetailsListForBillingPeriodLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsExpand.json */ -async function usageDetailsExpandLegacy() { +async function usageDetailsExpandLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -285,7 +285,7 @@ async function usageDetailsExpandLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsList.json */ -async function usageDetailsListLegacy() { +async function usageDetailsListLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -305,7 +305,7 @@ async function usageDetailsListLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricActualCost.json */ -async function usageDetailsListByMetricActualCostLegacy() { +async function usageDetailsListByMetricActualCostLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -327,7 +327,7 @@ async function usageDetailsListByMetricActualCostLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricAmortizedCost.json */ -async function usageDetailsListByMetricAmortizedCostLegacy() { +async function usageDetailsListByMetricAmortizedCostLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -349,7 +349,7 @@ async function usageDetailsListByMetricAmortizedCostLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListByMetricUsage.json */ -async function usageDetailsListByMetricUsageLegacy() { +async function usageDetailsListByMetricUsageLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -371,7 +371,7 @@ async function usageDetailsListByMetricUsageLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListFilterByTag.json */ -async function usageDetailsListFilterByTagLegacy() { +async function usageDetailsListFilterByTagLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -393,7 +393,7 @@ async function usageDetailsListFilterByTagLegacy() { * @summary Lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. * x-ms-original-file: specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/UsageDetailsListForBillingPeriod.json */ -async function usageDetailsListForBillingPeriodLegacy() { +async function usageDetailsListForBillingPeriodLegacy(): Promise { const subscriptionId = process.env["CONSUMPTION_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -407,7 +407,7 @@ async function usageDetailsListForBillingPeriodLegacy() { console.log(resArray); } -async function main() { +async function main(): Promise { billingAccountUsageDetailsListLegacy(); billingAccountUsageDetailsListModern(); billingAccountUsageDetailsListForBillingPeriodLegacy(); diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts index 9f2ab11e0101..053ac4058251 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -8,13 +8,10 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; -import { - PipelineRequest, - PipelineResponse, - SendRequest -} from "@azure/core-rest-pipeline"; +import { PipelineRequest, PipelineResponse, SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + PriceSheetImpl, UsageDetailsImpl, MarketplacesImpl, BudgetsImpl, @@ -26,14 +23,14 @@ import { ReservationRecommendationsImpl, ReservationRecommendationDetailsImpl, ReservationTransactionsImpl, - PriceSheetImpl, OperationsImpl, AggregatedCostImpl, EventsOperationsImpl, LotsOperationsImpl, - CreditsImpl + CreditsImpl, } from "./operations/index.js"; import { + PriceSheet, UsageDetails, Marketplaces, Budgets, @@ -45,19 +42,18 @@ import { ReservationRecommendations, ReservationRecommendationDetails, ReservationTransactions, - PriceSheet, Operations, AggregatedCost, EventsOperations, LotsOperations, - Credits + Credits, } from "./operationsInterfaces/index.js"; import { ConsumptionManagementClientOptionalParams } from "./models/index.js"; export class ConsumptionManagementClient extends coreClient.ServiceClient { $host: string; apiVersion: string; - subscriptionId: string; + subscriptionId?: string; /** * Initializes a new instance of the ConsumptionManagementClient class. @@ -68,13 +64,27 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, - options?: ConsumptionManagementClientOptionalParams + options?: ConsumptionManagementClientOptionalParams, + ); + constructor( + credentials: coreAuth.TokenCredential, + options?: ConsumptionManagementClientOptionalParams, + ); + constructor( + credentials: coreAuth.TokenCredential, + subscriptionIdOrOptions?: ConsumptionManagementClientOptionalParams | string, + options?: ConsumptionManagementClientOptionalParams, ) { if (credentials === undefined) { throw new Error("'credentials' cannot be null"); } - if (subscriptionId === undefined) { - throw new Error("'subscriptionId' cannot be null"); + + let subscriptionId: string | undefined; + + if (typeof subscriptionIdOrOptions === "string") { + subscriptionId = subscriptionIdOrOptions; + } else if (typeof subscriptionIdOrOptions === "object") { + options = subscriptionIdOrOptions; } // Initializing default values for options @@ -83,10 +93,10 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { } const defaults: ConsumptionManagementClientOptionalParams = { requestContentType: "application/json; charset=utf-8", - credential: credentials + credential: credentials, }; - const packageDetails = `azsdk-js-arm-consumption/9.2.1`; + const packageDetails = `azsdk-js-arm-consumption/10.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -96,20 +106,19 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { ...defaults, ...options, userAgentOptions: { - userAgentPrefix + userAgentPrefix, }, - endpoint: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com", }; super(optionsWithDefaults); let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); + const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = + options.pipeline.getOrderedPolicies(); bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName + pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName, ); } if ( @@ -119,19 +128,17 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { !bearerTokenAuthenticationPolicyFound ) { this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName + name: coreRestPipeline.bearerTokenAuthenticationPolicyName, }); this.pipeline.addPolicy( coreRestPipeline.bearerTokenAuthenticationPolicy({ credential: credentials, scopes: - optionsWithDefaults.credentialScopes ?? - `${optionsWithDefaults.endpoint}/.default`, + optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`, challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) + authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge, + }, + }), ); } // Parameter assignments @@ -139,7 +146,8 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-10-01"; + this.apiVersion = options.apiVersion || "2025-04-01"; + this.priceSheet = new PriceSheetImpl(this); this.usageDetails = new UsageDetailsImpl(this); this.marketplaces = new MarketplacesImpl(this); this.budgets = new BudgetsImpl(this); @@ -149,11 +157,8 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { this.reservationsSummaries = new ReservationsSummariesImpl(this); this.reservationsDetails = new ReservationsDetailsImpl(this); this.reservationRecommendations = new ReservationRecommendationsImpl(this); - this.reservationRecommendationDetails = new ReservationRecommendationDetailsImpl( - this - ); + this.reservationRecommendationDetails = new ReservationRecommendationDetailsImpl(this); this.reservationTransactions = new ReservationTransactionsImpl(this); - this.priceSheet = new PriceSheetImpl(this); this.operations = new OperationsImpl(this); this.aggregatedCost = new AggregatedCostImpl(this); this.eventsOperations = new EventsOperationsImpl(this); @@ -169,10 +174,7 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { } const apiVersionPolicy = { name: "CustomApiVersionPolicy", - async sendRequest( - request: PipelineRequest, - next: SendRequest - ): Promise { + async sendRequest(request: PipelineRequest, next: SendRequest): Promise { const param = request.url.split("?"); if (param.length > 1) { const newParams = param[1].split("&").map((item) => { @@ -185,11 +187,12 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { request.url = param[0] + "?" + newParams.join("&"); } return next(request); - } + }, }; this.pipeline.addPolicy(apiVersionPolicy); } + priceSheet: PriceSheet; usageDetails: UsageDetails; marketplaces: Marketplaces; budgets: Budgets; @@ -201,7 +204,6 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { reservationRecommendations: ReservationRecommendations; reservationRecommendationDetails: ReservationRecommendationDetails; reservationTransactions: ReservationTransactions; - priceSheet: PriceSheet; operations: Operations; aggregatedCost: AggregatedCost; eventsOperations: EventsOperations; diff --git a/sdk/consumption/arm-consumption/src/lroImpl.ts b/sdk/consumption/arm-consumption/src/lroImpl.ts new file mode 100644 index 000000000000..1b3a95e6c540 --- /dev/null +++ b/sdk/consumption/arm-consumption/src/lroImpl.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { AbortSignalLike } from "@azure/abort-controller"; +import { LongRunningOperation, LroResponse } from "@azure/core-lro"; + +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: (path: string, options?: { abortSignal?: AbortSignalLike }) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal, + }); + }, + }; +} diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index 50fb293eb139..03e3e16ea759 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -12,18 +12,62 @@ export type LegacyReservationRecommendationPropertiesUnion = | LegacyReservationRecommendationProperties | LegacySingleScopeReservationRecommendationProperties | LegacySharedScopeReservationRecommendationProperties; -export type UsageDetailUnion = - | UsageDetail - | LegacyUsageDetail - | ModernUsageDetail; +export type ModernReservationRecommendationPropertiesUnion = + | ModernReservationRecommendationProperties + | ModernSingleScopeReservationRecommendationProperties + | ModernSharedScopeReservationRecommendationProperties; +export type UsageDetailUnion = UsageDetail | LegacyUsageDetail | ModernUsageDetail; export type ReservationRecommendationUnion = | ReservationRecommendation | LegacyReservationRecommendation | ModernReservationRecommendation; -export type ChargeSummaryUnion = - | ChargeSummary - | LegacyChargeSummary - | ModernChargeSummary; +export type ChargeSummaryUnion = ChargeSummary | LegacyChargeSummary | ModernChargeSummary; + +/** The status of the long running operation. */ +export interface OperationStatus { + /** The status of the long running operation. */ + status?: OperationStatusType; + /** + * The link (url) to download the pricesheet. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly downloadUrl?: string; + /** + * Download link validity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validTill?: Date; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. + * + * Some Error responses: + * + * * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header. + * + * * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. + * + * * 504 Gateway Timeout - Service timed out while processing the request. Reduce the date range in the request, if possible. + */ +export interface ErrorResponse { + /** The details of the error. */ + error?: ErrorDetails; +} + +/** The details of the error. */ +export interface ErrorDetails { + /** + * Error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Error message indicating why the operation failed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} /** Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period. */ export interface UsageDetailsListResult { @@ -68,34 +112,6 @@ export interface Resource { readonly tags?: { [propertyName: string]: string }; } -/** - * Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. - * - * Some Error responses: - * - * * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header. - * - * * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header. - */ -export interface ErrorResponse { - /** The details of the error. */ - error?: ErrorDetails; -} - -/** The details of the error. */ -export interface ErrorDetails { - /** - * Error code. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * Error message indicating why the operation failed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; -} - /** Result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period. */ export interface MarketplacesListResult { /** @@ -136,8 +152,6 @@ export interface BudgetTimePeriod { export interface BudgetFilter { /** The logical "AND" expression. Must have at least 2 items. */ and?: BudgetFilterProperties[]; - /** The logical "NOT" expression. */ - not?: BudgetFilterProperties; /** Has comparison expression for a dimension */ dimensions?: BudgetComparisonExpression; /** Has comparison expression for a tag */ @@ -343,7 +357,7 @@ export interface ReservationRecommendationDetailsResourceProperties { */ readonly appliedScopes?: string[]; /** - * On demand rate of the resource. + * Hourly on-demand rate of the resource. Includes only hardware rate i.e, software rate is not included. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly onDemandRate?: number; @@ -358,7 +372,7 @@ export interface ReservationRecommendationDetailsResourceProperties { */ readonly region?: string; /** - * Reservation rate of the resource. + * Hourly reservation rate of the resource. Varies based on the term. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly reservationRate?: number; @@ -384,7 +398,7 @@ export interface ReservationRecommendationDetailsSavingsProperties { */ readonly recommendedQuantity?: number; /** - * Term period of the reservation, ex: P1Y or P3Y. + * Term period of the reservation. ex: P1M, P1Y or P3Y. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly reservationOrderTerm?: string; @@ -400,15 +414,15 @@ export interface ReservationRecommendationDetailsSavingsProperties { readonly unitOfMeasure?: string; } -/** Details of estimated savings. */ +/** Details of estimated savings. The costs and savings are estimated for the term. */ export interface ReservationRecommendationDetailsCalculatedSavingsProperties { /** - * The cost without reservation. + * The cost without reservation. Includes hardware and software cost. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly onDemandCost?: number; /** - * The difference between total reservation cost and reservation cost. + * Hardware and software cost of the resources not covered by the reservation. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly overageCost?: number; @@ -418,19 +432,19 @@ export interface ReservationRecommendationDetailsCalculatedSavingsProperties { */ readonly quantity?: number; /** - * The exact cost of the estimated usage using reservation. + * Hardware cost of the resources covered by the reservation. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly reservationCost?: number; /** - * The cost of the suggested quantity. + * Reservation cost + software cost of the resources covered by the reservation + overage cost. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly totalReservationCost?: number; /** The number of reserved units used to calculate savings. Always 1 for virtual machines. */ reservedUnitCount?: number; /** - * The amount saved by purchasing the recommended quantity of reservation. + * The amount saved by purchasing the recommended quantity of reservation. This is equal to onDemandCost - totalReservationCost. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly savings?: number; @@ -592,6 +606,11 @@ export interface PriceSheetProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly offerId?: string; + /** + * SavingsPlan Details + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly savingsPlan?: SavingsPlan; } /** The properties of the meter detail. */ @@ -643,6 +662,25 @@ export interface MeterDetails { readonly serviceTier?: string; } +/** The properties of the SavingsPlan. */ +export interface SavingsPlan { + /** + * SavingsPlan term + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly term?: string; + /** + * SavingsPlan Market Price + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly marketPrice?: number; + /** + * SavingsPlan Effective Price + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly effectivePrice?: number; +} + /** Result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results. */ export interface OperationListResult { /** @@ -841,7 +879,7 @@ export interface LegacyReservationRecommendationProperties { */ readonly resourceType?: string; /** - * RI recommendations in one or three year terms. + * Term period of the reservation. ex: P1M, P1Y or P3Y. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly term?: string; @@ -875,6 +913,16 @@ export interface LegacyReservationRecommendationProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly skuProperties?: SkuProperty[]; + /** + * The last usage date used for looking back for computing the recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUsageDate?: Date; + /** + * The total hours for which the cost is covered. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalHours?: number; } /** The Sku property */ @@ -891,6 +939,102 @@ export interface SkuProperty { readonly value?: string; } +/** The properties of the reservation recommendation. */ +export interface ModernReservationRecommendationProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + scope: "Single" | "Shared"; + /** + * Resource Location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * The number of days of usage to look back for recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lookBackPeriod?: number; + /** + * The instance Flexibility Ratio. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceFlexibilityRatio?: number; + /** + * The instance Flexibility Group. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceFlexibilityGroup?: string; + /** + * The normalized Size. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly normalizedSize?: string; + /** + * The recommended Quantity Normalized. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recommendedQuantityNormalized?: number; + /** + * The meter id (GUID) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly meterId?: string; + /** + * Term period of the reservation. ex: P1M, P1Y or P3Y. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly term?: string; + /** + * The total amount of cost without reserved instances. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly costWithNoReservedInstances?: Amount; + /** + * Recommended quality for reserved instances. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly recommendedQuantity?: number; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; + /** + * The total amount of cost with reserved instances. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCostWithReservedInstances?: Amount; + /** + * Total estimated savings with reserved instances. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly netSavings?: Amount; + /** + * The usage date for looking back. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly firstUsageDate?: Date; + /** + * List of sku properties + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly skuProperties?: SkuProperty[]; + /** + * This is the ARM Sku name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly skuName?: string; + /** + * The last usage date used for looking back for computing the recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUsageDate?: Date; + /** + * The total hours for which the cost is covered. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalHours?: number; +} + /** The properties of the price sheet download. */ export interface DownloadProperties { /** @@ -1109,6 +1253,11 @@ export interface Balance extends Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly priceHidden?: boolean; + /** + * Overage Refunds + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly overageRefund?: number; /** * List of new purchases. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1260,9 +1409,7 @@ export interface ReservationDetail extends Resource { } /** A reservation recommendation resource. */ -export interface ReservationRecommendation - extends Resource, - ResourceAttributes { +export interface ReservationRecommendation extends Resource, ResourceAttributes { /** Specifies the kind of reservation recommendation. */ kind: ReservationRecommendationKind; } @@ -1369,50 +1516,6 @@ export interface ManagementGroupAggregatedCostResult extends Resource { excludedSubscriptions?: string[]; } -/** A credit summary resource. */ -export interface CreditSummary extends Resource { - /** - * Summary of balances associated with this credit summary. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly balanceSummary?: CreditBalanceSummary; - /** - * Pending credit adjustments. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pendingCreditAdjustments?: Amount; - /** - * Expired credit. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly expiredCredit?: Amount; - /** - * Pending eligible charges. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly pendingEligibleCharges?: Amount; - /** - * 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; -} - /** A budget resource. */ export interface Budget extends ProxyResource { /** The category of the budget, whether the budget tracks cost or usage. */ @@ -1489,15 +1592,35 @@ export interface EventSummary extends ProxyResource { */ readonly creditExpired?: Amount; /** - * The amount of charges for events of type SettleCharges and PendingEligibleCharges. + * The amount of charges for events of type SettleCharges and PendingEligibleCharges in Lot Currency. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly charges?: Amount; /** - * The balance after the event. + * The amount of charges for events of type SettleCharges and PendingEligibleCharges in Lot Currency. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly chargesInLotCurrency?: Amount; + /** + * The balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly closedBalance?: Amount; + /** + * The balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly closedBalanceInLotCurrency?: Amount; + /** + * Identifier of the billing account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly billingAccountId?: string; + /** + * Name of the billing account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly billingAccountDisplayName?: string; /** Identifies the type of the event. */ eventType?: EventType; /** @@ -1566,10 +1689,15 @@ export interface EventSummary extends ProxyResource { */ readonly chargesInBillingCurrency?: AmountWithExchangeRate; /** - * The balance in billing currency after the event. + * The balance in billing currency after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; + /** + * If true, the listed details are based on an estimation and it will be subjected to change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isEstimatedBalance?: boolean; /** * The eTag for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1580,7 +1708,7 @@ export interface EventSummary extends ProxyResource { /** A lot summary resource. */ export interface LotSummary extends ProxyResource { /** - * The original amount of a lot. + * The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly originalAmount?: Amount; @@ -1630,7 +1758,7 @@ export interface LotSummary extends ProxyResource { */ readonly billingCurrency?: string; /** - * The original amount of a lot in billing currency. + * The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; @@ -1644,6 +1772,70 @@ export interface LotSummary extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly reseller?: Reseller; + /** + * If true, the listed details are based on an estimation and it will be subjected to change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isEstimatedBalance?: boolean; + /** + * The eTag for the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eTagPropertiesETag?: string; + /** + * The organization type of the lot. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly organizationType?: OrganizationType; + /** + * Amount consumed from the commitment. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly usedAmount?: Amount; +} + +/** A credit summary resource. */ +export interface CreditSummary extends ProxyResource { + /** + * Summary of balances associated with this credit summary. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly balanceSummary?: CreditBalanceSummary; + /** + * Pending credit adjustments. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly pendingCreditAdjustments?: Amount; + /** + * Expired credit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expiredCredit?: Amount; + /** + * Pending eligible charges. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly pendingEligibleCharges?: Amount; + /** + * 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; + /** + * If true, the listed details are based on an estimation and it will be subjected to change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isEstimatedBalance?: boolean; /** * The eTag for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1669,7 +1861,7 @@ export interface ReservationTransaction extends ReservationTransactionResource { */ readonly description?: string; /** - * The type of the transaction (Purchase, Cancel, etc.) + * The type of the transaction (Purchase, Cancel or Refund). * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly eventType?: string; @@ -1771,8 +1963,7 @@ export interface ReservationTransaction extends ReservationTransactionResource { } /** Modern Reservation transaction resource. */ -export interface ModernReservationTransaction - extends ReservationTransactionResource { +export interface ModernReservationTransaction extends ReservationTransactionResource { /** * The charge of the transaction. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1814,7 +2005,7 @@ export interface ModernReservationTransaction */ readonly eventDate?: Date; /** - * The type of the transaction (Purchase, Cancel, etc.) + * The type of the transaction (Purchase, Cancel or Refund). * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly eventType?: string; @@ -1908,6 +2099,25 @@ export interface LegacySharedScopeReservationRecommendationProperties scope: "Shared"; } +/** The properties of the modern reservation recommendation for single scope. */ +export interface ModernSingleScopeReservationRecommendationProperties + extends ModernReservationRecommendationProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + scope: "Single"; + /** + * Subscription ID associated with single scoped recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; +} + +/** The properties of the modern reservation recommendation for shared scope. */ +export interface ModernSharedScopeReservationRecommendationProperties + extends ModernReservationRecommendationProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + scope: "Shared"; +} + /** Legacy usage detail. */ export interface LegacyUsageDetail extends UsageDetail { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -2127,6 +2337,16 @@ export interface LegacyUsageDetail extends UsageDetail { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly payGPrice?: number; + /** + * Unique identifier for the applicable benefit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly benefitId?: string; + /** + * Name of the applicable benefit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly benefitName?: string; /** * Identifier that indicates how the meter is priced. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2501,8 +2721,7 @@ export interface ModernUsageDetail extends UsageDetail { } /** Legacy reservation recommendation. */ -export interface LegacyReservationRecommendation - extends ReservationRecommendation { +export interface LegacyReservationRecommendation extends ReservationRecommendation { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "legacy"; /** @@ -2541,7 +2760,7 @@ export interface LegacyReservationRecommendation */ readonly resourceType?: string; /** - * RI recommendations in one or three year terms. + * Term period of the reservation. ex: P1M, P1Y or P3Y. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly term?: string; @@ -2577,11 +2796,20 @@ export interface LegacyReservationRecommendation * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly skuProperties?: SkuProperty[]; + /** + * The last usage date used for looking back for computing the recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUsageDate?: Date; + /** + * The total hours for which the cost is covered. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalHours?: number; } /** Modern reservation recommendation. */ -export interface ModernReservationRecommendation - extends ReservationRecommendation { +export interface ModernReservationRecommendation extends ReservationRecommendation { /** Polymorphic discriminator, which specifies the different types this object can be */ kind: "modern"; /** @@ -2620,7 +2848,7 @@ export interface ModernReservationRecommendation */ readonly meterId?: string; /** - * RI recommendations in one or three year terms. + * Term period of the reservation. ex: P1M, P1Y or P3Y. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly term?: string; @@ -2634,6 +2862,11 @@ export interface ModernReservationRecommendation * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly recommendedQuantity?: number; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; /** * The total amount of cost with reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2649,11 +2882,8 @@ export interface ModernReservationRecommendation * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly firstUsageDate?: Date; - /** - * Shared or single recommendation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scope?: string; + /** Shared or single recommendation. */ + scope: string; /** * List of sku properties * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2664,6 +2894,16 @@ export interface ModernReservationRecommendation * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly skuName?: string; + /** + * The last usage date used for looking back for computing the recommendation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUsageDate?: Date; + /** + * The total hours for which the cost is covered. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalHours?: number; } /** Legacy charge summary. */ @@ -2699,7 +2939,7 @@ export interface LegacyChargeSummary extends ChargeSummary { * Marketplace Charges. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly marketplaceCharges?: number; + readonly azureMarketplaceCharges?: number; /** * Currency Code * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2766,11 +3006,43 @@ export interface ModernChargeSummary extends ChargeSummary { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isInvoiced?: boolean; + /** + * Subscription guid. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly subscriptionId?: string; } /** Legacy Reservation transaction resource. */ export interface LegacyReservationTransaction extends ReservationTransaction {} +/** Defines headers for PriceSheet_downloadByBillingAccountPeriod operation. */ +export interface PriceSheetDownloadByBillingAccountPeriodHeaders { + location?: string; + retryAfter?: number; +} + +/** Known values of {@link OperationStatusType} that the service accepts. */ +export enum KnownOperationStatusType { + /** Running */ + Running = "Running", + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for OperationStatusType. \ + * {@link KnownOperationStatusType} can be used interchangeably with OperationStatusType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running** \ + * **Completed** \ + * **Failed** + */ +export type OperationStatusType = string; + /** Known values of {@link Metrictype} that the service accepts. */ export enum KnownMetrictype { /** Actual cost data. */ @@ -2778,7 +3050,7 @@ export enum KnownMetrictype { /** Amortized cost data. */ AmortizedCostMetricType = "amortizedcost", /** Usage data. */ - UsageMetricType = "usage" + UsageMetricType = "usage", } /** @@ -2797,7 +3069,7 @@ export enum KnownUsageDetailsKind { /** Legacy */ Legacy = "legacy", /** Modern */ - Modern = "modern" + Modern = "modern", } /** @@ -2813,7 +3085,7 @@ export type UsageDetailsKind = string; /** Known values of {@link CategoryType} that the service accepts. */ export enum KnownCategoryType { /** Cost */ - Cost = "Cost" + Cost = "Cost", } /** @@ -2838,7 +3110,7 @@ export enum KnownTimeGrainType { /** BillingQuarter */ BillingQuarter = "BillingQuarter", /** BillingAnnual */ - BillingAnnual = "BillingAnnual" + BillingAnnual = "BillingAnnual", } /** @@ -2858,7 +3130,7 @@ export type TimeGrainType = string; /** Known values of {@link BudgetOperatorType} that the service accepts. */ export enum KnownBudgetOperatorType { /** In */ - In = "In" + In = "In", } /** @@ -2872,12 +3144,12 @@ export type BudgetOperatorType = string; /** Known values of {@link OperatorType} that the service accepts. */ export enum KnownOperatorType { - /** EqualTo */ + /** Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. */ EqualTo = "EqualTo", - /** GreaterThan */ + /** Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. */ GreaterThan = "GreaterThan", - /** GreaterThanOrEqualTo */ - GreaterThanOrEqualTo = "GreaterThanOrEqualTo" + /** Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. */ + GreaterThanOrEqualTo = "GreaterThanOrEqualTo", } /** @@ -2885,18 +3157,18 @@ export enum KnownOperatorType { * {@link KnownOperatorType} can be used interchangeably with OperatorType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **EqualTo** \ - * **GreaterThan** \ - * **GreaterThanOrEqualTo** + * **EqualTo**: Alert will be triggered if the evaluated cost is the same as threshold value. Note: It’s not recommended to use this OperatorType as there’s low chance of cost being exactly the same as threshold value, leading to missing of your alert. This OperatorType will be deprecated in future. \ + * **GreaterThan**: Alert will be triggered if the evaluated cost is greater than the threshold value. Note: This is the recommended OperatorType while configuring Budget Alert. \ + * **GreaterThanOrEqualTo**: Alert will be triggered if the evaluated cost is greater than or equal to the threshold value. */ export type OperatorType = string; /** Known values of {@link ThresholdType} that the service accepts. */ export enum KnownThresholdType { - /** Actual */ + /** Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . */ Actual = "Actual", - /** Forecasted */ - Forecasted = "Forecasted" + /** Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. */ + Forecasted = "Forecasted", } /** @@ -2904,8 +3176,8 @@ export enum KnownThresholdType { * {@link KnownThresholdType} can be used interchangeably with ThresholdType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Actual** \ - * **Forecasted** + * **Actual**: Actual costs budget alerts notify when the actual accrued cost exceeds the allocated budget . \ + * **Forecasted**: Forecasted costs budget alerts provide advanced notification that your spending trends are likely to exceed your allocated budget, as it relies on forecasted cost predictions. */ export type ThresholdType = string; @@ -2952,7 +3224,7 @@ export enum KnownCultureCode { /** PtPt */ PtPt = "pt-pt", /** SvSe */ - SvSe = "sv-se" + SvSe = "sv-se", } /** @@ -2989,7 +3261,7 @@ export enum KnownChargeSummaryKind { /** Legacy */ Legacy = "legacy", /** Modern */ - Modern = "modern" + Modern = "modern", } /** @@ -3009,7 +3281,7 @@ export enum KnownBillingFrequency { /** Quarter */ Quarter = "Quarter", /** Year */ - Year = "Year" + Year = "Year", } /** @@ -3028,7 +3300,7 @@ export enum KnownDatagrain { /** Daily grain of data */ DailyGrain = "daily", /** Monthly grain of data */ - MonthlyGrain = "monthly" + MonthlyGrain = "monthly", } /** @@ -3046,7 +3318,7 @@ export enum KnownReservationRecommendationKind { /** Legacy */ Legacy = "legacy", /** Modern */ - Modern = "modern" + Modern = "modern", } /** @@ -3059,12 +3331,32 @@ export enum KnownReservationRecommendationKind { */ export type ReservationRecommendationKind = string; +/** Known values of {@link Scope} that the service accepts. */ +export enum KnownScope { + /** Single */ + Single = "Single", + /** Shared */ + Shared = "Shared", +} + +/** + * Defines values for Scope. \ + * {@link KnownScope} can be used interchangeably with Scope, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Single** \ + * **Shared** + */ +export type Scope = string; + /** Known values of {@link Term} that the service accepts. */ export enum KnownTerm { + /** 1 month reservation term */ + P1M = "P1M", /** 1 year reservation term */ P1Y = "P1Y", /** 3 year reservation term */ - P3Y = "P3Y" + P3Y = "P3Y", } /** @@ -3072,6 +3364,7 @@ export enum KnownTerm { * {@link KnownTerm} can be used interchangeably with Term, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **P1M**: 1 month reservation term \ * **P1Y**: 1 year reservation term \ * **P3Y**: 3 year reservation term */ @@ -3084,7 +3377,7 @@ export enum KnownLookBackPeriod { /** Use 30 days of data for recommendations */ Last30Days = "Last30Days", /** Use 60 days of data for recommendations */ - Last60Days = "Last60Days" + Last60Days = "Last60Days", } /** @@ -3113,7 +3406,9 @@ export enum KnownEventType { /** UnKnown */ UnKnown = "UnKnown", /** NewCredit */ - NewCredit = "NewCredit" + NewCredit = "NewCredit", + /** CreditExpired */ + CreditExpired = "CreditExpired", } /** @@ -3127,7 +3422,8 @@ export enum KnownEventType { * **PendingNewCredit** \ * **PendingExpiredCredit** \ * **UnKnown** \ - * **NewCredit** + * **NewCredit** \ + * **CreditExpired** */ export type EventType = string; @@ -3138,7 +3434,7 @@ export enum KnownLotSource { /** PromotionalCredit */ PromotionalCredit = "PromotionalCredit", /** ConsumptionCommitment */ - ConsumptionCommitment = "ConsumptionCommitment" + ConsumptionCommitment = "ConsumptionCommitment", } /** @@ -3165,7 +3461,7 @@ export enum KnownStatus { /** Complete */ Complete = "Complete", /** Canceled */ - Canceled = "Canceled" + Canceled = "Canceled", } /** @@ -3182,6 +3478,24 @@ export enum KnownStatus { */ export type Status = string; +/** Known values of {@link OrganizationType} that the service accepts. */ +export enum KnownOrganizationType { + /** Primary organization type for Multi-Entity consumption commitment. */ + PrimaryOrganizationType = "Primary", + /** Contributor organization type for Multi-Entity consumption commitment. */ + ContributorOrganizationType = "Contributor", +} + +/** + * Defines values for OrganizationType. \ + * {@link KnownOrganizationType} can be used interchangeably with OrganizationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary**: Primary organization type for Multi-Entity consumption commitment. \ + * **Contributor**: Contributor organization type for Multi-Entity consumption commitment. + */ +export type OrganizationType = string; + /** Known values of {@link PricingModelType} that the service accepts. */ export enum KnownPricingModelType { /** OnDemand */ @@ -3189,7 +3503,7 @@ export enum KnownPricingModelType { /** Reservation */ Reservation = "Reservation", /** Spot */ - Spot = "Spot" + Spot = "Spot", } /** @@ -3203,35 +3517,54 @@ export enum KnownPricingModelType { */ export type PricingModelType = string; -/** Known values of {@link Scope} that the service accepts. */ -export enum KnownScope { - /** Single */ - Single = "Single", - /** Shared */ - Shared = "Shared" +/** Optional parameters. */ +export interface PriceSheetDownloadByBillingAccountPeriodOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for Scope. \ - * {@link KnownScope} can be used interchangeably with Scope, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Single** \ - * **Shared** - */ -export type Scope = string; +/** Contains response data for the downloadByBillingAccountPeriod operation. */ +export type PriceSheetDownloadByBillingAccountPeriodResponse = OperationStatus; /** Optional parameters. */ -export interface UsageDetailsListOptionalParams - extends coreClient.OperationOptions { +export interface PriceSheetGetOptionalParams extends coreClient.OperationOptions { + /** 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; + /** 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; + /** May be used to limit the number of results to the top N results. */ + top?: number; +} + +/** Contains response data for the get operation. */ +export type PriceSheetGetResponse = PriceSheetResult; + +/** Optional parameters. */ +export interface PriceSheetGetByBillingPeriodOptionalParams extends coreClient.OperationOptions { + /** 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; + /** 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; + /** May be used to limit the number of results to the top N results. */ + top?: number; +} + +/** Contains response data for the getByBillingPeriod operation. */ +export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult; + +/** Optional parameters. */ +export interface UsageDetailsListOptionalParams extends coreClient.OperationOptions { /** May be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. */ expand?: string; - /** 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 where key and value is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type */ - filter?: string; /** 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; /** May be used to limit the number of results to the most recent N usageDetails. */ top?: number; + /** 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 where key and value is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type */ + filter?: string; /** Allows to select different type of cost/usage records. */ metric?: Metrictype; } @@ -3240,36 +3573,32 @@ export interface UsageDetailsListOptionalParams export type UsageDetailsListResponse = UsageDetailsListResult; /** Optional parameters. */ -export interface UsageDetailsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface UsageDetailsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type UsageDetailsListNextResponse = UsageDetailsListResult; /** Optional parameters. */ -export interface MarketplacesListOptionalParams - extends coreClient.OperationOptions { - /** 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; +export interface MarketplacesListOptionalParams extends coreClient.OperationOptions { /** 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; /** May be used to limit the number of results to the most recent N marketplaces. */ top?: number; + /** 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; } /** Contains response data for the list operation. */ export type MarketplacesListResponse = MarketplacesListResult; /** Optional parameters. */ -export interface MarketplacesListNextOptionalParams - extends coreClient.OperationOptions {} +export interface MarketplacesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type MarketplacesListNextResponse = MarketplacesListResult; /** Optional parameters. */ -export interface BudgetsListOptionalParams - extends coreClient.OperationOptions {} +export interface BudgetsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type BudgetsListResponse = BudgetsListResult; @@ -3281,19 +3610,16 @@ export interface BudgetsGetOptionalParams extends coreClient.OperationOptions {} export type BudgetsGetResponse = Budget; /** Optional parameters. */ -export interface BudgetsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface BudgetsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ export type BudgetsCreateOrUpdateResponse = Budget; /** Optional parameters. */ -export interface BudgetsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface BudgetsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface BudgetsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface BudgetsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type BudgetsListNextResponse = BudgetsListResult; @@ -3320,8 +3646,7 @@ export interface ChargesListOptionalParams extends coreClient.OperationOptions { export type ChargesListResponse = ChargesListResult; /** Optional parameters. */ -export interface BalancesGetByBillingAccountOptionalParams - extends coreClient.OperationOptions {} +export interface BalancesGetByBillingAccountOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getByBillingAccount operation. */ export type BalancesGetByBillingAccountResponse = Balance; @@ -3351,11 +3676,11 @@ export interface ReservationsSummariesListByReservationOrderAndReservationOption } /** Contains response data for the listByReservationOrderAndReservation operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationResponse = ReservationSummariesListResult; +export type ReservationsSummariesListByReservationOrderAndReservationResponse = + ReservationSummariesListResult; /** Optional parameters. */ -export interface ReservationsSummariesListOptionalParams - extends coreClient.OperationOptions { +export interface ReservationsSummariesListOptionalParams extends coreClient.OperationOptions { /** 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; /** Start date. Only applicable when querying with billing profile */ @@ -3376,18 +3701,19 @@ export interface ReservationsSummariesListByReservationOrderNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByReservationOrderNext operation. */ -export type ReservationsSummariesListByReservationOrderNextResponse = ReservationSummariesListResult; +export type ReservationsSummariesListByReservationOrderNextResponse = + ReservationSummariesListResult; /** Optional parameters. */ export interface ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = ReservationSummariesListResult; +export type ReservationsSummariesListByReservationOrderAndReservationNextResponse = + ReservationSummariesListResult; /** Optional parameters. */ -export interface ReservationsSummariesListNextOptionalParams - extends coreClient.OperationOptions {} +export interface ReservationsSummariesListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ReservationsSummariesListNextResponse = ReservationSummariesListResult; @@ -3404,11 +3730,11 @@ export interface ReservationsDetailsListByReservationOrderAndReservationOptional extends coreClient.OperationOptions {} /** Contains response data for the listByReservationOrderAndReservation operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationResponse = ReservationDetailsListResult; +export type ReservationsDetailsListByReservationOrderAndReservationResponse = + ReservationDetailsListResult; /** Optional parameters. */ -export interface ReservationsDetailsListOptionalParams - extends coreClient.OperationOptions { +export interface ReservationsDetailsListOptionalParams extends coreClient.OperationOptions { /** Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile */ filter?: string; /** Start date. Only applicable when querying with billing profile */ @@ -3436,18 +3762,17 @@ export interface ReservationsDetailsListByReservationOrderAndReservationNextOpti extends coreClient.OperationOptions {} /** Contains response data for the listByReservationOrderAndReservationNext operation. */ -export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = ReservationDetailsListResult; +export type ReservationsDetailsListByReservationOrderAndReservationNextResponse = + ReservationDetailsListResult; /** Optional parameters. */ -export interface ReservationsDetailsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface ReservationsDetailsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type ReservationsDetailsListNextResponse = ReservationDetailsListResult; /** Optional parameters. */ -export interface ReservationRecommendationsListOptionalParams - extends coreClient.OperationOptions { +export interface ReservationRecommendationsListOptionalParams extends coreClient.OperationOptions { /** May be used to filter reservationRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple'] and default value 'VirtualMachines'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last7Days'. */ filter?: string; } @@ -3464,16 +3789,22 @@ export type ReservationRecommendationsListNextResponse = ReservationRecommendati /** Optional parameters. */ export interface ReservationRecommendationDetailsGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Used to filter reservation recommendation details by: properties/subscriptionId can be specified for billing account and billing profile paths. */ + filter?: string; +} /** Contains response data for the get operation. */ export type ReservationRecommendationDetailsGetResponse = ReservationRecommendationDetailsModel; /** Optional parameters. */ -export interface ReservationTransactionsListOptionalParams - extends coreClient.OperationOptions { - /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge' */ +export interface ReservationTransactionsListOptionalParams extends coreClient.OperationOptions { + /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and 31) */ filter?: string; + /** Applies mark up to the transactions if the caller is a partner. */ + useMarkupIfPartner?: boolean; + /** Preview markup percentage to be applied. */ + previewMarkupPercentage?: number; } /** Contains response data for the list operation. */ @@ -3482,12 +3813,13 @@ export type ReservationTransactionsListResponse = ReservationTransactionsListRes /** Optional parameters. */ export interface ReservationTransactionsListByBillingProfileOptionalParams extends coreClient.OperationOptions { - /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge' */ + /** Filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will include data for entire December 2020 month (i.e. will contain records for dates December 30 and 31) */ filter?: string; } /** Contains response data for the listByBillingProfile operation. */ -export type ReservationTransactionsListByBillingProfileResponse = ModernReservationTransactionsListResult; +export type ReservationTransactionsListByBillingProfileResponse = + ModernReservationTransactionsListResult; /** Optional parameters. */ export interface ReservationTransactionsListNextOptionalParams @@ -3501,46 +3833,17 @@ export interface ReservationTransactionsListByBillingProfileNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingProfileNext operation. */ -export type ReservationTransactionsListByBillingProfileNextResponse = ModernReservationTransactionsListResult; - -/** Optional parameters. */ -export interface PriceSheetGetOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** 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; - /** May be used to limit the number of results to the top N results. */ - top?: number; -} - -/** Contains response data for the get operation. */ -export type PriceSheetGetResponse = PriceSheetResult; +export type ReservationTransactionsListByBillingProfileNextResponse = + ModernReservationTransactionsListResult; /** Optional parameters. */ -export interface PriceSheetGetByBillingPeriodOptionalParams - extends coreClient.OperationOptions { - /** 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; - /** 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; - /** May be used to limit the number of results to the top N results. */ - top?: number; -} - -/** Contains response data for the getByBillingPeriod operation. */ -export type PriceSheetGetByBillingPeriodResponse = PriceSheetResult; - -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ export type OperationsListResponse = OperationListResult; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationListResult; @@ -3560,18 +3863,17 @@ export interface AggregatedCostGetForBillingPeriodByManagementGroupOptionalParam extends coreClient.OperationOptions {} /** Contains response data for the getForBillingPeriodByManagementGroup operation. */ -export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = ManagementGroupAggregatedCostResult; +export type AggregatedCostGetForBillingPeriodByManagementGroupResponse = + ManagementGroupAggregatedCostResult; /** Optional parameters. */ -export interface EventsListByBillingProfileOptionalParams - extends coreClient.OperationOptions {} +export interface EventsListByBillingProfileOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingProfile operation. */ export type EventsListByBillingProfileResponse = Events; /** Optional parameters. */ -export interface EventsListByBillingAccountOptionalParams - extends coreClient.OperationOptions { +export interface EventsListByBillingAccountOptionalParams extends coreClient.OperationOptions { /** 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; } @@ -3580,29 +3882,25 @@ export interface EventsListByBillingAccountOptionalParams export type EventsListByBillingAccountResponse = Events; /** Optional parameters. */ -export interface EventsListByBillingProfileNextOptionalParams - extends coreClient.OperationOptions {} +export interface EventsListByBillingProfileNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingProfileNext operation. */ export type EventsListByBillingProfileNextResponse = Events; /** Optional parameters. */ -export interface EventsListByBillingAccountNextOptionalParams - extends coreClient.OperationOptions {} +export interface EventsListByBillingAccountNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingAccountNext operation. */ export type EventsListByBillingAccountNextResponse = Events; /** Optional parameters. */ -export interface LotsListByBillingProfileOptionalParams - extends coreClient.OperationOptions {} +export interface LotsListByBillingProfileOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingProfile operation. */ export type LotsListByBillingProfileResponse = Lots; /** Optional parameters. */ -export interface LotsListByBillingAccountOptionalParams - extends coreClient.OperationOptions { +export interface LotsListByBillingAccountOptionalParams extends coreClient.OperationOptions { /** 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; } @@ -3611,19 +3909,32 @@ export interface LotsListByBillingAccountOptionalParams export type LotsListByBillingAccountResponse = Lots; /** Optional parameters. */ -export interface LotsListByBillingProfileNextOptionalParams - extends coreClient.OperationOptions {} +export interface LotsListByCustomerOptionalParams extends coreClient.OperationOptions { + /** May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. Tag filter is a key value pair string where key and value is separated by a colon (:). */ + filter?: string; +} + +/** Contains response data for the listByCustomer operation. */ +export type LotsListByCustomerResponse = Lots; + +/** Optional parameters. */ +export interface LotsListByBillingProfileNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingProfileNext operation. */ export type LotsListByBillingProfileNextResponse = Lots; /** Optional parameters. */ -export interface LotsListByBillingAccountNextOptionalParams - extends coreClient.OperationOptions {} +export interface LotsListByBillingAccountNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByBillingAccountNext operation. */ export type LotsListByBillingAccountNextResponse = Lots; +/** Optional parameters. */ +export interface LotsListByCustomerNextOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the listByCustomerNext operation. */ +export type LotsListByCustomerNextResponse = Lots; + /** Optional parameters. */ export interface CreditsGetOptionalParams extends coreClient.OperationOptions {} @@ -3631,8 +3942,7 @@ export interface CreditsGetOptionalParams extends coreClient.OperationOptions {} export type CreditsGetResponse = CreditSummary; /** Optional parameters. */ -export interface ConsumptionManagementClientOptionalParams - extends coreClient.ServiceClientOptions { +export interface ConsumptionManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; /** Api Version */ diff --git a/sdk/consumption/arm-consumption/src/models/mappers.ts b/sdk/consumption/arm-consumption/src/models/mappers.ts index bd98dc2dad1b..af3132aca099 100644 --- a/sdk/consumption/arm-consumption/src/models/mappers.ts +++ b/sdk/consumption/arm-consumption/src/models/mappers.ts @@ -8,6 +8,74 @@ import * as coreClient from "@azure/core-client"; +export const OperationStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + downloadUrl: { + serializedName: "properties.downloadUrl", + readOnly: true, + type: { + name: "String", + }, + }, + validTill: { + serializedName: "properties.validTill", + readOnly: true, + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetails", + }, + }, + }, + }, +}; + +export const ErrorDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetails", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const UsageDetailsListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -21,20 +89,20 @@ export const UsageDetailsListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "UsageDetail" - } - } - } + className: "UsageDetail", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Resource: coreClient.CompositeMapper = { @@ -46,79 +114,40 @@ export const Resource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, etag: { serializedName: "etag", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, tags: { serializedName: "tags", readOnly: true, type: { name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const ErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorDetails" - } - } - } - } -}; - -export const ErrorDetails: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ErrorDetails", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String" - } + value: { type: { name: "String" } }, + }, }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String" - } - } - } - } + }, + }, }; export const MarketplacesListResult: coreClient.CompositeMapper = { @@ -134,20 +163,20 @@ export const MarketplacesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Marketplace" - } - } - } + className: "Marketplace", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const BudgetsListResult: coreClient.CompositeMapper = { @@ -163,20 +192,20 @@ export const BudgetsListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Budget" - } - } - } + className: "Budget", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const BudgetTimePeriod: coreClient.CompositeMapper = { @@ -188,17 +217,17 @@ export const BudgetTimePeriod: coreClient.CompositeMapper = { serializedName: "startDate", required: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, endDate: { serializedName: "endDate", type: { - name: "DateTime" - } - } - } - } + name: "DateTime", + }, + }, + }, + }, }; export const BudgetFilter: coreClient.CompositeMapper = { @@ -213,34 +242,27 @@ export const BudgetFilter: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "BudgetFilterProperties" - } - } - } - }, - not: { - serializedName: "not", - type: { - name: "Composite", - className: "BudgetFilterProperties" - } + className: "BudgetFilterProperties", + }, + }, + }, }, dimensions: { serializedName: "dimensions", type: { name: "Composite", - className: "BudgetComparisonExpression" - } + className: "BudgetComparisonExpression", + }, }, tags: { serializedName: "tags", type: { name: "Composite", - className: "BudgetComparisonExpression" - } - } - } - } + className: "BudgetComparisonExpression", + }, + }, + }, + }, }; export const BudgetFilterProperties: coreClient.CompositeMapper = { @@ -252,18 +274,18 @@ export const BudgetFilterProperties: coreClient.CompositeMapper = { serializedName: "dimensions", type: { name: "Composite", - className: "BudgetComparisonExpression" - } + className: "BudgetComparisonExpression", + }, }, tags: { serializedName: "tags", type: { name: "Composite", - className: "BudgetComparisonExpression" - } - } - } - } + className: "BudgetComparisonExpression", + }, + }, + }, + }, }; export const BudgetComparisonExpression: coreClient.CompositeMapper = { @@ -275,15 +297,15 @@ export const BudgetComparisonExpression: coreClient.CompositeMapper = { serializedName: "name", required: true, type: { - name: "String" - } + name: "String", + }, }, operator: { serializedName: "operator", required: true, type: { - name: "String" - } + name: "String", + }, }, values: { serializedName: "values", @@ -292,13 +314,13 @@ export const BudgetComparisonExpression: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const CurrentSpend: coreClient.CompositeMapper = { @@ -310,18 +332,18 @@ export const CurrentSpend: coreClient.CompositeMapper = { serializedName: "amount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, unit: { serializedName: "unit", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Notification: coreClient.CompositeMapper = { @@ -333,26 +355,26 @@ export const Notification: coreClient.CompositeMapper = { serializedName: "enabled", required: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, operator: { serializedName: "operator", required: true, type: { - name: "String" - } + name: "String", + }, }, threshold: { serializedName: "threshold", required: true, type: { - name: "Number" - } + name: "Number", + }, }, contactEmails: { constraints: { - MaxItems: 50 + MaxItems: 50, }, serializedName: "contactEmails", required: true, @@ -360,10 +382,10 @@ export const Notification: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, contactRoles: { serializedName: "contactRoles", @@ -371,40 +393,40 @@ export const Notification: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, contactGroups: { constraints: { - MaxItems: 50 + MaxItems: 50, }, serializedName: "contactGroups", type: { name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, thresholdType: { defaultValue: "Actual", serializedName: "thresholdType", type: { - name: "String" - } + name: "String", + }, }, locale: { serializedName: "locale", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ForecastSpend: coreClient.CompositeMapper = { @@ -416,18 +438,18 @@ export const ForecastSpend: coreClient.CompositeMapper = { serializedName: "amount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, unit: { serializedName: "unit", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ProxyResource: coreClient.CompositeMapper = { @@ -439,31 +461,31 @@ export const ProxyResource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, eTag: { serializedName: "eTag", type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Tag: coreClient.CompositeMapper = { @@ -474,8 +496,8 @@ export const Tag: coreClient.CompositeMapper = { key: { serializedName: "key", type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", @@ -483,13 +505,13 @@ export const Tag: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const ChargesListResult: coreClient.CompositeMapper = { @@ -505,13 +527,13 @@ export const ChargesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ChargeSummary" - } - } - } - } - } - } + className: "ChargeSummary", + }, + }, + }, + }, + }, + }, }; export const BalancePropertiesNewPurchasesDetailsItem: coreClient.CompositeMapper = { @@ -523,18 +545,18 @@ export const BalancePropertiesNewPurchasesDetailsItem: coreClient.CompositeMappe serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const BalancePropertiesAdjustmentDetailsItem: coreClient.CompositeMapper = { @@ -546,18 +568,18 @@ export const BalancePropertiesAdjustmentDetailsItem: coreClient.CompositeMapper serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const ReservationSummariesListResult: coreClient.CompositeMapper = { @@ -573,20 +595,20 @@ export const ReservationSummariesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationSummary" - } - } - } + className: "ReservationSummary", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationDetailsListResult: coreClient.CompositeMapper = { @@ -602,20 +624,20 @@ export const ReservationDetailsListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationDetail" - } - } - } + className: "ReservationDetail", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationRecommendationsListResult: coreClient.CompositeMapper = { @@ -631,27 +653,27 @@ export const ReservationRecommendationsListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "ReservationRecommendation" - } - } - } + className: "ReservationRecommendation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, previousLink: { serializedName: "previousLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ResourceAttributes: coreClient.CompositeMapper = { @@ -663,18 +685,18 @@ export const ResourceAttributes: coreClient.CompositeMapper = { serializedName: "location", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, sku: { serializedName: "sku", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationRecommendationDetailsResourceProperties: coreClient.CompositeMapper = { @@ -689,48 +711,48 @@ export const ReservationRecommendationDetailsResourceProperties: coreClient.Comp name: "Sequence", element: { type: { - name: "String" - } - } - } + name: "String", + }, + }, + }, }, onDemandRate: { serializedName: "onDemandRate", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, product: { serializedName: "product", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, region: { serializedName: "region", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationRate: { serializedName: "reservationRate", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, resourceType: { serializedName: "resourceType", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationRecommendationDetailsSavingsProperties: coreClient.CompositeMapper = { @@ -745,107 +767,107 @@ export const ReservationRecommendationDetailsSavingsProperties: coreClient.Compo element: { type: { name: "Composite", - className: - "ReservationRecommendationDetailsCalculatedSavingsProperties" - } - } - } + className: "ReservationRecommendationDetailsCalculatedSavingsProperties", + }, + }, + }, }, lookBackPeriod: { serializedName: "lookBackPeriod", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, recommendedQuantity: { serializedName: "recommendedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, reservationOrderTerm: { serializedName: "reservationOrderTerm", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, savingsType: { serializedName: "savingsType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, unitOfMeasure: { serializedName: "unitOfMeasure", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; -export const ReservationRecommendationDetailsCalculatedSavingsProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReservationRecommendationDetailsCalculatedSavingsProperties", - modelProperties: { - onDemandCost: { - serializedName: "onDemandCost", - readOnly: true, - type: { - name: "Number" - } - }, - overageCost: { - serializedName: "overageCost", - readOnly: true, - type: { - name: "Number" - } - }, - quantity: { - serializedName: "quantity", - readOnly: true, - type: { - name: "Number" - } - }, - reservationCost: { - serializedName: "reservationCost", - readOnly: true, - type: { - name: "Number" - } - }, - totalReservationCost: { - serializedName: "totalReservationCost", - readOnly: true, - type: { - name: "Number" - } - }, - reservedUnitCount: { - serializedName: "reservedUnitCount", - type: { - name: "Number" - } +export const ReservationRecommendationDetailsCalculatedSavingsProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ReservationRecommendationDetailsCalculatedSavingsProperties", + modelProperties: { + onDemandCost: { + serializedName: "onDemandCost", + readOnly: true, + type: { + name: "Number", + }, + }, + overageCost: { + serializedName: "overageCost", + readOnly: true, + type: { + name: "Number", + }, + }, + quantity: { + serializedName: "quantity", + readOnly: true, + type: { + name: "Number", + }, + }, + reservationCost: { + serializedName: "reservationCost", + readOnly: true, + type: { + name: "Number", + }, + }, + totalReservationCost: { + serializedName: "totalReservationCost", + readOnly: true, + type: { + name: "Number", + }, + }, + reservedUnitCount: { + serializedName: "reservedUnitCount", + type: { + name: "Number", + }, + }, + savings: { + serializedName: "savings", + readOnly: true, + type: { + name: "Number", + }, + }, }, - savings: { - serializedName: "savings", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; + }, + }; export const ReservationRecommendationDetailsUsageProperties: coreClient.CompositeMapper = { type: { @@ -856,22 +878,22 @@ export const ReservationRecommendationDetailsUsageProperties: coreClient.Composi serializedName: "firstConsumptionDate", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lastConsumptionDate: { serializedName: "lastConsumptionDate", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lookBackUnitType: { serializedName: "lookBackUnitType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageData: { serializedName: "usageData", @@ -880,20 +902,20 @@ export const ReservationRecommendationDetailsUsageProperties: coreClient.Composi name: "Sequence", element: { type: { - name: "Number" - } - } - } + name: "Number", + }, + }, + }, }, usageGrain: { serializedName: "usageGrain", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const HighCasedErrorResponse: coreClient.CompositeMapper = { @@ -905,11 +927,11 @@ export const HighCasedErrorResponse: coreClient.CompositeMapper = { serializedName: "error", type: { name: "Composite", - className: "HighCasedErrorDetails" - } - } - } - } + className: "HighCasedErrorDetails", + }, + }, + }, + }, }; export const HighCasedErrorDetails: coreClient.CompositeMapper = { @@ -921,18 +943,18 @@ export const HighCasedErrorDetails: coreClient.CompositeMapper = { serializedName: "code", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, message: { serializedName: "message", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationTransactionsListResult: coreClient.CompositeMapper = { @@ -948,20 +970,20 @@ export const ReservationTransactionsListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ReservationTransaction" - } - } - } + className: "ReservationTransaction", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationTransactionResource: coreClient.CompositeMapper = { @@ -973,22 +995,22 @@ export const ReservationTransactionResource: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, type: { serializedName: "type", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, tags: { serializedName: "tags", @@ -997,13 +1019,13 @@ export const ReservationTransactionResource: coreClient.CompositeMapper = { name: "Sequence", element: { type: { - name: "String" - } - } - } - } - } - } + name: "String", + }, + }, + }, + }, + }, + }, }; export const ModernReservationTransactionsListResult: coreClient.CompositeMapper = { @@ -1019,20 +1041,20 @@ export const ModernReservationTransactionsListResult: coreClient.CompositeMapper element: { type: { name: "Composite", - className: "ModernReservationTransaction" - } - } - } + className: "ModernReservationTransaction", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const PriceSheetProperties: coreClient.CompositeMapper = { @@ -1044,67 +1066,74 @@ export const PriceSheetProperties: coreClient.CompositeMapper = { serializedName: "billingPeriodId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterId: { serializedName: "meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, meterDetails: { serializedName: "meterDetails", type: { name: "Composite", - className: "MeterDetails" - } + className: "MeterDetails", + }, }, unitOfMeasure: { serializedName: "unitOfMeasure", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, includedQuantity: { serializedName: "includedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, partNumber: { serializedName: "partNumber", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, unitPrice: { serializedName: "unitPrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, currencyCode: { serializedName: "currencyCode", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, offerId: { serializedName: "offerId", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + savingsPlan: { + serializedName: "savingsPlan", + type: { + name: "Composite", + className: "SavingsPlan", + }, + }, + }, + }, }; export const MeterDetails: coreClient.CompositeMapper = { @@ -1116,67 +1145,97 @@ export const MeterDetails: coreClient.CompositeMapper = { serializedName: "meterName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterCategory: { serializedName: "meterCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterSubCategory: { serializedName: "meterSubCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, unit: { serializedName: "unit", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterLocation: { serializedName: "meterLocation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, totalIncludedQuantity: { serializedName: "totalIncludedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, pretaxStandardRate: { serializedName: "pretaxStandardRate", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, serviceName: { serializedName: "serviceName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceTier: { serializedName: "serviceTier", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const SavingsPlan: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SavingsPlan", + modelProperties: { + term: { + serializedName: "term", + readOnly: true, + type: { + name: "String", + }, + }, + marketPrice: { + serializedName: "marketPrice", + readOnly: true, + type: { + name: "Number", + }, + }, + effectivePrice: { + serializedName: "effectivePrice", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, }; export const OperationListResult: coreClient.CompositeMapper = { @@ -1192,20 +1251,20 @@ export const OperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" - } - } - } + className: "Operation", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Operation: coreClient.CompositeMapper = { @@ -1217,25 +1276,25 @@ export const Operation: coreClient.CompositeMapper = { serializedName: "id", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, name: { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, display: { serializedName: "display", type: { name: "Composite", - className: "OperationDisplay" - } - } - } - } + className: "OperationDisplay", + }, + }, + }, + }, }; export const OperationDisplay: coreClient.CompositeMapper = { @@ -1247,32 +1306,32 @@ export const OperationDisplay: coreClient.CompositeMapper = { serializedName: "provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "resource", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, operation: { serializedName: "operation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "description", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Events: coreClient.CompositeMapper = { @@ -1288,20 +1347,20 @@ export const Events: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "EventSummary" - } - } - } + className: "EventSummary", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Amount: coreClient.CompositeMapper = { @@ -1313,18 +1372,18 @@ export const Amount: coreClient.CompositeMapper = { serializedName: "currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const Reseller: coreClient.CompositeMapper = { @@ -1336,18 +1395,18 @@ export const Reseller: coreClient.CompositeMapper = { serializedName: "resellerId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resellerDescription: { serializedName: "resellerDescription", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Lots: coreClient.CompositeMapper = { @@ -1363,20 +1422,20 @@ export const Lots: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LotSummary" - } - } - } + className: "LotSummary", + }, + }, + }, }, nextLink: { serializedName: "nextLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const CreditBalanceSummary: coreClient.CompositeMapper = { @@ -1388,25 +1447,25 @@ export const CreditBalanceSummary: coreClient.CompositeMapper = { serializedName: "estimatedBalance", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, currentBalance: { serializedName: "currentBalance", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, estimatedBalanceInBillingCurrency: { serializedName: "estimatedBalanceInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } - } - } - } + className: "AmountWithExchangeRate", + }, + }, + }, + }, }; export const MeterDetailsResponse: coreClient.CompositeMapper = { @@ -1418,39 +1477,39 @@ export const MeterDetailsResponse: coreClient.CompositeMapper = { serializedName: "meterName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterCategory: { serializedName: "meterCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterSubCategory: { serializedName: "meterSubCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, unitOfMeasure: { serializedName: "unitOfMeasure", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceFamily: { serializedName: "serviceFamily", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const LegacyReservationRecommendationProperties: coreClient.CompositeMapper = { @@ -1460,106 +1519,106 @@ export const LegacyReservationRecommendationProperties: coreClient.CompositeMapp uberParent: "LegacyReservationRecommendationProperties", polymorphicDiscriminator: { serializedName: "scope", - clientName: "scope" + clientName: "scope", }, modelProperties: { lookBackPeriod: { serializedName: "lookBackPeriod", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceFlexibilityRatio: { serializedName: "instanceFlexibilityRatio", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, instanceFlexibilityGroup: { serializedName: "instanceFlexibilityGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, normalizedSize: { serializedName: "normalizedSize", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, recommendedQuantityNormalized: { serializedName: "recommendedQuantityNormalized", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, meterId: { serializedName: "meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, resourceType: { serializedName: "resourceType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, term: { serializedName: "term", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costWithNoReservedInstances: { serializedName: "costWithNoReservedInstances", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, recommendedQuantity: { serializedName: "recommendedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalCostWithReservedInstances: { serializedName: "totalCostWithReservedInstances", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, netSavings: { serializedName: "netSavings", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, firstUsageDate: { serializedName: "firstUsageDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, scope: { serializedName: "scope", required: true, type: { - name: "String" - } + name: "String", + }, }, skuProperties: { serializedName: "skuProperties", @@ -1569,13 +1628,27 @@ export const LegacyReservationRecommendationProperties: coreClient.CompositeMapp element: { type: { name: "Composite", - className: "SkuProperty" - } - } - } - } - } - } + className: "SkuProperty", + }, + }, + }, + }, + lastUsageDate: { + serializedName: "lastUsageDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + totalHours: { + serializedName: "totalHours", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, }; export const SkuProperty: coreClient.CompositeMapper = { @@ -1587,18 +1660,171 @@ export const SkuProperty: coreClient.CompositeMapper = { serializedName: "name", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, value: { serializedName: "value", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, +}; + +export const ModernReservationRecommendationProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ModernReservationRecommendationProperties", + uberParent: "ModernReservationRecommendationProperties", + polymorphicDiscriminator: { + serializedName: "scope", + clientName: "scope", + }, + modelProperties: { + location: { + serializedName: "location", + readOnly: true, + type: { + name: "String", + }, + }, + lookBackPeriod: { + serializedName: "lookBackPeriod", + readOnly: true, + type: { + name: "Number", + }, + }, + instanceFlexibilityRatio: { + serializedName: "instanceFlexibilityRatio", + readOnly: true, + type: { + name: "Number", + }, + }, + instanceFlexibilityGroup: { + serializedName: "instanceFlexibilityGroup", + readOnly: true, + type: { + name: "String", + }, + }, + normalizedSize: { + serializedName: "normalizedSize", + readOnly: true, + type: { + name: "String", + }, + }, + recommendedQuantityNormalized: { + serializedName: "recommendedQuantityNormalized", + readOnly: true, + type: { + name: "Number", + }, + }, + meterId: { + serializedName: "meterId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + term: { + serializedName: "term", + readOnly: true, + type: { + name: "String", + }, + }, + costWithNoReservedInstances: { + serializedName: "costWithNoReservedInstances", + type: { + name: "Composite", + className: "Amount", + }, + }, + recommendedQuantity: { + serializedName: "recommendedQuantity", + readOnly: true, + type: { + name: "Number", + }, + }, + resourceType: { + serializedName: "resourceType", + readOnly: true, + type: { + name: "String", + }, + }, + totalCostWithReservedInstances: { + serializedName: "totalCostWithReservedInstances", + type: { + name: "Composite", + className: "Amount", + }, + }, + netSavings: { + serializedName: "netSavings", + type: { + name: "Composite", + className: "Amount", + }, + }, + firstUsageDate: { + serializedName: "firstUsageDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + scope: { + serializedName: "scope", + required: true, + type: { + name: "String", + }, + }, + skuProperties: { + serializedName: "skuProperties", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SkuProperty", + }, + }, + }, + }, + skuName: { + serializedName: "skuName", + readOnly: true, + type: { + name: "String", + }, + }, + lastUsageDate: { + serializedName: "lastUsageDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + totalHours: { + serializedName: "totalHours", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, }; export const DownloadProperties: coreClient.CompositeMapper = { @@ -1610,18 +1836,18 @@ export const DownloadProperties: coreClient.CompositeMapper = { serializedName: "downloadUrl", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, validTill: { serializedName: "validTill", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const UsageDetail: coreClient.CompositeMapper = { @@ -1632,7 +1858,7 @@ export const UsageDetail: coreClient.CompositeMapper = { uberParent: "Resource", polymorphicDiscriminator: { serializedName: "kind", - clientName: "kind" + clientName: "kind", }, modelProperties: { ...Resource.type.modelProperties, @@ -1640,11 +1866,11 @@ export const UsageDetail: coreClient.CompositeMapper = { serializedName: "kind", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const Marketplace: coreClient.CompositeMapper = { @@ -1657,186 +1883,186 @@ export const Marketplace: coreClient.CompositeMapper = { serializedName: "properties.billingPeriodId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageStart: { serializedName: "properties.usageStart", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, usageEnd: { serializedName: "properties.usageEnd", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, resourceRate: { serializedName: "properties.resourceRate", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, offerName: { serializedName: "properties.offerName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceGroup: { serializedName: "properties.resourceGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, additionalInfo: { serializedName: "properties.additionalInfo", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, orderNumber: { serializedName: "properties.orderNumber", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceName: { serializedName: "properties.instanceName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceId: { serializedName: "properties.instanceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, currency: { serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, consumedQuantity: { serializedName: "properties.consumedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, unitOfMeasure: { serializedName: "properties.unitOfMeasure", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, pretaxCost: { serializedName: "properties.pretaxCost", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, isEstimated: { serializedName: "properties.isEstimated", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, meterId: { serializedName: "properties.meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, subscriptionGuid: { serializedName: "properties.subscriptionGuid", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, subscriptionName: { serializedName: "properties.subscriptionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, accountName: { serializedName: "properties.accountName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, departmentName: { serializedName: "properties.departmentName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, consumedService: { serializedName: "properties.consumedService", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costCenter: { serializedName: "properties.costCenter", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, additionalProperties: { serializedName: "properties.additionalProperties", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publisherName: { serializedName: "properties.publisherName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, planName: { serializedName: "properties.planName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isRecurringCharge: { serializedName: "properties.isRecurringCharge", readOnly: true, type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + }, + }, }; export const Balance: coreClient.CompositeMapper = { @@ -1849,91 +2075,98 @@ export const Balance: coreClient.CompositeMapper = { serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, beginningBalance: { serializedName: "properties.beginningBalance", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, endingBalance: { serializedName: "properties.endingBalance", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, newPurchases: { serializedName: "properties.newPurchases", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, adjustments: { serializedName: "properties.adjustments", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, utilized: { serializedName: "properties.utilized", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, serviceOverage: { serializedName: "properties.serviceOverage", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, chargesBilledSeparately: { serializedName: "properties.chargesBilledSeparately", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalOverage: { serializedName: "properties.totalOverage", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalUsage: { serializedName: "properties.totalUsage", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, azureMarketplaceServiceCharges: { serializedName: "properties.azureMarketplaceServiceCharges", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, billingFrequency: { serializedName: "properties.billingFrequency", type: { - name: "String" - } + name: "String", + }, }, priceHidden: { serializedName: "properties.priceHidden", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, + }, + overageRefund: { + serializedName: "properties.overageRefund", + readOnly: true, + type: { + name: "Number", + }, }, newPurchasesDetails: { serializedName: "properties.newPurchasesDetails", @@ -1943,10 +2176,10 @@ export const Balance: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "BalancePropertiesNewPurchasesDetailsItem" - } - } - } + className: "BalancePropertiesNewPurchasesDetailsItem", + }, + }, + }, }, adjustmentDetails: { serializedName: "properties.adjustmentDetails", @@ -1956,13 +2189,13 @@ export const Balance: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "BalancePropertiesAdjustmentDetailsItem" - } - } - } - } - } - } + className: "BalancePropertiesAdjustmentDetailsItem", + }, + }, + }, + }, + }, + }, }; export const ReservationSummary: coreClient.CompositeMapper = { @@ -1975,109 +2208,109 @@ export const ReservationSummary: coreClient.CompositeMapper = { serializedName: "properties.reservationOrderId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationId: { serializedName: "properties.reservationId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, skuName: { serializedName: "properties.skuName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservedHours: { serializedName: "properties.reservedHours", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, usageDate: { serializedName: "properties.usageDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, usedHours: { serializedName: "properties.usedHours", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, minUtilizationPercentage: { serializedName: "properties.minUtilizationPercentage", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, avgUtilizationPercentage: { serializedName: "properties.avgUtilizationPercentage", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, maxUtilizationPercentage: { serializedName: "properties.maxUtilizationPercentage", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, kind: { serializedName: "properties.kind", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, purchasedQuantity: { serializedName: "properties.purchasedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, remainingQuantity: { serializedName: "properties.remainingQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalReservedQuantity: { serializedName: "properties.totalReservedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, usedQuantity: { serializedName: "properties.usedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, utilizedPercentage: { serializedName: "properties.utilizedPercentage", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const ReservationDetail: coreClient.CompositeMapper = { @@ -2090,81 +2323,81 @@ export const ReservationDetail: coreClient.CompositeMapper = { serializedName: "properties.reservationOrderId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceFlexibilityRatio: { serializedName: "properties.instanceFlexibilityRatio", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceFlexibilityGroup: { serializedName: "properties.instanceFlexibilityGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationId: { serializedName: "properties.reservationId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, skuName: { serializedName: "properties.skuName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservedHours: { serializedName: "properties.reservedHours", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, usageDate: { serializedName: "properties.usageDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, usedHours: { serializedName: "properties.usedHours", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, instanceId: { serializedName: "properties.instanceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, totalReservedQuantity: { serializedName: "properties.totalReservedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, kind: { serializedName: "properties.kind", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationRecommendation: coreClient.CompositeMapper = { @@ -2175,7 +2408,7 @@ export const ReservationRecommendation: coreClient.CompositeMapper = { uberParent: "Resource", polymorphicDiscriminator: { serializedName: "kind", - clientName: "kind" + clientName: "kind", }, modelProperties: { ...Resource.type.modelProperties, @@ -2184,11 +2417,11 @@ export const ReservationRecommendation: coreClient.CompositeMapper = { serializedName: "kind", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationRecommendationDetailsModel: coreClient.CompositeMapper = { @@ -2200,59 +2433,59 @@ export const ReservationRecommendationDetailsModel: coreClient.CompositeMapper = location: { serializedName: "location", type: { - name: "String" - } + name: "String", + }, }, sku: { serializedName: "sku", type: { - name: "String" - } + name: "String", + }, }, currency: { serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resource: { serializedName: "properties.resource", type: { name: "Composite", - className: "ReservationRecommendationDetailsResourceProperties" - } + className: "ReservationRecommendationDetailsResourceProperties", + }, }, resourceGroup: { serializedName: "properties.resourceGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, savings: { serializedName: "properties.savings", type: { name: "Composite", - className: "ReservationRecommendationDetailsSavingsProperties" - } + className: "ReservationRecommendationDetailsSavingsProperties", + }, }, scope: { serializedName: "properties.scope", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usage: { serializedName: "properties.usage", type: { name: "Composite", - className: "ReservationRecommendationDetailsUsageProperties" - } - } - } - } + className: "ReservationRecommendationDetailsUsageProperties", + }, + }, + }, + }, }; export const PriceSheetResult: coreClient.CompositeMapper = { @@ -2269,27 +2502,27 @@ export const PriceSheetResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PriceSheetProperties" - } - } - } + className: "PriceSheetProperties", + }, + }, + }, }, nextLink: { serializedName: "properties.nextLink", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, download: { serializedName: "properties.download", type: { name: "Composite", - className: "MeterDetails" - } - } - } - } + className: "MeterDetails", + }, + }, + }, + }, }; export const ManagementGroupAggregatedCostResult: coreClient.CompositeMapper = { @@ -2302,153 +2535,87 @@ export const ManagementGroupAggregatedCostResult: coreClient.CompositeMapper = { serializedName: "properties.billingPeriodId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageStart: { serializedName: "properties.usageStart", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, usageEnd: { serializedName: "properties.usageEnd", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, azureCharges: { serializedName: "properties.azureCharges", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, marketplaceCharges: { serializedName: "properties.marketplaceCharges", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, chargesBilledSeparately: { serializedName: "properties.chargesBilledSeparately", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - }, - children: { - serializedName: "properties.children", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagementGroupAggregatedCostResult" - } - } - } - }, - includedSubscriptions: { - serializedName: "properties.includedSubscriptions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - excludedSubscriptions: { - serializedName: "properties.excludedSubscriptions", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const CreditSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreditSummary", - modelProperties: { - ...Resource.type.modelProperties, - balanceSummary: { - serializedName: "properties.balanceSummary", - type: { - name: "Composite", - className: "CreditBalanceSummary" - } - }, - pendingCreditAdjustments: { - serializedName: "properties.pendingCreditAdjustments", - type: { - name: "Composite", - className: "Amount" - } - }, - expiredCredit: { - serializedName: "properties.expiredCredit", - type: { - name: "Composite", - className: "Amount" - } - }, - pendingEligibleCharges: { - serializedName: "properties.pendingEligibleCharges", - type: { - name: "Composite", - className: "Amount" - } - }, - creditCurrency: { - serializedName: "properties.creditCurrency", + serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, - billingCurrency: { - serializedName: "properties.billingCurrency", - readOnly: true, + children: { + serializedName: "properties.children", type: { - name: "String" - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagementGroupAggregatedCostResult", + }, + }, + }, }, - reseller: { - serializedName: "properties.reseller", + includedSubscriptions: { + serializedName: "properties.includedSubscriptions", type: { - name: "Composite", - className: "Reseller" - } + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, }, - eTag: { - serializedName: "properties.eTag", - readOnly: true, + excludedSubscriptions: { + serializedName: "properties.excludedSubscriptions", type: { - name: "String" - } - } - } - } + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, }; export const Budget: coreClient.CompositeMapper = { @@ -2460,58 +2627,58 @@ export const Budget: coreClient.CompositeMapper = { category: { serializedName: "properties.category", type: { - name: "String" - } + name: "String", + }, }, amount: { serializedName: "properties.amount", type: { - name: "Number" - } + name: "Number", + }, }, timeGrain: { serializedName: "properties.timeGrain", type: { - name: "String" - } + name: "String", + }, }, timePeriod: { serializedName: "properties.timePeriod", type: { name: "Composite", - className: "BudgetTimePeriod" - } + className: "BudgetTimePeriod", + }, }, filter: { serializedName: "properties.filter", type: { name: "Composite", - className: "BudgetFilter" - } + className: "BudgetFilter", + }, }, currentSpend: { serializedName: "properties.currentSpend", type: { name: "Composite", - className: "CurrentSpend" - } + className: "CurrentSpend", + }, }, notifications: { serializedName: "properties.notifications", type: { name: "Dictionary", - value: { type: { name: "Composite", className: "Notification" } } - } + value: { type: { name: "Composite", className: "Notification" } }, + }, }, forecastSpend: { serializedName: "properties.forecastSpend", type: { name: "Composite", - className: "ForecastSpend" - } - } - } - } + className: "ForecastSpend", + }, + }, + }, + }, }; export const TagsResult: coreClient.CompositeMapper = { @@ -2527,27 +2694,27 @@ export const TagsResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Tag" - } - } - } + className: "Tag", + }, + }, + }, }, nextLink: { serializedName: "properties.nextLink", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, previousLink: { serializedName: "properties.previousLink", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ChargeSummary: coreClient.CompositeMapper = { @@ -2558,7 +2725,7 @@ export const ChargeSummary: coreClient.CompositeMapper = { uberParent: "ProxyResource", polymorphicDiscriminator: { serializedName: "kind", - clientName: "kind" + clientName: "kind", }, modelProperties: { ...ProxyResource.type.modelProperties, @@ -2566,11 +2733,11 @@ export const ChargeSummary: coreClient.CompositeMapper = { serializedName: "kind", required: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const EventSummary: coreClient.CompositeMapper = { @@ -2583,164 +2750,199 @@ export const EventSummary: coreClient.CompositeMapper = { serializedName: "properties.transactionDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, description: { serializedName: "properties.description", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, newCredit: { serializedName: "properties.newCredit", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, adjustments: { serializedName: "properties.adjustments", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, creditExpired: { serializedName: "properties.creditExpired", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, charges: { serializedName: "properties.charges", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, + }, + chargesInLotCurrency: { + serializedName: "properties.chargesInLotCurrency", + type: { + name: "Composite", + className: "Amount", + }, }, closedBalance: { serializedName: "properties.closedBalance", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, + }, + closedBalanceInLotCurrency: { + serializedName: "properties.closedBalanceInLotCurrency", + type: { + name: "Composite", + className: "Amount", + }, + }, + billingAccountId: { + serializedName: "properties.billingAccountId", + readOnly: true, + type: { + name: "String", + }, + }, + billingAccountDisplayName: { + serializedName: "properties.billingAccountDisplayName", + readOnly: true, + type: { + name: "String", + }, }, eventType: { serializedName: "properties.eventType", type: { - name: "String" - } + name: "String", + }, }, invoiceNumber: { serializedName: "properties.invoiceNumber", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileId: { serializedName: "properties.billingProfileId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileDisplayName: { serializedName: "properties.billingProfileDisplayName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lotId: { serializedName: "properties.lotId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lotSource: { serializedName: "properties.lotSource", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, canceledCredit: { serializedName: "properties.canceledCredit", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, creditCurrency: { serializedName: "properties.creditCurrency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingCurrency: { serializedName: "properties.billingCurrency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reseller: { serializedName: "properties.reseller", type: { name: "Composite", - className: "Reseller" - } + className: "Reseller", + }, }, creditExpiredInBillingCurrency: { serializedName: "properties.creditExpiredInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, }, newCreditInBillingCurrency: { serializedName: "properties.newCreditInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, }, adjustmentsInBillingCurrency: { serializedName: "properties.adjustmentsInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, }, chargesInBillingCurrency: { serializedName: "properties.chargesInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, }, closedBalanceInBillingCurrency: { serializedName: "properties.closedBalanceInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, + }, + isEstimatedBalance: { + serializedName: "properties.isEstimatedBalance", + readOnly: true, + type: { + name: "Boolean", + }, }, eTagPropertiesETag: { serializedName: "properties.eTag", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const LotSummary: coreClient.CompositeMapper = { @@ -2753,102 +2955,196 @@ export const LotSummary: coreClient.CompositeMapper = { serializedName: "properties.originalAmount", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, closedBalance: { serializedName: "properties.closedBalance", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, source: { serializedName: "properties.source", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, startDate: { serializedName: "properties.startDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, expirationDate: { serializedName: "properties.expirationDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, poNumber: { serializedName: "properties.poNumber", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, purchasedDate: { serializedName: "properties.purchasedDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, status: { serializedName: "properties.status", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, creditCurrency: { serializedName: "properties.creditCurrency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingCurrency: { serializedName: "properties.billingCurrency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, originalAmountInBillingCurrency: { serializedName: "properties.originalAmountInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, }, closedBalanceInBillingCurrency: { serializedName: "properties.closedBalanceInBillingCurrency", type: { name: "Composite", - className: "AmountWithExchangeRate" - } + className: "AmountWithExchangeRate", + }, + }, + reseller: { + serializedName: "properties.reseller", + type: { + name: "Composite", + className: "Reseller", + }, + }, + isEstimatedBalance: { + serializedName: "properties.isEstimatedBalance", + readOnly: true, + type: { + name: "Boolean", + }, + }, + eTagPropertiesETag: { + serializedName: "properties.eTag", + readOnly: true, + type: { + name: "String", + }, + }, + organizationType: { + serializedName: "properties.OrganizationType", + readOnly: true, + type: { + name: "String", + }, + }, + usedAmount: { + serializedName: "properties.usedAmount", + type: { + name: "Composite", + className: "Amount", + }, + }, + }, + }, +}; + +export const CreditSummary: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreditSummary", + modelProperties: { + ...ProxyResource.type.modelProperties, + balanceSummary: { + serializedName: "properties.balanceSummary", + type: { + name: "Composite", + className: "CreditBalanceSummary", + }, + }, + pendingCreditAdjustments: { + serializedName: "properties.pendingCreditAdjustments", + type: { + name: "Composite", + className: "Amount", + }, + }, + expiredCredit: { + serializedName: "properties.expiredCredit", + type: { + name: "Composite", + className: "Amount", + }, + }, + pendingEligibleCharges: { + serializedName: "properties.pendingEligibleCharges", + type: { + name: "Composite", + className: "Amount", + }, + }, + creditCurrency: { + serializedName: "properties.creditCurrency", + readOnly: true, + type: { + name: "String", + }, + }, + billingCurrency: { + serializedName: "properties.billingCurrency", + readOnly: true, + type: { + name: "String", + }, }, reseller: { serializedName: "properties.reseller", type: { name: "Composite", - className: "Reseller" - } + className: "Reseller", + }, + }, + isEstimatedBalance: { + serializedName: "properties.isEstimatedBalance", + readOnly: true, + type: { + name: "Boolean", + }, }, eTagPropertiesETag: { serializedName: "properties.eTag", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ReservationTransaction: coreClient.CompositeMapper = { @@ -2861,169 +3157,168 @@ export const ReservationTransaction: coreClient.CompositeMapper = { serializedName: "properties.eventDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, reservationOrderId: { serializedName: "properties.reservationOrderId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "properties.description", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, eventType: { serializedName: "properties.eventType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, quantity: { serializedName: "properties.quantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, amount: { serializedName: "properties.amount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, currency: { serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationOrderName: { serializedName: "properties.reservationOrderName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, purchasingEnrollment: { serializedName: "properties.purchasingEnrollment", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, purchasingSubscriptionGuid: { serializedName: "properties.purchasingSubscriptionGuid", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, purchasingSubscriptionName: { serializedName: "properties.purchasingSubscriptionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, armSkuName: { serializedName: "properties.armSkuName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, term: { serializedName: "properties.term", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, region: { serializedName: "properties.region", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, accountName: { serializedName: "properties.accountName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, accountOwnerEmail: { serializedName: "properties.accountOwnerEmail", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, departmentName: { serializedName: "properties.departmentName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costCenter: { serializedName: "properties.costCenter", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, currentEnrollment: { serializedName: "properties.currentEnrollment", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingFrequency: { serializedName: "properties.billingFrequency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingMonth: { serializedName: "properties.billingMonth", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, monetaryCommitment: { serializedName: "properties.monetaryCommitment", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, overage: { serializedName: "properties.overage", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const ModernReservationTransaction: coreClient.CompositeMapper = { - serializedName: "Modern", type: { name: "Composite", className: "ModernReservationTransaction", @@ -3033,144 +3328,144 @@ export const ModernReservationTransaction: coreClient.CompositeMapper = { serializedName: "properties.amount", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, armSkuName: { serializedName: "properties.armSkuName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingFrequency: { serializedName: "properties.billingFrequency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileId: { serializedName: "properties.billingProfileId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileName: { serializedName: "properties.billingProfileName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, currency: { serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, description: { serializedName: "properties.description", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, eventDate: { serializedName: "properties.eventDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, eventType: { serializedName: "properties.eventType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoice: { serializedName: "properties.invoice", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceId: { serializedName: "properties.invoiceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceSectionId: { serializedName: "properties.invoiceSectionId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceSectionName: { serializedName: "properties.invoiceSectionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, purchasingSubscriptionGuid: { serializedName: "properties.purchasingSubscriptionGuid", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, purchasingSubscriptionName: { serializedName: "properties.purchasingSubscriptionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, quantity: { serializedName: "properties.quantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, region: { serializedName: "properties.region", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationOrderId: { serializedName: "properties.reservationOrderId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationOrderName: { serializedName: "properties.reservationOrderName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, term: { serializedName: "properties.term", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const AmountWithExchangeRate: coreClient.CompositeMapper = { @@ -3183,53 +3478,88 @@ export const AmountWithExchangeRate: coreClient.CompositeMapper = { serializedName: "exchangeRate", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, exchangeRateMonth: { serializedName: "exchangeRateMonth", readOnly: true, type: { - name: "Number" - } - } - } - } + name: "Number", + }, + }, + }, + }, }; export const LegacySingleScopeReservationRecommendationProperties: coreClient.CompositeMapper = { serializedName: "Single", type: { name: "Composite", - className: "LegacySingleScopeReservationRecommendationProperties", + className: "LegacySingleScopeReservationRecommendationProperties", + uberParent: "LegacyReservationRecommendationProperties", + polymorphicDiscriminator: + LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, + modelProperties: { + ...LegacyReservationRecommendationProperties.type.modelProperties, + subscriptionId: { + serializedName: "subscriptionId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + }, + }, +}; + +export const LegacySharedScopeReservationRecommendationProperties: coreClient.CompositeMapper = { + serializedName: "Shared", + type: { + name: "Composite", + className: "LegacySharedScopeReservationRecommendationProperties", uberParent: "LegacyReservationRecommendationProperties", polymorphicDiscriminator: LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, modelProperties: { ...LegacyReservationRecommendationProperties.type.modelProperties, + }, + }, +}; + +export const ModernSingleScopeReservationRecommendationProperties: coreClient.CompositeMapper = { + serializedName: "Single", + type: { + name: "Composite", + className: "ModernSingleScopeReservationRecommendationProperties", + uberParent: "ModernReservationRecommendationProperties", + polymorphicDiscriminator: + ModernReservationRecommendationProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ModernReservationRecommendationProperties.type.modelProperties, subscriptionId: { serializedName: "subscriptionId", readOnly: true, type: { - name: "Uuid" - } - } - } - } + name: "Uuid", + }, + }, + }, + }, }; -export const LegacySharedScopeReservationRecommendationProperties: coreClient.CompositeMapper = { +export const ModernSharedScopeReservationRecommendationProperties: coreClient.CompositeMapper = { serializedName: "Shared", type: { name: "Composite", - className: "LegacySharedScopeReservationRecommendationProperties", - uberParent: "LegacyReservationRecommendationProperties", + className: "ModernSharedScopeReservationRecommendationProperties", + uberParent: "ModernReservationRecommendationProperties", polymorphicDiscriminator: - LegacyReservationRecommendationProperties.type.polymorphicDiscriminator, + ModernReservationRecommendationProperties.type.polymorphicDiscriminator, modelProperties: { - ...LegacyReservationRecommendationProperties.type.modelProperties - } - } + ...ModernReservationRecommendationProperties.type.modelProperties, + }, + }, }; export const LegacyUsageDetail: coreClient.CompositeMapper = { @@ -3245,312 +3575,326 @@ export const LegacyUsageDetail: coreClient.CompositeMapper = { serializedName: "properties.billingAccountId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingAccountName: { serializedName: "properties.billingAccountName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingPeriodStartDate: { serializedName: "properties.billingPeriodStartDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, billingPeriodEndDate: { serializedName: "properties.billingPeriodEndDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, billingProfileId: { serializedName: "properties.billingProfileId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileName: { serializedName: "properties.billingProfileName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, accountOwnerId: { serializedName: "properties.accountOwnerId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, accountName: { serializedName: "properties.accountName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, subscriptionId: { serializedName: "properties.subscriptionId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, subscriptionName: { serializedName: "properties.subscriptionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, date: { serializedName: "properties.date", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, product: { serializedName: "properties.product", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, partNumber: { serializedName: "properties.partNumber", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterId: { serializedName: "properties.meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, meterDetails: { serializedName: "properties.meterDetails", type: { name: "Composite", - className: "MeterDetailsResponse" - } + className: "MeterDetailsResponse", + }, }, quantity: { serializedName: "properties.quantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, effectivePrice: { serializedName: "properties.effectivePrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, cost: { serializedName: "properties.cost", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, unitPrice: { serializedName: "properties.unitPrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, billingCurrency: { serializedName: "properties.billingCurrency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceLocation: { serializedName: "properties.resourceLocation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, consumedService: { serializedName: "properties.consumedService", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceId: { serializedName: "properties.resourceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceName: { serializedName: "properties.resourceName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceInfo1: { serializedName: "properties.serviceInfo1", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceInfo2: { serializedName: "properties.serviceInfo2", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, additionalInfo: { serializedName: "properties.additionalInfo", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceSection: { serializedName: "properties.invoiceSection", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costCenter: { serializedName: "properties.costCenter", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceGroup: { serializedName: "properties.resourceGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationId: { serializedName: "properties.reservationId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationName: { serializedName: "properties.reservationName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, productOrderId: { serializedName: "properties.productOrderId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, productOrderName: { serializedName: "properties.productOrderName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, offerId: { serializedName: "properties.offerId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isAzureCreditEligible: { serializedName: "properties.isAzureCreditEligible", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, term: { serializedName: "properties.term", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publisherName: { serializedName: "properties.publisherName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publisherType: { serializedName: "properties.publisherType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, planName: { serializedName: "properties.planName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, chargeType: { serializedName: "properties.chargeType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, frequency: { serializedName: "properties.frequency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, payGPrice: { serializedName: "properties.payGPrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, + }, + benefitId: { + serializedName: "properties.benefitId", + readOnly: true, + type: { + name: "String", + }, + }, + benefitName: { + serializedName: "properties.benefitName", + readOnly: true, + type: { + name: "String", + }, }, pricingModel: { serializedName: "properties.pricingModel", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ModernUsageDetail: coreClient.CompositeMapper = { @@ -3566,508 +3910,508 @@ export const ModernUsageDetail: coreClient.CompositeMapper = { serializedName: "properties.billingAccountId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, effectivePrice: { serializedName: "properties.effectivePrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, pricingModel: { serializedName: "properties.pricingModel", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingAccountName: { serializedName: "properties.billingAccountName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingPeriodStartDate: { serializedName: "properties.billingPeriodStartDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, billingPeriodEndDate: { serializedName: "properties.billingPeriodEndDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, billingProfileId: { serializedName: "properties.billingProfileId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileName: { serializedName: "properties.billingProfileName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, subscriptionGuid: { serializedName: "properties.subscriptionGuid", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, subscriptionName: { serializedName: "properties.subscriptionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, date: { serializedName: "properties.date", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, product: { serializedName: "properties.product", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterId: { serializedName: "properties.meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, meterName: { serializedName: "properties.meterName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterRegion: { serializedName: "properties.meterRegion", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterCategory: { serializedName: "properties.meterCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, meterSubCategory: { serializedName: "properties.meterSubCategory", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceFamily: { serializedName: "properties.serviceFamily", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, quantity: { serializedName: "properties.quantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, unitOfMeasure: { serializedName: "properties.unitOfMeasure", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceName: { serializedName: "properties.instanceName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costInUSD: { serializedName: "properties.costInUSD", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, unitPrice: { serializedName: "properties.unitPrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, billingCurrencyCode: { serializedName: "properties.billingCurrencyCode", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceLocation: { serializedName: "properties.resourceLocation", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, consumedService: { serializedName: "properties.consumedService", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceInfo1: { serializedName: "properties.serviceInfo1", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, serviceInfo2: { serializedName: "properties.serviceInfo2", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, additionalInfo: { serializedName: "properties.additionalInfo", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceSectionId: { serializedName: "properties.invoiceSectionId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceSectionName: { serializedName: "properties.invoiceSectionName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costCenter: { serializedName: "properties.costCenter", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceGroup: { serializedName: "properties.resourceGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationId: { serializedName: "properties.reservationId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, reservationName: { serializedName: "properties.reservationName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, productOrderId: { serializedName: "properties.productOrderId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, productOrderName: { serializedName: "properties.productOrderName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isAzureCreditEligible: { serializedName: "properties.isAzureCreditEligible", readOnly: true, type: { - name: "Boolean" - } + name: "Boolean", + }, }, term: { serializedName: "properties.term", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publisherName: { serializedName: "properties.publisherName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publisherType: { serializedName: "properties.publisherType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, chargeType: { serializedName: "properties.chargeType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, frequency: { serializedName: "properties.frequency", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costInBillingCurrency: { serializedName: "properties.costInBillingCurrency", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, costInPricingCurrency: { serializedName: "properties.costInPricingCurrency", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, exchangeRate: { serializedName: "properties.exchangeRate", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, exchangeRateDate: { serializedName: "properties.exchangeRateDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, invoiceId: { serializedName: "properties.invoiceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, previousInvoiceId: { serializedName: "properties.previousInvoiceId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, pricingCurrencyCode: { serializedName: "properties.pricingCurrencyCode", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, productIdentifier: { serializedName: "properties.productIdentifier", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resourceLocationNormalized: { serializedName: "properties.resourceLocationNormalized", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, servicePeriodStartDate: { serializedName: "properties.servicePeriodStartDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, servicePeriodEndDate: { serializedName: "properties.servicePeriodEndDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, customerTenantId: { serializedName: "properties.customerTenantId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, customerName: { serializedName: "properties.customerName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, partnerTenantId: { serializedName: "properties.partnerTenantId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, partnerName: { serializedName: "properties.partnerName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resellerMpnId: { serializedName: "properties.resellerMpnId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, resellerName: { serializedName: "properties.resellerName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, publisherId: { serializedName: "properties.publisherId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, marketPrice: { serializedName: "properties.marketPrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, exchangeRatePricingToBilling: { serializedName: "properties.exchangeRatePricingToBilling", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, paygCostInBillingCurrency: { serializedName: "properties.paygCostInBillingCurrency", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, paygCostInUSD: { serializedName: "properties.paygCostInUSD", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, partnerEarnedCreditRate: { serializedName: "properties.partnerEarnedCreditRate", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, partnerEarnedCreditApplied: { serializedName: "properties.partnerEarnedCreditApplied", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, payGPrice: { serializedName: "properties.payGPrice", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, benefitId: { serializedName: "properties.benefitId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, benefitName: { serializedName: "properties.benefitName", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, provider: { serializedName: "properties.provider", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costAllocationRuleName: { serializedName: "properties.costAllocationRuleName", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const LegacyReservationRecommendation: coreClient.CompositeMapper = { @@ -4076,107 +4420,106 @@ export const LegacyReservationRecommendation: coreClient.CompositeMapper = { name: "Composite", className: "LegacyReservationRecommendation", uberParent: "ReservationRecommendation", - polymorphicDiscriminator: - ReservationRecommendation.type.polymorphicDiscriminator, + polymorphicDiscriminator: ReservationRecommendation.type.polymorphicDiscriminator, modelProperties: { ...ReservationRecommendation.type.modelProperties, lookBackPeriod: { serializedName: "properties.lookBackPeriod", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, instanceFlexibilityRatio: { serializedName: "properties.instanceFlexibilityRatio", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, instanceFlexibilityGroup: { serializedName: "properties.instanceFlexibilityGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, normalizedSize: { serializedName: "properties.normalizedSize", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, recommendedQuantityNormalized: { serializedName: "properties.recommendedQuantityNormalized", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, meterId: { serializedName: "properties.meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, resourceType: { serializedName: "properties.resourceType", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, term: { serializedName: "properties.term", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costWithNoReservedInstances: { serializedName: "properties.costWithNoReservedInstances", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, recommendedQuantity: { serializedName: "properties.recommendedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, totalCostWithReservedInstances: { serializedName: "properties.totalCostWithReservedInstances", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, netSavings: { serializedName: "properties.netSavings", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, firstUsageDate: { serializedName: "properties.firstUsageDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, scope: { serializedName: "properties.scope", required: true, type: { - name: "String" - } + name: "String", + }, }, skuProperties: { serializedName: "properties.skuProperties", @@ -4186,13 +4529,27 @@ export const LegacyReservationRecommendation: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SkuProperty" - } - } - } - } - } - } + className: "SkuProperty", + }, + }, + }, + }, + lastUsageDate: { + serializedName: "properties.lastUsageDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + totalHours: { + serializedName: "properties.totalHours", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, }; export const ModernReservationRecommendation: coreClient.CompositeMapper = { @@ -4201,107 +4558,113 @@ export const ModernReservationRecommendation: coreClient.CompositeMapper = { name: "Composite", className: "ModernReservationRecommendation", uberParent: "ReservationRecommendation", - polymorphicDiscriminator: - ReservationRecommendation.type.polymorphicDiscriminator, + polymorphicDiscriminator: ReservationRecommendation.type.polymorphicDiscriminator, modelProperties: { ...ReservationRecommendation.type.modelProperties, locationPropertiesLocation: { serializedName: "properties.location", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, lookBackPeriod: { serializedName: "properties.lookBackPeriod", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, instanceFlexibilityRatio: { serializedName: "properties.instanceFlexibilityRatio", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, instanceFlexibilityGroup: { serializedName: "properties.instanceFlexibilityGroup", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, normalizedSize: { serializedName: "properties.normalizedSize", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, recommendedQuantityNormalized: { serializedName: "properties.recommendedQuantityNormalized", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, meterId: { serializedName: "properties.meterId", readOnly: true, type: { - name: "Uuid" - } + name: "Uuid", + }, }, term: { serializedName: "properties.term", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, costWithNoReservedInstances: { serializedName: "properties.costWithNoReservedInstances", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, recommendedQuantity: { serializedName: "properties.recommendedQuantity", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, + }, + resourceType: { + serializedName: "properties.resourceType", + readOnly: true, + type: { + name: "String", + }, }, totalCostWithReservedInstances: { serializedName: "properties.totalCostWithReservedInstances", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, netSavings: { serializedName: "properties.netSavings", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, firstUsageDate: { serializedName: "properties.firstUsageDate", readOnly: true, type: { - name: "DateTime" - } + name: "DateTime", + }, }, scope: { serializedName: "properties.scope", - readOnly: true, + required: true, type: { - name: "String" - } + name: "String", + }, }, skuProperties: { serializedName: "properties.skuProperties", @@ -4311,20 +4674,34 @@ export const ModernReservationRecommendation: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SkuProperty" - } - } - } + className: "SkuProperty", + }, + }, + }, }, skuName: { serializedName: "properties.skuName", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + lastUsageDate: { + serializedName: "properties.lastUsageDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + totalHours: { + serializedName: "properties.totalHours", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, }; export const LegacyChargeSummary: coreClient.CompositeMapper = { @@ -4340,53 +4717,53 @@ export const LegacyChargeSummary: coreClient.CompositeMapper = { serializedName: "properties.billingPeriodId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageStart: { serializedName: "properties.usageStart", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageEnd: { serializedName: "properties.usageEnd", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, azureCharges: { serializedName: "properties.azureCharges", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, chargesBilledSeparately: { serializedName: "properties.chargesBilledSeparately", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, - marketplaceCharges: { - serializedName: "properties.marketplaceCharges", + azureMarketplaceCharges: { + serializedName: "properties.azureMarketplaceCharges", readOnly: true, type: { - name: "Number" - } + name: "Number", + }, }, currency: { serializedName: "properties.currency", readOnly: true, type: { - name: "String" - } - } - } - } + name: "String", + }, + }, + }, + }, }; export const ModernChargeSummary: coreClient.CompositeMapper = { @@ -4402,81 +4779,88 @@ export const ModernChargeSummary: coreClient.CompositeMapper = { serializedName: "properties.billingPeriodId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageStart: { serializedName: "properties.usageStart", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, usageEnd: { serializedName: "properties.usageEnd", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, azureCharges: { serializedName: "properties.azureCharges", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, chargesBilledSeparately: { serializedName: "properties.chargesBilledSeparately", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, marketplaceCharges: { serializedName: "properties.marketplaceCharges", type: { name: "Composite", - className: "Amount" - } + className: "Amount", + }, }, billingAccountId: { serializedName: "properties.billingAccountId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, billingProfileId: { serializedName: "properties.billingProfileId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, invoiceSectionId: { serializedName: "properties.invoiceSectionId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, customerId: { serializedName: "properties.customerId", readOnly: true, type: { - name: "String" - } + name: "String", + }, }, isInvoiced: { serializedName: "properties.isInvoiced", readOnly: true, type: { - name: "Boolean" - } - } - } - } + name: "Boolean", + }, + }, + subscriptionId: { + serializedName: "properties.subscriptionId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, }; export const LegacyReservationTransaction: coreClient.CompositeMapper = { @@ -4484,22 +4868,50 @@ export const LegacyReservationTransaction: coreClient.CompositeMapper = { name: "Composite", className: "LegacyReservationTransaction", modelProperties: { - ...ReservationTransaction.type.modelProperties - } - } + ...ReservationTransaction.type.modelProperties, + }, + }, +}; + +export const PriceSheetDownloadByBillingAccountPeriodHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PriceSheetDownloadByBillingAccountPeriodHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + retryAfter: { + serializedName: "retry-after", + type: { + name: "Number", + }, + }, + }, + }, }; export let discriminators = { LegacyReservationRecommendationProperties: LegacyReservationRecommendationProperties, + ModernReservationRecommendationProperties: ModernReservationRecommendationProperties, "Resource.UsageDetail": UsageDetail, "Resource.ReservationRecommendation": ReservationRecommendation, "ProxyResource.ChargeSummary": ChargeSummary, - "LegacyReservationRecommendationProperties.Single": LegacySingleScopeReservationRecommendationProperties, - "LegacyReservationRecommendationProperties.Shared": LegacySharedScopeReservationRecommendationProperties, + "LegacyReservationRecommendationProperties.Single": + LegacySingleScopeReservationRecommendationProperties, + "LegacyReservationRecommendationProperties.Shared": + LegacySharedScopeReservationRecommendationProperties, + "ModernReservationRecommendationProperties.Single": + ModernSingleScopeReservationRecommendationProperties, + "ModernReservationRecommendationProperties.Shared": + ModernSharedScopeReservationRecommendationProperties, "UsageDetail.legacy": LegacyUsageDetail, "UsageDetail.modern": ModernUsageDetail, "ReservationRecommendation.legacy": LegacyReservationRecommendation, "ReservationRecommendation.modern": ModernReservationRecommendation, "ChargeSummary.legacy": LegacyChargeSummary, - "ChargeSummary.modern": ModernChargeSummary + "ChargeSummary.modern": ModernChargeSummary, }; diff --git a/sdk/consumption/arm-consumption/src/models/parameters.ts b/sdk/consumption/arm-consumption/src/models/parameters.ts index 5fc8eca93580..b8be92f7599a 100644 --- a/sdk/consumption/arm-consumption/src/models/parameters.ts +++ b/sdk/consumption/arm-consumption/src/models/parameters.ts @@ -9,7 +9,7 @@ import { OperationParameter, OperationURLParameter, - OperationQueryParameter + OperationQueryParameter, } from "@azure/core-client"; import { Budget as BudgetMapper } from "../models/mappers.js"; @@ -20,9 +20,9 @@ export const accept: OperationParameter = { isConstant: true, serializedName: "Accept", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const $host: OperationURLParameter = { @@ -31,42 +31,57 @@ export const $host: OperationURLParameter = { serializedName: "$host", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; -export const scope: OperationURLParameter = { - parameterPath: "scope", +export const billingAccountId: OperationURLParameter = { + parameterPath: "billingAccountId", mapper: { - serializedName: "scope", + serializedName: "billingAccountId", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true }; -export const expand: OperationQueryParameter = { - parameterPath: ["options", "expand"], +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - serializedName: "$expand", + defaultValue: "2025-04-01", + isConstant: true, + serializedName: "api-version", type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], +export const billingPeriodName: OperationURLParameter = { + parameterPath: "billingPeriodName", mapper: { - serializedName: "$filter", + constraints: { + Pattern: new RegExp("^[0-9]*$"), + }, + serializedName: "billingPeriodName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], + mapper: { + serializedName: "$expand", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const skiptoken: OperationQueryParameter = { @@ -74,9 +89,9 @@ export const skiptoken: OperationQueryParameter = { mapper: { serializedName: "$skiptoken", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const top: OperationQueryParameter = { @@ -84,25 +99,57 @@ export const top: OperationQueryParameter = { mapper: { constraints: { InclusiveMaximum: 1000, - InclusiveMinimum: 1 + InclusiveMinimum: 1, }, serializedName: "$top", type: { - name: "Number" - } - } + name: "Number", + }, + }, }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - defaultValue: "2021-10-01", - isConstant: true, - serializedName: "api-version", + serializedName: "subscriptionId", + required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const billingPeriodName1: OperationURLParameter = { + parameterPath: "billingPeriodName", + mapper: { + serializedName: "billingPeriodName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const scope: OperationURLParameter = { + parameterPath: "scope", + mapper: { + serializedName: "scope", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, +}; + +export const filter: OperationQueryParameter = { + parameterPath: ["options", "filter"], + mapper: { + serializedName: "$filter", + type: { + name: "String", + }, + }, }; export const metric: OperationQueryParameter = { @@ -110,9 +157,9 @@ export const metric: OperationQueryParameter = { mapper: { serializedName: "metric", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const nextLink: OperationURLParameter = { @@ -121,10 +168,10 @@ export const nextLink: OperationURLParameter = { serializedName: "nextLink", required: true, type: { - name: "String" - } + name: "String", + }, }, - skipEncoding: true + skipEncoding: true, }; export const budgetName: OperationURLParameter = { @@ -133,9 +180,9 @@ export const budgetName: OperationURLParameter = { serializedName: "budgetName", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const contentType: OperationParameter = { @@ -145,14 +192,14 @@ export const contentType: OperationParameter = { isConstant: true, serializedName: "Content-Type", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const parameters: OperationParameter = { parameterPath: "parameters", - mapper: BudgetMapper + mapper: BudgetMapper, }; export const startDate: OperationQueryParameter = { @@ -160,9 +207,9 @@ export const startDate: OperationQueryParameter = { mapper: { serializedName: "startDate", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const endDate: OperationQueryParameter = { @@ -170,9 +217,9 @@ export const endDate: OperationQueryParameter = { mapper: { serializedName: "endDate", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const apply: OperationQueryParameter = { @@ -180,31 +227,9 @@ export const apply: OperationQueryParameter = { mapper: { serializedName: "$apply", type: { - name: "String" - } - } -}; - -export const billingAccountId: OperationURLParameter = { - parameterPath: "billingAccountId", - mapper: { - serializedName: "billingAccountId", - required: true, - type: { - name: "String" - } - } -}; - -export const billingPeriodName: OperationURLParameter = { - parameterPath: "billingPeriodName", - mapper: { - serializedName: "billingPeriodName", - required: true, - type: { - name: "String" - } - } + name: "String", + }, + }, }; export const reservationOrderId: OperationURLParameter = { @@ -213,9 +238,9 @@ export const reservationOrderId: OperationURLParameter = { serializedName: "reservationOrderId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const grain: OperationQueryParameter = { @@ -224,9 +249,9 @@ export const grain: OperationQueryParameter = { serializedName: "grain", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const reservationId: OperationURLParameter = { @@ -235,9 +260,21 @@ export const reservationId: OperationURLParameter = { serializedName: "reservationId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const resourceScope: OperationURLParameter = { + parameterPath: "resourceScope", + mapper: { + serializedName: "resourceScope", + required: true, + type: { + name: "String", + }, + }, + skipEncoding: true, }; export const reservationId1: OperationQueryParameter = { @@ -245,9 +282,9 @@ export const reservationId1: OperationQueryParameter = { mapper: { serializedName: "reservationId", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const reservationOrderId1: OperationQueryParameter = { @@ -255,9 +292,9 @@ export const reservationOrderId1: OperationQueryParameter = { mapper: { serializedName: "reservationOrderId", type: { - name: "String" - } - } + name: "String", + }, + }, }; export const filter1: OperationQueryParameter = { @@ -266,9 +303,20 @@ export const filter1: OperationQueryParameter = { serializedName: "$filter", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const scope1: OperationQueryParameter = { + parameterPath: "scope", + mapper: { + serializedName: "scope", + required: true, + type: { + name: "String", + }, + }, }; export const region: OperationQueryParameter = { @@ -277,9 +325,9 @@ export const region: OperationQueryParameter = { serializedName: "region", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const term: OperationQueryParameter = { @@ -288,9 +336,9 @@ export const term: OperationQueryParameter = { serializedName: "term", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const lookBackPeriod: OperationQueryParameter = { @@ -299,9 +347,9 @@ export const lookBackPeriod: OperationQueryParameter = { serializedName: "lookBackPeriod", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const product: OperationQueryParameter = { @@ -310,31 +358,40 @@ export const product: OperationQueryParameter = { serializedName: "product", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; -export const billingProfileId: OperationURLParameter = { - parameterPath: "billingProfileId", +export const useMarkupIfPartner: OperationQueryParameter = { + parameterPath: ["options", "useMarkupIfPartner"], mapper: { - serializedName: "billingProfileId", - required: true, + serializedName: "useMarkupIfPartner", type: { - name: "String" - } - } + name: "Boolean", + }, + }, }; -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", +export const previewMarkupPercentage: OperationQueryParameter = { + parameterPath: ["options", "previewMarkupPercentage"], mapper: { - serializedName: "subscriptionId", + serializedName: "previewMarkupPercentage", + type: { + name: "Number", + }, + }, +}; + +export const billingProfileId: OperationURLParameter = { + parameterPath: "billingProfileId", + mapper: { + serializedName: "billingProfileId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const managementGroupId: OperationURLParameter = { @@ -343,9 +400,9 @@ export const managementGroupId: OperationURLParameter = { serializedName: "managementGroupId", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const startDate1: OperationQueryParameter = { @@ -354,9 +411,9 @@ export const startDate1: OperationQueryParameter = { serializedName: "startDate", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, }; export const endDate1: OperationQueryParameter = { @@ -365,7 +422,18 @@ export const endDate1: OperationQueryParameter = { serializedName: "endDate", required: true, type: { - name: "String" - } - } + name: "String", + }, + }, +}; + +export const customerId: OperationURLParameter = { + parameterPath: "customerId", + mapper: { + serializedName: "customerId", + required: true, + type: { + name: "String", + }, + }, }; diff --git a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts index ca8d440e2c3b..a4eb7d2633d2 100644 --- a/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts +++ b/sdk/consumption/arm-consumption/src/operations/aggregatedCost.ts @@ -15,7 +15,7 @@ import { AggregatedCostGetByManagementGroupOptionalParams, AggregatedCostGetByManagementGroupResponse, AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams, - AggregatedCostGetForBillingPeriodByManagementGroupResponse + AggregatedCostGetForBillingPeriodByManagementGroupResponse, } from "../models/index.js"; /** Class containing AggregatedCost operations. */ @@ -38,11 +38,11 @@ export class AggregatedCostImpl implements AggregatedCost { */ getByManagementGroup( managementGroupId: string, - options?: AggregatedCostGetByManagementGroupOptionalParams + options?: AggregatedCostGetByManagementGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { managementGroupId, options }, - getByManagementGroupOperationSpec + getByManagementGroupOperationSpec, ); } @@ -56,11 +56,11 @@ export class AggregatedCostImpl implements AggregatedCost { getForBillingPeriodByManagementGroup( managementGroupId: string, billingPeriodName: string, - options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams + options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams, ): Promise { return this.client.sendOperationRequest( { managementGroupId, billingPeriodName, options }, - getForBillingPeriodByManagementGroupOperationSpec + getForBillingPeriodByManagementGroupOperationSpec, ); } } @@ -68,40 +68,34 @@ export class AggregatedCostImpl implements AggregatedCost { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getByManagementGroupOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost", + path: "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Consumption/aggregatedcost", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManagementGroupAggregatedCostResult + bodyMapper: Mappers.ManagementGroupAggregatedCostResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [Parameters.$host, Parameters.managementGroupId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getForBillingPeriodByManagementGroupOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost", + path: "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/aggregatedCost", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManagementGroupAggregatedCostResult + bodyMapper: Mappers.ManagementGroupAggregatedCostResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingPeriodName, - Parameters.managementGroupId - ], + urlParameters: [Parameters.$host, Parameters.billingPeriodName1, Parameters.managementGroupId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/balances.ts b/sdk/consumption/arm-consumption/src/operations/balances.ts index 27e7310af195..741e8960c8ff 100644 --- a/sdk/consumption/arm-consumption/src/operations/balances.ts +++ b/sdk/consumption/arm-consumption/src/operations/balances.ts @@ -15,7 +15,7 @@ import { BalancesGetByBillingAccountOptionalParams, BalancesGetByBillingAccountResponse, BalancesGetForBillingPeriodByBillingAccountOptionalParams, - BalancesGetForBillingPeriodByBillingAccountResponse + BalancesGetForBillingPeriodByBillingAccountResponse, } from "../models/index.js"; /** Class containing Balances operations. */ @@ -38,11 +38,11 @@ export class BalancesImpl implements Balances { */ getByBillingAccount( billingAccountId: string, - options?: BalancesGetByBillingAccountOptionalParams + options?: BalancesGetByBillingAccountOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, options }, - getByBillingAccountOperationSpec + getByBillingAccountOperationSpec, ); } @@ -56,11 +56,11 @@ export class BalancesImpl implements Balances { getForBillingPeriodByBillingAccount( billingAccountId: string, billingPeriodName: string, - options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams + options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingPeriodName, options }, - getForBillingPeriodByBillingAccountOperationSpec + getForBillingPeriodByBillingAccountOperationSpec, ); } } @@ -68,40 +68,34 @@ export class BalancesImpl implements Balances { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/balances", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Balance + bodyMapper: Mappers.Balance, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.billingAccountId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getForBillingPeriodByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Balance + bodyMapper: Mappers.Balance, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingPeriodName - ], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.billingPeriodName1], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/budgets.ts b/sdk/consumption/arm-consumption/src/operations/budgets.ts index d9298c1bc9de..fd4b5c91de06 100644 --- a/sdk/consumption/arm-consumption/src/operations/budgets.ts +++ b/sdk/consumption/arm-consumption/src/operations/budgets.ts @@ -23,7 +23,7 @@ import { BudgetsCreateOrUpdateOptionalParams, BudgetsCreateOrUpdateResponse, BudgetsDeleteOptionalParams, - BudgetsListNextResponse + BudgetsListNextResponse, } from "../models/index.js"; /// @@ -52,13 +52,13 @@ export class BudgetsImpl implements Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param options The options parameters. */ public list( scope: string, - options?: BudgetsListOptionalParams + options?: BudgetsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(scope, options); return { @@ -73,14 +73,14 @@ export class BudgetsImpl implements Budgets { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(scope, options, settings); - } + }, }; } private async *listPagingPage( scope: string, options?: BudgetsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: BudgetsListResponse; let continuationToken = settings?.continuationToken; @@ -102,7 +102,7 @@ export class BudgetsImpl implements Budgets { private async *listPagingAll( scope: string, - options?: BudgetsListOptionalParams + options?: BudgetsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(scope, options)) { yield* page; @@ -122,18 +122,12 @@ export class BudgetsImpl implements Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param options The options parameters. */ - private _list( - scope: string, - options?: BudgetsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); + private _list(scope: string, options?: BudgetsListOptionalParams): Promise { + return this.client.sendOperationRequest({ scope, options }, listOperationSpec); } /** @@ -149,7 +143,7 @@ export class BudgetsImpl implements Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param budgetName Budget Name. * @param options The options parameters. @@ -157,12 +151,9 @@ export class BudgetsImpl implements Budgets { get( scope: string, budgetName: string, - options?: BudgetsGetOptionalParams + options?: BudgetsGetOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, budgetName, options }, - getOperationSpec - ); + return this.client.sendOperationRequest({ scope, budgetName, options }, getOperationSpec); } /** @@ -180,7 +171,7 @@ export class BudgetsImpl implements Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. @@ -190,11 +181,11 @@ export class BudgetsImpl implements Budgets { scope: string, budgetName: string, parameters: Budget, - options?: BudgetsCreateOrUpdateOptionalParams + options?: BudgetsCreateOrUpdateOptionalParams, ): Promise { return this.client.sendOperationRequest( { scope, budgetName, parameters, options }, - createOrUpdateOperationSpec + createOrUpdateOperationSpec, ); } @@ -211,20 +202,13 @@ export class BudgetsImpl implements Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param budgetName Budget Name. * @param options The options parameters. */ - delete( - scope: string, - budgetName: string, - options?: BudgetsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, budgetName, options }, - deleteOperationSpec - ); + delete(scope: string, budgetName: string, options?: BudgetsDeleteOptionalParams): Promise { + return this.client.sendOperationRequest({ scope, budgetName, options }, deleteOperationSpec); } /** @@ -240,7 +224,7 @@ export class BudgetsImpl implements Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -248,12 +232,9 @@ export class BudgetsImpl implements Budgets { private _listNext( scope: string, nextLink: string, - options?: BudgetsListNextOptionalParams + options?: BudgetsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -264,53 +245,53 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.BudgetsListResult + bodyMapper: Mappers.BudgetsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.scope], headerParameters: [Parameters.accept], - serializer + serializer, }; const getOperationSpec: coreClient.OperationSpec = { path: "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Budget + bodyMapper: Mappers.Budget, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName], headerParameters: [Parameters.accept], - serializer + serializer, }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.Budget + bodyMapper: Mappers.Budget, }, 201: { - bodyMapper: Mappers.Budget + bodyMapper: Mappers.Budget, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", - serializer + serializer, }; const deleteOperationSpec: coreClient.OperationSpec = { path: "/{scope}/providers/Microsoft.Consumption/budgets/{budgetName}", @@ -318,26 +299,26 @@ const deleteOperationSpec: coreClient.OperationSpec = { responses: { 200: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.scope, Parameters.budgetName], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.BudgetsListResult + bodyMapper: Mappers.BudgetsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/charges.ts b/sdk/consumption/arm-consumption/src/operations/charges.ts index d1082111e12d..a76571cd8c67 100644 --- a/sdk/consumption/arm-consumption/src/operations/charges.ts +++ b/sdk/consumption/arm-consumption/src/operations/charges.ts @@ -39,20 +39,14 @@ export class ChargesImpl implements Charges { * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param options The options parameters. */ - list( - scope: string, - options?: ChargesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); + list(scope: string, options?: ChargesListOptionalParams): Promise { + return this.client.sendOperationRequest({ scope, options }, listOperationSpec); } } // Operation Specifications @@ -63,20 +57,20 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ChargesListResult + bodyMapper: Mappers.ChargesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ - Parameters.filter, Parameters.apiVersion, + Parameters.filter, Parameters.startDate, Parameters.endDate, - Parameters.apply + Parameters.apply, ], urlParameters: [Parameters.$host, Parameters.scope], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/credits.ts b/sdk/consumption/arm-consumption/src/operations/credits.ts index 4d0254b354c2..2d8e3f09aa2d 100644 --- a/sdk/consumption/arm-consumption/src/operations/credits.ts +++ b/sdk/consumption/arm-consumption/src/operations/credits.ts @@ -34,11 +34,11 @@ export class CreditsImpl implements Credits { get( billingAccountId: string, billingProfileId: string, - options?: CreditsGetOptionalParams + options?: CreditsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, options }, - getOperationSpec + getOperationSpec, ); } } @@ -46,24 +46,19 @@ export class CreditsImpl implements Credits { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/credits/balanceSummary", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.CreditSummary + bodyMapper: Mappers.CreditSummary, }, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.billingProfileId], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts index 575bdf105642..5ed4b5d7626d 100644 --- a/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operations/eventsOperations.ts @@ -22,7 +22,7 @@ import { EventsListByBillingAccountOptionalParams, EventsListByBillingAccountResponse, EventsListByBillingProfileNextResponse, - EventsListByBillingAccountNextResponse + EventsListByBillingAccountNextResponse, } from "../models/index.js"; /// @@ -52,14 +52,14 @@ export class EventsOperationsImpl implements EventsOperations { billingProfileId: string, startDate: string, endDate: string, - options?: EventsListByBillingProfileOptionalParams + options?: EventsListByBillingProfileOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByBillingProfilePagingAll( billingAccountId, billingProfileId, startDate, endDate, - options + options, ); return { next() { @@ -78,9 +78,9 @@ export class EventsOperationsImpl implements EventsOperations { startDate, endDate, options, - settings + settings, ); - } + }, }; } @@ -90,7 +90,7 @@ export class EventsOperationsImpl implements EventsOperations { startDate: string, endDate: string, options?: EventsListByBillingProfileOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: EventsListByBillingProfileResponse; let continuationToken = settings?.continuationToken; @@ -100,7 +100,7 @@ export class EventsOperationsImpl implements EventsOperations { billingProfileId, startDate, endDate, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -112,7 +112,7 @@ export class EventsOperationsImpl implements EventsOperations { billingAccountId, billingProfileId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -126,14 +126,14 @@ export class EventsOperationsImpl implements EventsOperations { billingProfileId: string, startDate: string, endDate: string, - options?: EventsListByBillingProfileOptionalParams + options?: EventsListByBillingProfileOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByBillingProfilePagingPage( billingAccountId, billingProfileId, startDate, endDate, - options + options, )) { yield* page; } @@ -147,7 +147,7 @@ export class EventsOperationsImpl implements EventsOperations { */ public listByBillingAccount( billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams + options?: EventsListByBillingAccountOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByBillingAccountPagingAll(billingAccountId, options); return { @@ -161,19 +161,15 @@ export class EventsOperationsImpl implements EventsOperations { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByBillingAccountPagingPage( - billingAccountId, - options, - settings - ); - } + return this.listByBillingAccountPagingPage(billingAccountId, options, settings); + }, }; } private async *listByBillingAccountPagingPage( billingAccountId: string, options?: EventsListByBillingAccountOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: EventsListByBillingAccountResponse; let continuationToken = settings?.continuationToken; @@ -185,11 +181,7 @@ export class EventsOperationsImpl implements EventsOperations { yield page; } while (continuationToken) { - result = await this._listByBillingAccountNext( - billingAccountId, - continuationToken, - options - ); + result = await this._listByBillingAccountNext(billingAccountId, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -199,12 +191,9 @@ export class EventsOperationsImpl implements EventsOperations { private async *listByBillingAccountPagingAll( billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams + options?: EventsListByBillingAccountOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByBillingAccountPagingPage( - billingAccountId, - options - )) { + for await (const page of this.listByBillingAccountPagingPage(billingAccountId, options)) { yield* page; } } @@ -223,11 +212,11 @@ export class EventsOperationsImpl implements EventsOperations { billingProfileId: string, startDate: string, endDate: string, - options?: EventsListByBillingProfileOptionalParams + options?: EventsListByBillingProfileOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, startDate, endDate, options }, - listByBillingProfileOperationSpec + listByBillingProfileOperationSpec, ); } @@ -239,11 +228,11 @@ export class EventsOperationsImpl implements EventsOperations { */ private _listByBillingAccount( billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams + options?: EventsListByBillingAccountOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, options }, - listByBillingAccountOperationSpec + listByBillingAccountOperationSpec, ); } @@ -258,11 +247,11 @@ export class EventsOperationsImpl implements EventsOperations { billingAccountId: string, billingProfileId: string, nextLink: string, - options?: EventsListByBillingProfileNextOptionalParams + options?: EventsListByBillingProfileNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, nextLink, options }, - listByBillingProfileNextOperationSpec + listByBillingProfileNextOperationSpec, ); } @@ -275,11 +264,11 @@ export class EventsOperationsImpl implements EventsOperations { private _listByBillingAccountNext( billingAccountId: string, nextLink: string, - options?: EventsListByBillingAccountNextOptionalParams + options?: EventsListByBillingAccountNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, nextLink, options }, - listByBillingAccountNextOperationSpec + listByBillingAccountNextOperationSpec, ); } } @@ -287,83 +276,69 @@ export class EventsOperationsImpl implements EventsOperations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByBillingProfileOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/events", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Events + bodyMapper: Mappers.Events, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.apiVersion, - Parameters.startDate1, - Parameters.endDate1 - ], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], + queryParameters: [Parameters.apiVersion, Parameters.startDate1, Parameters.endDate1], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.billingProfileId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/events", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Events + bodyMapper: Mappers.Events, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [Parameters.$host, Parameters.billingAccountId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Events + bodyMapper: Mappers.Events, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, - Parameters.nextLink, Parameters.billingAccountId, - Parameters.billingProfileId + Parameters.nextLink, + Parameters.billingProfileId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Events + bodyMapper: Mappers.Events, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId - ], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/index.ts b/sdk/consumption/arm-consumption/src/operations/index.ts index b1a6c56e130b..a8d413211227 100644 --- a/sdk/consumption/arm-consumption/src/operations/index.ts +++ b/sdk/consumption/arm-consumption/src/operations/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./priceSheet.js"; export * from "./usageDetails.js"; export * from "./marketplaces.js"; export * from "./budgets.js"; @@ -17,7 +18,6 @@ export * from "./reservationsDetails.js"; export * from "./reservationRecommendations.js"; export * from "./reservationRecommendationDetails.js"; export * from "./reservationTransactions.js"; -export * from "./priceSheet.js"; export * from "./operations.js"; export * from "./aggregatedCost.js"; export * from "./eventsOperations.js"; diff --git a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts index 773414edaf42..abbbb818f0ca 100644 --- a/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operations/lotsOperations.ts @@ -21,8 +21,12 @@ import { LotsListByBillingAccountNextOptionalParams, LotsListByBillingAccountOptionalParams, LotsListByBillingAccountResponse, + LotsListByCustomerNextOptionalParams, + LotsListByCustomerOptionalParams, + LotsListByCustomerResponse, LotsListByBillingProfileNextResponse, - LotsListByBillingAccountNextResponse + LotsListByBillingAccountNextResponse, + LotsListByCustomerNextResponse, } from "../models/index.js"; /// @@ -39,9 +43,8 @@ export class LotsOperationsImpl implements LotsOperations { } /** - * 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. + * Lists all Azure credits for a billing account or a billing profile. The API is only supported for + * Microsoft Customer Agreements (MCA) billing accounts. * @param billingAccountId BillingAccount ID * @param billingProfileId Azure Billing Profile ID. * @param options The options parameters. @@ -49,13 +52,9 @@ export class LotsOperationsImpl implements LotsOperations { public listByBillingProfile( billingAccountId: string, billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams + options?: LotsListByBillingProfileOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByBillingProfilePagingAll( - billingAccountId, - billingProfileId, - options - ); + const iter = this.listByBillingProfilePagingAll(billingAccountId, billingProfileId, options); return { next() { return iter.next(); @@ -71,9 +70,9 @@ export class LotsOperationsImpl implements LotsOperations { billingAccountId, billingProfileId, options, - settings + settings, ); - } + }, }; } @@ -81,16 +80,12 @@ export class LotsOperationsImpl implements LotsOperations { billingAccountId: string, billingProfileId: string, options?: LotsListByBillingProfileOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: LotsListByBillingProfileResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByBillingProfile( - billingAccountId, - billingProfileId, - options - ); + result = await this._listByBillingProfile(billingAccountId, billingProfileId, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -101,7 +96,7 @@ export class LotsOperationsImpl implements LotsOperations { billingAccountId, billingProfileId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -113,27 +108,26 @@ export class LotsOperationsImpl implements LotsOperations { private async *listByBillingProfilePagingAll( billingAccountId: string, billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams + options?: LotsListByBillingProfileOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByBillingProfilePagingPage( billingAccountId, billingProfileId, - options + options, )) { yield* page; } } /** - * 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. + * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported + * for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts. * @param billingAccountId BillingAccount ID * @param options The options parameters. */ public listByBillingAccount( billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams + options?: LotsListByBillingAccountOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByBillingAccountPagingAll(billingAccountId, options); return { @@ -147,19 +141,15 @@ export class LotsOperationsImpl implements LotsOperations { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByBillingAccountPagingPage( - billingAccountId, - options, - settings - ); - } + return this.listByBillingAccountPagingPage(billingAccountId, options, settings); + }, }; } private async *listByBillingAccountPagingPage( billingAccountId: string, options?: LotsListByBillingAccountOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: LotsListByBillingAccountResponse; let continuationToken = settings?.continuationToken; @@ -171,10 +161,73 @@ export class LotsOperationsImpl implements LotsOperations { yield page; } while (continuationToken) { - result = await this._listByBillingAccountNext( + result = await this._listByBillingAccountNext(billingAccountId, continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByBillingAccountPagingAll( + billingAccountId: string, + options?: LotsListByBillingAccountOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByBillingAccountPagingPage(billingAccountId, options)) { + yield* page; + } + } + + /** + * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements + * (MPA) billing accounts. + * @param billingAccountId BillingAccount ID + * @param customerId Customer ID + * @param options The options parameters. + */ + public listByCustomer( + billingAccountId: string, + customerId: string, + options?: LotsListByCustomerOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByCustomerPagingAll(billingAccountId, customerId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByCustomerPagingPage(billingAccountId, customerId, options, settings); + }, + }; + } + + private async *listByCustomerPagingPage( + billingAccountId: string, + customerId: string, + options?: LotsListByCustomerOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: LotsListByCustomerResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByCustomer(billingAccountId, customerId, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByCustomerNext( billingAccountId, + customerId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -183,22 +236,19 @@ export class LotsOperationsImpl implements LotsOperations { } } - private async *listByBillingAccountPagingAll( + private async *listByCustomerPagingAll( billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams + customerId: string, + options?: LotsListByCustomerOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listByBillingAccountPagingPage( - billingAccountId, - options - )) { + for await (const page of this.listByCustomerPagingPage(billingAccountId, customerId, options)) { yield* page; } } /** - * 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. + * Lists all Azure credits for a billing account or a billing profile. The API is only supported for + * Microsoft Customer Agreements (MCA) billing accounts. * @param billingAccountId BillingAccount ID * @param billingProfileId Azure Billing Profile ID. * @param options The options parameters. @@ -206,28 +256,45 @@ export class LotsOperationsImpl implements LotsOperations { private _listByBillingProfile( billingAccountId: string, billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams + options?: LotsListByBillingProfileOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, options }, - listByBillingProfileOperationSpec + listByBillingProfileOperationSpec, ); } /** - * 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. + * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported + * for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts. * @param billingAccountId BillingAccount ID * @param options The options parameters. */ private _listByBillingAccount( billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams + options?: LotsListByBillingAccountOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, options }, - listByBillingAccountOperationSpec + listByBillingAccountOperationSpec, + ); + } + + /** + * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements + * (MPA) billing accounts. + * @param billingAccountId BillingAccount ID + * @param customerId Customer ID + * @param options The options parameters. + */ + private _listByCustomer( + billingAccountId: string, + customerId: string, + options?: LotsListByCustomerOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { billingAccountId, customerId, options }, + listByCustomerOperationSpec, ); } @@ -242,11 +309,11 @@ export class LotsOperationsImpl implements LotsOperations { billingAccountId: string, billingProfileId: string, nextLink: string, - options?: LotsListByBillingProfileNextOptionalParams + options?: LotsListByBillingProfileNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, nextLink, options }, - listByBillingProfileNextOperationSpec + listByBillingProfileNextOperationSpec, ); } @@ -259,11 +326,30 @@ export class LotsOperationsImpl implements LotsOperations { private _listByBillingAccountNext( billingAccountId: string, nextLink: string, - options?: LotsListByBillingAccountNextOptionalParams + options?: LotsListByBillingAccountNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, nextLink, options }, - listByBillingAccountNextOperationSpec + listByBillingAccountNextOperationSpec, + ); + } + + /** + * ListByCustomerNext + * @param billingAccountId BillingAccount ID + * @param customerId Customer ID + * @param nextLink The nextLink from the previous successful call to the ListByCustomer method. + * @param options The options parameters. + */ + private _listByCustomerNext( + billingAccountId: string, + customerId: string, + nextLink: string, + options?: LotsListByCustomerNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { billingAccountId, customerId, nextLink, options }, + listByCustomerNextOperationSpec, ); } } @@ -271,79 +357,105 @@ export class LotsOperationsImpl implements LotsOperations { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByBillingProfileOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/lots", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Lots + bodyMapper: Mappers.Lots, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.billingProfileId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingAccountOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/lots", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Lots + bodyMapper: Mappers.Lots, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [Parameters.$host, Parameters.billingAccountId], headerParameters: [Parameters.accept], - serializer + serializer, +}; +const listByCustomerOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}/providers/Microsoft.Consumption/lots", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Lots, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.customerId], + headerParameters: [Parameters.accept], + serializer, }; const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Lots + bodyMapper: Mappers.Lots, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, - Parameters.nextLink, Parameters.billingAccountId, - Parameters.billingProfileId + Parameters.nextLink, + Parameters.billingProfileId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingAccountNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.Lots + bodyMapper: Mappers.Lots, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.nextLink], + headerParameters: [Parameters.accept], + serializer, +}; +const listByCustomerNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Lots, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, + Parameters.billingAccountId, Parameters.nextLink, - Parameters.billingAccountId + Parameters.customerId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts index 1229befc616c..dc0ca890bbfc 100644 --- a/sdk/consumption/arm-consumption/src/operations/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operations/marketplaces.ts @@ -18,7 +18,7 @@ import { MarketplacesListNextOptionalParams, MarketplacesListOptionalParams, MarketplacesListResponse, - MarketplacesListNextResponse + MarketplacesListNextResponse, } from "../models/index.js"; /// @@ -52,7 +52,7 @@ export class MarketplacesImpl implements Marketplaces { */ public list( scope: string, - options?: MarketplacesListOptionalParams + options?: MarketplacesListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(scope, options); return { @@ -67,14 +67,14 @@ export class MarketplacesImpl implements Marketplaces { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(scope, options, settings); - } + }, }; } private async *listPagingPage( scope: string, options?: MarketplacesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: MarketplacesListResponse; let continuationToken = settings?.continuationToken; @@ -96,7 +96,7 @@ export class MarketplacesImpl implements Marketplaces { private async *listPagingAll( scope: string, - options?: MarketplacesListOptionalParams + options?: MarketplacesListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(scope, options)) { yield* page; @@ -121,12 +121,9 @@ export class MarketplacesImpl implements Marketplaces { */ private _list( scope: string, - options?: MarketplacesListOptionalParams + options?: MarketplacesListOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); + return this.client.sendOperationRequest({ scope, options }, listOperationSpec); } /** @@ -148,12 +145,9 @@ export class MarketplacesImpl implements Marketplaces { private _listNext( scope: string, nextLink: string, - options?: MarketplacesListNextOptionalParams + options?: MarketplacesListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -164,34 +158,31 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MarketplacesListResult + bodyMapper: Mappers.MarketplacesListResult, }, + 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.filter, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion - ], + queryParameters: [Parameters.apiVersion, Parameters.skiptoken, Parameters.top, Parameters.filter], urlParameters: [Parameters.$host, Parameters.scope], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.MarketplacesListResult + bodyMapper: Mappers.MarketplacesListResult, }, + 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/operations.ts b/sdk/consumption/arm-consumption/src/operations/operations.ts index 014e249bcb4b..e0bbb26ec4fb 100644 --- a/sdk/consumption/arm-consumption/src/operations/operations.ts +++ b/sdk/consumption/arm-consumption/src/operations/operations.ts @@ -18,7 +18,7 @@ import { OperationsListNextOptionalParams, OperationsListOptionalParams, OperationsListResponse, - OperationsListNextResponse + OperationsListNextResponse, } from "../models/index.js"; /// @@ -38,9 +38,7 @@ export class OperationsImpl implements Operations { * Lists all of the available consumption REST API operations. * @param options The options parameters. */ - public list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator { + public list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { next() { @@ -54,13 +52,13 @@ export class OperationsImpl implements Operations { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(options, settings); - } + }, }; } private async *listPagingPage( options?: OperationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: OperationsListResponse; let continuationToken = settings?.continuationToken; @@ -81,7 +79,7 @@ export class OperationsImpl implements Operations { } private async *listPagingAll( - options?: OperationsListOptionalParams + options?: OperationsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -92,9 +90,7 @@ export class OperationsImpl implements Operations { * Lists all of the available consumption REST API operations. * @param options The options parameters. */ - private _list( - options?: OperationsListOptionalParams - ): Promise { + private _list(options?: OperationsListOptionalParams): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -105,12 +101,9 @@ export class OperationsImpl implements Operations { */ private _listNext( nextLink: string, - options?: OperationsListNextOptionalParams + options?: OperationsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -121,29 +114,29 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.OperationListResult + bodyMapper: Mappers.OperationListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts index 4bee1bd0071b..6c541454d561 100644 --- a/sdk/consumption/arm-consumption/src/operations/priceSheet.ts +++ b/sdk/consumption/arm-consumption/src/operations/priceSheet.ts @@ -11,11 +11,15 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { ConsumptionManagementClient } from "../consumptionManagementClient.js"; +import { SimplePollerLike, OperationState, createHttpPoller } from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl.js"; import { + PriceSheetDownloadByBillingAccountPeriodOptionalParams, + PriceSheetDownloadByBillingAccountPeriodResponse, PriceSheetGetOptionalParams, PriceSheetGetResponse, PriceSheetGetByBillingPeriodOptionalParams, - PriceSheetGetByBillingPeriodResponse + PriceSheetGetByBillingPeriodResponse, } from "../models/index.js"; /** Class containing PriceSheet operations. */ @@ -30,6 +34,95 @@ export class PriceSheetImpl implements PriceSheet { this.client = client; } + /** + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id + * @param billingAccountId BillingAccount ID + * @param billingPeriodName Billing Period Name. + * @param options The options parameters. + */ + async beginDownloadByBillingAccountPeriod( + billingAccountId: string, + billingPeriodName: string, + options?: PriceSheetDownloadByBillingAccountPeriodOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PriceSheetDownloadByBillingAccountPeriodResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { billingAccountId, billingPeriodName, options }, + spec: downloadByBillingAccountPeriodOperationSpec, + }); + const poller = await createHttpPoller< + PriceSheetDownloadByBillingAccountPeriodResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id + * @param billingAccountId BillingAccount ID + * @param billingPeriodName Billing Period Name. + * @param options The options parameters. + */ + async beginDownloadByBillingAccountPeriodAndWait( + billingAccountId: string, + billingPeriodName: string, + options?: PriceSheetDownloadByBillingAccountPeriodOptionalParams, + ): Promise { + const poller = await this.beginDownloadByBillingAccountPeriod( + billingAccountId, + billingPeriodName, + options, + ); + return poller.pollUntilDone(); + } + /** * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 * or later. @@ -47,62 +140,71 @@ export class PriceSheetImpl implements PriceSheet { */ getByBillingPeriod( billingPeriodName: string, - options?: PriceSheetGetByBillingPeriodOptionalParams + options?: PriceSheetGetByBillingPeriodOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingPeriodName, options }, - getByBillingPeriodOperationSpec + getByBillingPeriodOperationSpec, ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const downloadByBillingAccountPeriodOperationSpec: coreClient.OperationSpec = { + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/download", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.OperationStatus, + }, + 201: { + bodyMapper: Mappers.OperationStatus, + }, + 202: { + bodyMapper: Mappers.OperationStatus, + }, + 204: { + bodyMapper: Mappers.OperationStatus, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.billingPeriodName], + headerParameters: [Parameters.accept], + serializer, +}; const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PriceSheetResult + bodyMapper: Mappers.PriceSheetResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.expand, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion - ], + queryParameters: [Parameters.apiVersion, Parameters.expand, Parameters.skiptoken, Parameters.top], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], - serializer + serializer, }; const getByBillingPeriodOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default", + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/pricesheets/default", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.PriceSheetResult + bodyMapper: Mappers.PriceSheetResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [ - Parameters.expand, - Parameters.skiptoken, - Parameters.top, - Parameters.apiVersion - ], - urlParameters: [ - Parameters.$host, - Parameters.billingPeriodName, - Parameters.subscriptionId - ], + queryParameters: [Parameters.apiVersion, Parameters.expand, Parameters.skiptoken, Parameters.top], + urlParameters: [Parameters.$host, Parameters.subscriptionId, Parameters.billingPeriodName1], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts index 475964b18338..81a269fdfa82 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendationDetails.ts @@ -12,15 +12,15 @@ import * as Mappers from "../models/mappers.js"; import * as Parameters from "../models/parameters.js"; import { ConsumptionManagementClient } from "../consumptionManagementClient.js"; import { + Scope, Term, LookBackPeriod, ReservationRecommendationDetailsGetOptionalParams, - ReservationRecommendationDetailsGetResponse + ReservationRecommendationDetailsGetResponse, } from "../models/index.js"; /** Class containing ReservationRecommendationDetails operations. */ -export class ReservationRecommendationDetailsImpl - implements ReservationRecommendationDetails { +export class ReservationRecommendationDetailsImpl implements ReservationRecommendationDetails { private readonly client: ConsumptionManagementClient; /** @@ -33,12 +33,13 @@ export class ReservationRecommendationDetailsImpl /** * Details of a reservation recommendation for what-if analysis of reserved instances. - * @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 resourceScope 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. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -47,16 +48,17 @@ export class ReservationRecommendationDetailsImpl * @param options The options parameters. */ get( - scope: string, + resourceScope: string, + scope: Scope, region: string, term: Term, lookBackPeriod: LookBackPeriod, product: string, - options?: ReservationRecommendationDetailsGetOptionalParams + options?: ReservationRecommendationDetailsGetOptionalParams, ): Promise { return this.client.sendOperationRequest( - { scope, region, term, lookBackPeriod, product, options }, - getOperationSpec + { resourceScope, scope, region, term, lookBackPeriod, product, options }, + getOperationSpec, ); } } @@ -64,26 +66,27 @@ export class ReservationRecommendationDetailsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const getOperationSpec: coreClient.OperationSpec = { - path: - "/{scope}/providers/Microsoft.Consumption/reservationRecommendationDetails", + path: "/{resourceScope}/providers/Microsoft.Consumption/reservationRecommendationDetails", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationRecommendationDetailsModel + bodyMapper: Mappers.ReservationRecommendationDetailsModel, }, 204: {}, default: { - bodyMapper: Mappers.HighCasedErrorResponse - } + bodyMapper: Mappers.HighCasedErrorResponse, + }, }, queryParameters: [ Parameters.apiVersion, + Parameters.filter, + Parameters.scope1, Parameters.region, Parameters.term, Parameters.lookBackPeriod, - Parameters.product + Parameters.product, ], - urlParameters: [Parameters.$host, Parameters.scope], + urlParameters: [Parameters.$host, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts index 95ba41ed1600..44619d6bb0b1 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationRecommendations.ts @@ -18,13 +18,12 @@ import { ReservationRecommendationsListNextOptionalParams, ReservationRecommendationsListOptionalParams, ReservationRecommendationsListResponse, - ReservationRecommendationsListNextResponse + ReservationRecommendationsListNextResponse, } from "../models/index.js"; /// /** Class containing ReservationRecommendations operations. */ -export class ReservationRecommendationsImpl - implements ReservationRecommendations { +export class ReservationRecommendationsImpl implements ReservationRecommendations { private readonly client: ConsumptionManagementClient; /** @@ -37,19 +36,19 @@ export class ReservationRecommendationsImpl /** * List of recommendations for purchasing reserved instances. - * @param scope The scope associated with reservation recommendations 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 resourceScope The scope associated with reservation recommendations 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 options The options parameters. */ public list( - scope: string, - options?: ReservationRecommendationsListOptionalParams + resourceScope: string, + options?: ReservationRecommendationsListOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); + const iter = this.listPagingAll(resourceScope, options); return { next() { return iter.next(); @@ -61,27 +60,27 @@ export class ReservationRecommendationsImpl if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage(scope, options, settings); - } + return this.listPagingPage(resourceScope, options, settings); + }, }; } private async *listPagingPage( - scope: string, + resourceScope: string, options?: ReservationRecommendationsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationRecommendationsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(scope, options); + result = await this._list(resourceScope, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); + result = await this._listNext(resourceScope, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -90,53 +89,50 @@ export class ReservationRecommendationsImpl } private async *listPagingAll( - scope: string, - options?: ReservationRecommendationsListOptionalParams + resourceScope: string, + options?: ReservationRecommendationsListOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { + for await (const page of this.listPagingPage(resourceScope, options)) { yield* page; } } /** * List of recommendations for purchasing reserved instances. - * @param scope The scope associated with reservation recommendations 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 resourceScope The scope associated with reservation recommendations 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 options The options parameters. */ private _list( - scope: string, - options?: ReservationRecommendationsListOptionalParams + resourceScope: string, + options?: ReservationRecommendationsListOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); + return this.client.sendOperationRequest({ resourceScope, options }, listOperationSpec); } /** * ListNext - * @param scope The scope associated with reservation recommendations 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 resourceScope The scope associated with reservation recommendations 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 nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ private _listNext( - scope: string, + resourceScope: string, nextLink: string, - options?: ReservationRecommendationsListNextOptionalParams + options?: ReservationRecommendationsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec + { resourceScope, nextLink, options }, + listNextOperationSpec, ); } } @@ -144,35 +140,35 @@ export class ReservationRecommendationsImpl const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/reservationRecommendations", + path: "/{resourceScope}/providers/Microsoft.Consumption/reservationRecommendations", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationRecommendationsListResult + bodyMapper: Mappers.ReservationRecommendationsListResult, }, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.scope], + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationRecommendationsListResult + bodyMapper: Mappers.ReservationRecommendationsListResult, }, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts b/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts index 04a3ccf9cce6..df504753a7db 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationTransactions.ts @@ -23,7 +23,7 @@ import { ReservationTransactionsListByBillingProfileOptionalParams, ReservationTransactionsListByBillingProfileResponse, ReservationTransactionsListNextResponse, - ReservationTransactionsListByBillingProfileNextResponse + ReservationTransactionsListByBillingProfileNextResponse, } from "../models/index.js"; /// @@ -40,13 +40,18 @@ export class ReservationTransactionsImpl implements ReservationTransactions { } /** - * List of transactions for reserved instances on billing account scope + * List of transactions for reserved instances on billing account scope. Note: The refund transactions + * are posted along with its purchase transaction (i.e. in the purchase billing month). For example, + * The refund is requested in May 2021. This refund transaction will have event date as May 2021 but + * the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size + * limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + * cases, API call should be made with smaller date ranges. * @param billingAccountId BillingAccount ID * @param options The options parameters. */ public list( billingAccountId: string, - options?: ReservationTransactionsListOptionalParams + options?: ReservationTransactionsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(billingAccountId, options); return { @@ -61,14 +66,14 @@ export class ReservationTransactionsImpl implements ReservationTransactions { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(billingAccountId, options, settings); - } + }, }; } private async *listPagingPage( billingAccountId: string, options?: ReservationTransactionsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationTransactionsListResponse; let continuationToken = settings?.continuationToken; @@ -80,11 +85,7 @@ export class ReservationTransactionsImpl implements ReservationTransactions { yield page; } while (continuationToken) { - result = await this._listNext( - billingAccountId, - continuationToken, - options - ); + result = await this._listNext(billingAccountId, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -94,7 +95,7 @@ export class ReservationTransactionsImpl implements ReservationTransactions { private async *listPagingAll( billingAccountId: string, - options?: ReservationTransactionsListOptionalParams + options?: ReservationTransactionsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(billingAccountId, options)) { yield* page; @@ -102,7 +103,12 @@ export class ReservationTransactionsImpl implements ReservationTransactions { } /** - * List of transactions for reserved instances on billing account scope + * List of transactions for reserved instances on billing profile scope. The refund transactions are + * posted along with its purchase transaction (i.e. in the purchase billing month). For example, The + * refund is requested in May 2021. This refund transaction will have event date as May 2021 but the + * billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size + * limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + * cases, API call should be made with smaller date ranges. * @param billingAccountId BillingAccount ID * @param billingProfileId Azure Billing Profile ID. * @param options The options parameters. @@ -110,13 +116,9 @@ export class ReservationTransactionsImpl implements ReservationTransactions { public listByBillingProfile( billingAccountId: string, billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams + options?: ReservationTransactionsListByBillingProfileOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByBillingProfilePagingAll( - billingAccountId, - billingProfileId, - options - ); + const iter = this.listByBillingProfilePagingAll(billingAccountId, billingProfileId, options); return { next() { return iter.next(); @@ -132,9 +134,9 @@ export class ReservationTransactionsImpl implements ReservationTransactions { billingAccountId, billingProfileId, options, - settings + settings, ); - } + }, }; } @@ -142,16 +144,12 @@ export class ReservationTransactionsImpl implements ReservationTransactions { billingAccountId: string, billingProfileId: string, options?: ReservationTransactionsListByBillingProfileOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationTransactionsListByBillingProfileResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByBillingProfile( - billingAccountId, - billingProfileId, - options - ); + result = await this._listByBillingProfile(billingAccountId, billingProfileId, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -162,7 +160,7 @@ export class ReservationTransactionsImpl implements ReservationTransactions { billingAccountId, billingProfileId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -174,34 +172,41 @@ export class ReservationTransactionsImpl implements ReservationTransactions { private async *listByBillingProfilePagingAll( billingAccountId: string, billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams + options?: ReservationTransactionsListByBillingProfileOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByBillingProfilePagingPage( billingAccountId, billingProfileId, - options + options, )) { yield* page; } } /** - * List of transactions for reserved instances on billing account scope + * List of transactions for reserved instances on billing account scope. Note: The refund transactions + * are posted along with its purchase transaction (i.e. in the purchase billing month). For example, + * The refund is requested in May 2021. This refund transaction will have event date as May 2021 but + * the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size + * limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + * cases, API call should be made with smaller date ranges. * @param billingAccountId BillingAccount ID * @param options The options parameters. */ private _list( billingAccountId: string, - options?: ReservationTransactionsListOptionalParams + options?: ReservationTransactionsListOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { billingAccountId, options }, - listOperationSpec - ); + return this.client.sendOperationRequest({ billingAccountId, options }, listOperationSpec); } /** - * List of transactions for reserved instances on billing account scope + * List of transactions for reserved instances on billing profile scope. The refund transactions are + * posted along with its purchase transaction (i.e. in the purchase billing month). For example, The + * refund is requested in May 2021. This refund transaction will have event date as May 2021 but the + * billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size + * limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + * cases, API call should be made with smaller date ranges. * @param billingAccountId BillingAccount ID * @param billingProfileId Azure Billing Profile ID. * @param options The options parameters. @@ -209,11 +214,11 @@ export class ReservationTransactionsImpl implements ReservationTransactions { private _listByBillingProfile( billingAccountId: string, billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams + options?: ReservationTransactionsListByBillingProfileOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, options }, - listByBillingProfileOperationSpec + listByBillingProfileOperationSpec, ); } @@ -226,11 +231,11 @@ export class ReservationTransactionsImpl implements ReservationTransactions { private _listNext( billingAccountId: string, nextLink: string, - options?: ReservationTransactionsListNextOptionalParams + options?: ReservationTransactionsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, nextLink, options }, - listNextOperationSpec + listNextOperationSpec, ); } @@ -245,11 +250,11 @@ export class ReservationTransactionsImpl implements ReservationTransactions { billingAccountId: string, billingProfileId: string, nextLink: string, - options?: ReservationTransactionsListByBillingProfileNextOptionalParams + options?: ReservationTransactionsListByBillingProfileNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { billingAccountId, billingProfileId, nextLink, options }, - listByBillingProfileNextOperationSpec + listByBillingProfileNextOperationSpec, ); } } @@ -257,79 +262,74 @@ export class ReservationTransactionsImpl implements ReservationTransactions { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationTransactionsListResult + bodyMapper: Mappers.ReservationTransactionsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.useMarkupIfPartner, + Parameters.previewMarkupPercentage, + ], urlParameters: [Parameters.$host, Parameters.billingAccountId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingProfileOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions", + path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.Consumption/reservationTransactions", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ModernReservationTransactionsListResult + bodyMapper: Mappers.ModernReservationTransactionsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.billingAccountId, - Parameters.billingProfileId - ], + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.billingProfileId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationTransactionsListResult + bodyMapper: Mappers.ReservationTransactionsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.billingAccountId - ], + urlParameters: [Parameters.$host, Parameters.billingAccountId, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByBillingProfileNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ModernReservationTransactionsListResult + bodyMapper: Mappers.ModernReservationTransactionsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, - Parameters.nextLink, Parameters.billingAccountId, - Parameters.billingProfileId + Parameters.nextLink, + Parameters.billingProfileId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts index 407bcc6f8a3b..52dc159be828 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsDetails.ts @@ -26,7 +26,7 @@ import { ReservationsDetailsListResponse, ReservationsDetailsListByReservationOrderNextResponse, ReservationsDetailsListByReservationOrderAndReservationNextResponse, - ReservationsDetailsListNextResponse + ReservationsDetailsListNextResponse, } from "../models/index.js"; /// @@ -43,7 +43,11 @@ export class ReservationsDetailsImpl implements ReservationsDetails { } /** - * Lists the reservations details for provided date range. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. * @param reservationOrderId Order Id of the reservation * @param filter Filter reservation details by date range. The properties/UsageDate for start date and * end date. The filter supports 'le' and 'ge' @@ -52,13 +56,9 @@ export class ReservationsDetailsImpl implements ReservationsDetails { public listByReservationOrder( reservationOrderId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams + options?: ReservationsDetailsListByReservationOrderOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByReservationOrderPagingAll( - reservationOrderId, - filter, - options - ); + const iter = this.listByReservationOrderPagingAll(reservationOrderId, filter, options); return { next() { return iter.next(); @@ -70,13 +70,8 @@ export class ReservationsDetailsImpl implements ReservationsDetails { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByReservationOrderPagingPage( - reservationOrderId, - filter, - options, - settings - ); - } + return this.listByReservationOrderPagingPage(reservationOrderId, filter, options, settings); + }, }; } @@ -84,16 +79,12 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId: string, filter: string, options?: ReservationsDetailsListByReservationOrderOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationsDetailsListByReservationOrderResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByReservationOrder( - reservationOrderId, - filter, - options - ); + result = await this._listByReservationOrder(reservationOrderId, filter, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -103,7 +94,7 @@ export class ReservationsDetailsImpl implements ReservationsDetails { result = await this._listByReservationOrderNext( reservationOrderId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -115,19 +106,23 @@ export class ReservationsDetailsImpl implements ReservationsDetails { private async *listByReservationOrderPagingAll( reservationOrderId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams + options?: ReservationsDetailsListByReservationOrderOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByReservationOrderPagingPage( reservationOrderId, filter, - options + options, )) { yield* page; } } /** - * Lists the reservations details for provided date range. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. * @param reservationOrderId Order Id of the reservation * @param reservationId Id of the reservation * @param filter Filter reservation details by date range. The properties/UsageDate for start date and @@ -138,13 +133,13 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId: string, reservationId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams + options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByReservationOrderAndReservationPagingAll( reservationOrderId, reservationId, filter, - options + options, ); return { next() { @@ -162,9 +157,9 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationId, filter, options, - settings + settings, ); - } + }, }; } @@ -173,7 +168,7 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationId: string, filter: string, options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationsDetailsListByReservationOrderAndReservationResponse; let continuationToken = settings?.continuationToken; @@ -182,7 +177,7 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId, reservationId, filter, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -194,7 +189,7 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId, reservationId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -207,32 +202,36 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId: string, reservationId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams + options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByReservationOrderAndReservationPagingPage( reservationOrderId, reservationId, filter, - options + options, )) { yield* page; } } /** - * Lists the reservations details for the defined scope and provided date range. - * @param scope The scope associated with reservations details operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. + * @param resourceScope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param options The options parameters. */ public list( - scope: string, - options?: ReservationsDetailsListOptionalParams + resourceScope: string, + options?: ReservationsDetailsListOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, options); + const iter = this.listPagingAll(resourceScope, options); return { next() { return iter.next(); @@ -244,27 +243,27 @@ export class ReservationsDetailsImpl implements ReservationsDetails { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage(scope, options, settings); - } + return this.listPagingPage(resourceScope, options, settings); + }, }; } private async *listPagingPage( - scope: string, + resourceScope: string, options?: ReservationsDetailsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationsDetailsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(scope, options); + result = await this._list(resourceScope, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); + result = await this._listNext(resourceScope, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -273,16 +272,20 @@ export class ReservationsDetailsImpl implements ReservationsDetails { } private async *listPagingAll( - scope: string, - options?: ReservationsDetailsListOptionalParams + resourceScope: string, + options?: ReservationsDetailsListOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, options)) { + for await (const page of this.listPagingPage(resourceScope, options)) { yield* page; } } /** - * Lists the reservations details for provided date range. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. * @param reservationOrderId Order Id of the reservation * @param filter Filter reservation details by date range. The properties/UsageDate for start date and * end date. The filter supports 'le' and 'ge' @@ -291,16 +294,20 @@ export class ReservationsDetailsImpl implements ReservationsDetails { private _listByReservationOrder( reservationOrderId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams + options?: ReservationsDetailsListByReservationOrderOptionalParams, ): Promise { return this.client.sendOperationRequest( { reservationOrderId, filter, options }, - listByReservationOrderOperationSpec + listByReservationOrderOperationSpec, ); } /** - * Lists the reservations details for provided date range. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. * @param reservationOrderId Order Id of the reservation * @param reservationId Id of the reservation * @param filter Filter reservation details by date range. The properties/UsageDate for start date and @@ -311,31 +318,32 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId: string, reservationId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams + options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams, ): Promise { return this.client.sendOperationRequest( { reservationOrderId, reservationId, filter, options }, - listByReservationOrderAndReservationOperationSpec + listByReservationOrderAndReservationOperationSpec, ); } /** - * Lists the reservations details for the defined scope and provided date range. - * @param scope The scope associated with reservations details operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. + * @param resourceScope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param options The options parameters. */ private _list( - scope: string, - options?: ReservationsDetailsListOptionalParams + resourceScope: string, + options?: ReservationsDetailsListOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); + return this.client.sendOperationRequest({ resourceScope, options }, listOperationSpec); } /** @@ -347,11 +355,11 @@ export class ReservationsDetailsImpl implements ReservationsDetails { private _listByReservationOrderNext( reservationOrderId: string, nextLink: string, - options?: ReservationsDetailsListByReservationOrderNextOptionalParams + options?: ReservationsDetailsListByReservationOrderNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { reservationOrderId, nextLink, options }, - listByReservationOrderNextOperationSpec + listByReservationOrderNextOperationSpec, ); } @@ -367,34 +375,32 @@ export class ReservationsDetailsImpl implements ReservationsDetails { reservationOrderId: string, reservationId: string, nextLink: string, - options?: ReservationsDetailsListByReservationOrderAndReservationNextOptionalParams - ): Promise< - ReservationsDetailsListByReservationOrderAndReservationNextResponse - > { + options?: ReservationsDetailsListByReservationOrderAndReservationNextOptionalParams, + ): Promise { return this.client.sendOperationRequest( { reservationOrderId, reservationId, nextLink, options }, - listByReservationOrderAndReservationNextOperationSpec + listByReservationOrderAndReservationNextOperationSpec, ); } /** * ListNext - * @param scope The scope associated with reservations details operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * @param resourceScope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ private _listNext( - scope: string, + resourceScope: string, nextLink: string, - options?: ReservationsDetailsListNextOptionalParams + options?: ReservationsDetailsListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec + { resourceScope, nextLink, options }, + listNextOperationSpec, ); } } @@ -402,117 +408,107 @@ export class ReservationsDetailsImpl implements ReservationsDetails { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByReservationOrderOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails", + path: "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationDetails", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationDetailsListResult + bodyMapper: Mappers.ReservationDetailsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.filter1], urlParameters: [Parameters.$host, Parameters.reservationOrderId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByReservationOrderAndReservationOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails", + path: "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationDetails", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationDetailsListResult + bodyMapper: Mappers.ReservationDetailsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion, Parameters.filter1], - urlParameters: [ - Parameters.$host, - Parameters.reservationOrderId, - Parameters.reservationId - ], + urlParameters: [Parameters.$host, Parameters.reservationOrderId, Parameters.reservationId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/reservationDetails", + path: "/{resourceScope}/providers/Microsoft.Consumption/reservationDetails", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationDetailsListResult + bodyMapper: Mappers.ReservationDetailsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ - Parameters.filter, Parameters.apiVersion, + Parameters.filter, Parameters.startDate, Parameters.endDate, Parameters.reservationId1, - Parameters.reservationOrderId1 + Parameters.reservationOrderId1, ], - urlParameters: [Parameters.$host, Parameters.scope], + urlParameters: [Parameters.$host, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByReservationOrderNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationDetailsListResult + bodyMapper: Mappers.ReservationDetailsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.reservationOrderId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.reservationOrderId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByReservationOrderAndReservationNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationDetailsListResult + bodyMapper: Mappers.ReservationDetailsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.reservationOrderId, - Parameters.reservationId + Parameters.reservationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationDetailsListResult + bodyMapper: Mappers.ReservationDetailsListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts index 79386bb8fa69..ee4fa0ec45cb 100644 --- a/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts +++ b/sdk/consumption/arm-consumption/src/operations/reservationsSummaries.ts @@ -27,7 +27,7 @@ import { ReservationsSummariesListResponse, ReservationsSummariesListByReservationOrderNextResponse, ReservationsSummariesListByReservationOrderAndReservationNextResponse, - ReservationsSummariesListNextResponse + ReservationsSummariesListNextResponse, } from "../models/index.js"; /// @@ -44,7 +44,9 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { } /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of + * 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API + * call should be made with smaller date ranges. * @param reservationOrderId Order Id of the reservation * @param grain Can be daily or monthly * @param options The options parameters. @@ -52,13 +54,9 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { public listByReservationOrder( reservationOrderId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams + options?: ReservationsSummariesListByReservationOrderOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listByReservationOrderPagingAll( - reservationOrderId, - grain, - options - ); + const iter = this.listByReservationOrderPagingAll(reservationOrderId, grain, options); return { next() { return iter.next(); @@ -70,13 +68,8 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByReservationOrderPagingPage( - reservationOrderId, - grain, - options, - settings - ); - } + return this.listByReservationOrderPagingPage(reservationOrderId, grain, options, settings); + }, }; } @@ -84,16 +77,12 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId: string, grain: Datagrain, options?: ReservationsSummariesListByReservationOrderOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationsSummariesListByReservationOrderResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByReservationOrder( - reservationOrderId, - grain, - options - ); + result = await this._listByReservationOrder(reservationOrderId, grain, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); @@ -103,7 +92,7 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { result = await this._listByReservationOrderNext( reservationOrderId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -115,19 +104,21 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { private async *listByReservationOrderPagingAll( reservationOrderId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams + options?: ReservationsSummariesListByReservationOrderOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByReservationOrderPagingPage( reservationOrderId, grain, - options + options, )) { yield* page; } } /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of + * 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API + * call should be made with smaller date ranges. * @param reservationOrderId Order Id of the reservation * @param reservationId Id of the reservation * @param grain Can be daily or monthly @@ -137,13 +128,13 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId: string, reservationId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams + options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listByReservationOrderAndReservationPagingAll( reservationOrderId, reservationId, grain, - options + options, ); return { next() { @@ -161,9 +152,9 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationId, grain, options, - settings + settings, ); - } + }, }; } @@ -172,7 +163,7 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationId: string, grain: Datagrain, options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationsSummariesListByReservationOrderAndReservationResponse; let continuationToken = settings?.continuationToken; @@ -181,7 +172,7 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId, reservationId, grain, - options + options, ); let page = result.value || []; continuationToken = result.nextLink; @@ -193,7 +184,7 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId, reservationId, continuationToken, - options + options, ); continuationToken = result.nextLink; let page = result.value || []; @@ -206,34 +197,36 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId: string, reservationId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams + options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams, ): AsyncIterableIterator { for await (const page of this.listByReservationOrderAndReservationPagingPage( reservationOrderId, reservationId, grain, - options + options, )) { yield* page; } } /** - * Lists the reservations summaries for the defined scope daily or monthly grain. - * @param scope The scope associated with reservations summaries operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a + * payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM + * limit. In such cases, API call should be made with smaller date ranges. + * @param resourceScope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param grain Can be daily or monthly * @param options The options parameters. */ public list( - scope: string, + resourceScope: string, grain: Datagrain, - options?: ReservationsSummariesListOptionalParams + options?: ReservationsSummariesListOptionalParams, ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(scope, grain, options); + const iter = this.listPagingAll(resourceScope, grain, options); return { next() { return iter.next(); @@ -245,28 +238,28 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage(scope, grain, options, settings); - } + return this.listPagingPage(resourceScope, grain, options, settings); + }, }; } private async *listPagingPage( - scope: string, + resourceScope: string, grain: Datagrain, options?: ReservationsSummariesListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: ReservationsSummariesListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(scope, grain, options); + result = await this._list(resourceScope, grain, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext(scope, continuationToken, options); + result = await this._listNext(resourceScope, continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -275,17 +268,19 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { } private async *listPagingAll( - scope: string, + resourceScope: string, grain: Datagrain, - options?: ReservationsSummariesListOptionalParams + options?: ReservationsSummariesListOptionalParams, ): AsyncIterableIterator { - for await (const page of this.listPagingPage(scope, grain, options)) { + for await (const page of this.listPagingPage(resourceScope, grain, options)) { yield* page; } } /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of + * 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API + * call should be made with smaller date ranges. * @param reservationOrderId Order Id of the reservation * @param grain Can be daily or monthly * @param options The options parameters. @@ -293,16 +288,18 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { private _listByReservationOrder( reservationOrderId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams + options?: ReservationsSummariesListByReservationOrderOptionalParams, ): Promise { return this.client.sendOperationRequest( { reservationOrderId, grain, options }, - listByReservationOrderOperationSpec + listByReservationOrderOperationSpec, ); } /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of + * 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API + * call should be made with smaller date ranges. * @param reservationOrderId Order Id of the reservation * @param reservationId Id of the reservation * @param grain Can be daily or monthly @@ -312,35 +309,32 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId: string, reservationId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams - ): Promise< - ReservationsSummariesListByReservationOrderAndReservationResponse - > { + options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams, + ): Promise { return this.client.sendOperationRequest( { reservationOrderId, reservationId, grain, options }, - listByReservationOrderAndReservationOperationSpec + listByReservationOrderAndReservationOperationSpec, ); } /** - * Lists the reservations summaries for the defined scope daily or monthly grain. - * @param scope The scope associated with reservations summaries operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a + * payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM + * limit. In such cases, API call should be made with smaller date ranges. + * @param resourceScope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param grain Can be daily or monthly * @param options The options parameters. */ private _list( - scope: string, + resourceScope: string, grain: Datagrain, - options?: ReservationsSummariesListOptionalParams + options?: ReservationsSummariesListOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, grain, options }, - listOperationSpec - ); + return this.client.sendOperationRequest({ resourceScope, grain, options }, listOperationSpec); } /** @@ -352,11 +346,11 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { private _listByReservationOrderNext( reservationOrderId: string, nextLink: string, - options?: ReservationsSummariesListByReservationOrderNextOptionalParams + options?: ReservationsSummariesListByReservationOrderNextOptionalParams, ): Promise { return this.client.sendOperationRequest( { reservationOrderId, nextLink, options }, - listByReservationOrderNextOperationSpec + listByReservationOrderNextOperationSpec, ); } @@ -372,34 +366,32 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { reservationOrderId: string, reservationId: string, nextLink: string, - options?: ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams - ): Promise< - ReservationsSummariesListByReservationOrderAndReservationNextResponse - > { + options?: ReservationsSummariesListByReservationOrderAndReservationNextOptionalParams, + ): Promise { return this.client.sendOperationRequest( { reservationOrderId, reservationId, nextLink, options }, - listByReservationOrderAndReservationNextOperationSpec + listByReservationOrderAndReservationNextOperationSpec, ); } /** * ListNext - * @param scope The scope associated with reservations summaries operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * @param resourceScope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ private _listNext( - scope: string, + resourceScope: string, nextLink: string, - options?: ReservationsSummariesListNextOptionalParams + options?: ReservationsSummariesListNextOptionalParams, ): Promise { return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec + { resourceScope, nextLink, options }, + listNextOperationSpec, ); } } @@ -407,118 +399,108 @@ export class ReservationsSummariesImpl implements ReservationsSummaries { const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); const listByReservationOrderOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries", + path: "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/providers/Microsoft.Consumption/reservationSummaries", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationSummariesListResult + bodyMapper: Mappers.ReservationSummariesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion, Parameters.grain], + queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.grain], urlParameters: [Parameters.$host, Parameters.reservationOrderId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByReservationOrderAndReservationOperationSpec: coreClient.OperationSpec = { - path: - "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries", + path: "/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationSummariesListResult + bodyMapper: Mappers.ReservationSummariesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - queryParameters: [Parameters.filter, Parameters.apiVersion, Parameters.grain], - urlParameters: [ - Parameters.$host, - Parameters.reservationOrderId, - Parameters.reservationId - ], + queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.grain], + urlParameters: [Parameters.$host, Parameters.reservationOrderId, Parameters.reservationId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listOperationSpec: coreClient.OperationSpec = { - path: "/{scope}/providers/Microsoft.Consumption/reservationSummaries", + path: "/{resourceScope}/providers/Microsoft.Consumption/reservationSummaries", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationSummariesListResult + bodyMapper: Mappers.ReservationSummariesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ - Parameters.filter, Parameters.apiVersion, + Parameters.filter, Parameters.startDate, Parameters.endDate, Parameters.grain, Parameters.reservationId1, - Parameters.reservationOrderId1 + Parameters.reservationOrderId1, ], - urlParameters: [Parameters.$host, Parameters.scope], + urlParameters: [Parameters.$host, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByReservationOrderNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationSummariesListResult + bodyMapper: Mappers.ReservationSummariesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [ - Parameters.$host, - Parameters.nextLink, - Parameters.reservationOrderId - ], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.reservationOrderId], headerParameters: [Parameters.accept], - serializer + serializer, }; const listByReservationOrderAndReservationNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationSummariesListResult + bodyMapper: Mappers.ReservationSummariesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [ Parameters.$host, Parameters.nextLink, Parameters.reservationOrderId, - Parameters.reservationId + Parameters.reservationId, ], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ReservationSummariesListResult + bodyMapper: Mappers.ReservationSummariesListResult, }, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, - urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], + urlParameters: [Parameters.$host, Parameters.nextLink, Parameters.resourceScope], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/tags.ts b/sdk/consumption/arm-consumption/src/operations/tags.ts index 5fc7f8cc5d2f..a7af47d25d27 100644 --- a/sdk/consumption/arm-consumption/src/operations/tags.ts +++ b/sdk/consumption/arm-consumption/src/operations/tags.ts @@ -38,14 +38,8 @@ export class TagsImpl implements Tags { * '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope.. * @param options The options parameters. */ - get( - scope: string, - options?: TagsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - getOperationSpec - ); + get(scope: string, options?: TagsGetOptionalParams): Promise { + return this.client.sendOperationRequest({ scope, options }, getOperationSpec); } } // Operation Specifications @@ -56,15 +50,15 @@ const getOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.TagsResult + bodyMapper: Mappers.TagsResult, }, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.scope], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts index 77491effe6eb..61d35d03b09f 100644 --- a/sdk/consumption/arm-consumption/src/operations/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operations/usageDetails.ts @@ -18,7 +18,7 @@ import { UsageDetailsListNextOptionalParams, UsageDetailsListOptionalParams, UsageDetailsListResponse, - UsageDetailsListNextResponse + UsageDetailsListNextResponse, } from "../models/index.js"; /// @@ -37,6 +37,12 @@ export class UsageDetailsImpl implements UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for May * 1, 2014 or later. + * + * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We + * do not recommend that you take a new dependency on this API. Please use the Cost Details API + * instead. We will notify customers once a date for retirement has been determined.For Learn more,see + * [Generate Cost Details Report - Create + * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)** * @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, @@ -52,15 +58,15 @@ export class UsageDetailsImpl implements UsageDetails { * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param options The options parameters. */ public list( scope: string, - options?: UsageDetailsListOptionalParams + options?: UsageDetailsListOptionalParams, ): PagedAsyncIterableIterator { const iter = this.listPagingAll(scope, options); return { @@ -75,14 +81,14 @@ export class UsageDetailsImpl implements UsageDetails { throw new Error("maxPageSize is not supported by this operation."); } return this.listPagingPage(scope, options, settings); - } + }, }; } private async *listPagingPage( scope: string, options?: UsageDetailsListOptionalParams, - settings?: PageSettings + settings?: PageSettings, ): AsyncIterableIterator { let result: UsageDetailsListResponse; let continuationToken = settings?.continuationToken; @@ -104,7 +110,7 @@ export class UsageDetailsImpl implements UsageDetails { private async *listPagingAll( scope: string, - options?: UsageDetailsListOptionalParams + options?: UsageDetailsListOptionalParams, ): AsyncIterableIterator { for await (const page of this.listPagingPage(scope, options)) { yield* page; @@ -114,6 +120,12 @@ export class UsageDetailsImpl implements UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for May * 1, 2014 or later. + * + * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We + * do not recommend that you take a new dependency on this API. Please use the Cost Details API + * instead. We will notify customers once a date for retirement has been determined.For Learn more,see + * [Generate Cost Details Report - Create + * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)** * @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, @@ -129,20 +141,17 @@ export class UsageDetailsImpl implements UsageDetails { * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param options The options parameters. */ private _list( scope: string, - options?: UsageDetailsListOptionalParams + options?: UsageDetailsListOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, options }, - listOperationSpec - ); + return this.client.sendOperationRequest({ scope, options }, listOperationSpec); } /** @@ -162,22 +171,19 @@ export class UsageDetailsImpl implements UsageDetails { * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ private _listNext( scope: string, nextLink: string, - options?: UsageDetailsListNextOptionalParams + options?: UsageDetailsListNextOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { scope, nextLink, options }, - listNextOperationSpec - ); + return this.client.sendOperationRequest({ scope, nextLink, options }, listNextOperationSpec); } } // Operation Specifications @@ -188,36 +194,38 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.UsageDetailsListResult + bodyMapper: Mappers.UsageDetailsListResult, }, + 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, queryParameters: [ + Parameters.apiVersion, Parameters.expand, - Parameters.filter, Parameters.skiptoken, Parameters.top, - Parameters.apiVersion, - Parameters.metric + Parameters.filter, + Parameters.metric, ], urlParameters: [Parameters.$host, Parameters.scope], headerParameters: [Parameters.accept], - serializer + serializer, }; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.UsageDetailsListResult + bodyMapper: Mappers.UsageDetailsListResult, }, + 204: {}, default: { - bodyMapper: Mappers.ErrorResponse - } + bodyMapper: Mappers.ErrorResponse, + }, }, urlParameters: [Parameters.$host, Parameters.scope, Parameters.nextLink], headerParameters: [Parameters.accept], - serializer + serializer, }; diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts index ce8233b7d778..6d883e5ba7ee 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/aggregatedCost.ts @@ -10,7 +10,7 @@ import { AggregatedCostGetByManagementGroupOptionalParams, AggregatedCostGetByManagementGroupResponse, AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams, - AggregatedCostGetForBillingPeriodByManagementGroupResponse + AggregatedCostGetForBillingPeriodByManagementGroupResponse, } from "../models/index.js"; /** Interface representing a AggregatedCost. */ @@ -23,7 +23,7 @@ export interface AggregatedCost { */ getByManagementGroup( managementGroupId: string, - options?: AggregatedCostGetByManagementGroupOptionalParams + options?: AggregatedCostGetByManagementGroupOptionalParams, ): Promise; /** * Provides the aggregate cost of a management group and all child management groups by specified @@ -35,6 +35,6 @@ export interface AggregatedCost { getForBillingPeriodByManagementGroup( managementGroupId: string, billingPeriodName: string, - options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams + options?: AggregatedCostGetForBillingPeriodByManagementGroupOptionalParams, ): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts index 4296af7d91af..130a70818efe 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/balances.ts @@ -10,7 +10,7 @@ import { BalancesGetByBillingAccountOptionalParams, BalancesGetByBillingAccountResponse, BalancesGetForBillingPeriodByBillingAccountOptionalParams, - BalancesGetForBillingPeriodByBillingAccountResponse + BalancesGetForBillingPeriodByBillingAccountResponse, } from "../models/index.js"; /** Interface representing a Balances. */ @@ -23,7 +23,7 @@ export interface Balances { */ getByBillingAccount( billingAccountId: string, - options?: BalancesGetByBillingAccountOptionalParams + options?: BalancesGetByBillingAccountOptionalParams, ): Promise; /** * Gets the balances for a scope by billing period and billingAccountId. Balances are available via @@ -35,6 +35,6 @@ export interface Balances { getForBillingPeriodByBillingAccount( billingAccountId: string, billingPeriodName: string, - options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams + options?: BalancesGetForBillingPeriodByBillingAccountOptionalParams, ): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts index 075913512fb7..99c53fe477ad 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/budgets.ts @@ -14,7 +14,7 @@ import { BudgetsGetResponse, BudgetsCreateOrUpdateOptionalParams, BudgetsCreateOrUpdateResponse, - BudgetsDeleteOptionalParams + BudgetsDeleteOptionalParams, } from "../models/index.js"; /// @@ -33,14 +33,11 @@ export interface Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param options The options parameters. */ - list( - scope: string, - options?: BudgetsListOptionalParams - ): PagedAsyncIterableIterator; + list(scope: string, options?: BudgetsListOptionalParams): PagedAsyncIterableIterator; /** * Gets the budget for the scope by budget name. * @param scope The scope associated with budget operations. This includes @@ -54,7 +51,7 @@ export interface Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param budgetName Budget Name. * @param options The options parameters. @@ -62,7 +59,7 @@ export interface Budgets { get( scope: string, budgetName: string, - options?: BudgetsGetOptionalParams + options?: BudgetsGetOptionalParams, ): Promise; /** * The operation to create or update a budget. You can optionally provide an eTag if desired as a form @@ -79,7 +76,7 @@ export interface Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param budgetName Budget Name. * @param parameters Parameters supplied to the Create Budget operation. @@ -89,7 +86,7 @@ export interface Budgets { scope: string, budgetName: string, parameters: Budget, - options?: BudgetsCreateOrUpdateOptionalParams + options?: BudgetsCreateOrUpdateOptionalParams, ): Promise; /** * The operation to delete a budget. @@ -104,14 +101,10 @@ export interface Budgets { * for Management Group scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope. * @param budgetName Budget Name. * @param options The options parameters. */ - delete( - scope: string, - budgetName: string, - options?: BudgetsDeleteOptionalParams - ): Promise; + delete(scope: string, budgetName: string, options?: BudgetsDeleteOptionalParams): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts index 58ee552903dd..6c25d37834d9 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/charges.ts @@ -24,14 +24,11 @@ export interface Charges { * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param options The options parameters. */ - list( - scope: string, - options?: ChargesListOptionalParams - ): Promise; + list(scope: string, options?: ChargesListOptionalParams): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts index 0ae309ed4cd9..2fbdc407c597 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/credits.ts @@ -19,6 +19,6 @@ export interface Credits { get( billingAccountId: string, billingProfileId: string, - options?: CreditsGetOptionalParams + options?: CreditsGetOptionalParams, ): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts index 403e11ac9e42..7ac449611786 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/eventsOperations.ts @@ -10,7 +10,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { EventSummary, EventsListByBillingProfileOptionalParams, - EventsListByBillingAccountOptionalParams + EventsListByBillingAccountOptionalParams, } from "../models/index.js"; /// @@ -30,7 +30,7 @@ export interface EventsOperations { billingProfileId: string, startDate: string, endDate: string, - options?: EventsListByBillingProfileOptionalParams + options?: EventsListByBillingProfileOptionalParams, ): PagedAsyncIterableIterator; /** * Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a @@ -40,6 +40,6 @@ export interface EventsOperations { */ listByBillingAccount( billingAccountId: string, - options?: EventsListByBillingAccountOptionalParams + options?: EventsListByBillingAccountOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts index b1a6c56e130b..a8d413211227 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/index.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./priceSheet.js"; export * from "./usageDetails.js"; export * from "./marketplaces.js"; export * from "./budgets.js"; @@ -17,7 +18,6 @@ export * from "./reservationsDetails.js"; export * from "./reservationRecommendations.js"; export * from "./reservationRecommendationDetails.js"; export * from "./reservationTransactions.js"; -export * from "./priceSheet.js"; export * from "./operations.js"; export * from "./aggregatedCost.js"; export * from "./eventsOperations.js"; diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts index 0909b6d18ddb..b8148b420c12 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/lotsOperations.ts @@ -10,16 +10,16 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { LotSummary, LotsListByBillingProfileOptionalParams, - LotsListByBillingAccountOptionalParams + LotsListByBillingAccountOptionalParams, + LotsListByCustomerOptionalParams, } from "../models/index.js"; /// /** Interface representing a LotsOperations. */ export interface LotsOperations { /** - * 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. + * Lists all Azure credits for a billing account or a billing profile. The API is only supported for + * Microsoft Customer Agreements (MCA) billing accounts. * @param billingAccountId BillingAccount ID * @param billingProfileId Azure Billing Profile ID. * @param options The options parameters. @@ -27,17 +27,28 @@ export interface LotsOperations { listByBillingProfile( billingAccountId: string, billingProfileId: string, - options?: LotsListByBillingProfileOptionalParams + options?: LotsListByBillingProfileOptionalParams, ): PagedAsyncIterableIterator; /** - * 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. + * Lists all Microsoft Azure consumption commitments for a billing account. The API is only supported + * for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts. * @param billingAccountId BillingAccount ID * @param options The options parameters. */ listByBillingAccount( billingAccountId: string, - options?: LotsListByBillingAccountOptionalParams + options?: LotsListByBillingAccountOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements + * (MPA) billing accounts. + * @param billingAccountId BillingAccount ID + * @param customerId Customer ID + * @param options The options parameters. + */ + listByCustomer( + billingAccountId: string, + customerId: string, + options?: LotsListByCustomerOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts index d3631a4a1a79..15bc15f29061 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/marketplaces.ts @@ -30,6 +30,6 @@ export interface Marketplaces { */ list( scope: string, - options?: MarketplacesListOptionalParams + options?: MarketplacesListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/operations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/operations.ts index c4f7111b8b4a..6a6ba41fc40c 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/operations.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/operations.ts @@ -16,7 +16,5 @@ export interface Operations { * Lists all of the available consumption REST API operations. * @param options The options parameters. */ - list( - options?: OperationsListOptionalParams - ): PagedAsyncIterableIterator; + list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/priceSheet.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/priceSheet.ts index 6bbd0283c5de..217e7d17f2c6 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/priceSheet.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/priceSheet.ts @@ -6,15 +6,45 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { + PriceSheetDownloadByBillingAccountPeriodOptionalParams, + PriceSheetDownloadByBillingAccountPeriodResponse, PriceSheetGetOptionalParams, PriceSheetGetResponse, PriceSheetGetByBillingPeriodOptionalParams, - PriceSheetGetByBillingPeriodResponse + PriceSheetGetByBillingPeriodResponse, } from "../models/index.js"; /** Interface representing a PriceSheet. */ export interface PriceSheet { + /** + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id + * @param billingAccountId BillingAccount ID + * @param billingPeriodName Billing Period Name. + * @param options The options parameters. + */ + beginDownloadByBillingAccountPeriod( + billingAccountId: string, + billingPeriodName: string, + options?: PriceSheetDownloadByBillingAccountPeriodOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + PriceSheetDownloadByBillingAccountPeriodResponse + > + >; + /** + * Generates the pricesheet for the provided billing period asynchronously based on the enrollment id + * @param billingAccountId BillingAccount ID + * @param billingPeriodName Billing Period Name. + * @param options The options parameters. + */ + beginDownloadByBillingAccountPeriodAndWait( + billingAccountId: string, + billingPeriodName: string, + options?: PriceSheetDownloadByBillingAccountPeriodOptionalParams, + ): Promise; /** * Gets the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 * or later. @@ -29,6 +59,6 @@ export interface PriceSheet { */ getByBillingPeriod( billingPeriodName: string, - options?: PriceSheetGetByBillingPeriodOptionalParams + options?: PriceSheetGetByBillingPeriodOptionalParams, ): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts index cb159a291e03..5cf39f336dae 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendationDetails.ts @@ -7,22 +7,24 @@ */ import { + Scope, Term, LookBackPeriod, ReservationRecommendationDetailsGetOptionalParams, - ReservationRecommendationDetailsGetResponse + ReservationRecommendationDetailsGetResponse, } from "../models/index.js"; /** Interface representing a ReservationRecommendationDetails. */ export interface ReservationRecommendationDetails { /** * Details of a reservation recommendation for what-if analysis of reserved instances. - * @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 resourceScope 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. * @param region Used to select the region the recommendation should be generated for. * @param term Specify length of reservation recommendation term. * @param lookBackPeriod Filter the time period on which reservation recommendation results are based. @@ -31,11 +33,12 @@ export interface ReservationRecommendationDetails { * @param options The options parameters. */ get( - scope: string, + resourceScope: string, + scope: Scope, region: string, term: Term, lookBackPeriod: LookBackPeriod, product: string, - options?: ReservationRecommendationDetailsGetOptionalParams + options?: ReservationRecommendationDetailsGetOptionalParams, ): Promise; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts index 796c83ea626d..7c559fa91a13 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationRecommendations.ts @@ -9,7 +9,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { ReservationRecommendationUnion, - ReservationRecommendationsListOptionalParams + ReservationRecommendationsListOptionalParams, } from "../models/index.js"; /// @@ -17,16 +17,16 @@ import { export interface ReservationRecommendations { /** * List of recommendations for purchasing reserved instances. - * @param scope The scope associated with reservation recommendations 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 resourceScope The scope associated with reservation recommendations 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 options The options parameters. */ list( - scope: string, - options?: ReservationRecommendationsListOptionalParams + resourceScope: string, + options?: ReservationRecommendationsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts index cb1efaa92831..cf4cc2d90b50 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationTransactions.ts @@ -11,23 +11,33 @@ import { ReservationTransaction, ReservationTransactionsListOptionalParams, ModernReservationTransaction, - ReservationTransactionsListByBillingProfileOptionalParams + ReservationTransactionsListByBillingProfileOptionalParams, } from "../models/index.js"; /// /** Interface representing a ReservationTransactions. */ export interface ReservationTransactions { /** - * List of transactions for reserved instances on billing account scope + * List of transactions for reserved instances on billing account scope. Note: The refund transactions + * are posted along with its purchase transaction (i.e. in the purchase billing month). For example, + * The refund is requested in May 2021. This refund transaction will have event date as May 2021 but + * the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size + * limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + * cases, API call should be made with smaller date ranges. * @param billingAccountId BillingAccount ID * @param options The options parameters. */ list( billingAccountId: string, - options?: ReservationTransactionsListOptionalParams + options?: ReservationTransactionsListOptionalParams, ): PagedAsyncIterableIterator; /** - * List of transactions for reserved instances on billing account scope + * List of transactions for reserved instances on billing profile scope. The refund transactions are + * posted along with its purchase transaction (i.e. in the purchase billing month). For example, The + * refund is requested in May 2021. This refund transaction will have event date as May 2021 but the + * billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size + * limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such + * cases, API call should be made with smaller date ranges. * @param billingAccountId BillingAccount ID * @param billingProfileId Azure Billing Profile ID. * @param options The options parameters. @@ -35,6 +45,6 @@ export interface ReservationTransactions { listByBillingProfile( billingAccountId: string, billingProfileId: string, - options?: ReservationTransactionsListByBillingProfileOptionalParams + options?: ReservationTransactionsListByBillingProfileOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts index e060d8a2f717..a54f09aa1efb 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsDetails.ts @@ -11,14 +11,18 @@ import { ReservationDetail, ReservationsDetailsListByReservationOrderOptionalParams, ReservationsDetailsListByReservationOrderAndReservationOptionalParams, - ReservationsDetailsListOptionalParams + ReservationsDetailsListOptionalParams, } from "../models/index.js"; /// /** Interface representing a ReservationsDetails. */ export interface ReservationsDetails { /** - * Lists the reservations details for provided date range. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. * @param reservationOrderId Order Id of the reservation * @param filter Filter reservation details by date range. The properties/UsageDate for start date and * end date. The filter supports 'le' and 'ge' @@ -27,10 +31,14 @@ export interface ReservationsDetails { listByReservationOrder( reservationOrderId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderOptionalParams + options?: ReservationsDetailsListByReservationOrderOptionalParams, ): PagedAsyncIterableIterator; /** - * Lists the reservations details for provided date range. + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. * @param reservationOrderId Order Id of the reservation * @param reservationId Id of the reservation * @param filter Filter reservation details by date range. The properties/UsageDate for start date and @@ -41,19 +49,23 @@ export interface ReservationsDetails { reservationOrderId: string, reservationId: string, filter: string, - options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams + options?: ReservationsDetailsListByReservationOrderAndReservationOptionalParams, ): PagedAsyncIterableIterator; /** - * Lists the reservations details for the defined scope and provided date range. - * @param scope The scope associated with reservations details operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * Lists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, + * so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too + * large, customers may also get 504 as the API timed out preparing the data. In such cases, API call + * should be made with smaller date ranges or a call to Generate Reservation Details Report API should + * be made as it is asynchronous and will not run into response size time outs. + * @param resourceScope The scope associated with reservations details operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param options The options parameters. */ list( - scope: string, - options?: ReservationsDetailsListOptionalParams + resourceScope: string, + options?: ReservationsDetailsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts index 455a923911cd..20dfccf62c22 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/reservationsSummaries.ts @@ -12,14 +12,16 @@ import { Datagrain, ReservationsSummariesListByReservationOrderOptionalParams, ReservationsSummariesListByReservationOrderAndReservationOptionalParams, - ReservationsSummariesListOptionalParams + ReservationsSummariesListOptionalParams, } from "../models/index.js"; /// /** Interface representing a ReservationsSummaries. */ export interface ReservationsSummaries { /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of + * 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API + * call should be made with smaller date ranges. * @param reservationOrderId Order Id of the reservation * @param grain Can be daily or monthly * @param options The options parameters. @@ -27,10 +29,12 @@ export interface ReservationsSummaries { listByReservationOrder( reservationOrderId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderOptionalParams + options?: ReservationsSummariesListByReservationOrderOptionalParams, ): PagedAsyncIterableIterator; /** - * Lists the reservations summaries for daily or monthly grain. + * Lists the reservations summaries for daily or monthly grain. Note: ARM has a payload size limit of + * 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API + * call should be made with smaller date ranges. * @param reservationOrderId Order Id of the reservation * @param reservationId Id of the reservation * @param grain Can be daily or monthly @@ -40,21 +44,23 @@ export interface ReservationsSummaries { reservationOrderId: string, reservationId: string, grain: Datagrain, - options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams + options?: ReservationsSummariesListByReservationOrderAndReservationOptionalParams, ): PagedAsyncIterableIterator; /** - * Lists the reservations summaries for the defined scope daily or monthly grain. - * @param scope The scope associated with reservations summaries operations. This includes - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), - * and - * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' - * for BillingProfile scope (modern). + * Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a + * payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM + * limit. In such cases, API call should be made with smaller date ranges. + * @param resourceScope The scope associated with reservations summaries operations. This includes + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), + * and + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' + * for BillingProfile scope (modern). * @param grain Can be daily or monthly * @param options The options parameters. */ list( - scope: string, + resourceScope: string, grain: Datagrain, - options?: ReservationsSummariesListOptionalParams + options?: ReservationsSummariesListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts b/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts index 026e363aa8c9..d3d887dde00b 100644 --- a/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts +++ b/sdk/consumption/arm-consumption/src/operationsInterfaces/usageDetails.ts @@ -15,6 +15,12 @@ export interface UsageDetails { /** * Lists the usage details for the defined scope. Usage details are available via this API only for May * 1, 2014 or later. + * + * **Note:Microsoft will be retiring the Consumption Usage Details API at some point in the future. We + * do not recommend that you take a new dependency on this API. Please use the Cost Details API + * instead. We will notify customers once a date for retirement has been determined.For Learn more,see + * [Generate Cost Details Report - Create + * Operation](https://learn.microsoft.com/en-us/rest/api/cost-management/generate-cost-details-report/create-operation?tabs=HTTP)** * @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, @@ -30,14 +36,14 @@ export interface UsageDetails { * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' * for billingProfile scope, - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' * for invoiceSection scope, and - * 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for - * partners. + * '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific + * for partners. * @param options The options parameters. */ list( scope: string, - options?: UsageDetailsListOptionalParams + options?: UsageDetailsListOptionalParams, ): PagedAsyncIterableIterator; } diff --git a/sdk/consumption/arm-consumption/src/pagingHelper.ts b/sdk/consumption/arm-consumption/src/pagingHelper.ts index 269a2b9814b5..e362819bdfc4 100644 --- a/sdk/consumption/arm-consumption/src/pagingHelper.ts +++ b/sdk/consumption/arm-consumption/src/pagingHelper.ts @@ -26,10 +26,7 @@ export function getContinuationToken(page: unknown): string | undefined { return pageMap.get(page)?.continuationToken; } -export function setContinuationToken( - page: unknown, - continuationToken: string | undefined -): void { +export function setContinuationToken(page: unknown, continuationToken: string | undefined): void { if (typeof page !== "object" || page === null || !continuationToken) { return; } diff --git a/sdk/consumption/arm-consumption/test/sampleTest.spec.ts b/sdk/consumption/arm-consumption/test/sampleTest.spec.ts new file mode 100644 index 000000000000..90b3c8a868b4 --- /dev/null +++ b/sdk/consumption/arm-consumption/test/sampleTest.spec.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { afterEach, beforeEach, describe, it, assert } from "vitest"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async () => { + recorder = new Recorder(); + await recorder.start(recorderOptions); + }); + + afterEach(async () => { + await recorder.stop(); + }); + + it("sample test", async () => { + assert(true); + }); +}); diff --git a/sdk/consumption/arm-consumption/test/snippets.spec.ts b/sdk/consumption/arm-consumption/test/snippets.spec.ts index 43dc1875dd01..ea803a84109b 100644 --- a/sdk/consumption/arm-consumption/test/snippets.spec.ts +++ b/sdk/consumption/arm-consumption/test/snippets.spec.ts @@ -1,5 +1,10 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ import { ConsumptionManagementClient } from "../src/index.js"; import { DefaultAzureCredential, InteractiveBrowserCredential } from "@azure/identity"; diff --git a/sdk/consumption/arm-consumption/tsconfig.browser.config.json b/sdk/consumption/arm-consumption/tsconfig.browser.config.json index b6586181d006..75871518e3a0 100644 --- a/sdk/consumption/arm-consumption/tsconfig.browser.config.json +++ b/sdk/consumption/arm-consumption/tsconfig.browser.config.json @@ -1,17 +1,3 @@ { - "extends": "./.tshy/build.json", - "include": [ - "./src/**/*.ts", - "./src/**/*.mts", - "./test/**/*.spec.ts", - "./test/**/*.mts" - ], - "exclude": [ - "./test/**/node/**/*.ts" - ], - "compilerOptions": { - "outDir": "./dist-test/browser", - "rootDir": ".", - "skipLibCheck": true - } + "extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] } diff --git a/sdk/consumption/arm-consumption/tsconfig.json b/sdk/consumption/arm-consumption/tsconfig.json index 19ceb382b521..59ea83c046bf 100644 --- a/sdk/consumption/arm-consumption/tsconfig.json +++ b/sdk/consumption/arm-consumption/tsconfig.json @@ -3,11 +3,8 @@ { "path": "./tsconfig.src.json" }, - { - "path": "./tsconfig.samples.json" - }, { "path": "./tsconfig.test.json" } ] -} +} \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/tsconfig.samples.json b/sdk/consumption/arm-consumption/tsconfig.samples.json index 3496a23fc33f..64866bd6bd97 100644 --- a/sdk/consumption/arm-consumption/tsconfig.samples.json +++ b/sdk/consumption/arm-consumption/tsconfig.samples.json @@ -2,9 +2,7 @@ "extends": "../../../tsconfig.samples.base.json", "compilerOptions": { "paths": { - "@azure/arm-consumption": [ - "./dist/esm" - ] + "@azure/arm-consumption": ["./dist/esm"] } } } diff --git a/sdk/consumption/arm-consumption/tsconfig.test.json b/sdk/consumption/arm-consumption/tsconfig.test.json index 3c2b783a8c1b..290ca214aebc 100644 --- a/sdk/consumption/arm-consumption/tsconfig.test.json +++ b/sdk/consumption/arm-consumption/tsconfig.test.json @@ -1,6 +1,3 @@ { - "extends": [ - "./tsconfig.src.json", - "../../../tsconfig.test.base.json" - ] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] } diff --git a/sdk/consumption/arm-consumption/vitest.browser.config.ts b/sdk/consumption/arm-consumption/vitest.browser.config.ts index b48c61b2ef46..182729ab5ce9 100644 --- a/sdk/consumption/arm-consumption/vitest.browser.config.ts +++ b/sdk/consumption/arm-consumption/vitest.browser.config.ts @@ -9,9 +9,9 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - include: [ - "dist-test/browser/test/**/*.spec.js", - ], + include: ["dist-test/browser/test/**/*.spec.js",], + testTimeout: 1200000, + hookTimeout: 1200000, }, }), ); diff --git a/sdk/consumption/arm-consumption/vitest.config.ts b/sdk/consumption/arm-consumption/vitest.config.ts index 2a4750c84292..40e031385dd8 100644 --- a/sdk/consumption/arm-consumption/vitest.config.ts +++ b/sdk/consumption/arm-consumption/vitest.config.ts @@ -1,3 +1,4 @@ + // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. @@ -8,8 +9,8 @@ export default mergeConfig( viteConfig, defineConfig({ test: { - hookTimeout: 1200000, testTimeout: 1200000, + hookTimeout: 1200000, }, }), );