diff --git a/sdk/consumption/arm-consumption/CHANGELOG.md b/sdk/consumption/arm-consumption/CHANGELOG.md index 99cc8ce33f22..5fbf7f743694 100644 --- a/sdk/consumption/arm-consumption/CHANGELOG.md +++ b/sdk/consumption/arm-consumption/CHANGELOG.md @@ -1,15 +1,30 @@ # Release History - -## 9.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 10.0.0 (2022-01-05) + +**Features** + + - Add parameters of Resource to TypeAlias ChargeSummary + - Add parameters of Resource to TypeAlias EventSummary + - Add parameters of Resource to TypeAlias LotSummary + - Type Alias EventSummary has a new parameter eTag + - Type Alias LotSummary has a new parameter eTag + +**Breaking Changes** + + - Interface Notification_2 no longer has parameter locale + - Delete parameters of ProxyResource in TypeAlias ChargeSummary + - Delete parameters of ProxyResource in TypeAlias EventSummary + - Delete parameters of ProxyResource in TypeAlias LotSummary + - Type Alias EventSummary no longer has parameter eTagPropertiesETag + - Type Alias LotSummary no longer has parameter eTagPropertiesETag + - Type Alias ReservationTransaction no longer has parameter billingMonth + - Type Alias ReservationTransaction no longer has parameter monetaryCommitment + - Type Alias ReservationTransaction no longer has parameter overage + - Removed Enum KnownCultureCode + - Enum KnownThresholdType no longer has value Forecasted + + ## 9.0.0 (2021-12-16) The package of @azure/arm-consumption is using our next generation design principles since version 9.0.0, which contains breaking changes. diff --git a/sdk/consumption/arm-consumption/LICENSE b/sdk/consumption/arm-consumption/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/consumption/arm-consumption/LICENSE +++ b/sdk/consumption/arm-consumption/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/consumption/arm-consumption/_meta.json b/sdk/consumption/arm-consumption/_meta.json index 1e25c71e9fde..ad062a881a76 100644 --- a/sdk/consumption/arm-consumption/_meta.json +++ b/sdk/consumption/arm-consumption/_meta.json @@ -1,7 +1,7 @@ { - "commit": "d600759c3516b61a7c353bc8682bccbab85a6f65", + "commit": "6ba37b7279bbd0d69042743246780cc3af9257b9", "readme": "specification/consumption/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/consumption/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211207.1", + "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/consumption/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211207.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" } \ No newline at end of file diff --git a/sdk/consumption/arm-consumption/package.json b/sdk/consumption/arm-consumption/package.json index a66e8a5b2a46..5489fb4d3923 100644 --- a/sdk/consumption/arm-consumption/package.json +++ b/sdk/consumption/arm-consumption/package.json @@ -3,10 +3,8 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ConsumptionManagementClient.", - "version": "9.0.1", - "engines": { - "node": ">=12.0.0" - }, + "version": "10.0.0", + "engines": { "node": ">=12.0.0" }, "dependencies": { "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.0.0", @@ -14,13 +12,7 @@ "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", @@ -47,9 +39,7 @@ "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", "dist/**/*.js.map", diff --git a/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_create_test.js b/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_create_test.js deleted file mode 100644 index c3bce62904a2..000000000000 --- a/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_create_test.js +++ /dev/null @@ -1,149 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "68057e0b7dd3283e854c5b0ffd3e9f20"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f12d6233-7a33-4ce6-8ec0-15b570680400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Aj58EvsDaWBHt2ju5Vfcrjk; expires=Sat, 15-Jan-2022 09:05:49 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr1G41LHOGl9nJM4iWHz67lOlEX2wXvk1g4VttFM8WUtq2-KQqDcY7HMeZiOdlnhoojm2AllD-CaBApNEqrvKhV2pxR8eGAqkctTlEt4XNE96b1o_0eKkwIlCMwVAwHIBhG8Aq5QDAHgcD0Axk4kVS3-QNQJ18fqBcCavUq_g46rcgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:49 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'd0c9695e-6cfc-4eda-9b3f-58d3c2c10400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AvcSV8-C5hFLmVHBQXrZ0cw; expires=Sat, 15-Jan-2022 09:05:49 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr0DH7DUf_uyBxGOqwATZFAzt2lFneuK_AzYOCJYVE4F26M2v6GFLTZCpuVBD3KOcTfIEqCzwfp11N7auxNSJ2mOCcvLG9uDxZ-VU9OG1425NMoMLYglikgfZ3je4qNY7UQUJOkqyRCYVlmFIC5R8ZEjIeFC3YkFDfoTus0WFza3YgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:49 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=10806bb2-3a56-4f9b-b7c1-01a5f2c696fd&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'fd5938f4-f3e7-4e00-9b54-02d0b0f00800', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ao7fbe-tPqNPlkj3eBjVe3sWPr5BAQAAAG34TNkOAAAA; expires=Sat, 15-Jan-2022 09:05:49 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:49 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy', {"properties":{"category":"Cost","amount":100,"timeGrain":"Monthly","timePeriod":{"startDate":"2021-12-01T00:00:00.000Z","endDate":"2021-12-31T00:00:00.000Z"},"filter":{"and":[{"dimensions":{"name":"ResourceId","operator":"In","values":["/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Compute/virtualMachines/myvmxxx"]}},{"tags":{"name":"category","operator":"In","values":["Dev","Prod"]}}]},"notifications":{"Actual_GreaterThan_80_Percent":{"enabled":true,"operator":"GreaterThan","threshold":80,"contactEmails":["johndoe@contoso.com","janesmith@contoso.com"],"contactRoles":["Contributor","Reader"],"thresholdType":"Actual"}}}}) - .query(true) - .reply(201, {"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy","name":"mybudgetxxxy","type":"Microsoft.Consumption/budgets","eTag":"\"1d7f25c205179c2\"","properties":{"timePeriod":{"startDate":"2021-12-01T00:00:00Z","endDate":"2021-12-31T00:00:00Z"},"timeGrain":"Monthly","amount":100,"currentSpend":null,"category":"Cost","notifications":{"actual_GreaterThan_80_Percent":{"enabled":true,"operator":"GreaterThan","threshold":80,"contactEmails":["johndoe@contoso.com","janesmith@contoso.com"],"contactRoles":["Contributor","Reader"],"contactGroups":[],"thresholdType":"Actual"}},"filter":{"and":[{"dimensions":{"name":"ResourceId","operator":"In","values":["/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Compute/virtualMachines/myvmxxx"]}},{"tags":{"name":"category","operator":"In","values":["Dev","Prod"]}}]}}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '939', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy?api-version=2021-10-01', - 'session-id', - '697ef85a-f68f-4fc3-9655-e210aa289d0c', - 'x-ms-request-id', - '0270af48-489f-4dbf-a170-1e008633258f', - 'x-ms-correlation-request-id', - '98b2bcfb-1644-4e3e-9f1d-1425061860ef', - 'x-ms-client-request-id', - 'a59ce5cc-0cb2-4ad3-9d5d-c4f810002a47', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211216T090552Z:98b2bcfb-1644-4e3e-9f1d-1425061860ef', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 16 Dec 2021 09:05:52 GMT' -]); diff --git a/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_delete_test.js b/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_delete_test.js deleted file mode 100644 index 749da457c9df..000000000000 --- a/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_delete_test.js +++ /dev/null @@ -1,145 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "4053cc82ff8e78dde36e4517d1f796ca"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'd0c9695e-6cfc-4eda-9b3f-58d3d8c10400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AhhCMzcFhFpOlqD5aeDifDo; expires=Sat, 15-Jan-2022 09:05:53 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrgl2AVmCoIz_1NNu_AgsVe_RX6PtEPceAYRnSbk84HquYtRVFlcSEtLG0-hoRB6xpo9C9otrhqrdMNfv7EvOtQVqyRondwDTv18tDIVigd4Kf4nVl1B4t35KZHZ2OVwhwedpPbOMYyBTLbxy8QBkSqNahVPmlk__uVPkUwfnA_PAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:53 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'd0c9695e-6cfc-4eda-9b3f-58d3d9c10400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AtN-uSFdj1BPjBxrWwRID4g; expires=Sat, 15-Jan-2022 09:05:54 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrAvCPLqK-Tr7vDtH7U6VLRac2HmuEB3cJM8CMFHLP9DpX67uiW_MTnm84sOmM75lcdA-BFXiLSqmDj8bB4p7R8-wD-jw4Y6Hu62MstOumduX0yU054KM9b7_itqOfEnzDYjz10xYO1i-6q_UGZUU_c4_pzNmPmI_2mX-ds2XVTvAgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:53 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=64768d39-6baf-4db4-b088-4cb3e04e423f&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '9e21a3f3-9d46-4882-8eff-839ebf420400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ApHC6EHq9ylOpejAy9_4SjsWPr5BAQAAAHH4TNkOAAAA; expires=Sat, 15-Jan-2022 09:05:54 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:54 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'session-id', - '3c6ea7dd-4b09-4e1b-a44c-d41daf68aeeb', - 'x-ms-request-id', - '008dee0a-a4ca-4862-9b36-507059e8ebf7', - 'x-ms-correlation-request-id', - '700d1a68-38c5-4d5c-bda8-18804da2fd92', - 'x-ms-client-request-id', - '08d6828e-02a4-4329-af56-f7366c6428a1', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211216T090555Z:700d1a68-38c5-4d5c-bda8-18804da2fd92', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 16 Dec 2021 09:05:55 GMT', - 'Content-Length', - '0' -]); diff --git a/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_get_test.js b/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_get_test.js deleted file mode 100644 index ee5d3ec21d5f..000000000000 --- a/sdk/consumption/arm-consumption/recordings/node/consumption_test/recording_budgets_get_test.js +++ /dev/null @@ -1,151 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "f0352c1810a8bbe7f6b6e0a2b912db95"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f12d6233-7a33-4ce6-8ec0-15b585680400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AugniNT1dyFMnfl9jzkw0Tg; expires=Sat, 15-Jan-2022 09:05:52 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevryoSWMXnBgwKTuxJMmMl85I70wLY6HJtMDOxoMjFnU_ic5B9mtZmWvttkmJ2_fdQ0-h-E8gdsmlcnT5ZBoXPWK8lPkZeNYuy1x4tTRlxhmeG4Z4q2DaFkveY9NNNt4TYgTmET3JdFa3CyNB5i3ZTviPESr6PK_z9GQye4oJzjCfEgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:52 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f12d6233-7a33-4ce6-8ec0-15b587680400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AuTSQ7j2QBFFtqwWvf1UOxQ; expires=Sat, 15-Jan-2022 09:05:52 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrzgSaar_uafe1t2NusFDCivOS4uduRPZybzqeK92QZKwRgIfRZRp1n0cDRoCCbFEl1UoTWWOJCnwvq3JH-zzDfBYL5Jc-cg8BoE2_ypCGhB8HyxgTMFZL9gTpSzSRAxTCZOoxsgTNOzeHyrrPvmUr4uyGkuoN9fu41Tz4mR59t9QgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:52 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=710cd218-32af-41e2-8f1e-174bb394ec60&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a128bc5f-3e0d-452d-b6e3-ff5bd6090900', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AolwVUpGF0RJi7gxCpXto08WPr5BAQAAAHD4TNkOAAAA; expires=Sat, 15-Jan-2022 09:05:53 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:05:53 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e4f08ea7ac1d0ef4ed6b38bbcc50bf2dbbb77efae3f1a7db4cc163961d2f9b4bd5ee1d38d90a859fe26bba066bfef47bbb307e77bf7a77b3bf7771f3c9ceefdbe1fd19784d02aafdb226f3e7af48b3f6a8b45fe32af8b8ac6fd8b3f6adaac6e9f662d3ad9dbd9dbdddedddbded97db3b3f388fff753f47abe9c751adcf31bfc124292407e5e67c592da7c512ddb7909d4b345b55eb61f3ddaddd919ef8c3e9aaeeb3a5fb6af57040f3d9baff9cbf5b2a05f3ffaeaf553c09b527717557d4d9f9c544d4bb096555b9c17f4390d9b47914ddb7556fefe9fd739b5addfccb3e5ef7fb0f3fbd3b8a6d4071ae4cb6c52e6d4535baff3d147a040d6563581f4de21c8ed9ce6715e95d4f2805199d20008fae9222b4aeaea7b1ffd74355fceaafcf7c4173407e369b5a0f77e3a5be6cda268e7c1e7dfb7efbfaa4ad0fb7b3482655b1793353a1f7df42acf8835bc76c23dd4903eb2b8bc91593fe6417ef44b8824e7454938636019c8f7bd5ffcd18c88be6c0c3d947b5e294f9ecda82f6fcc6718ea6556ae05a7bb3febecbe58addbfcee655163045f64d37941e4a2972e17c4d81f7d9f86449c985d103616779a5d99f54d983fcd2fe9ef9735712f01a1ff","fd92ff0742ddf09ac2030000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'session-id', - '59a5d425-789d-4af4-99e1-9ac6ef8026aa', - 'x-ms-request-id', - 'c16c7c2b-9f05-4a91-b608-f9dce1c38c3e', - 'x-ms-correlation-request-id', - '92d607dd-b83a-472a-a94b-352a57e93be1', - 'x-ms-client-request-id', - '2a6f69ff-fdd7-412d-887a-358b4ac84ec1', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211216T090553Z:92d607dd-b83a-472a-a94b-352a57e93be1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 16 Dec 2021 09:05:53 GMT' -]); diff --git a/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_create_test.js b/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_create_test.js deleted file mode 100644 index 7bc831902071..000000000000 --- a/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_create_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "ec7f3fdb02d11a27248023d0744d991d"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '96da2a01-9bbf-4976-b77e-e8e653a30400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Am-SPQPh-MxNkotQriSTeVE; expires=Sat, 15-Jan-2022 09:03:10 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrtjs30u8ueI8CvKCvVm8EA45kcasprCoP55A-XwrU_-5t-_J9dxIdOWAyIwejRJirOVzFwIZ-aBrwL7fmCsHnuNfx2hUC9Dtv-CHFTIHKqqphB-X_ICILhRAsAmWXeya-aF9LBtvrlvReS5a5FVvwUyfrtJoOBB7fgsTodrFLDS8gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:10 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'cea5795e-3301-4fb9-b860-1840fd8f0400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Alq0if2ztYJBs8_ynjTS_lo; expires=Sat, 15-Jan-2022 09:03:10 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrVLTvn5Qw14WDQHH2nTh2jNBOLVozg9lMC48PwTsd94t7Ni7VxLpOBMDrxWelt0sh4Qsv8EH4-vB0TLbiKVFfd1pBaLg9qFqnamlHnFoNHNEuuS_DT2LSlRn_nfogpZ2thVo0knDhByOa1IDzAz0hjRg_V9mf3ZTY9eP6bPFqZOggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:10 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=5e6bae08-b6ea-4a25-9c90-6ecf4af70443&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '9e21a3f3-9d46-4882-8eff-839e693e0400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AoJIvXQPamBAvYi_ef8TQqoWPr5BAQAAAM_3TNkOAAAA; expires=Sat, 15-Jan-2022 09:03:11 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:11 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy', {"properties":{"category":"Cost","amount":100,"timeGrain":"Monthly","timePeriod":{"startDate":"2021-11-01T00:00:00.000Z","endDate":"2021-12-01T00:00:00.000Z"},"filter":{"and":[{"dimensions":{"name":"ResourceId","operator":"In","values":["/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Compute/virtualMachines/myvmxxx"]}},{"tags":{"name":"category","operator":"In","values":["Dev","Prod"]}}]},"notifications":{"Actual_GreaterThan_80_Percent":{"enabled":true,"operator":"GreaterThan","threshold":80,"contactEmails":["johndoe@contoso.com","janesmith@contoso.com"],"contactRoles":["Contributor","Reader"],"thresholdType":"Actual"}}}}) - .query(true) - .reply(400, {"error":{"code":"400","message":"End date should be greater than or equal to the current date.\r\n (Request ID: f407932a-6252-499b-abcd-e000cd1d0773)"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '153', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'session-id', - '1375d960-ddd9-48ba-a6c2-5a77e96e84ab', - 'x-ms-request-id', - 'f407932a-6252-499b-abcd-e000cd1d0773', - 'x-ms-correlation-request-id', - '7705cc8c-9270-46e0-af1e-4e34a156ee7f', - 'x-ms-client-request-id', - '2993242f-d454-4dd0-b11e-9eaef6348d7f', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211216T090313Z:7705cc8c-9270-46e0-af1e-4e34a156ee7f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 16 Dec 2021 09:03:13 GMT' -]); diff --git a/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_delete_test.js b/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_delete_test.js deleted file mode 100644 index c4330d7810a4..000000000000 --- a/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_delete_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "4053cc82ff8e78dde36e4517d1f796ca"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'c026a237-edf6-4187-b74c-802159c50400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AvGo4bh8u4JIviw7HwZ_4Lg; expires=Sat, 15-Jan-2022 09:03:14 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrvDnT5LIhsKQhQB4tGsjw-poTBrPKWE--_znjBvnUf3voPyrLm_zZs8xjoBiNuxNUd-6V4Y54vJuTZ_E_o-0FiR8LDtMcUcC_3EeN3ua9T6u2E9N_kawl2zdMMNe9FfpB85Qt6LJ2PL1WjNaZf9fe8CdcieBN_xRE8hyQxOVb_28gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:14 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '512165c2-73c4-480c-943d-7ead72bf0400', - 'x-ms-ests-server', - '2.1.12261.15 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AiFKY7-E3ZJAh83x6G5Jm8g; expires=Sat, 15-Jan-2022 09:03:14 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr635TpNN_i56GeP9T1pCc7SOL7qR77Q3VQkXe0pSLCRRaokXRAtY5RA74mNsUUQ0gBdWVqzJmT4NJOzUrBT2DCkR7p2saJLd9ZWnRqbSr46-oWij8fl2oRoHoZ_PYAsIhG1ZcT3TnEpmcXzipDxnkiT54v5UbZ2hbo562syfFONggAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:14 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=5235d322-c846-4e4d-b864-d5facb087b1f&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '9e7be817-0cfd-4edb-9c1f-217899a20400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AryAb4DAcWtNqOSKAKFvNIQWPr5BAQAAANL3TNkOAAAA; expires=Sat, 15-Jan-2022 09:03:15 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:15 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy') - .query(true) - .reply(404, {"error":{"code":"404","message":"No budget found matching budgetName: mybudgetxxxy, under storageScope: EntityType = Subscription, EntityId = azure_subscription_id, ChildScope = EntityType = ResourceGroup, EntityId = myjstest, ChildScope = , MetaData = , MetaData = (Request ID: a66c5a95-a508-4272-bdf5-7af77f4a41bf)"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '338', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'session-id', - '9fe08036-eaf8-4ede-ae1b-9cb44c47b8c1', - 'x-ms-request-id', - 'a66c5a95-a508-4272-bdf5-7af77f4a41bf', - 'x-ms-correlation-request-id', - 'b940b601-dfe5-4a6a-9ad2-ef326d89ba47', - 'x-ms-client-request-id', - 'a3c30e4d-f193-4f4b-a163-bd09bad35347', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211216T090315Z:b940b601-dfe5-4a6a-9ad2-ef326d89ba47', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 16 Dec 2021 09:03:15 GMT' -]); diff --git a/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_get_test.js b/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_get_test.js deleted file mode 100644 index 783e25c0b0cd..000000000000 --- a/sdk/consumption/arm-consumption/recordings/node/my_test/recording_budgets_get_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "f0352c1810a8bbe7f6b6e0a2b912db95"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/common/discovery/instance') - .query(true) - .reply(200, {"tenant_discovery_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration","api-version":"1.1","metadata":[{"preferred_network":"login.microsoftonline.com","preferred_cache":"login.windows.net","aliases":["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{"preferred_network":"login.partner.microsoftonline.cn","preferred_cache":"login.partner.microsoftonline.cn","aliases":["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{"preferred_network":"login.microsoftonline.de","preferred_cache":"login.microsoftonline.de","aliases":["login.microsoftonline.de"]},{"preferred_network":"login.microsoftonline.us","preferred_cache":"login.microsoftonline.us","aliases":["login.microsoftonline.us","login.usgovcloudapi.net"]},{"preferred_network":"login-us.microsoftonline.com","preferred_cache":"login-us.microsoftonline.com","aliases":["login-us.microsoftonline.com"]}]}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a60e0c08-89eb-433f-a476-c0a9b0680400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AqlmxH4v2jVNjlxbEFdsqh4; expires=Sat, 15-Jan-2022 09:03:13 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevra_Sul1WG9cdXXyAORJXqvofo8s-UVCm_xUcMyJgQPF90bugRZYW_qtkE1Y-9h_7bC-YA4HGYo5nYNaVaIvVcZAspyO-xokidY1lBipdewsGkNDGpERiza8S8ELzqzOnP2KrcO1XkZL59pccuZJyrrjxIeeSf9LsmtuRJ_PaLwY4gAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:13 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '9bed8f69-8b1e-4591-be3e-449608620900', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AqUiiwKnjulIgw1xbkP9yZ0; expires=Sat, 15-Jan-2022 09:03:13 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrjbljACEY3-T2-YhCENWG8efgzksmrVv0wgr4eOd_lhnIZ_MwNJv-dz3GHsWgclpIhDTxF5Gx4zFw9_zYLHF_ksgGdWtaQrh1I61tyeNaoIkxADmIS_AKwRY2swlFpe9xs_Yy9U058kECMJvF2TVwrfdbtzefSH9h1IBPX_k9ewIgAA; domain=.login.microsoftonline.com; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:13 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=5a60e07b-c403-47a7-9fc8-cdab74b19c97&client_secret=azure_client_secret&claims=%7B%22access_token%22%3A%7B%22xms_cc%22%3A%7B%22values%22%3A%5B%22cp1%22%5D%7D%7D%7D") - .reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-store, no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'a60e0c08-89eb-433f-a476-c0a9b6680400', - 'x-ms-ests-server', - '2.1.12261.15 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Avxvk7jkGXxIhBtI5Twpn28WPr5BAQAAANH3TNkOAAAA; expires=Sat, 15-Jan-2022 09:03:13 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Thu, 16 Dec 2021 09:03:13 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('//subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Consumption/budgets/mybudgetxxxy') - .query(true) - .reply(404, {"error":{"code":"404","message":"No budget found matching budgetName: mybudgetxxxy, under storageScope: EntityType = Subscription, EntityId = azure_subscription_id, ChildScope = EntityType = ResourceGroup, EntityId = myjstest, ChildScope = , MetaData = , MetaData = (Request ID: 42416799-a1e3-42d8-9863-407dc0825766)"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '338', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'session-id', - 'a49bbae5-311e-4aa9-bb32-3626a4a1ff7e', - 'x-ms-request-id', - '42416799-a1e3-42d8-9863-407dc0825766', - 'x-ms-correlation-request-id', - '1ba410e4-1599-474f-b18b-2f0001ade2f5', - 'x-ms-client-request-id', - '3bb60199-c1d1-413d-8ac3-487e9e0e4c38', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211216T090314Z:1ba410e4-1599-474f-b18b-2f0001ade2f5', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 16 Dec 2021 09:03:14 GMT' -]); diff --git a/sdk/consumption/arm-consumption/review/arm-consumption.api.md b/sdk/consumption/arm-consumption/review/arm-consumption.api.md index ff700c3e0aac..50badd357c37 100644 --- a/sdk/consumption/arm-consumption/review/arm-consumption.api.md +++ b/sdk/consumption/arm-consumption/review/arm-consumption.api.md @@ -210,7 +210,7 @@ export interface ChargesListResult { } // @public -export type ChargeSummary = ProxyResource & { +export type ChargeSummary = Resource & { kind: ChargeSummaryKind; }; @@ -303,9 +303,6 @@ export type CreditSummary = Resource & { readonly eTag?: string; }; -// @public -export type CultureCode = string; - // @public export interface CurrentSpend { readonly amount?: number; @@ -375,7 +372,7 @@ export interface EventsOperations { } // @public -export type EventSummary = ProxyResource & { +export type EventSummary = Resource & { readonly transactionDate?: Date; readonly description?: string; readonly newCredit?: Amount; @@ -398,7 +395,7 @@ export type EventSummary = ProxyResource & { readonly adjustmentsInBillingCurrency?: AmountWithExchangeRate; readonly chargesInBillingCurrency?: AmountWithExchangeRate; readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; - readonly eTagPropertiesETag?: string; + readonly eTag?: string; }; // @public @@ -451,52 +448,6 @@ export enum KnownChargeSummaryKind { Modern = "modern" } -// @public -export enum KnownCultureCode { - // (undocumented) - CsCz = "cs-cz", - // (undocumented) - DaDk = "da-dk", - // (undocumented) - DeDe = "de-de", - // (undocumented) - EnGb = "en-gb", - // (undocumented) - EnUs = "en-us", - // (undocumented) - EsEs = "es-es", - // (undocumented) - FrFr = "fr-fr", - // (undocumented) - HuHu = "hu-hu", - // (undocumented) - ItIt = "it-it", - // (undocumented) - JaJp = "ja-jp", - // (undocumented) - KoKr = "ko-kr", - // (undocumented) - NbNo = "nb-no", - // (undocumented) - NlNl = "nl-nl", - // (undocumented) - PlPl = "pl-pl", - // (undocumented) - PtBr = "pt-br", - // (undocumented) - PtPt = "pt-pt", - // (undocumented) - RuRu = "ru-ru", - // (undocumented) - SvSe = "sv-se", - // (undocumented) - TrTr = "tr-tr", - // (undocumented) - ZhCn = "zh-cn", - // (undocumented) - ZhTw = "zh-tw" -} - // @public export enum KnownDatagrain { DailyGrain = "daily", @@ -606,9 +557,7 @@ export enum KnownTerm { // @public export enum KnownThresholdType { // (undocumented) - Actual = "Actual", - // (undocumented) - Forecasted = "Forecasted" + Actual = "Actual" } // @public @@ -661,46 +610,13 @@ export type LegacyReservationRecommendation = ReservationRecommendation & { readonly totalCostWithReservedInstances?: number; readonly netSavings?: number; readonly firstUsageDate?: Date; - scope: string; + readonly scope?: string; readonly skuProperties?: SkuProperty[]; }; -// @public -export interface LegacyReservationRecommendationProperties { - readonly costWithNoReservedInstances?: number; - readonly firstUsageDate?: Date; - readonly instanceFlexibilityGroup?: string; - readonly instanceFlexibilityRatio?: number; - readonly lookBackPeriod?: string; - readonly meterId?: string; - readonly netSavings?: number; - readonly normalizedSize?: string; - readonly recommendedQuantity?: number; - readonly recommendedQuantityNormalized?: number; - readonly resourceType?: string; - scope: "Single" | "Shared"; - readonly skuProperties?: SkuProperty[]; - readonly term?: string; - readonly totalCostWithReservedInstances?: number; -} - -// @public (undocumented) -export type LegacyReservationRecommendationPropertiesUnion = LegacyReservationRecommendationProperties | LegacySingleScopeReservationRecommendationProperties | LegacySharedScopeReservationRecommendationProperties; - // @public export type LegacyReservationTransaction = ReservationTransaction & {}; -// @public -export type LegacySharedScopeReservationRecommendationProperties = LegacyReservationRecommendationProperties & { - scope: "Shared"; -}; - -// @public -export type LegacySingleScopeReservationRecommendationProperties = LegacyReservationRecommendationProperties & { - scope: "Single"; - readonly subscriptionId?: string; -}; - // @public export type LegacyUsageDetail = UsageDetail & { readonly billingAccountId?: string; @@ -798,7 +714,7 @@ export interface LotsOperations { export type LotSource = string; // @public -export type LotSummary = ProxyResource & { +export type LotSummary = Resource & { readonly originalAmount?: Amount; readonly closedBalance?: Amount; readonly source?: LotSource; @@ -812,7 +728,7 @@ export type LotSummary = ProxyResource & { readonly originalAmountInBillingCurrency?: AmountWithExchangeRate; readonly closedBalanceInBillingCurrency?: AmountWithExchangeRate; readonly reseller?: Reseller; - readonly eTagPropertiesETag?: string; + readonly eTag?: string; }; // @public @@ -1062,7 +978,6 @@ interface Notification_2 { contactGroups?: string[]; contactRoles?: string[]; enabled: boolean; - locale?: CultureCode; operator: OperatorType; threshold: number; thresholdType?: ThresholdType; @@ -1468,9 +1383,6 @@ export type ReservationTransaction = ReservationTransactionResource & { readonly costCenter?: string; readonly currentEnrollment?: string; readonly billingFrequency?: string; - readonly billingMonth?: number; - readonly monetaryCommitment?: number; - readonly overage?: number; }; // @public diff --git a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts index b7c9fa70b3c1..7b16f0d9b493 100644 --- a/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts +++ b/sdk/consumption/arm-consumption/src/consumptionManagementClient.ts @@ -80,7 +80,7 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-consumption/9.0.0`; + const packageDetails = `azsdk-js-arm-consumption/10.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/consumption/arm-consumption/src/models/index.ts b/sdk/consumption/arm-consumption/src/models/index.ts index c37726a97d85..f9049d475a3b 100644 --- a/sdk/consumption/arm-consumption/src/models/index.ts +++ b/sdk/consumption/arm-consumption/src/models/index.ts @@ -8,22 +8,18 @@ import * as coreClient from "@azure/core-client"; -export type LegacyReservationRecommendationPropertiesUnion = - | LegacyReservationRecommendationProperties - | LegacySingleScopeReservationRecommendationProperties - | LegacySharedScopeReservationRecommendationProperties; export type UsageDetailUnion = | UsageDetail | LegacyUsageDetail | ModernUsageDetail; -export type ReservationRecommendationUnion = - | ReservationRecommendation - | LegacyReservationRecommendation - | ModernReservationRecommendation; export type ChargeSummaryUnion = | ChargeSummary | LegacyChargeSummary | ModernChargeSummary; +export type ReservationRecommendationUnion = + | ReservationRecommendation + | LegacyReservationRecommendation + | ModernReservationRecommendation; /** Result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period. */ export interface UsageDetailsListResult { @@ -192,8 +188,6 @@ export interface Notification { contactGroups?: string[]; /** The type of threshold */ thresholdType?: ThresholdType; - /** Language in which the recipient will receive the notification */ - locale?: CultureCode; } /** The forecasted cost which is being tracked for a budget. */ @@ -801,82 +795,6 @@ export interface MeterDetailsResponse { readonly serviceFamily?: string; } -/** The properties of the reservation recommendation. */ -export interface LegacyReservationRecommendationProperties { - /** Polymorphic discriminator, which specifies the different types this object can be */ - scope: "Single" | "Shared"; - /** - * The number of days of usage to look back for recommendation. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lookBackPeriod?: string; - /** - * 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; - /** - * The azure resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceType?: string; - /** - * RI recommendations in one or three year terms. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly term?: string; - /** - * The total amount of cost without reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly costWithNoReservedInstances?: number; - /** - * Recommended quality for reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly recommendedQuantity?: number; - /** - * The total amount of cost with reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly totalCostWithReservedInstances?: number; - /** - * Total estimated savings with reserved instances. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly netSavings?: number; - /** - * 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[]; -} - /** The Sku property */ export interface SkuProperty { /** @@ -1045,6 +963,12 @@ export type Marketplace = Resource & { readonly isRecurringCharge?: boolean; }; +/** A charge summary resource. */ +export type ChargeSummary = Resource & { + /** Specifies the kind of charge summary. */ + kind: ChargeSummaryKind; +}; + /** A balance resource. */ export type Balance = Resource & { /** @@ -1368,100 +1292,8 @@ export type ManagementGroupAggregatedCostResult = Resource & { excludedSubscriptions?: string[]; }; -/** A credit summary resource. */ -export type CreditSummary = 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 type Budget = ProxyResource & { - /** The category of the budget, whether the budget tracks cost or usage. */ - category?: CategoryType; - /** The total amount of cost to track with the budget */ - amount?: number; - /** The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers */ - timeGrain?: TimeGrainType; - /** Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. */ - timePeriod?: BudgetTimePeriod; - /** May be used to filter budgets by user-specified dimensions and/or tags. */ - filter?: BudgetFilter; - /** - * The current amount of cost which is being tracked for a budget. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly currentSpend?: CurrentSpend; - /** Dictionary of notifications associated with the budget. Budget can have up to five notifications. */ - notifications?: { [propertyName: string]: Notification }; - /** - * The forecasted cost which is being tracked for a budget. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly forecastSpend?: ForecastSpend; -}; - -/** A resource listing all tags. */ -export type TagsResult = ProxyResource & { - /** A list of Tag. */ - tags?: Tag[]; - /** - * The link (url) to the next page of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; - /** - * The link (url) to the previous page of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly previousLink?: string; -}; - -/** A charge summary resource. */ -export type ChargeSummary = ProxyResource & { - /** Specifies the kind of charge summary. */ - kind: ChargeSummaryKind; -}; - /** An event summary resource. */ -export type EventSummary = ProxyResource & { +export type EventSummary = Resource & { /** * The date of the event. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1573,11 +1405,11 @@ export type EventSummary = ProxyResource & { * The eTag for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly eTagPropertiesETag?: string; + readonly eTag?: string; }; /** A lot summary resource. */ -export type LotSummary = ProxyResource & { +export type LotSummary = Resource & { /** * The original amount of a lot. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1647,7 +1479,93 @@ export type LotSummary = ProxyResource & { * The eTag for the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly eTagPropertiesETag?: string; + readonly eTag?: string; +}; + +/** A credit summary resource. */ +export type CreditSummary = 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 type Budget = ProxyResource & { + /** The category of the budget, whether the budget tracks cost or usage. */ + category?: CategoryType; + /** The total amount of cost to track with the budget */ + amount?: number; + /** The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers */ + timeGrain?: TimeGrainType; + /** Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. */ + timePeriod?: BudgetTimePeriod; + /** May be used to filter budgets by user-specified dimensions and/or tags. */ + filter?: BudgetFilter; + /** + * The current amount of cost which is being tracked for a budget. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentSpend?: CurrentSpend; + /** Dictionary of notifications associated with the budget. Budget can have up to five notifications. */ + notifications?: { [propertyName: string]: Notification }; + /** + * The forecasted cost which is being tracked for a budget. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly forecastSpend?: ForecastSpend; +}; + +/** A resource listing all tags. */ +export type TagsResult = ProxyResource & { + /** A list of Tag. */ + tags?: Tag[]; + /** + * The link (url) to the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; + /** + * The link (url) to the previous page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly previousLink?: string; }; /** Reservation transaction resource. */ @@ -1752,21 +1670,6 @@ export type ReservationTransaction = ReservationTransactionResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly billingFrequency?: string; - /** - * The billing month(yyyyMMdd), on which the event initiated. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingMonth?: number; - /** - * The monetary commitment amount at the enrollment scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly monetaryCommitment?: number; - /** - * The overage amount at the enrollment scope. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly overage?: number; }; /** Modern Reservation transaction resource. */ @@ -1887,23 +1790,6 @@ export type AmountWithExchangeRate = Amount & { readonly exchangeRateMonth?: number; }; -/** The properties of the legacy reservation recommendation for single scope. */ -export type LegacySingleScopeReservationRecommendationProperties = LegacyReservationRecommendationProperties & { - /** 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 legacy reservation recommendation for shared scope. */ -export type LegacySharedScopeReservationRecommendationProperties = LegacyReservationRecommendationProperties & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - scope: "Shared"; -}; - /** Legacy usage detail. */ export type LegacyUsageDetail = UsageDetail & { /** @@ -2492,94 +2378,111 @@ export type ModernUsageDetail = UsageDetail & { readonly costAllocationRuleName?: string; }; -/** Legacy reservation recommendation. */ -export type LegacyReservationRecommendation = ReservationRecommendation & { +/** Legacy charge summary. */ +export type LegacyChargeSummary = ChargeSummary & { /** - * The number of days of usage to look back for recommendation. + * The id of the billing period resource that the charge belongs to. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lookBackPeriod?: string; + readonly billingPeriodId?: string; /** - * The instance Flexibility Ratio. + * Usage start date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceFlexibilityRatio?: number; + readonly usageStart?: string; /** - * The instance Flexibility Group. + * Usage end date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceFlexibilityGroup?: string; + readonly usageEnd?: string; /** - * The normalized Size. + * Azure Charges. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly normalizedSize?: string; + readonly azureCharges?: number; /** - * The recommended Quantity Normalized. + * Charges Billed separately. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly recommendedQuantityNormalized?: number; + readonly chargesBilledSeparately?: number; /** - * The meter id (GUID) + * Marketplace Charges. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly meterId?: string; + readonly marketplaceCharges?: number; /** - * The azure resource type. + * Currency Code * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resourceType?: string; + readonly currency?: string; +}; + +/** Modern charge summary. */ +export type ModernChargeSummary = ChargeSummary & { /** - * RI recommendations in one or three year terms. + * The id of the billing period resource that the charge belongs to. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly term?: string; + readonly billingPeriodId?: string; /** - * The total amount of cost without reserved instances. + * Usage start date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly costWithNoReservedInstances?: number; + readonly usageStart?: string; /** - * Recommended quality for reserved instances. + * Usage end date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly recommendedQuantity?: number; + readonly usageEnd?: string; /** - * The total amount of cost with reserved instances. + * Azure Charges. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalCostWithReservedInstances?: number; + readonly azureCharges?: Amount; /** - * Total estimated savings with reserved instances. + * Charges Billed separately. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly netSavings?: number; + readonly chargesBilledSeparately?: Amount; /** - * The usage date for looking back. + * Marketplace Charges. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly firstUsageDate?: Date; - /** Shared or single recommendation. */ - scope: string; + readonly marketplaceCharges?: Amount; /** - * List of sku properties + * Billing Account Id * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly skuProperties?: SkuProperty[]; -}; - -/** Modern reservation recommendation. */ -export type ModernReservationRecommendation = ReservationRecommendation & { + readonly billingAccountId?: string; /** - * Resource Location. + * Billing Profile Id * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly locationPropertiesLocation?: string; + readonly billingProfileId?: string; + /** + * Invoice Section Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly invoiceSectionId?: string; + /** + * Customer Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customerId?: string; + /** + * Is charge Invoiced + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isInvoiced?: boolean; +}; + +/** Legacy reservation recommendation. */ +export type LegacyReservationRecommendation = ReservationRecommendation & { /** * 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; + readonly lookBackPeriod?: string; /** * The instance Flexibility Ratio. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2605,6 +2508,11 @@ export type ModernReservationRecommendation = ReservationRecommendation & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly meterId?: string; + /** + * The azure resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resourceType?: string; /** * RI recommendations in one or three year terms. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2614,7 +2522,7 @@ export type ModernReservationRecommendation = ReservationRecommendation & { * 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; + readonly costWithNoReservedInstances?: number; /** * Recommended quality for reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2624,12 +2532,12 @@ export type ModernReservationRecommendation = ReservationRecommendation & { * 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; + readonly totalCostWithReservedInstances?: number; /** * Total estimated savings with reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly netSavings?: Amount; + readonly netSavings?: number; /** * The usage date for looking back. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2645,109 +2553,90 @@ export type ModernReservationRecommendation = ReservationRecommendation & { * 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; }; -/** Legacy charge summary. */ -export type LegacyChargeSummary = ChargeSummary & { - /** - * The id of the billing period resource that the charge belongs to. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly billingPeriodId?: string; - /** - * Usage start date. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly usageStart?: string; +/** Modern reservation recommendation. */ +export type ModernReservationRecommendation = ReservationRecommendation & { /** - * Usage end date. + * Resource Location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly usageEnd?: string; + readonly locationPropertiesLocation?: string; /** - * Azure Charges. + * 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 azureCharges?: number; + readonly lookBackPeriod?: number; /** - * Charges Billed separately. + * The instance Flexibility Ratio. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly chargesBilledSeparately?: number; + readonly instanceFlexibilityRatio?: number; /** - * Marketplace Charges. + * The instance Flexibility Group. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly marketplaceCharges?: number; + readonly instanceFlexibilityGroup?: string; /** - * Currency Code + * The normalized Size. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currency?: string; -}; - -/** Modern charge summary. */ -export type ModernChargeSummary = ChargeSummary & { + readonly normalizedSize?: string; /** - * The id of the billing period resource that the charge belongs to. + * The recommended Quantity Normalized. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly billingPeriodId?: string; + readonly recommendedQuantityNormalized?: number; /** - * Usage start date. + * The meter id (GUID) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly usageStart?: string; + readonly meterId?: string; /** - * Usage end date. + * RI recommendations in one or three year terms. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly usageEnd?: string; + readonly term?: string; /** - * Azure Charges. + * The total amount of cost without reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly azureCharges?: Amount; + readonly costWithNoReservedInstances?: Amount; /** - * Charges Billed separately. + * Recommended quality for reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly chargesBilledSeparately?: Amount; + readonly recommendedQuantity?: number; /** - * Marketplace Charges. + * The total amount of cost with reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly marketplaceCharges?: Amount; + readonly totalCostWithReservedInstances?: Amount; /** - * Billing Account Id + * Total estimated savings with reserved instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly billingAccountId?: string; + readonly netSavings?: Amount; /** - * Billing Profile Id + * The usage date for looking back. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly billingProfileId?: string; + readonly firstUsageDate?: Date; /** - * Invoice Section Id + * Shared or single recommendation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly invoiceSectionId?: string; + readonly scope?: string; /** - * Customer Id + * List of sku properties * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customerId?: string; + readonly skuProperties?: SkuProperty[]; /** - * Is charge Invoiced + * This is the ARM Sku name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isInvoiced?: boolean; + readonly skuName?: string; }; /** Legacy Reservation transaction resource. */ @@ -2862,8 +2751,7 @@ export type OperatorType = string; /** Known values of {@link ThresholdType} that the service accepts. */ export enum KnownThresholdType { - Actual = "Actual", - Forecasted = "Forecasted" + Actual = "Actual" } /** @@ -2871,65 +2759,10 @@ 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** */ export type ThresholdType = string; -/** Known values of {@link CultureCode} that the service accepts. */ -export enum KnownCultureCode { - EnUs = "en-us", - JaJp = "ja-jp", - ZhCn = "zh-cn", - DeDe = "de-de", - EsEs = "es-es", - FrFr = "fr-fr", - ItIt = "it-it", - KoKr = "ko-kr", - PtBr = "pt-br", - RuRu = "ru-ru", - ZhTw = "zh-tw", - CsCz = "cs-cz", - PlPl = "pl-pl", - TrTr = "tr-tr", - DaDk = "da-dk", - EnGb = "en-gb", - HuHu = "hu-hu", - NbNo = "nb-no", - NlNl = "nl-nl", - PtPt = "pt-pt", - SvSe = "sv-se" -} - -/** - * Defines values for CultureCode. \ - * {@link KnownCultureCode} can be used interchangeably with CultureCode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **en-us** \ - * **ja-jp** \ - * **zh-cn** \ - * **de-de** \ - * **es-es** \ - * **fr-fr** \ - * **it-it** \ - * **ko-kr** \ - * **pt-br** \ - * **ru-ru** \ - * **zh-tw** \ - * **cs-cz** \ - * **pl-pl** \ - * **tr-tr** \ - * **da-dk** \ - * **en-gb** \ - * **hu-hu** \ - * **nb-no** \ - * **nl-nl** \ - * **pt-pt** \ - * **sv-se** - */ -export type CultureCode = string; - /** Known values of {@link ChargeSummaryKind} that the service accepts. */ export enum KnownChargeSummaryKind { Legacy = "legacy", diff --git a/sdk/consumption/arm-consumption/src/models/mappers.ts b/sdk/consumption/arm-consumption/src/models/mappers.ts index 2433e367e222..ce469e30fa2c 100644 --- a/sdk/consumption/arm-consumption/src/models/mappers.ts +++ b/sdk/consumption/arm-consumption/src/models/mappers.ts @@ -396,12 +396,6 @@ export const Notification: coreClient.CompositeMapper = { type: { name: "String" } - }, - locale: { - serializedName: "locale", - type: { - name: "String" - } } } } @@ -1453,131 +1447,6 @@ export const MeterDetailsResponse: coreClient.CompositeMapper = { } }; -export const LegacyReservationRecommendationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LegacyReservationRecommendationProperties", - uberParent: "LegacyReservationRecommendationProperties", - polymorphicDiscriminator: { - serializedName: "scope", - clientName: "scope" - }, - modelProperties: { - lookBackPeriod: { - serializedName: "lookBackPeriod", - readOnly: true, - type: { - name: "String" - } - }, - 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" - } - }, - resourceType: { - serializedName: "resourceType", - readOnly: true, - type: { - name: "String" - } - }, - term: { - serializedName: "term", - readOnly: true, - type: { - name: "String" - } - }, - costWithNoReservedInstances: { - serializedName: "costWithNoReservedInstances", - readOnly: true, - type: { - name: "Number" - } - }, - recommendedQuantity: { - serializedName: "recommendedQuantity", - readOnly: true, - type: { - name: "Number" - } - }, - totalCostWithReservedInstances: { - serializedName: "totalCostWithReservedInstances", - readOnly: true, - type: { - name: "Number" - } - }, - netSavings: { - serializedName: "netSavings", - readOnly: true, - type: { - name: "Number" - } - }, - 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" - } - } - } - } - } - } -}; - export const SkuProperty: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1839,6 +1708,29 @@ export const Marketplace: coreClient.CompositeMapper = { } }; +export const ChargeSummary: coreClient.CompositeMapper = { + serializedName: "ChargeSummary", + type: { + name: "Composite", + className: "ChargeSummary", + uberParent: "Resource", + polymorphicDiscriminator: { + serializedName: "kind", + clientName: "kind" + }, + modelProperties: { + ...Resource.type.modelProperties, + kind: { + serializedName: "kind", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const Balance: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2385,162 +2277,167 @@ export const ManagementGroupAggregatedCostResult: coreClient.CompositeMapper = { } }; -export const CreditSummary: coreClient.CompositeMapper = { +export const EventSummary: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CreditSummary", + className: "EventSummary", modelProperties: { ...Resource.type.modelProperties, - balanceSummary: { - serializedName: "properties.balanceSummary", + transactionDate: { + serializedName: "properties.transactionDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + description: { + serializedName: "properties.description", + readOnly: true, + type: { + name: "String" + } + }, + newCredit: { + serializedName: "properties.newCredit", type: { name: "Composite", - className: "CreditBalanceSummary" + className: "Amount" } }, - pendingCreditAdjustments: { - serializedName: "properties.pendingCreditAdjustments", + adjustments: { + serializedName: "properties.adjustments", type: { name: "Composite", className: "Amount" } }, - expiredCredit: { - serializedName: "properties.expiredCredit", + creditExpired: { + serializedName: "properties.creditExpired", type: { name: "Composite", className: "Amount" } }, - pendingEligibleCharges: { - serializedName: "properties.pendingEligibleCharges", + charges: { + serializedName: "properties.charges", type: { name: "Composite", className: "Amount" } }, - creditCurrency: { - serializedName: "properties.creditCurrency", + closedBalance: { + serializedName: "properties.closedBalance", + type: { + name: "Composite", + className: "Amount" + } + }, + eventType: { + serializedName: "properties.eventType", + type: { + name: "String" + } + }, + invoiceNumber: { + serializedName: "properties.invoiceNumber", readOnly: true, type: { name: "String" } }, - billingCurrency: { - serializedName: "properties.billingCurrency", + billingProfileId: { + serializedName: "properties.billingProfileId", readOnly: true, type: { name: "String" } }, - reseller: { - serializedName: "properties.reseller", + billingProfileDisplayName: { + serializedName: "properties.billingProfileDisplayName", + readOnly: true, type: { - name: "Composite", - className: "Reseller" + name: "String" } }, - eTag: { - serializedName: "properties.eTag", + lotId: { + serializedName: "properties.lotId", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const Budget: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Budget", - modelProperties: { - ...ProxyResource.type.modelProperties, - category: { - serializedName: "properties.category", + }, + lotSource: { + serializedName: "properties.lotSource", + readOnly: true, type: { name: "String" } }, - amount: { - serializedName: "properties.amount", + canceledCredit: { + serializedName: "properties.canceledCredit", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - timeGrain: { - serializedName: "properties.timeGrain", + creditCurrency: { + serializedName: "properties.creditCurrency", + readOnly: true, type: { name: "String" } }, - timePeriod: { - serializedName: "properties.timePeriod", + billingCurrency: { + serializedName: "properties.billingCurrency", + readOnly: true, type: { - name: "Composite", - className: "BudgetTimePeriod" + name: "String" } }, - filter: { - serializedName: "properties.filter", + reseller: { + serializedName: "properties.reseller", type: { name: "Composite", - className: "BudgetFilter" + className: "Reseller" } }, - currentSpend: { - serializedName: "properties.currentSpend", + creditExpiredInBillingCurrency: { + serializedName: "properties.creditExpiredInBillingCurrency", type: { name: "Composite", - className: "CurrentSpend" + className: "AmountWithExchangeRate" } }, - notifications: { - serializedName: "properties.notifications", + newCreditInBillingCurrency: { + serializedName: "properties.newCreditInBillingCurrency", type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "Notification" } } + name: "Composite", + className: "AmountWithExchangeRate" } }, - forecastSpend: { - serializedName: "properties.forecastSpend", + adjustmentsInBillingCurrency: { + serializedName: "properties.adjustmentsInBillingCurrency", type: { name: "Composite", - className: "ForecastSpend" + className: "AmountWithExchangeRate" } - } - } - } -}; - -export const TagsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TagsResult", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - serializedName: "properties.tags", + }, + chargesInBillingCurrency: { + serializedName: "properties.chargesInBillingCurrency", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Tag" - } - } + name: "Composite", + className: "AmountWithExchangeRate" } }, - nextLink: { - serializedName: "properties.nextLink", - readOnly: true, + closedBalanceInBillingCurrency: { + serializedName: "properties.closedBalanceInBillingCurrency", type: { - name: "String" + name: "Composite", + className: "AmountWithExchangeRate" } }, - previousLink: { - serializedName: "properties.previousLink", + eTag: { + serializedName: "properties.eTag", readOnly: true, type: { name: "String" @@ -2550,72 +2447,14 @@ export const TagsResult: coreClient.CompositeMapper = { } }; -export const ChargeSummary: coreClient.CompositeMapper = { - serializedName: "ChargeSummary", - type: { - name: "Composite", - className: "ChargeSummary", - uberParent: "ProxyResource", - polymorphicDiscriminator: { - serializedName: "kind", - clientName: "kind" - }, - modelProperties: { - ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const EventSummary: coreClient.CompositeMapper = { +export const LotSummary: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EventSummary", + className: "LotSummary", modelProperties: { - ...ProxyResource.type.modelProperties, - transactionDate: { - serializedName: "properties.transactionDate", - readOnly: true, - type: { - name: "DateTime" - } - }, - description: { - serializedName: "properties.description", - readOnly: true, - type: { - name: "String" - } - }, - newCredit: { - serializedName: "properties.newCredit", - type: { - name: "Composite", - className: "Amount" - } - }, - adjustments: { - serializedName: "properties.adjustments", - type: { - name: "Composite", - className: "Amount" - } - }, - creditExpired: { - serializedName: "properties.creditExpired", - type: { - name: "Composite", - className: "Amount" - } - }, - charges: { - serializedName: "properties.charges", + ...Resource.type.modelProperties, + originalAmount: { + serializedName: "properties.originalAmount", type: { name: "Composite", className: "Amount" @@ -2628,54 +2467,48 @@ export const EventSummary: coreClient.CompositeMapper = { className: "Amount" } }, - eventType: { - serializedName: "properties.eventType", + source: { + serializedName: "properties.source", + readOnly: true, type: { name: "String" } }, - invoiceNumber: { - serializedName: "properties.invoiceNumber", + startDate: { + serializedName: "properties.startDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - billingProfileId: { - serializedName: "properties.billingProfileId", + expirationDate: { + serializedName: "properties.expirationDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - billingProfileDisplayName: { - serializedName: "properties.billingProfileDisplayName", + poNumber: { + serializedName: "properties.poNumber", readOnly: true, type: { name: "String" } }, - lotId: { - serializedName: "properties.lotId", + purchasedDate: { + serializedName: "properties.purchasedDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - lotSource: { - serializedName: "properties.lotSource", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String" } }, - canceledCredit: { - serializedName: "properties.canceledCredit", - type: { - name: "Composite", - className: "Amount" - } - }, creditCurrency: { serializedName: "properties.creditCurrency", readOnly: true, @@ -2690,49 +2523,28 @@ export const EventSummary: coreClient.CompositeMapper = { name: "String" } }, - reseller: { - serializedName: "properties.reseller", - type: { - name: "Composite", - className: "Reseller" - } - }, - creditExpiredInBillingCurrency: { - serializedName: "properties.creditExpiredInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - newCreditInBillingCurrency: { - serializedName: "properties.newCreditInBillingCurrency", - type: { - name: "Composite", - className: "AmountWithExchangeRate" - } - }, - adjustmentsInBillingCurrency: { - serializedName: "properties.adjustmentsInBillingCurrency", + originalAmountInBillingCurrency: { + serializedName: "properties.originalAmountInBillingCurrency", type: { name: "Composite", className: "AmountWithExchangeRate" } }, - chargesInBillingCurrency: { - serializedName: "properties.chargesInBillingCurrency", + closedBalanceInBillingCurrency: { + serializedName: "properties.closedBalanceInBillingCurrency", type: { name: "Composite", className: "AmountWithExchangeRate" } }, - closedBalanceInBillingCurrency: { - serializedName: "properties.closedBalanceInBillingCurrency", + reseller: { + serializedName: "properties.reseller", type: { name: "Composite", - className: "AmountWithExchangeRate" + className: "Reseller" } }, - eTagPropertiesETag: { + eTag: { serializedName: "properties.eTag", readOnly: true, type: { @@ -2743,105 +2555,162 @@ export const EventSummary: coreClient.CompositeMapper = { } }; -export const LotSummary: coreClient.CompositeMapper = { +export const CreditSummary: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LotSummary", + className: "CreditSummary", modelProperties: { - ...ProxyResource.type.modelProperties, - originalAmount: { - serializedName: "properties.originalAmount", + ...Resource.type.modelProperties, + balanceSummary: { + serializedName: "properties.balanceSummary", type: { name: "Composite", - className: "Amount" + className: "CreditBalanceSummary" } }, - closedBalance: { - serializedName: "properties.closedBalance", + pendingCreditAdjustments: { + serializedName: "properties.pendingCreditAdjustments", type: { name: "Composite", className: "Amount" } }, - source: { - serializedName: "properties.source", - readOnly: true, + expiredCredit: { + serializedName: "properties.expiredCredit", type: { - name: "String" + name: "Composite", + className: "Amount" } }, - startDate: { - serializedName: "properties.startDate", - readOnly: true, + pendingEligibleCharges: { + serializedName: "properties.pendingEligibleCharges", type: { - name: "DateTime" + name: "Composite", + className: "Amount" } }, - expirationDate: { - serializedName: "properties.expirationDate", + creditCurrency: { + serializedName: "properties.creditCurrency", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - poNumber: { - serializedName: "properties.poNumber", + billingCurrency: { + serializedName: "properties.billingCurrency", readOnly: true, type: { name: "String" } }, - purchasedDate: { - serializedName: "properties.purchasedDate", - readOnly: true, + reseller: { + serializedName: "properties.reseller", type: { - name: "DateTime" + name: "Composite", + className: "Reseller" } }, - status: { - serializedName: "properties.status", + eTag: { + serializedName: "properties.eTag", readOnly: true, type: { name: "String" } - }, - creditCurrency: { - serializedName: "properties.creditCurrency", - readOnly: true, + } + } + } +}; + +export const Budget: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Budget", + modelProperties: { + ...ProxyResource.type.modelProperties, + category: { + serializedName: "properties.category", type: { name: "String" } }, - billingCurrency: { - serializedName: "properties.billingCurrency", - readOnly: true, + amount: { + serializedName: "properties.amount", + type: { + name: "Number" + } + }, + timeGrain: { + serializedName: "properties.timeGrain", type: { name: "String" } }, - originalAmountInBillingCurrency: { - serializedName: "properties.originalAmountInBillingCurrency", + timePeriod: { + serializedName: "properties.timePeriod", type: { name: "Composite", - className: "AmountWithExchangeRate" + className: "BudgetTimePeriod" } }, - closedBalanceInBillingCurrency: { - serializedName: "properties.closedBalanceInBillingCurrency", + filter: { + serializedName: "properties.filter", type: { name: "Composite", - className: "AmountWithExchangeRate" + className: "BudgetFilter" } }, - reseller: { - serializedName: "properties.reseller", + currentSpend: { + serializedName: "properties.currentSpend", type: { name: "Composite", - className: "Reseller" + className: "CurrentSpend" } }, - eTagPropertiesETag: { - serializedName: "properties.eTag", + notifications: { + serializedName: "properties.notifications", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "Notification" } } + } + }, + forecastSpend: { + serializedName: "properties.forecastSpend", + type: { + name: "Composite", + className: "ForecastSpend" + } + } + } + } +}; + +export const TagsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TagsResult", + modelProperties: { + ...ProxyResource.type.modelProperties, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Tag" + } + } + } + }, + nextLink: { + serializedName: "properties.nextLink", + readOnly: true, + type: { + name: "String" + } + }, + previousLink: { + serializedName: "properties.previousLink", readOnly: true, type: { name: "String" @@ -2996,27 +2865,6 @@ export const ReservationTransaction: coreClient.CompositeMapper = { type: { name: "String" } - }, - billingMonth: { - serializedName: "properties.billingMonth", - readOnly: true, - type: { - name: "Number" - } - }, - monetaryCommitment: { - serializedName: "properties.monetaryCommitment", - readOnly: true, - type: { - name: "Number" - } - }, - overage: { - serializedName: "properties.overage", - readOnly: true, - type: { - name: "Number" - } } } } @@ -3197,41 +3045,6 @@ export const AmountWithExchangeRate: coreClient.CompositeMapper = { } }; -export const LegacySingleScopeReservationRecommendationProperties: coreClient.CompositeMapper = { - serializedName: "Single", - type: { - name: "Composite", - 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 LegacyUsageDetail: coreClient.CompositeMapper = { serializedName: "legacy", type: { @@ -3968,103 +3781,255 @@ export const ModernUsageDetail: coreClient.CompositeMapper = { name: "String" } }, - resellerMpnId: { - serializedName: "properties.resellerMpnId", + resellerMpnId: { + serializedName: "properties.resellerMpnId", + readOnly: true, + type: { + name: "String" + } + }, + resellerName: { + serializedName: "properties.resellerName", + readOnly: true, + type: { + name: "String" + } + }, + publisherId: { + serializedName: "properties.publisherId", + readOnly: true, + type: { + name: "String" + } + }, + marketPrice: { + serializedName: "properties.marketPrice", + readOnly: true, + type: { + name: "Number" + } + }, + exchangeRatePricingToBilling: { + serializedName: "properties.exchangeRatePricingToBilling", + readOnly: true, + type: { + name: "Number" + } + }, + paygCostInBillingCurrency: { + serializedName: "properties.paygCostInBillingCurrency", + readOnly: true, + type: { + name: "Number" + } + }, + paygCostInUSD: { + serializedName: "properties.paygCostInUSD", + readOnly: true, + type: { + name: "Number" + } + }, + partnerEarnedCreditRate: { + serializedName: "properties.partnerEarnedCreditRate", + readOnly: true, + type: { + name: "Number" + } + }, + partnerEarnedCreditApplied: { + serializedName: "properties.partnerEarnedCreditApplied", + readOnly: true, + type: { + name: "String" + } + }, + payGPrice: { + serializedName: "properties.payGPrice", + readOnly: true, + type: { + name: "Number" + } + }, + benefitId: { + serializedName: "properties.benefitId", + readOnly: true, + type: { + name: "String" + } + }, + benefitName: { + serializedName: "properties.benefitName", + readOnly: true, + type: { + name: "String" + } + }, + provider: { + serializedName: "properties.provider", + readOnly: true, + type: { + name: "String" + } + }, + costAllocationRuleName: { + serializedName: "properties.costAllocationRuleName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const LegacyChargeSummary: coreClient.CompositeMapper = { + serializedName: "legacy", + type: { + name: "Composite", + className: "LegacyChargeSummary", + uberParent: "Resource", + polymorphicDiscriminator: Resource.type.polymorphicDiscriminator, + modelProperties: { + ...ChargeSummary.type.modelProperties, + billingPeriodId: { + serializedName: "properties.billingPeriodId", + readOnly: true, + type: { + name: "String" + } + }, + usageStart: { + serializedName: "properties.usageStart", readOnly: true, type: { name: "String" } }, - resellerName: { - serializedName: "properties.resellerName", + usageEnd: { + serializedName: "properties.usageEnd", readOnly: true, type: { name: "String" } }, - publisherId: { - serializedName: "properties.publisherId", + azureCharges: { + serializedName: "properties.azureCharges", readOnly: true, type: { - name: "String" + name: "Number" } }, - marketPrice: { - serializedName: "properties.marketPrice", + chargesBilledSeparately: { + serializedName: "properties.chargesBilledSeparately", readOnly: true, type: { name: "Number" } }, - exchangeRatePricingToBilling: { - serializedName: "properties.exchangeRatePricingToBilling", + marketplaceCharges: { + serializedName: "properties.marketplaceCharges", readOnly: true, type: { name: "Number" } }, - paygCostInBillingCurrency: { - serializedName: "properties.paygCostInBillingCurrency", + currency: { + serializedName: "properties.currency", readOnly: true, type: { - name: "Number" + name: "String" } - }, - paygCostInUSD: { - serializedName: "properties.paygCostInUSD", + } + } + } +}; + +export const ModernChargeSummary: coreClient.CompositeMapper = { + serializedName: "modern", + type: { + name: "Composite", + className: "ModernChargeSummary", + uberParent: "Resource", + polymorphicDiscriminator: Resource.type.polymorphicDiscriminator, + modelProperties: { + ...ChargeSummary.type.modelProperties, + billingPeriodId: { + serializedName: "properties.billingPeriodId", readOnly: true, type: { - name: "Number" + name: "String" } }, - partnerEarnedCreditRate: { - serializedName: "properties.partnerEarnedCreditRate", + usageStart: { + serializedName: "properties.usageStart", readOnly: true, type: { - name: "Number" + name: "String" } }, - partnerEarnedCreditApplied: { - serializedName: "properties.partnerEarnedCreditApplied", + usageEnd: { + serializedName: "properties.usageEnd", readOnly: true, type: { name: "String" } }, - payGPrice: { - serializedName: "properties.payGPrice", - readOnly: true, + azureCharges: { + serializedName: "properties.azureCharges", type: { - name: "Number" + name: "Composite", + className: "Amount" } }, - benefitId: { - serializedName: "properties.benefitId", + chargesBilledSeparately: { + serializedName: "properties.chargesBilledSeparately", + type: { + name: "Composite", + className: "Amount" + } + }, + marketplaceCharges: { + serializedName: "properties.marketplaceCharges", + type: { + name: "Composite", + className: "Amount" + } + }, + billingAccountId: { + serializedName: "properties.billingAccountId", readOnly: true, type: { name: "String" } }, - benefitName: { - serializedName: "properties.benefitName", + billingProfileId: { + serializedName: "properties.billingProfileId", readOnly: true, type: { name: "String" } }, - provider: { - serializedName: "properties.provider", + invoiceSectionId: { + serializedName: "properties.invoiceSectionId", readOnly: true, type: { name: "String" } }, - costAllocationRuleName: { - serializedName: "properties.costAllocationRuleName", + customerId: { + serializedName: "properties.customerId", readOnly: true, type: { name: "String" } + }, + isInvoiced: { + serializedName: "properties.isInvoiced", + readOnly: true, + type: { + name: "Boolean" + } } } } @@ -4172,7 +4137,7 @@ export const LegacyReservationRecommendation: coreClient.CompositeMapper = { }, scope: { serializedName: "properties.scope", - required: true, + readOnly: true, type: { name: "String" } @@ -4325,158 +4290,6 @@ export const ModernReservationRecommendation: coreClient.CompositeMapper = { } }; -export const LegacyChargeSummary: coreClient.CompositeMapper = { - serializedName: "legacy", - type: { - name: "Composite", - className: "LegacyChargeSummary", - uberParent: "ProxyResource", - polymorphicDiscriminator: ProxyResource.type.polymorphicDiscriminator, - modelProperties: { - ...ChargeSummary.type.modelProperties, - billingPeriodId: { - serializedName: "properties.billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - usageStart: { - serializedName: "properties.usageStart", - readOnly: true, - type: { - name: "String" - } - }, - usageEnd: { - serializedName: "properties.usageEnd", - readOnly: true, - type: { - name: "String" - } - }, - azureCharges: { - serializedName: "properties.azureCharges", - readOnly: true, - type: { - name: "Number" - } - }, - chargesBilledSeparately: { - serializedName: "properties.chargesBilledSeparately", - readOnly: true, - type: { - name: "Number" - } - }, - marketplaceCharges: { - serializedName: "properties.marketplaceCharges", - readOnly: true, - type: { - name: "Number" - } - }, - currency: { - serializedName: "properties.currency", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ModernChargeSummary: coreClient.CompositeMapper = { - serializedName: "modern", - type: { - name: "Composite", - className: "ModernChargeSummary", - uberParent: "ProxyResource", - polymorphicDiscriminator: ProxyResource.type.polymorphicDiscriminator, - modelProperties: { - ...ChargeSummary.type.modelProperties, - billingPeriodId: { - serializedName: "properties.billingPeriodId", - readOnly: true, - type: { - name: "String" - } - }, - usageStart: { - serializedName: "properties.usageStart", - readOnly: true, - type: { - name: "String" - } - }, - usageEnd: { - serializedName: "properties.usageEnd", - readOnly: true, - type: { - name: "String" - } - }, - azureCharges: { - serializedName: "properties.azureCharges", - type: { - name: "Composite", - className: "Amount" - } - }, - chargesBilledSeparately: { - serializedName: "properties.chargesBilledSeparately", - type: { - name: "Composite", - className: "Amount" - } - }, - marketplaceCharges: { - serializedName: "properties.marketplaceCharges", - type: { - name: "Composite", - className: "Amount" - } - }, - billingAccountId: { - serializedName: "properties.billingAccountId", - readOnly: true, - type: { - name: "String" - } - }, - billingProfileId: { - serializedName: "properties.billingProfileId", - readOnly: true, - type: { - name: "String" - } - }, - invoiceSectionId: { - serializedName: "properties.invoiceSectionId", - readOnly: true, - type: { - name: "String" - } - }, - customerId: { - serializedName: "properties.customerId", - readOnly: true, - type: { - name: "String" - } - }, - isInvoiced: { - serializedName: "properties.isInvoiced", - readOnly: true, - type: { - name: "Boolean" - } - } - } - } -}; - export const LegacyReservationTransaction: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4488,14 +4301,9 @@ export const LegacyReservationTransaction: coreClient.CompositeMapper = { }; export let discriminators = { - LegacyReservationRecommendationProperties: LegacyReservationRecommendationProperties, "Resource.UsageDetail": UsageDetail, + "Resource.ChargeSummary": ChargeSummary, "Resource.ReservationRecommendation": ReservationRecommendation, - "ProxyResource.ChargeSummary": ChargeSummary, - "LegacyReservationRecommendationProperties.Single": LegacySingleScopeReservationRecommendationProperties, - "LegacyReservationRecommendationProperties.Shared": LegacySharedScopeReservationRecommendationProperties, "Resource.legacy": LegacyReservationRecommendation, - "Resource.modern": ModernReservationRecommendation, - "ProxyResource.legacy": LegacyChargeSummary, - "ProxyResource.modern": ModernChargeSummary + "Resource.modern": ModernReservationRecommendation }; diff --git a/sdk/consumption/arm-consumption/src/operations/balances.ts b/sdk/consumption/arm-consumption/src/operations/balances.ts index ec5c3fcf9868..e5b9c00f5c74 100644 --- a/sdk/consumption/arm-consumption/src/operations/balances.ts +++ b/sdk/consumption/arm-consumption/src/operations/balances.ts @@ -86,7 +86,7 @@ const getByBillingAccountOperationSpec: coreClient.OperationSpec = { }; const getForBillingPeriodByBillingAccountOperationSpec: coreClient.OperationSpec = { path: - "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}/providers/Microsoft.Consumption/balances", httpMethod: "GET", responses: { 200: { diff --git a/sdk/consumption/arm-consumption/test/consumption_examples.ts b/sdk/consumption/arm-consumption/test/consumption_examples.ts deleted file mode 100644 index 2b3d03be4a33..000000000000 --- a/sdk/consumption/arm-consumption/test/consumption_examples.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - env, - record, - RecorderEnvironmentSetup, - Recorder, - delay, - isPlaybackMode -} from "@azure-tools/test-recorder"; -import * as assert from "assert"; -import { ClientSecretCredential } from "@azure/identity"; -import { ConsumptionManagementClient } from "../src/consumptionManagementClient"; - -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - 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" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("Consumption test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ConsumptionManagementClient; - let location: string; - let resourceGroup: string; - let budgetName: string; - let vmName: string; - let scope: string; - - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); - subscriptionId = env.SUBSCRIPTION_ID; - // This is an example of how the environment variables are used - const credential = new ClientSecretCredential( - env.AZURE_TENANT_ID, - env.AZURE_CLIENT_ID, - env.AZURE_CLIENT_SECRET - ); - client = new ConsumptionManagementClient(credential, subscriptionId); - location = "eastus"; - resourceGroup = "myjstest"; - budgetName = "mybudgetxxxy"; - vmName = "myvmxxx"; - scope = "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup; - }); - - afterEach(async function() { - await recorder.stop(); - }); - - it("budgets create test", async function() { - const res = await client.budgets.createOrUpdate(scope,budgetName,{ - category: "Cost", - amount: 100, - timeGrain: "Monthly", - timePeriod: { - startDate: new Date("2021-12-01T00:00:00Z"), - endDate: new Date("2021-12-31T00:00:00Z") - }, - filter: { - and: [ - { - dimensions: { - name: "ResourceId", - operator: "In", - values: [ - "/subscriptions/"+subscriptionId+"/resourceGroups/"+resourceGroup+"/providers/Microsoft.Compute/virtualMachines/"+vmName - ] - } - }, - { - tags: { - name: "category", - operator: "In", - values: [ - "Dev", - "Prod" - ] - } - } - ] - }, - notifications: { - Actual_GreaterThan_80_Percent: { - enabled: true, - operator: "GreaterThan", - threshold: 80, - contactEmails: [ - "johndoe@contoso.com", - "janesmith@contoso.com" - ], - contactRoles: [ - "Contributor", - "Reader" - ], - thresholdType: "Actual" - } - } - }); - assert.equal(res.name,budgetName); - }); - - it("budgets get test", async function() { - const res = await client.budgets.get(scope,budgetName); - assert.equal(res.name,budgetName); - }); - - it("budgets delete test", async function() { - const res = await client.budgets.delete(scope,budgetName); - }); -}); diff --git a/sdk/consumption/arm-consumption/test/sampleTest.ts b/sdk/consumption/arm-consumption/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/consumption/arm-consumption/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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 { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + 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" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +});