diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 33c3f8419c54..6c71ab2c4a82 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -11781,7 +11781,7 @@ packages: dev: false file:projects/arm-datalake-analytics.tgz: - resolution: {integrity: sha512-/wtriWS/G14ZKjuXeLtwJ/G0DpdRiwQvpokB5vMy6zQFFmKprHmwOAL/Wfjww5KvuuRthFTEm+l4Vu5OmlACGg==, tarball: file:projects/arm-datalake-analytics.tgz} + resolution: {integrity: sha512-dCpD5shLRFxS5YwlZbu3+n1oDFYFs2AuBGLmnfHWhwULh36A7X/5heNrqYbvBeOTNRh2c5BzneO6yI4ct5VueQ==, tarball: file:projects/arm-datalake-analytics.tgz} name: '@rush-temp/arm-datalake-analytics' version: 0.0.0 dependencies: @@ -11792,18 +11792,19 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 + '@types/chai': 4.3.4 + '@types/node': 14.18.33 + chai: 4.3.7 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 + rollup-plugin-sourcemaps: 0.6.3_1225c068d0546e507df7db46196a6444 tslib: 2.4.1 - typescript: 4.2.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - - '@types/node' - - encoding - supports-color dev: false diff --git a/sdk/datalake-analytics/arm-datalake-analytics/CHANGELOG.md b/sdk/datalake-analytics/arm-datalake-analytics/CHANGELOG.md index 3c6aeca0e080..ff21970be22f 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/CHANGELOG.md +++ b/sdk/datalake-analytics/arm-datalake-analytics/CHANGELOG.md @@ -1,18 +1,8 @@ # Release History + +## 2.0.0-beta.4 (2022-11-21) -## 2.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.3 (2022-04-18) - -The package of @azure/arm-datalake-analytics is using our next generation design principles since version 2.0.0-beta.3, which contains breaking changes. +The package of @azure/arm-datalake-analytics is using our next generation design principles since version 2.0.0-beta.4, which contains breaking changes. To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog). diff --git a/sdk/datalake-analytics/arm-datalake-analytics/_meta.json b/sdk/datalake-analytics/arm-datalake-analytics/_meta.json index 4dfc96f697b2..2533cf97b9d0 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/_meta.json +++ b/sdk/datalake-analytics/arm-datalake-analytics/_meta.json @@ -1,8 +1,8 @@ { "commit": "270ba8923ce458af2b59cd66b008355676bccd49", "readme": "specification\\datalake-analytics\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datalake-analytics\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\datalake-analytics\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", + "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" } \ No newline at end of file diff --git a/sdk/datalake-analytics/arm-datalake-analytics/package.json b/sdk/datalake-analytics/arm-datalake-analytics/package.json index 4c4a96a4c87b..882c1bfbe52f 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/package.json +++ b/sdk/datalake-analytics/arm-datalake-analytics/package.json @@ -11,7 +11,7 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.5.0", + "@azure/core-client": "^1.6.1", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -36,13 +36,18 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^14.0.0", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datalake-analytics/arm-datalake-analytics", "repository": { @@ -93,9 +98,8 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", - "integration-test:browser": "echo skipped", - "docs": "echo skipped" + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:browser": "echo skipped" }, "sideEffects": false, "//metadata": { @@ -115,4 +119,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-datalake-analytics?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_create_test.js b/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_create_test.js deleted file mode 100644 index 95fe7cfc1f9f..000000000000 --- a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_create_test.js +++ /dev/null @@ -1,593 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "847fe3b5ec6a6aba11b307fdc6fdec00"; - -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', - 'b0945a43-ce20-4888-800b-bb5bd2690100', - 'x-ms-ests-server', - '2.1.12231.8 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AqRwS1xwexBKhAX-jZ8n8Jk; expires=Sat, 18-Dec-2021 02:15:19 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrqlbpBitG_OKtC1BYfU5KN72dSHvCYBhBrLIvofnP4-yqoGtmWJGu14Xh0P9jugNsNIOKGYRhepMYgRVbhuvTzetKgCbYK03dkG_5-Ry2TJP27-E88lW5IUpMIcRBIkoiLe0UiBVxvqdhuI26qNIMeRfmoin1aYrpLeWpumsea0UgAA; 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, 18 Nov 2021 02:15:19 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', - 'b0945a43-ce20-4888-800b-bb5bd5690100', - 'x-ms-ests-server', - '2.1.12231.8 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AnabLVE3RzNEmDOOY303gaA; expires=Sat, 18-Dec-2021 02:15:19 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr74RWuzM0uJ_dN_GgZRfljrIMV5emN1coRqtg-G4lxJX0hdkJYavPXyPawmmXiB3MJfYUEo4MFdgbopf30mW1hvCGBTw6CXX7rEEse3KRJTyyDyqajkMuXs9LTkHrOXyN7uK1Bkr-gTp2oBnDminxPMb-6IT0rexpknU5HCvsh6kgAA; 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, 18 Nov 2021 02:15:19 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.3.3&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=e65107ec-fd98-419e-8e66-4422cc61479c&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', - '5dd6015d-1c11-4581-ab0f-ab1c51210200', - 'x-ms-ests-server', - '2.1.12231.8 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AlTq8qN7-i9FvQYQnzJ9WBMWPr5BAQAAADeuJ9kOAAAA; expires=Sat, 18-Dec-2021 02:15:19 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, 18 Nov 2021 02:15:19 GMT', - 'Content-Length', - '1351' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.DataLakeAnalytics/accounts/myaccountxxx', {"location":"eastus2","tags":{"key1":"value1"},"properties":{"defaultDataLakeStoreAccount":"mygen1","dataLakeStoreAccounts":[{"name":"mygen1"}],"firewallState":"Enabled","firewallAllowAzureIps":"Enabled","newTier":"Consumption","maxJobCount":3,"maxDegreeOfParallelism":30,"maxDegreeOfParallelismPerJob":1,"minPriorityPerJob":1,"queryStoreRetention":30}}) - .query(true) - .reply(201, {"properties":{"firewallState":"Enabled","firewallAllowAzureIps":"Enabled","defaultDataLakeStoreAccount":"mygen1","dataLakeStoreAccounts":[{"properties":{"suffix":"azuredatalakestore.net"},"name":"mygen1"}],"maxDegreeOfParallelism":30,"maxJobCount":3,"maxDegreeOfParallelismPerJob":1,"minPriorityPerJob":1,"queryStoreRetention":30,"newTier":"Consumption","provisioningState":"Creating","state":null,"endpoint":null,"accountId":"bb5483e6-b01e-4879-a6f2-f5d9289d426e"},"location":"eastus2","tags":{"key1":"value1"},"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.DataLakeAnalytics/accounts/myaccountxxx","name":"myaccountxxx","type":"Microsoft.DataLakeAnalytics/accounts"}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '724', - 'Content-Type', - 'application/json', - 'Expires', - '-1', - 'Location', - 'https://management.azure.com/subscriptions/azure_subscription_id/resourcegroups/myjstest/providers/Microsoft.DataLakeAnalytics/accounts/myaccountxxx/operationresults/0?api-version=2019-11-01-preview', - 'Retry-After', - '0', - 'Azure-AsyncOperation', - 'https://management.azure.com/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0?api-version=2019-11-01-preview', - 'x-ms-request-id', - 'ad387f0b-96aa-4051-b251-4783c13063fd', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '8860c2ba-d072-4547-8022-b8b0210a3c74', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021528Z:8860c2ba-d072-4547-8022-b8b0210a3c74', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:28 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '9d7f62ad-56da-4bd1-a426-9133f14e1713', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '2cb140e3-07cc-484e-ac35-42424b8da9bb', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021530Z:2cb140e3-07cc-484e-ac35-42424b8da9bb', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:29 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '99575332-603d-4c87-b389-db94e0984146', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11998', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '31c85a41-221e-4ffc-90e5-2578b58e24ba', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021533Z:31c85a41-221e-4ffc-90e5-2578b58e24ba', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:32 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '253d21a0-a07e-4ee0-a601-4914178cef44', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11997', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - 'ba238243-176c-4cba-8977-8aadf9eaed9a', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021537Z:ba238243-176c-4cba-8977-8aadf9eaed9a', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:36 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'a264a136-cb55-421a-be53-8eb4b320f399', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11996', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '1c3b65fc-fecb-4cb8-90f2-66cac4442b9f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021540Z:1c3b65fc-fecb-4cb8-90f2-66cac4442b9f', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:39 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '26fd2f8d-9f3b-48c5-bbd5-f00a21eaff7a', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11995', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '1ac30a1e-48bc-43cc-9bb3-906cf418468e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021543Z:1ac30a1e-48bc-43cc-9bb3-906cf418468e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:42 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '089fa0d0-8a0c-4810-a13d-355f79f08e18', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11994', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - 'cdf321ad-5baa-4059-8e00-bd59845b9d85', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021547Z:cdf321ad-5baa-4059-8e00-bd59845b9d85', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:46 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '3d1855c3-6ba2-4c96-87ca-d68fa95a1a01', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11993', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '1e02cd22-1284-4e0c-847b-479d776d764e', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021550Z:1e02cd22-1284-4e0c-847b-479d776d764e', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:49 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '2da7e7bb-274c-4716-a6cd-fb3f535ca0dc', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11992', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - 'bb68b6b7-d1db-4308-83b9-89dbb53ae6a4', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021553Z:bb68b6b7-d1db-4308-83b9-89dbb53ae6a4', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:53 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471f9d2d5fd6d5459d37cd47237c5ab76f8a454e5fecedeced6eefd2ff0edeecec3ddabdff68efd3f1838307f7ef3d3cf8a98f7e","c9ff037a49907242000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - 'd6127bac-777b-4671-abe2-dda07672a9be', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11991', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - 'a025552c-93f5-42f6-acbf-a08cbda69028', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021557Z:a025552c-93f5-42f6-acbf-a08cbda69028', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:56 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/providers/Microsoft.DataLakeAnalytics/locations/eastus2/operationResults/bb5483e6-b01e-4879-a6f2-f5d9289d426e_0') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1474d9bb5ebe6a3471fbd5e4fa7793ecb671f8df061ddbe2916397dbeb7b3b7bbbd4bff3b78b3b3f768f7fea3bd4fc70f0e1edcbff7f0e0a7a869be9c0d35bc7f307eb8bfbfb3f3e0fe4f7df44b","fe1fd4e848d06a000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '66e0e155-32cb-4d45-bca3-5728dc0a8f35', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11990', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '675285e3-6117-441b-b9bc-84be1cc541b2', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021600Z:675285e3-6117-441b-b9bc-84be1cc541b2', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:15:59 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.DataLakeAnalytics/accounts/myaccountxxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147abba5ae5755be4cd478f7ef147b3fc3c5b97edd3accd9e676ff3d76d55e7c7d369b55eb66fae57f9478f3e9af95f7d340afffe3c5fee697302f7bdef8f3e3a2feafc2a2bcbd76dd6e2f5d3653629f319bd68be392ecbeaeaf807eb3a3f5bd14b9116afd625b003b8cba26ed759f9226fafaafaadf7c52c9fac2f8036759f37cdf3fc322f09180127401b46456d16d717f97217cd22df037c9748cdfafcbc78476f66c01a6f95f45683b7c6cbbcfde8978c3e5a660b8c5641ff124270b59e94c5348602c1fc802eb259d9d659b12c96174db65811e5a8317dfff5215ecc8b65535ccc0931208e26d9858f2c7db8c8de3dcd2fea3cfff2fc6556d31ce565d12c3e7a746f87bffb4e3539416bfa80005c376dbef862e08ddd1d7ac536712feed1c70429f2cecbbca666f4263528962feba2aa8bf6dafb745a2d56eb367f5911c179f4c0f817adf3fa9ac9fe2a6ff3655b544bc28e3a991797f917799b619ca6f1745dd7d4e64d91d74490936ad9ac172b7e85a8945f453f27725f160dfd4e3361b8fdf59ab8319f313737fad9f1b4a51ee9837c395b5505c64a7c920979dfbd7b370e26285b66e5755b4c1b9ea4d147daee6c466f4d26f7f70feee59f6e4f7676f3edfd83070fb7b34fcff7b6cfefcf1eee1d3c9cedef7d8a7ea6759e01c737054fefdecedeeef62efdefe0cdcedea3ddfb8fee1f8c1fde7b70f070ffa7a8714974f8a29a15e7453ebbc50bc435653565f0d432a797d7cd1e8169b30b22e52ffee86d7ebd4b5f5c66e53a2739187d5400f1bbcd7ad24ceb8249d7dc7db877fef0feece07cfbdef4d307dbfbbb7bfbdb0f77a70fb60fa6e73b0fa6b3c9f9defeee5d9a9b6a5d4ff3cfeb6abd6aee2eae7f9a58a669ef32d96779dddcfda298d655539db7632365c7867877956c784f7f254a139ecaf29d4f5b5175b701f8d12f","f97f008839376243050000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '63194d04-d805-44c9-86f4-65371f999fdc', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11989', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '41a9d1c5-7e2a-40af-8410-7a99904a7b57', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021603Z:41a9d1c5-7e2a-40af-8410-7a99904a7b57', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:16:03 GMT' -]); diff --git a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_create_test.json b/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_create_test.json new file mode 100644 index 000000000000..0fde16487385 --- /dev/null +++ b/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_create_test.json @@ -0,0 +1,511 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/providers/Microsoft.DataLakeAnalytics/operations?api-version=2019-11-01-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-arm-datalake-analytics/2.0.0-beta.4 core-rest-pipeline/1.10.1 Node/v16.17.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "490b1be3-1065-45b8-922f-e320d2e4bd28" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json", + "Date": "Tue, 06 Dec 2022 09:20:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": "Accept-Encoding", + "X-AspNet-Version": "4.0.30319", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b3a4880d-a824-40b6-8de5-e13586beda15", + "x-ms-ratelimit-remaining-tenant-reads": "11998", + "x-ms-request-id": "94e63502-de84-4c30-9345-a56c9996cdf4", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221206T092024Z:b3a4880d-a824-40b6-8de5-e13586beda15", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "name": "Microsoft.DataLakeAnalytics/operations/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Available Operations", + "operation": "Get Available Operations", + "description": "Get available operations of DataLakeAnalytics." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/register/action", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Registration", + "operation": "Register to DataLakeAnalytics", + "description": "Register subscription to DataLakeAnalytics." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Account", + "operation": "Get DataLakeAnalytics Account", + "description": "Get information about an existing DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Account", + "operation": "Create or Update DataLakeAnalytics Account", + "description": "Create or update a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Account", + "operation": "Delete DataLakeAnalytics Account", + "description": "Delete a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/operationResults/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Operation Result", + "operation": "Get DataLakeAnalytics Account OperationResult", + "description": "Get result of a DataLakeAnalytics account operation." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/transferAnalyticsUnits/action", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Account", + "operation": "Transfer AnalyticsUnits", + "description": "Transfer SystemMaxAnalyticsUnits among DataLakeAnalytics accounts." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/firewallRules/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Firewall Rule", + "operation": "Get Firewall Rule", + "description": "Get information about a firewall rule." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/firewallRules/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Firewall Rule", + "operation": "Create or Update Firewall Rule", + "description": "Create or update a firewall rule." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/firewallRules/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Firewall Rule", + "operation": "Delete Firewall Rule", + "description": "Delete a firewall rule." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/virtualNetworkRules/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Virtual Network Rule", + "operation": "Get Virtual Network Rule", + "description": "Get information about a virtual network rule." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/virtualNetworkRules/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Virtual Network Rule", + "operation": "Create or Update Virtual Network Rule", + "description": "Create or update a virtual network rule." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/virtualNetworkRules/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Virtual Network Rule", + "operation": "Delete Virtual Network Rule", + "description": "Delete a virtual network rule." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/dataLakeStoreAccounts/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "DataLakeStore Account", + "operation": "Get Linked DataLakeStore Account", + "description": "Get information about a linked DataLakeStore account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/dataLakeStoreAccounts/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "DataLakeStore Account", + "operation": "Create or Update Linked DataLakeStore Account", + "description": "Create or update a linked DataLakeStore account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/dataLakeStoreAccounts/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "DataLakeStore Account", + "operation": "Unlink DataLakeStore Account", + "description": "Unlink a DataLakeStore account from a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/dataLakeStoreGen2Accounts/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "DataLakeStoreGen2 Account", + "operation": "Get Linked DataLakeStoreGen2 Account", + "description": "Get information about a linked DataLakeStoreGen2 account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/dataLakeStoreGen2Accounts/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "DataLakeStoreGen2 Account", + "operation": "Create or Update Linked DataLakeStoreGen2 Account", + "description": "Create or update a linked DataLakeStoreGen2 account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/dataLakeStoreGen2Accounts/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "DataLakeStoreGen2 Account", + "operation": "Unlink DataLakeStoreGen2 Account", + "description": "Unlink a DataLakeStoreGen2 account from a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/storageAccounts/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Storage Account", + "operation": "Get Linked Storage Account", + "description": "Get information about a linked Storage account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/storageAccounts/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Storage Account", + "operation": "Create or Update Linked Storage Account", + "description": "Create or update a linked Storage account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/storageAccounts/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Storage Account", + "operation": "Unlink Storage Account", + "description": "Unlink a Storage account from a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/storageAccounts/Containers/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Container", + "operation": "Get Storage Container", + "description": "Get containers of a linked Storage account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/storageAccounts/Containers/listSasTokens/action", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "SAS Token", + "operation": "List SAS Tokens", + "description": "List SAS tokens for storage containers of a linked Storage account of a DataLakeAnalytics account." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/computePolicies/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Compute Policy", + "operation": "Get Compute Policy", + "description": "Get information about a compute policy." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/computePolicies/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Compute Policy", + "operation": "Create or Update Compute Policy", + "description": "Create or update a compute policy." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/computePolicies/delete", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Compute Policy", + "operation": "Delete Compute Policy", + "description": "Delete a compute policy." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/TakeOwnership/action", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Job Ownership", + "operation": "Take Ownership of DataLakeAnalytics Job", + "description": "Grant permissions to cancel jobs submitted by other users." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/locations/capability/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Subscription Capability", + "operation": "Get DataLakeAnalytics Subscription Capability", + "description": "Get capability information of a subscription regarding using DataLakeAnalytics." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/locations/usages/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Subscription Quota Usages", + "operation": "Get DataLakeAnalytics Subscription Quota Usages", + "description": "Get quota usages information of a subscription regarding using DataLakeAnalytics." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/locations/checkNameAvailability/action", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Name Availability", + "operation": "Check DataLakeAnalytics Account Name Availability", + "description": "Check availability of a DataLakeAnalytics account name." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/locations/operationResults/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Operation Result", + "operation": "Get DataLakeAnalytics Account OperationResult", + "description": "Get result of a DataLakeAnalytics account operation." + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/providers/Microsoft.Insights/metricDefinitions/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Metric Definition", + "operation": "Get DataLakeAnalytics Account metric definitions", + "description": "Get the available metrics for the DataLakeAnalytics account." + }, + "origin": "system", + "properties": { + "serviceSpecification": { + "metricSpecifications": [ + { + "name": "JobEndedSuccess", + "displayName": "Successful Jobs", + "displayDescription": "Count of successful jobs.", + "unit": "Count", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + }, + { + "name": "JobEndedFailure", + "displayName": "Failed Jobs", + "displayDescription": "Count of failed jobs.", + "unit": "Count", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + }, + { + "name": "JobEndedCancelled", + "displayName": "Cancelled Jobs", + "displayDescription": "Count of cancelled jobs.", + "unit": "Count", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + }, + { + "name": "JobAUEndedSuccess", + "displayName": "Successful AU Time", + "displayDescription": "Total AU time for successful jobs.", + "unit": "Seconds", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + }, + { + "name": "JobAUEndedFailure", + "displayName": "Failed AU Time", + "displayDescription": "Total AU time for failed jobs.", + "unit": "Seconds", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + }, + { + "name": "JobAUEndedCancelled", + "displayName": "Cancelled AU Time", + "displayDescription": "Total AU time for cancelled jobs.", + "unit": "Seconds", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + }, + { + "name": "JobStage", + "displayName": "Jobs in Stage", + "displayDescription": "Number of jobs in each stage.", + "unit": "Count", + "aggregationType": "Total", + "availabilities": [ + { + "timeGrain": "PT1M", + "blobDuration": "PT1H" + }, + { + "timeGrain": "PT1H", + "blobDuration": "P1D" + } + ] + } + ] + } + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/providers/Microsoft.Insights/logDefinitions/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Log Definition", + "operation": "Get DataLakeAnalytics Account log definitions", + "description": "Get the available logs for the DataLakeAnalytics account." + }, + "origin": "system", + "properties": { + "serviceSpecification": { + "logSpecifications": [ + { + "name": "Audit", + "displayName": "Audit Logs", + "blobDuration": "PT1H" + }, + { + "name": "Requests", + "displayName": "Request Logs", + "blobDuration": "PT1H" + } + ] + } + } + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/providers/Microsoft.Insights/diagnosticSettings/read", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Diagnostic Setting", + "operation": "Get DataLakeAnalytics Account diagnostic settings", + "description": "Get the diagnostic settings for the DataLakeAnalytics account." + }, + "origin": "system" + }, + { + "name": "Microsoft.DataLakeAnalytics/accounts/providers/Microsoft.Insights/diagnosticSettings/write", + "display": { + "provider": "Microsoft DataLakeAnalytics", + "resource": "Diagnostic Setting", + "operation": "Create or update DataLakeAnalytics Account diagnostic settings", + "description": "Create or update the diagnostic settings for the DataLakeAnalytics account." + }, + "origin": "system" + } + ] + } + } + ], + "Variables": {} +} diff --git a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_delete_test.js b/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_delete_test.js deleted file mode 100644 index d5bea3e5512b..000000000000 --- a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_delete_test.js +++ /dev/null @@ -1,145 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "dd01bf15a54d7f0fa4f2cf98ab566352"; - -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', - '8ea072b7-8bf0-4d71-ab4b-7b5680f70100', - 'x-ms-ests-server', - '2.1.12231.8 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AvrnDbGMHVhJuCXEnK2gmoU; expires=Sat, 18-Dec-2021 02:16:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrM6L9w7gNwu1oi_3pmE7Pvi8CgbHTwfpcsmipaGcZF3z34aRBadDIUcPdbA6hUeUtauB257k1OYdkbCF6ZsmYybNv-OB14MYud882ncGcQSkR0JRozPVrNu4uniKXpUNuWJhST9ryDt2zhwecjhjdJb0Xq37R7R3jjDdM2Ll2tjMgAA; 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, 18 Nov 2021 02:16:06 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', - '5dd6015d-1c11-4581-ab0f-ab1c6e220200', - 'x-ms-ests-server', - '2.1.12231.8 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=ArXy8dlvnyBMq49Qc6dFbwQ; expires=Sat, 18-Dec-2021 02:16:06 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrRTJGflYdpSLGmRJEgWLKD5lilESJLM4wrfORSbi7P91erDRofQOQMUXPQZVr7FlVY8ORHm1WKqRJIFMAvt_cvWsmhEtsIA_PqMjdsn2dMPyCra1hwrxTX4ADli-jnbhyZslYUVQadW_iwVZUNZXIW0vtUhQ96ui45sjJWT1VKZEgAA; 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, 18 Nov 2021 02:16:06 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.3.3&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=c6fe554e-070a-468c-a847-4d200bab899b&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', - '8ea072b7-8bf0-4d71-ab4b-7b5682f70100', - 'x-ms-ests-server', - '2.1.12231.8 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AmLEmntgtElKm662q90KL4cWPr5BAQAAAGWuJ9kOAAAA; expires=Sat, 18-Dec-2021 02:16:06 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, 18 Nov 2021 02:16:06 GMT', - 'Content-Length', - '1351' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.DataLakeAnalytics/accounts/myaccountxxx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'x-ms-request-id', - 'f70bb844-ef8f-40ee-af9f-9c8038189cfd', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - '5ed84239-0e1e-4ea8-8fda-bce5b51aaae4', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021615Z:5ed84239-0e1e-4ea8-8fda-bce5b51aaae4', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Thu, 18 Nov 2021 02:16:14 GMT', - 'Content-Length', - '0' -]); diff --git a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_get_test.js b/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_get_test.js deleted file mode 100644 index 4cddf2ab5c4c..000000000000 --- a/sdk/datalake-analytics/arm-datalake-analytics/recordings/node/datalakeanalytics_test/recording_accounts_get_test.js +++ /dev/null @@ -1,151 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "723cc51c398ab5334d9fd96b2f17b53d"; - -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', - 'dc6a5af1-2776-4fe6-a4f6-1ed80c8b0100', - 'x-ms-ests-server', - '2.1.12231.8 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AhM26ePgZXxBhR5MAFVuz7c; expires=Sat, 18-Dec-2021 02:16:04 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrvwIqVscNzoPcXnDzExZkGTy-9-qJeaf9JHtC9MLQ1j3l64wYYGBobwqunAkrYSChVtl49Z_ys_MutoV6s6r5ALK63N6EGAPpxSkWfW_xpzq0GQIuhRLLYmhkQ-bgs7NUO0WMut01HNMk24FE6I_mVZ5DDpas6JnfbqxEEqPBM3kgAA; 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, 18 Nov 2021 02:16:04 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', - 'b0945a43-ce20-4888-800b-bb5b686b0100', - 'x-ms-ests-server', - '2.1.12231.8 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AnyPxvi5x-dFgfPau9SrI08; expires=Sat, 18-Dec-2021 02:16:04 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrP1ZanEu53X7FB-Bo8A3RaoVejnRhCGmpIyjv8GKGfTZfkiXnEsmOxXrO68El7fCc_VQ_di2TGlczP3bd-2sDQWb5qggf7WbihmFOeLikIqaeyXZYlRJMZwJPO7M1MPDIesilaplz8jnkxliwylND_DB-sJ6Ee6kJkyvRMX-1B_QgAA; 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, 18 Nov 2021 02:16:04 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.3.3&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=bdc45619-36ed-4084-a7eb-72bba457cf89&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', - '8d1c6cc8-1901-4814-904a-5ab993970100', - 'x-ms-ests-server', - '2.1.12231.8 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ah7lRnxx-opMln51wFltD1cWPr5BAQAAAGOuJ9kOAAAA; expires=Sat, 18-Dec-2021 02:16:04 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, 18 Nov 2021 02:16:04 GMT', - 'Content-Length', - '1351' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.DataLakeAnalytics/accounts/myaccountxxx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e9f666df63c7b9b1f2fb3f2ba2da6cddd6c3aadd6cb16efe9afefdebdfb68f411bdbdcaebb6c89b8f1efde28f66f979b62e5bf3faebb6aaf36369fee67a9513e633ff2b7a3ff8fbf37cb9a7cd09dcf7be3ffae8bca8f3abac2c5fb7598bd74f97d9a4cc67f4a2f9e6b82cababe31facebfc6c452f455abc5a97c00ee02e8bba5d67e58bbcbdaaeab7de17b37cb2be00dad47dde34cff3cbbc2460049c006d1815b5595c5fe4cb5d348b7c0ff0bfb843a4667d7e5ebca33733608db74a7aabc15be365de7ef44b461f2db30546aba07f0921b85a4fca621a4381607e4017d9ac6cebac5816cb8b265bac8872d498befffa102fe6c5b2292ee68418104793ecc247963e5c64ef9ee617759e7f79fe32ab698ef2b268161f3dbab7c3df7da79a9ca0357d4000ae894f175f0cbcb1bb43afd826eec53dfa982045de7999d7d48cdea406c5f2655d5475d15e7b9f4eabc56adde62f2b22388f1e18ffa2755e5f33d95fe56dbe84dc1176d4c9bcb8ccbfc8db0ce3348da7ebbaa6366f8abc26829c9088ae172caac425cbfc2afa3991fbb268e8779a09c3edafd7c48df98cb9b9d1cf8ea72df5481fe4cbd9aa2a3056e2132793e360823223c03c49a38fb4dd1994c864727fffe05efee9f6646737dfde3f78f0703bfbf47c6ffbfcfeece1dec1c3d9fedea7e8675ae719707c53f0f4eeedeced6eefd2ff0edeecec3ddabdffe8fec1f8e1bd07070ff77f8a1a9744872faa59715ee4b35bbc405c535653064f2d737a79ddec119836bb2052fee28fdee6d7bbf4c56556ae739203a25ec630fd01a3b9e896dbe8af8f","7ec9ff03dd84e9fb43050000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-request-id', - '790e0c6e-fa62-4fb0-afa0-38e0e075fe9c', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-ratelimit-remaining-subscription-reads', - '11988', - 'Server', - 'Microsoft-IIS/10.0', - 'X-AspNet-Version', - '4.0.30319', - 'X-Powered-By', - 'ASP.NET', - 'x-ms-correlation-request-id', - 'f024e332-620e-4c63-a820-bc776ec86cf8', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211118T021606Z:f024e332-620e-4c63-a820-bc776ec86cf8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'Date', - 'Thu, 18 Nov 2021 02:16:05 GMT' -]); diff --git a/sdk/datalake-analytics/arm-datalake-analytics/review/arm-datalake-analytics.api.md b/sdk/datalake-analytics/arm-datalake-analytics/review/arm-datalake-analytics.api.md index 341ef9a424b1..ef585b930eb5 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/review/arm-datalake-analytics.api.md +++ b/sdk/datalake-analytics/arm-datalake-analytics/review/arm-datalake-analytics.api.md @@ -207,12 +207,12 @@ export interface ComputePoliciesUpdateOptionalParams extends coreClient.Operatio export type ComputePoliciesUpdateResponse = ComputePolicy; // @public -export type ComputePolicy = SubResource & { - readonly objectId?: string; - readonly objectType?: AADObjectType; +export interface ComputePolicy extends SubResource { readonly maxDegreeOfParallelismPerJob?: number; readonly minPriorityPerJob?: number; -}; + readonly objectId?: string; + readonly objectType?: AADObjectType; +} // @public export interface ComputePolicyListResult { @@ -272,48 +272,48 @@ export interface CreateOrUpdateFirewallRuleParameters { } // @public -export type DataLakeAnalyticsAccount = Resource & { +export interface DataLakeAnalyticsAccount extends Resource { readonly accountId?: string; - readonly provisioningState?: DataLakeAnalyticsAccountStatus; - readonly state?: DataLakeAnalyticsAccountState; + readonly computePolicies?: ComputePolicy[]; readonly creationTime?: Date; - readonly lastModifiedTime?: Date; - readonly endpoint?: string; - readonly defaultDataLakeStoreAccountType?: string; - readonly defaultDataLakeStoreAccount?: string; + readonly currentTier?: TierType; readonly dataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; - publicDataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; - readonly storageAccounts?: StorageAccountInformation[]; - readonly computePolicies?: ComputePolicy[]; - readonly hiveMetastores?: HiveMetastore[]; - readonly virtualNetworkRules?: VirtualNetworkRule[]; + readonly debugDataAccessLevel?: DebugDataAccessLevel; + readonly defaultDataLakeStoreAccount?: string; + readonly defaultDataLakeStoreAccountType?: string; + readonly endpoint?: string; + firewallAllowAzureIps?: FirewallAllowAzureIpsState; readonly firewallRules?: FirewallRule[]; firewallState?: FirewallState; - firewallAllowAzureIps?: FirewallAllowAzureIpsState; - newTier?: TierType; - readonly currentTier?: TierType; - maxJobCount?: number; + readonly hiveMetastores?: HiveMetastore[]; + readonly lastModifiedTime?: Date; readonly maxActiveJobCountPerUser?: number; - readonly maxQueuedJobCountPerUser?: number; - readonly maxJobRunningTimeInMin?: number; - readonly systemMaxJobCount?: number; maxDegreeOfParallelism?: number; - readonly systemMaxDegreeOfParallelism?: number; maxDegreeOfParallelismPerJob?: number; + maxJobCount?: number; + readonly maxJobRunningTimeInMin?: number; + readonly maxQueuedJobCountPerUser?: number; readonly minPriorityPerJob?: number; + newTier?: TierType; + readonly provisioningState?: DataLakeAnalyticsAccountStatus; + publicDataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; queryStoreRetention?: number; - readonly debugDataAccessLevel?: DebugDataAccessLevel; -}; + readonly state?: DataLakeAnalyticsAccountState; + readonly storageAccounts?: StorageAccountInformation[]; + readonly systemMaxDegreeOfParallelism?: number; + readonly systemMaxJobCount?: number; + readonly virtualNetworkRules?: VirtualNetworkRule[]; +} // @public -export type DataLakeAnalyticsAccountBasic = Resource & { +export interface DataLakeAnalyticsAccountBasic extends Resource { readonly accountId?: string; - readonly provisioningState?: DataLakeAnalyticsAccountStatus; - readonly state?: DataLakeAnalyticsAccountState; readonly creationTime?: Date; - readonly lastModifiedTime?: Date; readonly endpoint?: string; -}; + readonly lastModifiedTime?: Date; + readonly provisioningState?: DataLakeAnalyticsAccountStatus; + readonly state?: DataLakeAnalyticsAccountState; +} // @public export interface DataLakeAnalyticsAccountListResult { @@ -355,32 +355,32 @@ export interface DataLakeAnalyticsAccountManagementClientOptionalParams extends } // @public -export type DataLakeAnalyticsAccountProperties = DataLakeAnalyticsAccountPropertiesBasic & { - readonly defaultDataLakeStoreAccountType?: string; - readonly defaultDataLakeStoreAccount?: string; - readonly dataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; - publicDataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; - readonly storageAccounts?: StorageAccountInformation[]; +export interface DataLakeAnalyticsAccountProperties extends DataLakeAnalyticsAccountPropertiesBasic { readonly computePolicies?: ComputePolicy[]; - readonly hiveMetastores?: HiveMetastore[]; - readonly virtualNetworkRules?: VirtualNetworkRule[]; + readonly currentTier?: TierType; + readonly dataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; + readonly debugDataAccessLevel?: DebugDataAccessLevel; + readonly defaultDataLakeStoreAccount?: string; + readonly defaultDataLakeStoreAccountType?: string; + firewallAllowAzureIps?: FirewallAllowAzureIpsState; readonly firewallRules?: FirewallRule[]; firewallState?: FirewallState; - firewallAllowAzureIps?: FirewallAllowAzureIpsState; - newTier?: TierType; - readonly currentTier?: TierType; - maxJobCount?: number; + readonly hiveMetastores?: HiveMetastore[]; readonly maxActiveJobCountPerUser?: number; - readonly maxQueuedJobCountPerUser?: number; - readonly maxJobRunningTimeInMin?: number; - readonly systemMaxJobCount?: number; maxDegreeOfParallelism?: number; - readonly systemMaxDegreeOfParallelism?: number; maxDegreeOfParallelismPerJob?: number; + maxJobCount?: number; + readonly maxJobRunningTimeInMin?: number; + readonly maxQueuedJobCountPerUser?: number; readonly minPriorityPerJob?: number; + newTier?: TierType; + publicDataLakeStoreAccounts?: DataLakeStoreAccountInformation[]; queryStoreRetention?: number; - readonly debugDataAccessLevel?: DebugDataAccessLevel; -}; + readonly storageAccounts?: StorageAccountInformation[]; + readonly systemMaxDegreeOfParallelism?: number; + readonly systemMaxJobCount?: number; + readonly virtualNetworkRules?: VirtualNetworkRule[]; +} // @public export interface DataLakeAnalyticsAccountPropertiesBasic { @@ -399,9 +399,9 @@ export type DataLakeAnalyticsAccountState = "Active" | "Suspended"; export type DataLakeAnalyticsAccountStatus = "Failed" | "Creating" | "Running" | "Succeeded" | "Patching" | "Suspending" | "Resuming" | "Deleting" | "Deleted" | "Undeleting" | "Canceled"; // @public -export type DataLakeStoreAccountInformation = SubResource & { +export interface DataLakeStoreAccountInformation extends SubResource { readonly suffix?: string; -}; +} // @public export interface DataLakeStoreAccountInformationListResult { @@ -486,10 +486,10 @@ export interface ErrorResponse { export type FirewallAllowAzureIpsState = "Enabled" | "Disabled"; // @public -export type FirewallRule = SubResource & { - readonly startIpAddress?: string; +export interface FirewallRule extends SubResource { readonly endIpAddress?: string; -}; + readonly startIpAddress?: string; +} // @public export interface FirewallRuleListResult { @@ -549,15 +549,18 @@ export type FirewallRulesUpdateResponse = FirewallRule; // @public export type FirewallState = "Enabled" | "Disabled"; +// @public +export function getContinuationToken(page: unknown): string | undefined; + // @public (undocumented) -export type HiveMetastore = SubResource & { - readonly serverUri?: string; +export interface HiveMetastore extends SubResource { readonly databaseName?: string; + readonly nestedResourceProvisioningState?: NestedResourceProvisioningState; + readonly password?: string; readonly runtimeVersion?: string; + readonly serverUri?: string; readonly userName?: string; - readonly password?: string; - readonly nestedResourceProvisioningState?: NestedResourceProvisioningState; -}; +} // @public export interface HiveMetastoreListResult { @@ -567,35 +570,24 @@ export interface HiveMetastoreListResult { // @public export enum KnownAADObjectType { - // (undocumented) Group = "Group", - // (undocumented) ServicePrincipal = "ServicePrincipal", - // (undocumented) User = "User" } // @public export enum KnownOperationOrigin { - // (undocumented) System = "system", - // (undocumented) User = "user", - // (undocumented) UserSystem = "user,system" } // @public export enum KnownSubscriptionState { - // (undocumented) Deleted = "Deleted", - // (undocumented) Registered = "Registered", - // (undocumented) Suspended = "Suspended", - // (undocumented) Unregistered = "Unregistered", - // (undocumented) Warned = "Warned" } @@ -715,9 +707,9 @@ export interface SasTokenInformationListResult { } // @public -export type StorageAccountInformation = SubResource & { +export interface StorageAccountInformation extends SubResource { readonly suffix?: string; -}; +} // @public export interface StorageAccountInformationListResult { @@ -819,9 +811,9 @@ export interface StorageAccountsUpdateOptionalParams extends coreClient.Operatio } // @public -export type StorageContainer = SubResource & { +export interface StorageContainer extends SubResource { readonly lastModifiedTime?: Date; -}; +} // @public export interface StorageContainerListResult { @@ -911,10 +903,10 @@ export interface UpdateStorageAccountWithAccountParameters { } // @public -export type VirtualNetworkRule = SubResource & { +export interface VirtualNetworkRule extends SubResource { readonly subnetId?: string; readonly virtualNetworkRuleState?: VirtualNetworkRuleState; -}; +} // @public export interface VirtualNetworkRuleListResult { diff --git a/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json b/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json index 96ce86e9f540..4f945b2548c7 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json +++ b/sdk/datalake-analytics/arm-datalake-analytics/samples/v2-beta/typescript/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/node": "^14.0.0", - "typescript": "~4.4.0", + "typescript": "~4.8.0", "rimraf": "latest" } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/dataLakeAnalyticsAccountManagementClient.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/dataLakeAnalyticsAccountManagementClient.ts index 81f9352808af..293ba7f982c7 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/dataLakeAnalyticsAccountManagementClient.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/dataLakeAnalyticsAccountManagementClient.ts @@ -8,6 +8,11 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { AccountsImpl, @@ -68,41 +73,47 @@ export class DataLakeAnalyticsAccountManagementClient extends coreClient.Service ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; - if (!options.credentialScopes) { - options.credentialScopes = ["https://management.azure.com/.default"]; - } const optionsWithDefaults = { ...defaults, ...options, userAgentOptions: { userAgentPrefix }, - baseUri: + endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com" }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: + optionsWithDefaults.credentialScopes ?? + `${optionsWithDefaults.endpoint}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; @@ -117,6 +128,35 @@ export class DataLakeAnalyticsAccountManagementClient extends coreClient.Service this.firewallRules = new FirewallRulesImpl(this); this.operations = new OperationsImpl(this); this.locations = new LocationsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); + } + + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); } accounts: Accounts; diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/index.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/index.ts index b9378fd16826..c7d95d6064b7 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/index.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/index.ts @@ -7,6 +7,7 @@ */ /// +export { getContinuationToken } from "./pagingHelper"; export * from "./models"; export { DataLakeAnalyticsAccountManagementClient } from "./dataLakeAnalyticsAccountManagementClient"; export * from "./operationsInterfaces"; diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/models/index.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/models/index.ts index 710aaad70f3a..5b0a44ceb2a5 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/models/index.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/models/index.ts @@ -651,7 +651,8 @@ export interface HiveMetastoreListResult { } /** The account specific properties that are associated with an underlying Data Lake Analytics account. Returned only when retrieving a specific account. */ -export type DataLakeAnalyticsAccountProperties = DataLakeAnalyticsAccountPropertiesBasic & { +export interface DataLakeAnalyticsAccountProperties + extends DataLakeAnalyticsAccountPropertiesBasic { /** * The type of the default Data Lake Store account associated with this account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -748,10 +749,10 @@ export type DataLakeAnalyticsAccountProperties = DataLakeAnalyticsAccountPropert * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly debugDataAccessLevel?: DebugDataAccessLevel; -}; +} /** A Data Lake Analytics account object, containing all information associated with the named Data Lake Analytics account. */ -export type DataLakeAnalyticsAccountBasic = Resource & { +export interface DataLakeAnalyticsAccountBasic extends Resource { /** * The unique identifier associated with this Data Lake Analytics account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -782,10 +783,10 @@ export type DataLakeAnalyticsAccountBasic = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly endpoint?: string; -}; +} /** A Data Lake Analytics account object, containing all information associated with the named Data Lake Analytics account. */ -export type DataLakeAnalyticsAccount = Resource & { +export interface DataLakeAnalyticsAccount extends Resource { /** * The unique identifier associated with this Data Lake Analytics account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -912,28 +913,28 @@ export type DataLakeAnalyticsAccount = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly debugDataAccessLevel?: DebugDataAccessLevel; -}; +} /** Data Lake Store account information. */ -export type DataLakeStoreAccountInformation = SubResource & { +export interface DataLakeStoreAccountInformation extends SubResource { /** * The optional suffix for the Data Lake Store account. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly suffix?: string; -}; +} /** Azure Storage account information. */ -export type StorageAccountInformation = SubResource & { +export interface StorageAccountInformation extends SubResource { /** * The optional suffix for the storage account. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly suffix?: string; -}; +} /** Data Lake Analytics compute policy information. */ -export type ComputePolicy = SubResource & { +export interface ComputePolicy extends SubResource { /** * The AAD object identifier for the entity to create a policy for. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -954,9 +955,9 @@ export type ComputePolicy = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly minPriorityPerJob?: number; -}; +} -export type HiveMetastore = SubResource & { +export interface HiveMetastore extends SubResource { /** * The serverUri for the Hive MetaStore * NOTE: This property will not be serialized. It can only be populated by the server. @@ -987,10 +988,10 @@ export type HiveMetastore = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly nestedResourceProvisioningState?: NestedResourceProvisioningState; -}; +} /** Data Lake Analytics VirtualNetwork Rule information. */ -export type VirtualNetworkRule = SubResource & { +export interface VirtualNetworkRule extends SubResource { /** * The resource identifier for the subnet * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1001,10 +1002,10 @@ export type VirtualNetworkRule = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly virtualNetworkRuleState?: VirtualNetworkRuleState; -}; +} /** Data Lake Analytics firewall rule information. */ -export type FirewallRule = SubResource & { +export interface FirewallRule extends SubResource { /** * The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1015,21 +1016,24 @@ export type FirewallRule = SubResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly endIpAddress?: string; -}; +} /** Azure Storage blob container information. */ -export type StorageContainer = SubResource & { +export interface StorageContainer extends SubResource { /** * The last modified time of the blob container. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly lastModifiedTime?: Date; -}; +} /** Known values of {@link AADObjectType} that the service accepts. */ export enum KnownAADObjectType { + /** User */ User = "User", + /** Group */ Group = "Group", + /** ServicePrincipal */ ServicePrincipal = "ServicePrincipal" } @@ -1046,8 +1050,11 @@ export type AADObjectType = string; /** Known values of {@link OperationOrigin} that the service accepts. */ export enum KnownOperationOrigin { + /** User */ User = "user", + /** System */ System = "system", + /** UserSystem */ UserSystem = "user,system" } @@ -1064,10 +1071,15 @@ export type OperationOrigin = string; /** Known values of {@link SubscriptionState} that the service accepts. */ export enum KnownSubscriptionState { + /** Registered */ Registered = "Registered", + /** Suspended */ Suspended = "Suspended", + /** Deleted */ Deleted = "Deleted", + /** Unregistered */ Unregistered = "Unregistered", + /** Warned */ Warned = "Warned" } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/accounts.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/accounts.ts index 07080d7c5323..0d12409c2cd4 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/accounts.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/accounts.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { Accounts } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,9 +19,9 @@ import { DataLakeAnalyticsAccountBasic, AccountsListNextOptionalParams, AccountsListOptionalParams, + AccountsListResponse, AccountsListByResourceGroupNextOptionalParams, AccountsListByResourceGroupOptionalParams, - AccountsListResponse, AccountsListByResourceGroupResponse, CreateDataLakeAnalyticsAccountParameters, AccountsCreateOptionalParams, @@ -66,22 +67,34 @@ export class AccountsImpl implements Accounts { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); } }; } private async *listPagingPage( - options?: AccountsListOptionalParams + options?: AccountsListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: AccountsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -111,19 +124,33 @@ export class AccountsImpl implements Accounts { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } private async *listByResourceGroupPagingPage( resourceGroupName: string, - options?: AccountsListByResourceGroupOptionalParams + options?: AccountsListByResourceGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: AccountsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByResourceGroupNext( resourceGroupName, @@ -131,7 +158,9 @@ export class AccountsImpl implements Accounts { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/computePolicies.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/computePolicies.ts index cb1e8bd6e076..0d8ae81a98e0 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/computePolicies.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/computePolicies.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { ComputePolicies } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -65,11 +66,15 @@ export class ComputePoliciesImpl implements ComputePolicies { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByAccountPagingPage( resourceGroupName, accountName, - options + options, + settings ); } }; @@ -78,15 +83,22 @@ export class ComputePoliciesImpl implements ComputePolicies { private async *listByAccountPagingPage( resourceGroupName: string, accountName: string, - options?: ComputePoliciesListByAccountOptionalParams + options?: ComputePoliciesListByAccountOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByAccount( - resourceGroupName, - accountName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: ComputePoliciesListByAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAccount( + resourceGroupName, + accountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByAccountNext( resourceGroupName, @@ -95,7 +107,9 @@ export class ComputePoliciesImpl implements ComputePolicies { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/dataLakeStoreAccounts.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/dataLakeStoreAccounts.ts index c1a599115956..ec92836541f6 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/dataLakeStoreAccounts.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/dataLakeStoreAccounts.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { DataLakeStoreAccounts } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -61,11 +62,15 @@ export class DataLakeStoreAccountsImpl implements DataLakeStoreAccounts { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByAccountPagingPage( resourceGroupName, accountName, - options + options, + settings ); } }; @@ -74,15 +79,22 @@ export class DataLakeStoreAccountsImpl implements DataLakeStoreAccounts { private async *listByAccountPagingPage( resourceGroupName: string, accountName: string, - options?: DataLakeStoreAccountsListByAccountOptionalParams + options?: DataLakeStoreAccountsListByAccountOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByAccount( - resourceGroupName, - accountName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: DataLakeStoreAccountsListByAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAccount( + resourceGroupName, + accountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByAccountNext( resourceGroupName, @@ -91,7 +103,9 @@ export class DataLakeStoreAccountsImpl implements DataLakeStoreAccounts { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/firewallRules.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/firewallRules.ts index be7402ba63cd..bb157db80357 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/firewallRules.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/firewallRules.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { FirewallRules } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -64,11 +65,15 @@ export class FirewallRulesImpl implements FirewallRules { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByAccountPagingPage( resourceGroupName, accountName, - options + options, + settings ); } }; @@ -77,15 +82,22 @@ export class FirewallRulesImpl implements FirewallRules { private async *listByAccountPagingPage( resourceGroupName: string, accountName: string, - options?: FirewallRulesListByAccountOptionalParams + options?: FirewallRulesListByAccountOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByAccount( - resourceGroupName, - accountName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: FirewallRulesListByAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAccount( + resourceGroupName, + accountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByAccountNext( resourceGroupName, @@ -94,7 +106,9 @@ export class FirewallRulesImpl implements FirewallRules { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/storageAccounts.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/storageAccounts.ts index d5ed8afc6e8d..ca5c0c6fdc87 100644 --- a/sdk/datalake-analytics/arm-datalake-analytics/src/operations/storageAccounts.ts +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/operations/storageAccounts.ts @@ -6,7 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { StorageAccounts } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -16,23 +17,23 @@ import { StorageAccountInformation, StorageAccountsListByAccountNextOptionalParams, StorageAccountsListByAccountOptionalParams, + StorageAccountsListByAccountResponse, StorageContainer, StorageAccountsListStorageContainersNextOptionalParams, StorageAccountsListStorageContainersOptionalParams, + StorageAccountsListStorageContainersResponse, SasTokenInformation, StorageAccountsListSasTokensNextOptionalParams, StorageAccountsListSasTokensOptionalParams, - StorageAccountsListByAccountResponse, + StorageAccountsListSasTokensResponse, AddStorageAccountParameters, StorageAccountsAddOptionalParams, StorageAccountsGetOptionalParams, StorageAccountsGetResponse, StorageAccountsUpdateOptionalParams, StorageAccountsDeleteOptionalParams, - StorageAccountsListStorageContainersResponse, StorageAccountsGetStorageContainerOptionalParams, StorageAccountsGetStorageContainerResponse, - StorageAccountsListSasTokensResponse, StorageAccountsListByAccountNextResponse, StorageAccountsListStorageContainersNextResponse, StorageAccountsListSasTokensNextResponse @@ -75,11 +76,15 @@ export class StorageAccountsImpl implements StorageAccounts { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByAccountPagingPage( resourceGroupName, accountName, - options + options, + settings ); } }; @@ -88,15 +93,22 @@ export class StorageAccountsImpl implements StorageAccounts { private async *listByAccountPagingPage( resourceGroupName: string, accountName: string, - options?: StorageAccountsListByAccountOptionalParams + options?: StorageAccountsListByAccountOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByAccount( - resourceGroupName, - accountName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: StorageAccountsListByAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByAccount( + resourceGroupName, + accountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByAccountNext( resourceGroupName, @@ -105,7 +117,9 @@ export class StorageAccountsImpl implements StorageAccounts { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -150,12 +164,16 @@ export class StorageAccountsImpl implements StorageAccounts { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listStorageContainersPagingPage( resourceGroupName, accountName, storageAccountName, - options + options, + settings ); } }; @@ -165,16 +183,23 @@ export class StorageAccountsImpl implements StorageAccounts { resourceGroupName: string, accountName: string, storageAccountName: string, - options?: StorageAccountsListStorageContainersOptionalParams + options?: StorageAccountsListStorageContainersOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listStorageContainers( - resourceGroupName, - accountName, - storageAccountName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: StorageAccountsListStorageContainersResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listStorageContainers( + resourceGroupName, + accountName, + storageAccountName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listStorageContainersNext( resourceGroupName, @@ -184,7 +209,9 @@ export class StorageAccountsImpl implements StorageAccounts { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -236,13 +263,17 @@ export class StorageAccountsImpl implements StorageAccounts { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listSasTokensPagingPage( resourceGroupName, accountName, storageAccountName, containerName, - options + options, + settings ); } }; @@ -253,17 +284,24 @@ export class StorageAccountsImpl implements StorageAccounts { accountName: string, storageAccountName: string, containerName: string, - options?: StorageAccountsListSasTokensOptionalParams + options?: StorageAccountsListSasTokensOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listSasTokens( - resourceGroupName, - accountName, - storageAccountName, - containerName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: StorageAccountsListSasTokensResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listSasTokens( + resourceGroupName, + accountName, + storageAccountName, + containerName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listSasTokensNext( resourceGroupName, @@ -274,7 +312,9 @@ export class StorageAccountsImpl implements StorageAccounts { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } diff --git a/sdk/datalake-analytics/arm-datalake-analytics/src/pagingHelper.ts b/sdk/datalake-analytics/arm-datalake-analytics/src/pagingHelper.ts new file mode 100644 index 000000000000..d85fc13bce1e --- /dev/null +++ b/sdk/datalake-analytics/arm-datalake-analytics/src/pagingHelper.ts @@ -0,0 +1,39 @@ +/* + * 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. + */ + +export interface PageInfo { + continuationToken?: string; +} + +const pageMap = new WeakMap(); + +/** + * Given a result page from a pageable operation, returns a + * continuation token that can be used to begin paging from + * that point later. + * @param page A result object from calling .byPage() on a paged operation. + * @returns The continuation token that can be passed into byPage(). + */ +export function getContinuationToken(page: unknown): string | undefined { + if (typeof page !== "object" || page === null) { + return undefined; + } + return pageMap.get(page)?.continuationToken; +} + +export function setContinuationToken( + page: unknown, + continuationToken: string | undefined +): void { + if (typeof page !== "object" || page === null || !continuationToken) { + return; + } + const pageInfo = pageMap.get(page) ?? {}; + pageInfo.continuationToken = continuationToken; + pageMap.set(page, pageInfo); +} diff --git a/sdk/datalake-analytics/arm-datalake-analytics/test/datalake-analytics_examples.spec.ts b/sdk/datalake-analytics/arm-datalake-analytics/test/datalake-analytics_examples.spec.ts new file mode 100644 index 000000000000..27212eb008c9 --- /dev/null +++ b/sdk/datalake-analytics/arm-datalake-analytics/test/datalake-analytics_examples.spec.ts @@ -0,0 +1,63 @@ +/* + * 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, + Recorder, + RecorderStartOptions, + delay, + isPlaybackMode, +} from "@azure-tools/test-recorder"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert } from "chai"; +import { Context } from "mocha"; +import { DataLakeAnalyticsAccountManagementClient } from "../src/dataLakeAnalyticsAccountManagementClient"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +export const testPollingOptions = { + updateIntervalInMs: isPlaybackMode() ? 0 : undefined, +}; + +describe("DatalakeAnalytics test", () => { + let recorder: Recorder; + let subscriptionId: string; + let client: DataLakeAnalyticsAccountManagementClient; + let location: string; + let resourceGroup: string; + let accountName: string; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + subscriptionId = env.SUBSCRIPTION_ID || ''; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new DataLakeAnalyticsAccountManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); + location = "eastus2"; + resourceGroup = "myjstest"; + accountName = "myaccountxxx"; + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("accounts create test", async function () { + const res = await client.operations.list(); + }); +}); diff --git a/sdk/datalake-analytics/arm-datalake-analytics/test/sampleTest.ts b/sdk/datalake-analytics/arm-datalake-analytics/test/sampleTest.ts deleted file mode 100644 index b93864a4395f..000000000000 --- a/sdk/datalake-analytics/arm-datalake-analytics/test/sampleTest.ts +++ /dev/null @@ -1,102 +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 { DataLakeAnalyticsAccountManagementClient } from "../src/dataLakeAnalyticsAccountManagementClient"; - -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("DatalakeAnalytics test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: DataLakeAnalyticsAccountManagementClient; - let location: string; - let resourceGroup: string; - let accountName: 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 DataLakeAnalyticsAccountManagementClient(credential, subscriptionId); - location = "eastus2"; - resourceGroup = "myjstest"; - accountName = "myaccountxxx"; - }); - - afterEach(async function() { - await recorder.stop(); - }); - - it("accounts create test", async function() { - const res = await client.accounts.beginCreateAndWait(resourceGroup,accountName,{ - location: location, - tags: { - key1: "value1" - }, - defaultDataLakeStoreAccount: "mygen1", - dataLakeStoreAccounts: [ - { - name: "mygen1" - } - ], - firewallState: "Enabled", - firewallAllowAzureIps: "Enabled", - newTier: "Consumption", - maxJobCount: 3, - maxDegreeOfParallelism: 30, - maxDegreeOfParallelismPerJob:1, - minPriorityPerJob: 1, - queryStoreRetention: 30 - },testPollingOptions); - console.log(res); - }); - - it("accounts get test", async function() { - const res = await client.accounts.get(resourceGroup,accountName); - console.log(res); - }); - - it("accounts delete test", async function() { - const res = await client.accounts.beginDeleteAndWait(resourceGroup,accountName,testPollingOptions); - console.log(res); - }); -});