From 743e6de8a119f836d9d487fa3045c4d7e9b3f8e5 Mon Sep 17 00:00:00 2001 From: kazrael2119 <98569699+kazrael2119@users.noreply.github.com> Date: Tue, 20 Dec 2022 16:07:02 +0800 Subject: [PATCH 1/6] search refresh (#24182) * search refresh * Fix the failure test cases Co-authored-by: Mary Gao --- common/config/rush/pnpm-lock.yaml | 11 +- sdk/search/arm-search/CHANGELOG.md | 21 +- sdk/search/arm-search/_meta.json | 6 +- sdk/search/arm-search/package.json | 22 ++- .../recording_querykeys_create_test.js | 149 -------------- .../recording_querykeys_create_test.json | 45 +++++ .../recording_querykeys_delete_test.js | 185 ------------------ .../recording_querykeys_delete_test.json | 128 ++++++++++++ .../recording_querykeys_list_test.js | 149 -------------- .../recording_querykeys_list_test.json | 54 +++++ .../recording_services_create_test.js | 147 -------------- .../recording_services_create_test.json | 72 +++++++ .../recording_services_delete_test.js | 177 ----------------- .../recording_services_delete_test.json | 68 +++++++ .../recording_services_get_test.js | 151 -------------- .../recording_services_get_test.json | 65 ++++++ .../recording_services_list_test.js | 149 -------------- .../recording_services_list_test.json | 70 +++++++ .../arm-search/review/arm-search.api.md | 70 ++++--- .../samples/v3/typescript/package.json | 2 +- .../samples/v3/typescript/tsconfig.json | 2 +- sdk/search/arm-search/src/index.ts | 1 + sdk/search/arm-search/src/models/index.ts | 29 +-- .../arm-search/src/operations/operations.ts | 15 +- .../operations/privateEndpointConnections.ts | 41 ++-- .../src/operations/privateLinkResources.ts | 16 +- .../arm-search/src/operations/queryKeys.ts | 41 ++-- .../arm-search/src/operations/services.ts | 65 ++++-- .../operations/sharedPrivateLinkResources.ts | 41 ++-- sdk/search/arm-search/src/pagingHelper.ts | 39 ++++ .../arm-search/src/searchManagementClient.ts | 80 ++++++-- sdk/search/arm-search/test/search_examples.ts | 132 +++++++------ 32 files changed, 903 insertions(+), 1340 deletions(-) delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.json delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.json delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.json delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.json delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.json delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.json delete mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.js create mode 100644 sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.json create mode 100644 sdk/search/arm-search/src/pagingHelper.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f91fdfc84299..2d9b38010f79 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -14022,7 +14022,7 @@ packages: dev: false file:projects/arm-search.tgz: - resolution: {integrity: sha512-iOwGP7Z5Vm24UkzTDGIpO5uMHmgdyZ+eADOwvuzoJvvZFGJ3Yokmza0LvOwSmR1ZUi9QhdHzxmcU8YIQ6Qltrw==, tarball: file:projects/arm-search.tgz} + resolution: {integrity: sha512-DI1uNXcsqTZ9Ck9yCPW2LKnZK3dON9+hDPsjIton0TyXpM1G9T4+3MIacE6Rm97PxliJccXNrwzg9Y88TiSTCg==, tarball: file:projects/arm-search.tgz} name: '@rush-temp/arm-search' version: 0.0.0 dependencies: @@ -14033,18 +14033,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/search/arm-search/CHANGELOG.md b/sdk/search/arm-search/CHANGELOG.md index a2099850b3e3..fc28fb923c59 100644 --- a/sdk/search/arm-search/CHANGELOG.md +++ b/sdk/search/arm-search/CHANGELOG.md @@ -1,15 +1,16 @@ # Release History + +## 3.1.0 (2022-12-07) + +**Features** -## 3.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface PrivateEndpointConnection + - Added Interface PrivateLinkResource + - Added Interface SearchService + - Added Interface SearchServiceUpdate + - Added Interface SharedPrivateLinkResource + - Added Interface TrackedResource + ## 3.0.1 (2022-04-29) **Features** diff --git a/sdk/search/arm-search/_meta.json b/sdk/search/arm-search/_meta.json index 88d626dc7e40..ce4aa58457e5 100644 --- a/sdk/search/arm-search/_meta.json +++ b/sdk/search/arm-search/_meta.json @@ -1,8 +1,8 @@ { "commit": "0cd7b3e83d5e7e21222dcc4bdde4565562da0cdf", "readme": "specification\\search\\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\\search\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\search\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", + "use": "@autorest/typescript@6.0.0-rc.4" } \ No newline at end of file diff --git a/sdk/search/arm-search/package.json b/sdk/search/arm-search/package.json index 4bd2e152c7e5..b7189dba4f50 100644 --- a/sdk/search/arm-search/package.json +++ b/sdk/search/arm-search/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SearchManagementClient.", - "version": "3.0.2", + "version": "3.1.0", "engines": { "node": ">=14.0.0" }, @@ -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/search/arm-search", "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-search?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.js deleted file mode 100644 index 7171ee5dac30..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.js +++ /dev/null @@ -1,149 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "0902a8985af6c00e5484cc29b54ef73d"; - -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', - 'c7025f87-5230-4b1b-a3d3-5a8e48e41000', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AnFJo4KxyV5KjRJd0lLk7tA; expires=Thu, 20-Jan-2022 08:35:16 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevreCtx7R-SdJhcipdJmofnGPb0jzHs06fh5BrXQzkak7TuhvbXz5vp7nOTC1S_f5wwp1FTBUB4Ja9YWeNB8-xG1aTW89EfdmP-yZlP-tN5DL1yW2hXd3sllpOMwf88jQ1ARI52xAHfFOyPCihl5p417G7laWrGfEjJPr4lb6ZLthQgAA; 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', - 'Tue, 21 Dec 2021 08:35:16 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', - 'e5f8b3bb-d617-4d20-a5d6-39aade550500', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Aucji1bUgQpKsEOgg-4_5hw; expires=Thu, 20-Jan-2022 08:35:16 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr2EjbQx3wB1gnSnD3AQN3eALoPp-usw2HnZsAkMFSM0EPYdIij_p79vbmWzbnVn0gOBDIQoK_C6ioU2bQQDyo3qyJNsorDER2ugaGgB528_t99V_Mu6wKR_p8Bmed8ob2VNBzhKnRdrA8nbOUwIzazRkLdfhsUmn8YJdXKEHCBVggAA; 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', - 'Tue, 21 Dec 2021 08:35:16 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=1d943c10-13d7-42eb-94fd-0b16ebaaa306&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', - '792de6b9-024e-4c20-b2f9-0fab9bd90a00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AjzWVCRXCSBNmzbjpObu9LPLj78gAQAAAMSIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35:16 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', - 'Tue, 21 Dec 2021 08:35:16 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .post('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx/createQueryKey/testjskey') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147cb6c917ff4e8a3366fda9f6edee6d71f8d3ec2bf8f3eba777ab077fae9313d27cf3ebdfff4e1c3a7bb3b4fef3f393d3e3879f0f0c9c1ee47","bfe4ff019f8c09593d000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-request-id', - 'b8968f15-a142-4d18-ba35-9d3a9dab4faf', - 'request-id', - 'b8968f15-a142-4d18-ba35-9d3a9dab4faf', - 'elapsed-time', - '198', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-correlation-request-id', - '38e84aec-b04c-40f8-9cd7-de169dc1ddd5', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083517Z:38e84aec-b04c-40f8-9cd7-de169dc1ddd5', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:16 GMT' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.json new file mode 100644 index 000000000000..98dd575c4a41 --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_create_test.json @@ -0,0 +1,45 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx/createQueryKey/testjskey?api-version=2020-08-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "08a019f5-c274-4782-a44a-055305885729" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:44 GMT", + "elapsed-time": "141", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "08a019f5-c274-4782-a44a-055305885729", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f646e0bd-c93c-426a-91c3-2af70daee214", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "08a019f5-c274-4782-a44a-055305885729", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072845Z:f646e0bd-c93c-426a-91c3-2af70daee214" + }, + "ResponseBody": { + "name": "testjskey", + "key": "Ry6d14Q7F6Isa9JIVYeDm9lWkUJfJ5Ga8UqH2RVSyIAzSeCOCJh3" + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.js deleted file mode 100644 index 974d6c38635f..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.js +++ /dev/null @@ -1,185 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "d8c1c488682a2eebf8fa7687871680ed"; - -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', - '882ce76a-8151-44e0-b77f-469ec8fa0f00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AutWUbFrDNRNi0juCor3rfA; expires=Thu, 20-Jan-2022 08:35:19 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr64PQbaKRSGswCI3lxmJeb3ok8nW8Cuw5ocUEgAvHdSnSc6wwMFCT6uSSmJcP-n0eYcN91NRztuqhU-yMnpuH66hM70UunLZF6RdKTFYMZq90HHlIHDAveFuQOVcU_ACOXvBFizt3pO6YBUDyoP3Z1oV2V4xEcb06xIdIiq-IEJMgAA; 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', - 'Tue, 21 Dec 2021 08:35:18 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', - '9dd0c33e-2a73-4b99-a0e0-506f9b250b00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=ApIGe1N-OKFNojR4gvAkZCY; expires=Thu, 20-Jan-2022 08:35:19 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr2fEp2F5xVvMRRI25q-OjhrKtf_oBuXNJY0Eqa14huUzyL7BOvz1sdN8Y6jb_8xUzIfpMR-b3BhBVoxKHiVycuHwVFoWp6qPCCqTZ6sZbc05X999FqbwRaXnQVFK8H_NF1bdmj5-9B2_YbYME6ZpqcTn2MGLspFhaQs0LG7aRTPogAA; 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', - 'Tue, 21 Dec 2021 08:35:18 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=4b6e79c4-1f25-4ccb-b5e7-dddc39410bfa&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', - '882ce76a-8151-44e0-b77f-469ecdfa0f00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AmhqDVcLvENMtLjJlw5Vs-XLj78gAQAAAMeIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35: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', - 'Tue, 21 Dec 2021 08:35:18 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx/deleteQueryKey/testjskey') - .query(true) - .reply(404, {"error":{"code":"Unknown","message":"This API key does not exist for service 'myjssearchservicexx'. RequestId: ca5e1c5e-9427-4af2-a0f3-99bdb953a57b","target":null,"details":null}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '180', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Language', - 'en', - 'Expires', - '-1', - 'x-ms-request-id', - 'ca5e1c5e-9427-4af2-a0f3-99bdb953a57b', - 'request-id', - 'ca5e1c5e-9427-4af2-a0f3-99bdb953a57b', - 'elapsed-time', - '116', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14999', - 'x-ms-correlation-request-id', - 'a4de790d-e5dc-4eb5-985b-4830290d0bde', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083519Z:a4de790d-e5dc-4eb5-985b-4830290d0bde', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:19 GMT' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .post('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx/listQueryKeys') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1325bd02fcb75598e3e7a9b5f7ff4e8a3a79f3e7dfa60e7e0f8c9dec9b39d9d873b0f0e4e3f7d78fae0c1fec9e9e9a79f9e9c7cf44b46e6b58fdabc697fbac17be6ed7ba7077ba79f1ed373f2ecd3fb4f1f3e7cbabbf3f4fe93d3e38393070f9f1cec7ef44bbe3ffa6899bf6b9f17cbb7d2f12f","f97f00fe702cd990000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-request-id', - '4cecf515-b69a-4f7d-b84a-e95ab98acc90', - 'request-id', - '4cecf515-b69a-4f7d-b84a-e95ab98acc90', - 'elapsed-time', - '114', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1197', - 'x-ms-correlation-request-id', - '32d451b3-e0b5-4dcc-9efe-2f90170d8b79', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083520Z:32d451b3-e0b5-4dcc-9efe-2f90170d8b79', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:19 GMT' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.json new file mode 100644 index 000000000000..3f30911a3097 --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_delete_test.json @@ -0,0 +1,128 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx/listQueryKeys?api-version=2020-08-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "bc548b37-8a22-4c38-9d37-e0a1e7fb5754" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:47 GMT", + "elapsed-time": "127", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "bc548b37-8a22-4c38-9d37-e0a1e7fb5754", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4c35f013-f0a6-4606-9ed0-cb40522b8a05", + "x-ms-ratelimit-remaining-subscription-writes": "1194", + "x-ms-request-id": "bc548b37-8a22-4c38-9d37-e0a1e7fb5754", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072848Z:4c35f013-f0a6-4606-9ed0-cb40522b8a05" + }, + "ResponseBody": { + "value": [ + { + "name": null, + "key": "Rrw8IlQgUyW0TEmyR6iMJ80CaZSwqyAWKDRPDKntLLAzSeBtcvYg" + }, + { + "name": "testjskey", + "key": "Ry6d14Q7F6Isa9JIVYeDm9lWkUJfJ5Ga8UqH2RVSyIAzSeCOCJh3" + } + ], + "nextLink": null + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx/deleteQueryKey/Ry6d14Q7F6Isa9JIVYeDm9lWkUJfJ5Ga8UqH2RVSyIAzSeCOCJh3?api-version=2020-08-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "68fe194c-973b-4de1-8cc2-954af2913aea" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Date": "Tue, 20 Dec 2022 07:28:49 GMT", + "elapsed-time": "141", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "68fe194c-973b-4de1-8cc2-954af2913aea", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a1c8c848-889c-4c74-9378-9e4fc0a2ea58", + "x-ms-ratelimit-remaining-subscription-deletes": "14998", + "x-ms-request-id": "68fe194c-973b-4de1-8cc2-954af2913aea", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072849Z:a1c8c848-889c-4c74-9378-9e4fc0a2ea58" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx/listQueryKeys?api-version=2020-08-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "95240a3a-7b74-4c82-99cb-f6891c3588c4" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:49 GMT", + "elapsed-time": "144", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "95240a3a-7b74-4c82-99cb-f6891c3588c4", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c19de451-8198-47e6-b270-489a8e067b5e", + "x-ms-ratelimit-remaining-subscription-writes": "1193", + "x-ms-request-id": "95240a3a-7b74-4c82-99cb-f6891c3588c4", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072850Z:c19de451-8198-47e6-b270-489a8e067b5e" + }, + "ResponseBody": { + "value": [ + { + "name": null, + "key": "Rrw8IlQgUyW0TEmyR6iMJ80CaZSwqyAWKDRPDKntLLAzSeBtcvYg" + } + ], + "nextLink": null + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.js deleted file mode 100644 index 72985ebe38d7..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.js +++ /dev/null @@ -1,149 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "253cb4f279bde5f04cb6f6e7543edb51"; - -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', - 'c7025f87-5230-4b1b-a3d3-5a8e56e41000', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AlrT-qYO0BJCqUglcUzG3SE; expires=Thu, 20-Jan-2022 08:35:17 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrOqW4w_mmTFVMjIjrpAPKPFNx79GIHZN47gPhuBFhJ8kj0IHaJ3FYU-hlRLzSpDyQwQPmopyyiBM3a8GZ1B6QkDAqmJLVlKlu6d5OuCr1wBgQDWilZHy4jvSzei6udcyJvX_HQmbU3fayQGpT5KZCzNAhh-EO5Ha71iCR1t9LJ_4gAA; 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', - 'Tue, 21 Dec 2021 08:35:17 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', - 'e5f8b3bb-d617-4d20-a5d6-39aae9550500', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AvcL3PrEtyZFhP8To2EMY8A; expires=Thu, 20-Jan-2022 08:35:18 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevrer7q9LdYgkZOIQ91clbXDJBUg5iKS5iJl4tKSX4LSbAxuMSC83wUY6acMpEkbs30K-Eox2Lc-uZBLwSRijzjIUstX1u5XnFLDYccKh3MXUwRDilh_bP0OCOh-AwlifJzoTiTXnp_Be5gDx7GHvyyCienrFbOq_b4BhwVwzHZ7ycgAA; 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', - 'Tue, 21 Dec 2021 08:35:17 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=d97098f1-a63a-48da-8000-f3f11ef0d0f9&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', - '792de6b9-024e-4c20-b2f9-0faba7d90a00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AnzEBUHnIiRIqgXQRcZep8_Lj78gAQAAAMWIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35:18 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', - 'Tue, 21 Dec 2021 08:35:17 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .post('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx/listQueryKeys') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffcd1325bd02fcb75598e3e7a9b5f7ff4e8a3a79f3e7dfa60e7e0f8c9dec9b39d9d873b0f0e4e3f7d78fae0c1fec9e9e9a79f9e9c7cf44b46e6b58fdabc697fbac17be6ed7ba7077ba79f1ed373f2ecd3fb4f1f3e7cbabbf3f4fe93d3e38393070f9f1cec7ef44bbe3ffa6899bf6b9f17cbb7d2f12f","f97f00fe702cd990000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-request-id', - '9332a445-c154-46c7-a1df-83597c53f36a', - 'request-id', - '9332a445-c154-46c7-a1df-83597c53f36a', - 'elapsed-time', - '142', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1198', - 'x-ms-correlation-request-id', - 'fa5553ad-4397-4cad-ba7f-7919369a8aa6', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083518Z:fa5553ad-4397-4cad-ba7f-7919369a8aa6', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:18 GMT' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.json new file mode 100644 index 000000000000..649793253d26 --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_querykeys_list_test.json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx/listQueryKeys?api-version=2020-08-01", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "0", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "d9270920-260d-4168-b008-d57bded6bcc1" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:46 GMT", + "elapsed-time": "133", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "d9270920-260d-4168-b008-d57bded6bcc1", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c904f025-79d4-47c1-a6be-6409768ea0f5", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "d9270920-260d-4168-b008-d57bded6bcc1", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072846Z:c904f025-79d4-47c1-a6be-6409768ea0f5" + }, + "ResponseBody": { + "value": [ + { + "name": null, + "key": "Rrw8IlQgUyW0TEmyR6iMJ80CaZSwqyAWKDRPDKntLLAzSeBtcvYg" + }, + { + "name": "testjskey", + "key": "Ry6d14Q7F6Isa9JIVYeDm9lWkUJfJ5Ga8UqH2RVSyIAzSeCOCJh3" + } + ], + "nextLink": null + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.js deleted file mode 100644 index b9c6af456512..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.js +++ /dev/null @@ -1,147 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "b3017d75108c0f0ee9f900fba34addd1"; - -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', - '792de6b9-024e-4c20-b2f9-0fab39d90a00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=AnF373lyiVZGmTPAkBdTy4s; expires=Thu, 20-Jan-2022 08:35:02 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrJnICsaJQe8CeYsOVq11yHf77NWz_0grJcvOhtnxqsfWpVXnqXFLO4H_Z6QM7Vz9zhqTBD7HaZQ-Mvbrsvsa7zGLoVwbhJdtzUgz3eUzfkTV7yLC3gs4lmbjzfxndA-bSmcdwVf_bfC9r5dnbrtMzLoxLSYv9m4vXCh3-9rDF2eogAA; 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', - 'Tue, 21 Dec 2021 08:35:01 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', - 'e5f8b3bb-d617-4d20-a5d6-39aa7f550500', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AsoGz01_b-5PoIS95PRu0TY; expires=Thu, 20-Jan-2022 08:35:02 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr6tEJ19ri9WMICskFOswCrErgMtNaTqeCRl2MHrG0aRSXUjU6XZiuFfcvKHwRAjEDEkwni0qmTQRGPLg58zOJvePyQElsgM2OQI2kf3Nzj7jT73Bqvt2aSzHwdWjVqDXejqtf4ym134762BeyUl-6viUZnulQgt1tw-4R1xUAhrggAA; 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', - 'Tue, 21 Dec 2021 08:35:02 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=9ebe80c5-6007-4cfe-8ecf-d8be580e951b&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', - '9dd0c33e-2a73-4b99-a0e0-506f2a250b00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=Ath_JBNpeuVAhwFQ0ViIOVHLj78gAQAAALaIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35:02 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', - 'Tue, 21 Dec 2021 08:35:02 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .put('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx', {"location":"eastus","sku":{"name":"standard"},"properties":{"replicaCount":1,"partitionCount":1,"hostingMode":"default"}}) - .query(true) - .reply(201, {"id":"/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx","name":"myjssearchservicexx","type":"Microsoft.Search/searchServices","location":"East US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"standard"}}, [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Length', - '552', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'ETag', - `W/"datetime'2021-12-21T08%3A35%3A12.0802951Z'"`, - 'x-ms-request-id', - '881eb399-5f62-470b-9688-c30eb5ace531', - 'request-id', - '881eb399-5f62-470b-9688-c30eb5ace531', - 'elapsed-time', - '1947', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-writes', - '1199', - 'x-ms-correlation-request-id', - 'dd813805-e194-447a-822f-e938b9f00ce1', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083513Z:dd813805-e194-447a-822f-e938b9f00ce1', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:12 GMT' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.json new file mode 100644 index 000000000000..3fbff718e4f0 --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_services_create_test.json @@ -0,0 +1,72 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx?api-version=2020-08-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "122", + "Content-Type": "application/json", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "8d2afa5a-2262-4be2-8b84-ace11efdf914" + }, + "RequestBody": { + "location": "eastus", + "sku": { + "name": "standard" + }, + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "hostingMode": "default" + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "539", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:39 GMT", + "elapsed-time": "4106", + "ETag": "W/\u0022datetime\u00272022-12-20T07%3A28%3A38.3528914Z\u0027\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "8d2afa5a-2262-4be2-8b84-ace11efdf914", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a4426b3f-c454-4e7e-9a36-9b8e75cd66a8", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "8d2afa5a-2262-4be2-8b84-ace11efdf914", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072840Z:a4426b3f-c454-4e7e-9a36-9b8e75cd66a8" + }, + "ResponseBody": { + "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx", + "name": "myjssearchservicexxx", + "type": "Microsoft.Search/searchServices", + "location": "East US", + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "status": "running", + "statusDetails": "", + "provisioningState": "succeeded", + "hostingMode": "default", + "publicNetworkAccess": "Enabled", + "networkRuleSet": { + "ipRules": [], + "bypass": "None" + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [] + }, + "sku": { + "name": "standard" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.js deleted file mode 100644 index e73699bb6744..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.js +++ /dev/null @@ -1,177 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "058e97a52ffbf0d84ec36fab6e5997fe"; - -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', - 'f480e226-70a1-4283-a533-9f5ea7f00c00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AoeIgI_6MqxPraHs8RK0vZI; expires=Thu, 20-Jan-2022 08:35:20 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevr8SVLKN1vrcqVimxO-1gX7tmo3m8vNJC7e_f7ELJr7IWWVMs0P2uyjk0wT_O2hy3HvRwZnvtY7pcto0a9aQhVJMp6gnuEogSEiRV8VN0cX1uKaLYHjfvu176KxGhQ3rsPg7mQ0020qOEpvooPuB1SZBrRxA6asrLip2Q74Ts6WWYgAA; 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', - 'Tue, 21 Dec 2021 08:35:20 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', - '9dd0c33e-2a73-4b99-a0e0-506fa6250b00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AuhDB6YIeaRFpdPTtSz2B5w; expires=Thu, 20-Jan-2022 08:35:20 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrDhiNdYLzrrd2iifI1GIwMin8sjx3uFdzn9Kca1u6SuEsQtT20IAX6EAhKgLOZv6qh2aDTqUkRnZjWuEKZrjITurOW4ThC59HxvmjEFkv5TvjKCWP_nJV2wAjNXxck4PLnUFEnPwVLd7g91Vu18n2JkXHUjO9kUKz5loaeGI0oVkgAA; 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', - 'Tue, 21 Dec 2021 08:35:20 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=7e9d614a-cbe3-4268-ab17-a319cadc44f3&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', - '9dd0c33e-2a73-4b99-a0e0-506fa8250b00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ArFaw8QupTpEopVkvRrnTRDLj78gAQAAAMeIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35:20 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', - 'Tue, 21 Dec 2021 08:35:20 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .delete('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx') - .query(true) - .reply(200, "", [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Expires', - '-1', - 'x-ms-request-id', - '9e03c8c3-7b03-495c-8b8a-cef61512db2c', - 'request-id', - '9e03c8c3-7b03-495c-8b8a-cef61512db2c', - 'elapsed-time', - '967', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-deletes', - '14998', - 'x-ms-correlation-request-id', - 'f7fa296a-203f-4268-8c02-b2ddf084752b', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083526Z:f7fa296a-203f-4268-8c02-b2ddf084752b', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:25 GMT', - 'Content-Length', - '0' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bdefff92ff0742ea40440c000000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding', - 'x-ms-ratelimit-remaining-subscription-reads', - '11997', - 'x-ms-request-id', - '77309677-0bb5-45e4-810c-3a1ec2376bef', - 'x-ms-correlation-request-id', - '77309677-0bb5-45e4-810c-3a1ec2376bef', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083526Z:77309677-0bb5-45e4-810c-3a1ec2376bef', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:25 GMT', - 'Content-Length', - '133' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.json new file mode 100644 index 000000000000..9a91aedbe826 --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_services_delete_test.json @@ -0,0 +1,68 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx?api-version=2020-08-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "2e6eb84f-c1cd-4d95-bea3-51bed49ee182" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Tue, 20 Dec 2022 07:29:00 GMT", + "elapsed-time": "2174", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "2e6eb84f-c1cd-4d95-bea3-51bed49ee182", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a51a25b4-8f98-4e69-bca4-a6633c1dcb3a", + "x-ms-ratelimit-remaining-subscription-deletes": "14997", + "x-ms-request-id": "2e6eb84f-c1cd-4d95-bea3-51bed49ee182", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072900Z:a51a25b4-8f98-4e69-bca4-a6633c1dcb3a" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices?api-version=2020-08-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "5343d1ac-0a7f-424e-aa1f-92055b872f1d" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:29:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Vary": "Accept-Encoding", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "32523d5e-7634-4521-8a2d-3b3b10e33c65", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "32523d5e-7634-4521-8a2d-3b3b10e33c65", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072900Z:32523d5e-7634-4521-8a2d-3b3b10e33c65" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.js deleted file mode 100644 index 9cb9a7db873d..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.js +++ /dev/null @@ -1,151 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "e814c202711fbf5816839f23314bc9bf"; - -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', - 'c11f8f9a-6879-4d56-8cc3-1fb244120d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=ApgTigJ6mpxLnQNWQ-l678Q; expires=Thu, 20-Jan-2022 08:35:13 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrnosL7YYTo7Ix4K-rLYN88o3ukFM9DUtFjhieHI6295baf2mGf3WTh5TYerNI3zTxMP1_5t0VPefcOx3Zs7TqlpeHZkr3pM97diLD9sAYhJWcolJOdT7_ZCtvyTwNE-sG9Yu0dk-9XV0h_0dX8-BcPAAatDHgVK_0POXA1ZXuZFAgAA; 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', - 'Tue, 21 Dec 2021 08:35:13 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - 'f480e226-70a1-4283-a533-9f5e7df00c00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=Ak83AXmifn9KtppM3yXpGv8; expires=Thu, 20-Jan-2022 08:35:13 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrAzV59MtcBVOq4Y4UXPWQvb-0RZ9OsLtESxFi9Tw2oaOmK1wB5DRMYGQBPwVcBAbpQuHomirTRlvSqDiUJeuvRjkgB2TVKn23CedKs9cGy0ScQgjBCWnONAQXKEZgkhtV7A-TS5WXFieetpik0CMuko3ZUSCWsa0Dd3Eq782bba8gAA; 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', - 'Tue, 21 Dec 2021 08:35:13 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=f59569aa-17a8-49c1-ab5a-d95ed1380562&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', - 'c11f8f9a-6879-4d56-8cc3-1fb246120d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=AmI8vI4wfYNNlfI0v0ANMe7Lj78gAQAAAMKIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35:14 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', - 'Tue, 21 Dec 2021 08:35:13 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexx') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef147c5eca3471fdd6dd693665a17abb6a896cddd877be70fefcf0eceb7ef4d3f7db0bdbfbbb7bffd7077fa60fb607abef3603a9b9cefedefdeadf3a65ad7d3fcf3ba5aaf9abb8beb9f6edabc69efaeeaeab298e57573f78b625a574d75de8e5fe7593d9ddf6df8c7ebbcbe2ca6b9bc221f35f2d1bb771f8d3e5a668b9c508a7fd95eaff0e50d90a961594d330c861a9f664d9b7ef59a3e24d45679dd16d4e2d12ffea8ce576531cd4eaaf5b2fde8d12e7d9dd17778c97dd4b459bba6d61fd5ebe5b2585e1010f9e869de6645896fe823827b5934f422b5784d5f03c5663d9de6f92c9fd1f7f3aa69e9ab2faa19be99e5e7d9ba6ce9f3d57a4218bcc8dbabaa7e7b4ced1b003c5d669392df5bca37afd665fe3a278468b656f8835a7deffba38f26d7ab8cdf78512df38f7e09c1ab8b4beafd74395b55c5b23da996cb7c8a015123bcd0ccb33a9fbd9456cf8be5db573a87fc3d0168deaed18b4e018d7439cbead947bfe4","97fc3f2787116028020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'ETag', - `W/"datetime'2021-12-21T08%3A35%3A12.0802951Z'"`, - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-request-id', - 'ebbfc4ea-d17a-4a83-a48c-3453c29f4b26', - 'request-id', - 'ebbfc4ea-d17a-4a83-a48c-3453c29f4b26', - 'elapsed-time', - '165', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-reads', - '11999', - 'x-ms-correlation-request-id', - '5af7766b-5b0e-49fb-b6f0-60e0dc5a3b1f', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083514Z:5af7766b-5b0e-49fb-b6f0-60e0dc5a3b1f', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:14 GMT' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.json new file mode 100644 index 000000000000..92f1e47ec337 --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_services_get_test.json @@ -0,0 +1,65 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx?api-version=2020-08-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "647d93dd-d7ce-4a85-b69e-d465af04ec41" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:41 GMT", + "elapsed-time": "472", + "ETag": "W/\u0022datetime\u00272022-12-20T07%3A28%3A38.3528914Z\u0027\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "647d93dd-d7ce-4a85-b69e-d465af04ec41", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "43e28ccc-db1c-4a78-a4f1-0564d01cdbdc", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "647d93dd-d7ce-4a85-b69e-d465af04ec41", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072842Z:43e28ccc-db1c-4a78-a4f1-0564d01cdbdc" + }, + "ResponseBody": { + "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx", + "name": "myjssearchservicexxx", + "type": "Microsoft.Search/searchServices", + "location": "East US", + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "status": "running", + "statusDetails": "", + "provisioningState": "succeeded", + "hostingMode": "default", + "publicNetworkAccess": "Enabled", + "networkRuleSet": { + "ipRules": [], + "bypass": "None" + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [] + }, + "sku": { + "name": "standard" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.js b/sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.js deleted file mode 100644 index c9189c3a25f0..000000000000 --- a/sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.js +++ /dev/null @@ -1,149 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "e5c7e28b729fddab131c256371a7e658"; - -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', - 'c11f8f9a-6879-4d56-8cc3-1fb24f120d00', - 'x-ms-ests-server', - '2.1.12261.17 - SEASLR2 ProdSlices', - 'Set-Cookie', - 'fpc=AmUNeS38POFClaEF95yiONs; expires=Thu, 20-Jan-2022 08:35:14 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrPgCzwJYYOpXJlSVjyq3k0nw2Kb1vnpoy6nISOlRi8rDZHA6AmAqGVsbKjTPzGSekSYN0g-GwSqcQ3FEDbLKFpoNw4wfR5iFd0k2Rb-ilw9e9ODyPJ5106qh8OZVUJqWwS1zeCWwS05lXnnPEiqh7PZUlDV_A4S-5dKCNVldTA2ogAA; 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', - 'Tue, 21 Dec 2021 08:35:14 GMT', - 'Content-Length', - '980' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .get('/88888888-8888-8888-8888-888888888888/v2.0/.well-known/openid-configuration') - .reply(200, {"token_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token","token_endpoint_auth_methods_supported":["client_secret_post","private_key_jwt","client_secret_basic"],"jwks_uri":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/discovery/v2.0/keys","response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["pairwise"],"id_token_signing_alg_values_supported":["RS256"],"response_types_supported":["code","id_token","code id_token","id_token token"],"scopes_supported":["openid","profile","email","offline_access"],"issuer":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/v2.0","request_uri_parameter_supported":false,"userinfo_endpoint":"https://graph.microsoft.com/oidc/userinfo","authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/authorize","device_authorization_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/devicecode","http_logout_supported":true,"frontchannel_logout_supported":true,"end_session_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/logout","claims_supported":["sub","iss","cloud_instance_name","cloud_instance_host_name","cloud_graph_host_name","msgraph_host","aud","exp","iat","auth_time","acr","nonce","preferred_username","name","tid","ver","at_hash","c_hash","email"],"kerberos_endpoint":"https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/kerberos","tenant_region_scope":"WW","cloud_instance_name":"microsoftonline.com","cloud_graph_host_name":"graph.windows.net","msgraph_host":"graph.microsoft.com","rbac_url":"https://pas.windows.net"}, [ - 'Cache-Control', - 'max-age=86400, private', - 'Content-Type', - 'application/json; charset=utf-8', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'Access-Control-Allow-Origin', - '*', - 'Access-Control-Allow-Methods', - 'GET, OPTIONS', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'x-ms-request-id', - '792de6b9-024e-4c20-b2f9-0fab94d90a00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'Set-Cookie', - 'fpc=Aiy9JPQMSkZLvNG8chHP3pE; expires=Thu, 20-Jan-2022 08:35:15 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrBdcr3CX5I7CiNtTWXaon0KuvHi1z_lVd7QZvqJVerr395dMR722v2_-UheFF6rBLZIzaWf8Ogj85Q8lUbhWY0_TANJitnwjVU4F0XroGr4X5wsI241aP4xdeICnAFDG7Ud6EUB6bmtcpv4a0_aOKAiU8kz4skjRXNbpxTz6q2QsgAA; 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', - 'Tue, 21 Dec 2021 08:35:14 GMT', - 'Content-Length', - '1753' -]); - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "client_id=azure_client_id&scope=https%3A%2F%2Fsanitized%2F&grant_type=client_credentials&x-client-SKU=msal.js.node&x-client-VER=1.4.0&x-client-OS=win32&x-client-CPU=x64&x-ms-lib-capability=retry-after, h429&x-client-current-telemetry=5|771,2,,,|,&x-client-last-telemetry=5|0|||0,0&client-request-id=4b05b867-7c3d-406b-8ac8-a4d5bd540b43&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', - '792de6b9-024e-4c20-b2f9-0fab95d90a00', - 'x-ms-ests-server', - '2.1.12261.17 - KRSLR1 ProdSlices', - 'x-ms-clitelem', - '1,0,0,,', - 'Set-Cookie', - 'fpc=ArlLPKhWmsZMgQtNHza3cTLLj78gAQAAAMKIU9kOAAAA; expires=Thu, 20-Jan-2022 08:35:15 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly', - 'Set-Cookie', - 'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly', - 'Date', - 'Tue, 21 Dec 2021 08:35:14 GMT', - 'Content-Length', - '1393' -]); - -nock('https://management.azure.com:443', {"encodedQueryParams":true}) - .get('/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices') - .query(true) - .reply(200, ["1f8b0800000000000400edbd07601c499625262f6dca7b7f4af54ad7e074a10880601324d8904010ecc188cde692ec1d69472329ab2a81ca6556655d661640cced9dbcf7de7befbdf7de7befbdf7ba3b9d4e27f7dfff3f5c6664016cf6ce4adac99e2180aac81f3f7e7c1f3f227ef1479759b9ce3f7af4bd5ffc5131fbe8d147779bf5a499d6c5aa2daa6573f7e1def9c3fbb383f3ed7bd34f1f6cefefeeed6f3fdc9d3ed83e989eef3c98ce26e77bfbbb77ebbca9d6f534ffbcaed6abe6eee2faa79b366fdabbabbaba2c6679dddcfda298d655539db7e3d779564fe7771bfef13aaf2f8b692eafc8478d7cf4eedd47a38f96d98230fb28fe657bbdc2973740a6866535cd30186a7c9a356dfad56bfa90505be5755b508b47bff8a33a5f95c5343ba9d6cbf6a347bbf47546dfe125f751d366ed9a5a7f54af97cb62794140e4a3a7799b1525bea18f08ee65d1d08bd4e2357d0d149bf5749ae7b37c46dfcfaba6a5afbea866f866969f67ebb2a5cf57eb0961f0226fafaafaed31b56f00f074994d4a7e6f29dfbc5a97f9eb9c10a2d95ae10f6af5bdef8f3e9a5caf327ee345b5cc3ffa2504af2e2ea9f7d3e56c5515cbf6a45a2ef32906448df04233cfea7cf6525a3d2f966f5fe91ceaf7f99bec82c07df7eeeffbd18c5ab4c522ff786f676f777b776f7b6ff7cdcec1ef7eeff8de7dfa67776fbc73b0b3f7f0feee4f7dfcfb7e84ae9bb76be0a79347345aceb27af6d12ff925047699bf6bd1db478f96ebb2fc","25ff0f4fd2ff4c7e020000"], [ - 'Cache-Control', - 'no-cache', - 'Pragma', - 'no-cache', - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'Content-Encoding', - 'gzip', - 'Expires', - '-1', - 'Vary', - 'Accept-Encoding,Accept-Encoding', - 'x-ms-request-id', - '5475f7bf-8680-4a3f-a4ee-f58a9ba44ffe', - 'request-id', - '5475f7bf-8680-4a3f-a4ee-f58a9ba44ffe', - 'elapsed-time', - '318', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'x-ms-ratelimit-remaining-subscription-reads', - '11998', - 'x-ms-correlation-request-id', - '1f11eb65-a233-401b-a427-f010b56d97a8', - 'x-ms-routing-request-id', - 'SOUTHEASTASIA:20211221T083516Z:1f11eb65-a233-401b-a427-f010b56d97a8', - 'X-Content-Type-Options', - 'nosniff', - 'Date', - 'Tue, 21 Dec 2021 08:35:15 GMT' -]); diff --git a/sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.json b/sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.json new file mode 100644 index 000000000000..7033c5dcae0c --- /dev/null +++ b/sdk/search/arm-search/recordings/node/search_test/recording_services_list_test.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices?api-version=2020-08-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-arm-search/3.1.0 core-rest-pipeline/1.10.1 Node/v18.12.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "1207ed77-b05d-4daf-87d9-fda2c77cf240" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Encoding": "gzip", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 20 Dec 2022 07:28:43 GMT", + "elapsed-time": "263", + "Expires": "-1", + "Pragma": "no-cache", + "request-id": "1207ed77-b05d-4daf-87d9-fda2c77cf240", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "Vary": [ + "Accept-Encoding", + "Accept-Encoding" + ], + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f0615009-fbf6-4c32-81eb-a1b238fc9a3a", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "1207ed77-b05d-4daf-87d9-fda2c77cf240", + "x-ms-routing-request-id": "SOUTHEASTASIA:20221220T072843Z:f0615009-fbf6-4c32-81eb-a1b238fc9a3a" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/azure_subscription_id/resourceGroups/myjstest/providers/Microsoft.Search/searchServices/myjssearchservicexxx", + "name": "myjssearchservicexxx", + "type": "Microsoft.Search/searchServices", + "location": "East US", + "properties": { + "replicaCount": 1, + "partitionCount": 1, + "status": "running", + "statusDetails": "", + "provisioningState": "succeeded", + "hostingMode": "default", + "publicNetworkAccess": "Enabled", + "networkRuleSet": { + "ipRules": [], + "bypass": "None" + }, + "privateEndpointConnections": [], + "sharedPrivateLinkResources": [], + "eTag": "W/\u0022datetime\u00272022-12-20T07%3A28%3A38.3528914Z\u0027\u0022" + }, + "sku": { + "name": "standard" + } + } + ], + "nextLink": null + } + } + ], + "Variables": {} +} diff --git a/sdk/search/arm-search/review/arm-search.api.md b/sdk/search/arm-search/review/arm-search.api.md index 85cfcb7ccdcd..f6f598f7b086 100644 --- a/sdk/search/arm-search/review/arm-search.api.md +++ b/sdk/search/arm-search/review/arm-search.api.md @@ -72,6 +72,9 @@ export interface CloudErrorBody { target?: string; } +// @public +export function getContinuationToken(page: unknown): string | undefined; + // @public export type HostingMode = "default" | "highDensity"; @@ -92,19 +95,14 @@ export interface IpRule { // @public export enum KnownSharedPrivateLinkResourceAsyncOperationResult { - // (undocumented) Failed = "Failed", - // (undocumented) Running = "Running", - // (undocumented) Succeeded = "Succeeded" } // @public export enum KnownUnavailableNameReason { - // (undocumented) AlreadyExists = "AlreadyExists", - // (undocumented) Invalid = "Invalid" } @@ -152,9 +150,9 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption export type OperationsListResponse = OperationListResult; // @public -export type PrivateEndpointConnection = Resource & { +export interface PrivateEndpointConnection extends Resource { properties?: PrivateEndpointConnectionProperties; -}; +} // @public export interface PrivateEndpointConnectionListResult { @@ -229,9 +227,9 @@ export interface PrivateEndpointConnectionsUpdateOptionalParams extends coreClie export type PrivateEndpointConnectionsUpdateResponse = PrivateEndpointConnection; // @public -export type PrivateLinkResource = Resource & { +export interface PrivateLinkResource extends Resource { readonly properties?: PrivateLinkResourceProperties; -}; +} // @public export interface PrivateLinkResourceProperties { @@ -355,20 +353,20 @@ export interface SearchManagementRequestOptions { } // @public -export type SearchService = TrackedResource & { - sku?: Sku; +export interface SearchService extends TrackedResource { + hostingMode?: HostingMode; identity?: Identity; - replicaCount?: number; + networkRuleSet?: NetworkRuleSet; partitionCount?: number; - hostingMode?: HostingMode; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; + replicaCount?: number; + readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + sku?: Sku; readonly status?: SearchServiceStatus; readonly statusDetails?: string; - readonly provisioningState?: ProvisioningState; - networkRuleSet?: NetworkRuleSet; - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; -}; +} // @public export interface SearchServiceListResult { @@ -380,24 +378,24 @@ export interface SearchServiceListResult { export type SearchServiceStatus = "running" | "provisioning" | "deleting" | "degraded" | "disabled" | "error"; // @public -export type SearchServiceUpdate = Resource & { - sku?: Sku; - location?: string; - tags?: { - [propertyName: string]: string; - }; +export interface SearchServiceUpdate extends Resource { + hostingMode?: HostingMode; identity?: Identity; - replicaCount?: number; + location?: string; + networkRuleSet?: NetworkRuleSet; partitionCount?: number; - hostingMode?: HostingMode; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; + replicaCount?: number; + readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + sku?: Sku; readonly status?: SearchServiceStatus; readonly statusDetails?: string; - readonly provisioningState?: ProvisioningState; - networkRuleSet?: NetworkRuleSet; - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; -}; + tags?: { + [propertyName: string]: string; + }; +} // @public export interface Services { @@ -496,9 +494,9 @@ export interface ShareablePrivateLinkResourceType { } // @public -export type SharedPrivateLinkResource = Resource & { +export interface SharedPrivateLinkResource extends Resource { properties?: SharedPrivateLinkResourceProperties; -}; +} // @public export type SharedPrivateLinkResourceAsyncOperationResult = string; @@ -585,12 +583,12 @@ export interface Sku { export type SkuName = "free" | "basic" | "standard" | "standard2" | "standard3" | "storage_optimized_l1" | "storage_optimized_l2"; // @public -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { + location: string; tags?: { [propertyName: string]: string; }; - location: string; -}; +} // @public export type UnavailableNameReason = string; diff --git a/sdk/search/arm-search/samples/v3/typescript/package.json b/sdk/search/arm-search/samples/v3/typescript/package.json index 153ff4bcba74..e0d3207a4196 100644 --- a/sdk/search/arm-search/samples/v3/typescript/package.json +++ b/sdk/search/arm-search/samples/v3/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/search/arm-search/samples/v3/typescript/tsconfig.json b/sdk/search/arm-search/samples/v3/typescript/tsconfig.json index 416c2dd82e00..e26ce2a6d8f7 100644 --- a/sdk/search/arm-search/samples/v3/typescript/tsconfig.json +++ b/sdk/search/arm-search/samples/v3/typescript/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2018", + "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "resolveJsonModule": true, diff --git a/sdk/search/arm-search/src/index.ts b/sdk/search/arm-search/src/index.ts index 416cd08df1e2..948e465676fd 100644 --- a/sdk/search/arm-search/src/index.ts +++ b/sdk/search/arm-search/src/index.ts @@ -7,6 +7,7 @@ */ /// +export { getContinuationToken } from "./pagingHelper"; export * from "./models"; export { SearchManagementClient } from "./searchManagementClient"; export * from "./operationsInterfaces"; diff --git a/sdk/search/arm-search/src/models/index.ts b/sdk/search/arm-search/src/models/index.ts index 0759705abc42..a777b121c7f9 100644 --- a/sdk/search/arm-search/src/models/index.ts +++ b/sdk/search/arm-search/src/models/index.ts @@ -352,27 +352,27 @@ export interface AsyncOperationResult { } /** Describes an existing Private Endpoint connection to the Azure Cognitive Search service. */ -export type PrivateEndpointConnection = Resource & { +export interface PrivateEndpointConnection extends Resource { /** Describes the properties of an existing Private Endpoint connection to the Azure Cognitive Search service. */ properties?: PrivateEndpointConnectionProperties; -}; +} /** Describes a Shared Private Link Resource managed by the Azure Cognitive Search service. */ -export type SharedPrivateLinkResource = Resource & { +export interface SharedPrivateLinkResource extends Resource { /** Describes the properties of a Shared Private Link Resource managed by the Azure Cognitive Search service. */ properties?: SharedPrivateLinkResourceProperties; -}; +} /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ -export type TrackedResource = Resource & { +export interface TrackedResource extends Resource { /** Resource tags. */ tags?: { [propertyName: string]: string }; /** The geo-location where the resource lives */ location: string; -}; +} /** The parameters used to update an Azure Cognitive Search service. */ -export type SearchServiceUpdate = Resource & { +export interface SearchServiceUpdate extends Resource { /** The SKU of the Search Service, which determines price tier and capacity limits. This property is required when creating a new Search Service. */ sku?: Sku; /** The geographic location of the resource. This must be one of the supported and registered Azure Geo Regions (for example, West US, East US, Southeast Asia, and so forth). This property is required when creating a new resource. */ @@ -416,19 +416,19 @@ export type SearchServiceUpdate = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; -}; +} /** Describes a supported private link resource for the Azure Cognitive Search service. */ -export type PrivateLinkResource = Resource & { +export interface PrivateLinkResource extends Resource { /** * Describes the properties of a supported private link resource for the Azure Cognitive Search service. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly properties?: PrivateLinkResourceProperties; -}; +} /** Describes an Azure Cognitive Search service and its current state. */ -export type SearchService = TrackedResource & { +export interface SearchService extends TrackedResource { /** The SKU of the Search Service, which determines price tier and capacity limits. This property is required when creating a new Search Service. */ sku?: Sku; /** The identity of the resource. */ @@ -468,7 +468,7 @@ export type SearchService = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly sharedPrivateLinkResources?: SharedPrivateLinkResource[]; -}; +} /** Parameter group */ export interface SearchManagementRequestOptions { @@ -478,7 +478,9 @@ export interface SearchManagementRequestOptions { /** Known values of {@link UnavailableNameReason} that the service accepts. */ export enum KnownUnavailableNameReason { + /** Invalid */ Invalid = "Invalid", + /** AlreadyExists */ AlreadyExists = "AlreadyExists" } @@ -494,8 +496,11 @@ export type UnavailableNameReason = string; /** Known values of {@link SharedPrivateLinkResourceAsyncOperationResult} that the service accepts. */ export enum KnownSharedPrivateLinkResourceAsyncOperationResult { + /** Running */ Running = "Running", + /** Succeeded */ Succeeded = "Succeeded", + /** Failed */ Failed = "Failed" } diff --git a/sdk/search/arm-search/src/operations/operations.ts b/sdk/search/arm-search/src/operations/operations.ts index 71528a64de6c..97a24c9dc8f7 100644 --- a/sdk/search/arm-search/src/operations/operations.ts +++ b/sdk/search/arm-search/src/operations/operations.ts @@ -6,7 +6,7 @@ * 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 { Operations } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -46,16 +46,21 @@ export class OperationsImpl implements Operations { [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?: OperationsListOptionalParams + options?: OperationsListOptionalParams, + _settings?: PageSettings ): AsyncIterableIterator { - let result = await this._list(options); + let result: OperationsListResponse; + result = await this._list(options); yield result.value || []; } diff --git a/sdk/search/arm-search/src/operations/privateEndpointConnections.ts b/sdk/search/arm-search/src/operations/privateEndpointConnections.ts index abe8cccf1600..0763faabb0f6 100644 --- a/sdk/search/arm-search/src/operations/privateEndpointConnections.ts +++ b/sdk/search/arm-search/src/operations/privateEndpointConnections.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 { PrivateEndpointConnections } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -16,13 +17,13 @@ import { PrivateEndpointConnection, PrivateEndpointConnectionsListByServiceNextOptionalParams, PrivateEndpointConnectionsListByServiceOptionalParams, + PrivateEndpointConnectionsListByServiceResponse, PrivateEndpointConnectionsUpdateOptionalParams, PrivateEndpointConnectionsUpdateResponse, PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse, - PrivateEndpointConnectionsListByServiceResponse, PrivateEndpointConnectionsListByServiceNextResponse } from "../models"; @@ -65,11 +66,15 @@ export class PrivateEndpointConnectionsImpl [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByServicePagingPage( resourceGroupName, searchServiceName, - options + options, + settings ); } }; @@ -78,15 +83,22 @@ export class PrivateEndpointConnectionsImpl private async *listByServicePagingPage( resourceGroupName: string, searchServiceName: string, - options?: PrivateEndpointConnectionsListByServiceOptionalParams + options?: PrivateEndpointConnectionsListByServiceOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByService( - resourceGroupName, - searchServiceName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: PrivateEndpointConnectionsListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + searchServiceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByServiceNext( resourceGroupName, @@ -95,7 +107,9 @@ export class PrivateEndpointConnectionsImpl options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -350,7 +364,6 @@ const listByServiceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/search/arm-search/src/operations/privateLinkResources.ts b/sdk/search/arm-search/src/operations/privateLinkResources.ts index ed1fc907bb14..ccefb51c5798 100644 --- a/sdk/search/arm-search/src/operations/privateLinkResources.ts +++ b/sdk/search/arm-search/src/operations/privateLinkResources.ts @@ -6,7 +6,7 @@ * 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 { PrivateLinkResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -56,11 +56,15 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listSupportedPagingPage( resourceGroupName, searchServiceName, - options + options, + settings ); } }; @@ -69,9 +73,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private async *listSupportedPagingPage( resourceGroupName: string, searchServiceName: string, - options?: PrivateLinkResourcesListSupportedOptionalParams + options?: PrivateLinkResourcesListSupportedOptionalParams, + _settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listSupported( + let result: PrivateLinkResourcesListSupportedResponse; + result = await this._listSupported( resourceGroupName, searchServiceName, options diff --git a/sdk/search/arm-search/src/operations/queryKeys.ts b/sdk/search/arm-search/src/operations/queryKeys.ts index e01301d546e6..4cb29f5000db 100644 --- a/sdk/search/arm-search/src/operations/queryKeys.ts +++ b/sdk/search/arm-search/src/operations/queryKeys.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 { QueryKeys } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -16,9 +17,9 @@ import { QueryKey, QueryKeysListBySearchServiceNextOptionalParams, QueryKeysListBySearchServiceOptionalParams, + QueryKeysListBySearchServiceResponse, QueryKeysCreateOptionalParams, QueryKeysCreateResponse, - QueryKeysListBySearchServiceResponse, QueryKeysDeleteOptionalParams, QueryKeysListBySearchServiceNextResponse } from "../models"; @@ -61,11 +62,15 @@ export class QueryKeysImpl implements QueryKeys { [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listBySearchServicePagingPage( resourceGroupName, searchServiceName, - options + options, + settings ); } }; @@ -74,15 +79,22 @@ export class QueryKeysImpl implements QueryKeys { private async *listBySearchServicePagingPage( resourceGroupName: string, searchServiceName: string, - options?: QueryKeysListBySearchServiceOptionalParams + options?: QueryKeysListBySearchServiceOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listBySearchService( - resourceGroupName, - searchServiceName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: QueryKeysListBySearchServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySearchService( + resourceGroupName, + searchServiceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listBySearchServiceNext( resourceGroupName, @@ -91,7 +103,9 @@ export class QueryKeysImpl implements QueryKeys { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -275,7 +289,6 @@ const listBySearchServiceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/search/arm-search/src/operations/services.ts b/sdk/search/arm-search/src/operations/services.ts index 121d8c740694..b2e8e2b395b5 100644 --- a/sdk/search/arm-search/src/operations/services.ts +++ b/sdk/search/arm-search/src/operations/services.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 { Services } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,8 +19,10 @@ import { SearchService, ServicesListByResourceGroupNextOptionalParams, ServicesListByResourceGroupOptionalParams, + ServicesListByResourceGroupResponse, ServicesListBySubscriptionNextOptionalParams, ServicesListBySubscriptionOptionalParams, + ServicesListBySubscriptionResponse, ServicesCreateOrUpdateOptionalParams, ServicesCreateOrUpdateResponse, SearchServiceUpdate, @@ -28,8 +31,6 @@ import { ServicesGetOptionalParams, ServicesGetResponse, ServicesDeleteOptionalParams, - ServicesListByResourceGroupResponse, - ServicesListBySubscriptionResponse, ServicesCheckNameAvailabilityOptionalParams, ServicesCheckNameAvailabilityResponse, ServicesListByResourceGroupNextResponse, @@ -67,19 +68,33 @@ export class ServicesImpl implements Services { [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?: ServicesListByResourceGroupOptionalParams + options?: ServicesListByResourceGroupOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: ServicesListByResourceGroupResponse; + 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, @@ -87,7 +102,9 @@ export class ServicesImpl implements Services { options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -118,22 +135,34 @@ export class ServicesImpl implements Services { [Symbol.asyncIterator]() { return this; }, - byPage: () => { - return this.listBySubscriptionPagingPage(options); + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); } }; } private async *listBySubscriptionPagingPage( - options?: ServicesListBySubscriptionOptionalParams + options?: ServicesListBySubscriptionOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listBySubscription(options); - yield result.value || []; - let continuationToken = result.nextLink; + let result: ServicesListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listBySubscriptionNext(continuationToken, options); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -576,7 +605,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, @@ -597,7 +625,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.ts b/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.ts index a999b8b74c03..d72557fd58e8 100644 --- a/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.ts +++ b/sdk/search/arm-search/src/operations/sharedPrivateLinkResources.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 { SharedPrivateLinkResources } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -18,12 +19,12 @@ import { SharedPrivateLinkResource, SharedPrivateLinkResourcesListByServiceNextOptionalParams, SharedPrivateLinkResourcesListByServiceOptionalParams, + SharedPrivateLinkResourcesListByServiceResponse, SharedPrivateLinkResourcesCreateOrUpdateOptionalParams, SharedPrivateLinkResourcesCreateOrUpdateResponse, SharedPrivateLinkResourcesGetOptionalParams, SharedPrivateLinkResourcesGetResponse, SharedPrivateLinkResourcesDeleteOptionalParams, - SharedPrivateLinkResourcesListByServiceResponse, SharedPrivateLinkResourcesListByServiceNextResponse } from "../models"; @@ -66,11 +67,15 @@ export class SharedPrivateLinkResourcesImpl [Symbol.asyncIterator]() { return this; }, - byPage: () => { + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } return this.listByServicePagingPage( resourceGroupName, searchServiceName, - options + options, + settings ); } }; @@ -79,15 +84,22 @@ export class SharedPrivateLinkResourcesImpl private async *listByServicePagingPage( resourceGroupName: string, searchServiceName: string, - options?: SharedPrivateLinkResourcesListByServiceOptionalParams + options?: SharedPrivateLinkResourcesListByServiceOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result = await this._listByService( - resourceGroupName, - searchServiceName, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; + let result: SharedPrivateLinkResourcesListByServiceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByService( + resourceGroupName, + searchServiceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } while (continuationToken) { result = await this._listByServiceNext( resourceGroupName, @@ -96,7 +108,9 @@ export class SharedPrivateLinkResourcesImpl options ); continuationToken = result.nextLink; - yield result.value || []; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; } } @@ -516,7 +530,6 @@ const listByServiceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.resourceGroupName, diff --git a/sdk/search/arm-search/src/pagingHelper.ts b/sdk/search/arm-search/src/pagingHelper.ts new file mode 100644 index 000000000000..269a2b9814b5 --- /dev/null +++ b/sdk/search/arm-search/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 the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from + * that point later. + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. + */ +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/search/arm-search/src/searchManagementClient.ts b/sdk/search/arm-search/src/searchManagementClient.ts index eac7bb6b5b6f..5a2e8e2e0c36 100644 --- a/sdk/search/arm-search/src/searchManagementClient.ts +++ b/sdk/search/arm-search/src/searchManagementClient.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 { OperationsImpl, @@ -62,47 +67,53 @@ export class SearchManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-search/3.0.2`; + const packageDetails = `azsdk-js-arm-search/3.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${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 SearchManagementClient extends coreClient.ServiceClient { this.privateLinkResources = new PrivateLinkResourcesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.sharedPrivateLinkResources = new SharedPrivateLinkResourcesImpl(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); } operations: Operations; diff --git a/sdk/search/arm-search/test/search_examples.ts b/sdk/search/arm-search/test/search_examples.ts index 45002a6fc89b..9ea63f8bcea9 100644 --- a/sdk/search/arm-search/test/search_examples.ts +++ b/sdk/search/arm-search/test/search_examples.ts @@ -8,31 +8,25 @@ import { env, - record, - RecorderEnvironmentSetup, Recorder, + RecorderStartOptions, delay, - isPlaybackMode + isPlaybackMode, } from "@azure-tools/test-recorder"; -import * as assert from "assert"; -import { ClientSecretCredential } from "@azure/identity"; +import { createTestCredential } from "@azure-tools/test-credential"; +import { assert } from "chai"; +import { Context } from "mocha"; import { SearchManagementClient } from "../src/searchManagementClient"; -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: [] +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 = { @@ -47,81 +41,89 @@ describe("Search test", () => { let resourceGroup: string; let searchServiceName: string; let keyname: string; + let keyvalue: string; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); - subscriptionId = env.SUBSCRIPTION_ID; + 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 = new ClientSecretCredential( - env.AZURE_TENANT_ID, - env.AZURE_CLIENT_ID, - env.AZURE_CLIENT_SECRET - ); - client = new SearchManagementClient(credential, subscriptionId); + const credential = createTestCredential(); + client = new SearchManagementClient(credential, subscriptionId, recorder.configureClientOptions({})); location = "eastus"; resourceGroup = "myjstest"; - searchServiceName = "myjssearchservicexx" + searchServiceName = "myjssearchservicexxx" keyname = "testjskey"; }); - afterEach(async function() { + afterEach(async function () { await recorder.stop(); }); - it("services create test", async function() { - const res = await client.services.beginCreateOrUpdateAndWait(resourceGroup,searchServiceName,{ + it("services create test", async function () { + const res = await client.services.beginCreateOrUpdateAndWait(resourceGroup, searchServiceName, { location: location, - replicaCount: 1, - partitionCount: 1, - hostingMode: "default", - sku: { - name: "standard" - } + replicaCount: 1, + partitionCount: 1, + hostingMode: "default", + sku: { + name: "standard" + } }); - assert.equal(res.name,searchServiceName); + assert.equal(res.name, searchServiceName); }); - it("services get test", async function() { - const res = await client.services.get(resourceGroup,searchServiceName); - assert.equal(res.name,searchServiceName); + it("services get test", async function () { + const res = await client.services.get(resourceGroup, searchServiceName); + assert.equal(res.name, searchServiceName); }); - it("services list test", async function() { + it("services list test", async function () { const resArray = new Array(); - for await (let item of client.services.listByResourceGroup(resourceGroup)){ - resArray.push(item); + for await (let item of client.services.listByResourceGroup(resourceGroup)) { + resArray.push(item); } - assert.equal(resArray.length,1); + assert.equal(resArray.length, 1); }); - it("queryKeys create test", async function() { - const res = await client.queryKeys.create(resourceGroup,searchServiceName,keyname); - assert.notEqual(res.key,""); + it("queryKeys create test", async function () { + const res = await client.queryKeys.create(resourceGroup, searchServiceName, keyname); + keyvalue = res.key || ""; + assert.equal(res.name, keyname); }); - it("queryKeys list test", async function() { + it("queryKeys list test", async function () { const resArray = new Array(); - for await (let item of client.queryKeys.listBySearchService(resourceGroup,searchServiceName)){ - resArray.push(item); + for await (let item of client.queryKeys.listBySearchService(resourceGroup, searchServiceName)) { + resArray.push(item); } - assert.equal(resArray.length,2); + assert.equal(resArray.length, 2); }); - it("queryKeys delete test", async function() { - const res = await client.queryKeys.delete(resourceGroup,searchServiceName,keyname); - const resArray = new Array(); - for await (let item of client.queryKeys.listBySearchService(resourceGroup,searchServiceName)){ - resArray.push(item); + it("queryKeys delete test", async function () { + let resArray = new Array(); + for await (let item of client.queryKeys.listBySearchService(resourceGroup, searchServiceName)) { + resArray.push(item); + } + const len = resArray.length; + // At least one query key + assert.isTrue(len > 0); + // Delete the query key by key not by keyname + await client.queryKeys.delete(resourceGroup, searchServiceName, keyvalue); + resArray = new Array(); + for await (let item of client.queryKeys.listBySearchService(resourceGroup, searchServiceName)) { + resArray.push(item); } - assert.equal(resArray.length,2); + // The key number is reduced to len - 1 + assert.equal(resArray.length, len - 1); }); - it("services delete test", async function() { - const res = await client.services.delete(resourceGroup,searchServiceName); + it("services delete test", async function () { + await client.services.delete(resourceGroup, searchServiceName); const resArray = new Array(); - for await (let item of client.services.listByResourceGroup(resourceGroup)){ - resArray.push(item); + for await (let item of client.services.listByResourceGroup(resourceGroup)) { + resArray.push(item); } - assert.equal(resArray.length,0); + assert.equal(resArray.length, 0); }); }); From 4c0c9328332c5d4d96ed84db7dba78eb774c7b91 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 20 Dec 2022 03:37:23 -0500 Subject: [PATCH 2/6] Post release automated changes for azure-arm-network (#24283) --- sdk/network/arm-network/CHANGELOG.md | 12 +++++++++++- sdk/network/arm-network/package.json | 4 ++-- .../arm-network/src/networkManagementClient.ts | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index 241dda6f225c..ba3f8c357b81 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History - + +## 30.1.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 30.1.0 (2022-12-13) **Features** diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 2643ac350312..bacb356a169b 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkManagementClient.", - "version": "30.1.0", + "version": "30.1.1", "engines": { "node": ">=14.0.0" }, @@ -119,4 +119,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview" } -} \ No newline at end of file +} diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index 4a0f91b99b34..4482b922dacf 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -359,7 +359,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-network/30.1.0`; + const packageDetails = `azsdk-js-arm-network/30.1.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` From c15771607f11250b7b38267ab6f95996da2fdb8a Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 20 Dec 2022 03:37:53 -0500 Subject: [PATCH 3/6] Post release automated changes for azure-arm-digitaltwins (#24275) --- sdk/digitaltwins/arm-digitaltwins/CHANGELOG.md | 12 +++++++++++- sdk/digitaltwins/arm-digitaltwins/package.json | 4 ++-- .../src/azureDigitalTwinsManagementClient.ts | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sdk/digitaltwins/arm-digitaltwins/CHANGELOG.md b/sdk/digitaltwins/arm-digitaltwins/CHANGELOG.md index 242c0d4a70f6..6a390be15c99 100644 --- a/sdk/digitaltwins/arm-digitaltwins/CHANGELOG.md +++ b/sdk/digitaltwins/arm-digitaltwins/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History - + +## 3.2.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 3.2.0 (2022-11-30) **Features** diff --git a/sdk/digitaltwins/arm-digitaltwins/package.json b/sdk/digitaltwins/arm-digitaltwins/package.json index a80fae228b4b..2d0ca6687221 100644 --- a/sdk/digitaltwins/arm-digitaltwins/package.json +++ b/sdk/digitaltwins/arm-digitaltwins/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureDigitalTwinsManagementClient.", - "version": "3.2.0", + "version": "3.2.1", "engines": { "node": ">=14.0.0" }, @@ -119,4 +119,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-digitaltwins?view=azure-node-preview" } -} \ No newline at end of file +} diff --git a/sdk/digitaltwins/arm-digitaltwins/src/azureDigitalTwinsManagementClient.ts b/sdk/digitaltwins/arm-digitaltwins/src/azureDigitalTwinsManagementClient.ts index 600cd9ff574e..8171879ab050 100644 --- a/sdk/digitaltwins/arm-digitaltwins/src/azureDigitalTwinsManagementClient.ts +++ b/sdk/digitaltwins/arm-digitaltwins/src/azureDigitalTwinsManagementClient.ts @@ -64,7 +64,7 @@ export class AzureDigitalTwinsManagementClient extends coreClient.ServiceClient credential: credentials }; - const packageDetails = `azsdk-js-arm-digitaltwins/3.2.0`; + const packageDetails = `azsdk-js-arm-digitaltwins/3.2.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` From c4c7bd398a0f6188389f0aef112ab8146f56b15d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 20 Dec 2022 03:39:07 -0500 Subject: [PATCH 4/6] Post release automated changes for storage releases (#24285) Post release automated changes for azure-arm-storage --- sdk/storage/arm-storage/CHANGELOG.md | 12 +++++++++++- sdk/storage/arm-storage/package.json | 4 ++-- .../arm-storage/src/storageManagementClient.ts | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sdk/storage/arm-storage/CHANGELOG.md b/sdk/storage/arm-storage/CHANGELOG.md index eef1c5a7b864..94bbdce0b6c6 100644 --- a/sdk/storage/arm-storage/CHANGELOG.md +++ b/sdk/storage/arm-storage/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History - + +## 18.1.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 18.1.0 (2022-11-24) **Features** diff --git a/sdk/storage/arm-storage/package.json b/sdk/storage/arm-storage/package.json index 0450e0fe7cdc..4ffa04494dbb 100644 --- a/sdk/storage/arm-storage/package.json +++ b/sdk/storage/arm-storage/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for StorageManagementClient.", - "version": "18.1.0", + "version": "18.1.1", "engines": { "node": ">=14.0.0" }, @@ -119,4 +119,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-storage?view=azure-node-preview" } -} \ No newline at end of file +} diff --git a/sdk/storage/arm-storage/src/storageManagementClient.ts b/sdk/storage/arm-storage/src/storageManagementClient.ts index a52803529b02..68fd46e81f7c 100644 --- a/sdk/storage/arm-storage/src/storageManagementClient.ts +++ b/sdk/storage/arm-storage/src/storageManagementClient.ts @@ -92,7 +92,7 @@ export class StorageManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-storage/18.1.0`; + const packageDetails = `azsdk-js-arm-storage/18.1.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` From 9abc883881fa6938af2f99832541bc3f63207837 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 20 Dec 2022 03:39:35 -0500 Subject: [PATCH 5/6] Post release automated changes for azure-arm-synapse (#24271) --- sdk/synapse/arm-synapse/CHANGELOG.md | 12 +++++++++++- sdk/synapse/arm-synapse/package.json | 2 +- .../arm-synapse/src/synapseManagementClient.ts | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sdk/synapse/arm-synapse/CHANGELOG.md b/sdk/synapse/arm-synapse/CHANGELOG.md index bfa8b11a890c..5ff2ca3cc8a5 100644 --- a/sdk/synapse/arm-synapse/CHANGELOG.md +++ b/sdk/synapse/arm-synapse/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History - + +## 8.1.0-beta.3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 8.1.0-beta.2 (2022-12-16) **Features** diff --git a/sdk/synapse/arm-synapse/package.json b/sdk/synapse/arm-synapse/package.json index d8a1667414f9..71df79584920 100644 --- a/sdk/synapse/arm-synapse/package.json +++ b/sdk/synapse/arm-synapse/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SynapseManagementClient.", - "version": "8.1.0-beta.2", + "version": "8.1.0-beta.3", "engines": { "node": ">=14.0.0" }, diff --git a/sdk/synapse/arm-synapse/src/synapseManagementClient.ts b/sdk/synapse/arm-synapse/src/synapseManagementClient.ts index f15f445b383c..9d84f88d90dd 100644 --- a/sdk/synapse/arm-synapse/src/synapseManagementClient.ts +++ b/sdk/synapse/arm-synapse/src/synapseManagementClient.ts @@ -192,7 +192,7 @@ export class SynapseManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-synapse/8.1.0-beta.2`; + const packageDetails = `azsdk-js-arm-synapse/8.1.0-beta.3`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` From b47c0a9163928b260914db82f8d2e1837554d340 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 20 Dec 2022 08:58:23 +0000 Subject: [PATCH 6/6] CodeGen from PR 21919 in Azure/azure-rest-api-specs Merge d9defc3efe73e28f32e1ad2dd39f9c241e070dd8 into 639376b2bf9f0f36debfd7fce7debdf7b72578af --- .../arm-recoveryservicesbackup/CHANGELOG.md | 50 +- .../arm-recoveryservicesbackup/_meta.json | 8 +- .../arm-recoveryservicesbackup/package.json | 10 +- .../review/arm-recoveryservicesbackup.api.md | 126 ++++- .../src/models/index.ts | 459 +++++++++++++----- .../src/models/mappers.ts | 181 ++++++- .../src/models/parameters.ts | 2 +- .../operations/deletedProtectionContainers.ts | 198 ++++++++ .../src/operations/index.ts | 1 + .../deletedProtectionContainers.ts | 30 ++ .../src/operationsInterfaces/index.ts | 1 + .../src/recoveryServicesBackupClient.ts | 8 +- .../arm-recoveryservicesbackup/tsconfig.json | 10 +- 13 files changed, 901 insertions(+), 183 deletions(-) create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/deletedProtectionContainers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/deletedProtectionContainers.ts diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md index ac2f2d974c71..cdffd76753e7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md @@ -1,9 +1,10 @@ # Release History -## 10.0.0 (2022-12-05) +## 10.0.0 (2022-12-20) **Features** + - Added operation group DeletedProtectionContainers - Added Interface AzureBackupGoalFeatureSupportRequest - Added Interface AzureBackupServerContainer - Added Interface AzureBackupServerEngine @@ -48,6 +49,9 @@ - Added Interface AzureVmWorkloadSAPHanaDatabaseProtectableItem - Added Interface AzureVmWorkloadSAPHanaDatabaseProtectedItem - Added Interface AzureVmWorkloadSAPHanaDatabaseWorkloadItem + - Added Interface AzureVmWorkloadSAPHanaDBInstance + - Added Interface AzureVmWorkloadSAPHanaDBInstanceProtectedItem + - Added Interface AzureVmWorkloadSAPHanaHSR - Added Interface AzureVmWorkloadSAPHanaSystemProtectableItem - Added Interface AzureVmWorkloadSAPHanaSystemWorkloadItem - Added Interface AzureVmWorkloadSQLAvailabilityGroupProtectableItem @@ -86,6 +90,8 @@ - Added Interface BackupResourceEncryptionConfigExtendedResource - Added Interface BackupResourceEncryptionConfigResource - Added Interface BackupResourceVaultConfigResource + - Added Interface DeletedProtectionContainersListNextOptionalParams + - Added Interface DeletedProtectionContainersListOptionalParams - Added Interface DpmBackupEngine - Added Interface DpmContainer - Added Interface DpmJob @@ -139,6 +145,7 @@ - Added Interface SimpleRetentionPolicy - Added Interface SimpleSchedulePolicy - Added Interface SimpleSchedulePolicyV2 + - Added Interface TieringPolicy - Added Interface ValidateIaasVMRestoreOperationRequest - Added Interface ValidateRestoreOperationRequest - Added Interface VaultJob @@ -146,6 +153,37 @@ - Added Interface WorkloadItemResourceList - Added Interface WorkloadProtectableItemResource - Added Interface WorkloadProtectableItemResourceList + - Added Type Alias DeletedProtectionContainersListNextResponse + - Added Type Alias DeletedProtectionContainersListResponse + - Added Type Alias ProtectableContainerType + - Added Type Alias TieringMode + - Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter newestRecoveryPointInArchive + - Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInArchive + - Interface AzureIaaSVMProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInVault + - Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter newestRecoveryPointInArchive + - Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInArchive + - Interface AzureVmWorkloadProtectedItemExtendedInfo has a new optional parameter oldestRecoveryPointInVault + - Interface ProtectedItem has a new optional parameter softDeleteRetentionPeriod + - Interface SubProtectionPolicy has a new optional parameter tieringPolicy + - Added Enum KnownTieringMode + - Enum KnownBackupItemType has a new value SAPHanaDBInstance + - Enum KnownBackupType has a new value SnapshotCopyOnlyFull + - Enum KnownBackupType has a new value SnapshotFull + - Enum KnownContainerType has a new value HanaHSRContainer + - Enum KnownDataSourceType has a new value SAPHanaDBInstance + - Enum KnownPolicyType has a new value SnapshotCopyOnlyFull + - Enum KnownPolicyType has a new value SnapshotFull + - Enum KnownRestorePointQueryType has a new value SnapshotCopyOnlyFull + - Enum KnownRestorePointQueryType has a new value SnapshotFull + - Enum KnownRestorePointType has a new value SnapshotCopyOnlyFull + - Enum KnownRestorePointType has a new value SnapshotFull + - Enum KnownWorkloadItemType has a new value SAPHanaDBInstance + - Enum KnownWorkloadType has a new value SAPHanaDBInstance + - Added function getContinuationToken + +**Breaking Changes** + + - Operation ResourceGuardProxy.put has a new signature - Interface BackupEnginesListNextOptionalParams no longer has parameter filter - Interface BackupEnginesListNextOptionalParams no longer has parameter skipToken - Interface BackupJobsListNextOptionalParams no longer has parameter filter @@ -162,10 +200,12 @@ - Interface BackupWorkloadItemsListNextOptionalParams no longer has parameter skipToken - Interface ProtectableContainersListNextOptionalParams no longer has parameter filter - Interface RecoveryPointsListNextOptionalParams no longer has parameter filter - -**Breaking Changes** - - - Operation ResourceGuardProxy.put has a new signature + - Type of parameter protectedItemType of interface ProtectedItem is changed from "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem" to "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem" + - Type of parameter protectableItemType of interface WorkloadProtectableItem is changed from "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" to "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance" + - Enum KnownContainerType no longer has value AzureWorkloadContainer + - Enum KnownContainerType no longer has value MicrosoftClassicComputeVirtualMachines + - Enum KnownContainerType no longer has value MicrosoftComputeVirtualMachines + ## 9.0.0 (2022-05-16) diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json index 571b1bf25825..a35d8945f4a5 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json @@ -1,8 +1,8 @@ { - "commit": "81562c6c057a510ddde50ff40720d254bd5f6dbf", + "commit": "37fabb1b62c57498e0954a1d168a18bd1b673928", "readme": "specification/recoveryservicesbackup/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicesbackup\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservicesbackup/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", - "use": "@autorest/typescript@6.0.0-rc.4" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index e02074d56a3a..d2ac6851cb37 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup?view=azure-node-preview" - } + "autoPublish": true } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md index 32868ecd9013..ff1a042a7251 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md @@ -199,24 +199,27 @@ export interface AzureIaaSVMJobV2 extends Job { export interface AzureIaaSVMProtectedItem extends ProtectedItem { extendedInfo?: AzureIaaSVMProtectedItemExtendedInfo; extendedProperties?: ExtendedProperties; - friendlyName?: string; + readonly friendlyName?: string; healthDetails?: AzureIaaSVMHealthDetails[]; - healthStatus?: HealthStatus; + readonly healthStatus?: HealthStatus; kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails; }; lastBackupStatus?: string; - lastBackupTime?: Date; - protectedItemDataId?: string; + readonly lastBackupTime?: Date; + readonly protectedItemDataId?: string; protectedItemType: "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; protectionState?: ProtectionState; protectionStatus?: string; - virtualMachineId?: string; + readonly virtualMachineId?: string; } // @public export interface AzureIaaSVMProtectedItemExtendedInfo { + newestRecoveryPointInArchive?: Date; oldestRecoveryPoint?: Date; + oldestRecoveryPointInArchive?: Date; + oldestRecoveryPointInVault?: Date; policyInconsistent?: boolean; recoveryPointCount?: number; } @@ -230,9 +233,13 @@ export interface AzureIaaSVMProtectionPolicy extends ProtectionPolicy { // (undocumented) instantRPDetails?: InstantRPAdditionalDetails; instantRpRetentionRangeInDays?: number; + // (undocumented) policyType?: IaasvmPolicyType; retentionPolicy?: RetentionPolicyUnion; schedulePolicy?: SchedulePolicyUnion; + tieringPolicy?: { + [propertyName: string]: TieringPolicy; + }; timeZone?: string; } @@ -372,19 +379,19 @@ export interface AzureVmWorkloadProtectableItem extends WorkloadProtectableItem parentName?: string; parentUniqueName?: string; prebackupvalidation?: PreBackupValidation; - protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; + protectableItemType: "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; serverName?: string; subinquireditemcount?: number; subprotectableitemcount?: number; } // @public (undocumented) -export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; +export type AzureVmWorkloadProtectableItemUnion = AzureVmWorkloadProtectableItem | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem | AzureVmWorkloadSAPHanaDBInstance | AzureVmWorkloadSAPHanaHSR | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; // @public export interface AzureVmWorkloadProtectedItem extends ProtectedItem { extendedInfo?: AzureVmWorkloadProtectedItemExtendedInfo; - friendlyName?: string; + readonly friendlyName?: string; kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails; }; @@ -395,22 +402,25 @@ export interface AzureVmWorkloadProtectedItem extends ProtectedItem { parentType?: string; protectedItemDataSourceId?: string; protectedItemHealthStatus?: ProtectedItemHealthStatus; - protectedItemType: "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase"; + protectedItemType: "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase"; protectionState?: ProtectionState; - protectionStatus?: string; + readonly protectionStatus?: string; serverName?: string; } // @public export interface AzureVmWorkloadProtectedItemExtendedInfo { + newestRecoveryPointInArchive?: Date; oldestRecoveryPoint?: Date; + oldestRecoveryPointInArchive?: Date; + oldestRecoveryPointInVault?: Date; policyState?: string; recoveryModel?: string; recoveryPointCount?: number; } // @public (undocumented) -export type AzureVmWorkloadProtectedItemUnion = AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem; +export type AzureVmWorkloadProtectedItemUnion = AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem | AzureVmWorkloadSAPHanaDBInstanceProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem; // @public export interface AzureVmWorkloadProtectionPolicy extends ProtectionPolicy { @@ -456,6 +466,21 @@ export interface AzureVmWorkloadSAPHanaDatabaseWorkloadItem extends AzureVmWorkl workloadItemType: "SAPHanaDatabase"; } +// @public +export interface AzureVmWorkloadSAPHanaDBInstance extends AzureVmWorkloadProtectableItem { + protectableItemType: "SAPHanaDBInstance"; +} + +// @public +export interface AzureVmWorkloadSAPHanaDBInstanceProtectedItem extends AzureVmWorkloadProtectedItem { + protectedItemType: "AzureVmWorkloadSAPHanaDBInstance"; +} + +// @public +export interface AzureVmWorkloadSAPHanaHSR extends AzureVmWorkloadProtectableItem { + protectableItemType: "SAPHanaHSR"; +} + // @public export interface AzureVmWorkloadSAPHanaSystemProtectableItem extends AzureVmWorkloadProtectableItem { protectableItemType: "SAPHanaSystem"; @@ -1385,6 +1410,26 @@ export type DayOfWeek = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursda // @public export type DedupState = string; +// @public +export interface DeletedProtectionContainers { + list(resourceGroupName: string, vaultName: string, options?: DeletedProtectionContainersListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DeletedProtectionContainersListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DeletedProtectionContainersListNextResponse = ProtectionContainerResourceList; + +// @public +export interface DeletedProtectionContainersListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type DeletedProtectionContainersListResponse = ProtectionContainerResourceList; + // @public (undocumented) export interface DiskExclusionProperties { diskLunList?: number[]; @@ -1953,6 +1998,7 @@ export enum KnownBackupItemType { Invalid = "Invalid", SAPAseDatabase = "SAPAseDatabase", SAPHanaDatabase = "SAPHanaDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance", Sharepoint = "Sharepoint", SQLDataBase = "SQLDataBase", Sqldb = "SQLDB", @@ -1981,23 +2027,23 @@ export enum KnownBackupType { Full = "Full", Incremental = "Incremental", Invalid = "Invalid", - Log = "Log" + Log = "Log", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + SnapshotFull = "SnapshotFull" } // @public export enum KnownContainerType { AzureBackupServerContainer = "AzureBackupServerContainer", AzureSqlContainer = "AzureSqlContainer", - AzureWorkloadContainer = "AzureWorkloadContainer", Cluster = "Cluster", DPMContainer = "DPMContainer", GenericContainer = "GenericContainer", + HanaHSRContainer = "HanaHSRContainer", IaasVMContainer = "IaasVMContainer", IaasVMServiceContainer = "IaasVMServiceContainer", Invalid = "Invalid", MABContainer = "MABContainer", - MicrosoftClassicComputeVirtualMachines = "Microsoft.ClassicCompute/virtualMachines", - MicrosoftComputeVirtualMachines = "Microsoft.Compute/virtualMachines", SqlagWorkLoadContainer = "SQLAGWorkLoadContainer", StorageContainer = "StorageContainer", Unknown = "Unknown", @@ -2040,6 +2086,7 @@ export enum KnownDataSourceType { Invalid = "Invalid", SAPAseDatabase = "SAPAseDatabase", SAPHanaDatabase = "SAPHanaDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance", Sharepoint = "Sharepoint", SQLDataBase = "SQLDataBase", Sqldb = "SQLDB", @@ -2214,7 +2261,9 @@ export enum KnownPolicyType { Full = "Full", Incremental = "Incremental", Invalid = "Invalid", - Log = "Log" + Log = "Log", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + SnapshotFull = "SnapshotFull" } // @public @@ -2321,7 +2370,9 @@ export enum KnownRestorePointQueryType { FullAndDifferential = "FullAndDifferential", Incremental = "Incremental", Invalid = "Invalid", - Log = "Log" + Log = "Log", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + SnapshotFull = "SnapshotFull" } // @public @@ -2330,7 +2381,9 @@ export enum KnownRestorePointType { Full = "Full", Incremental = "Incremental", Invalid = "Invalid", - Log = "Log" + Log = "Log", + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull", + SnapshotFull = "SnapshotFull" } // @public @@ -2403,6 +2456,14 @@ export enum KnownSupportStatus { Supported = "Supported" } +// @public +export enum KnownTieringMode { + DoNotTier = "DoNotTier", + Invalid = "Invalid", + TierAfter = "TierAfter", + TierRecommended = "TierRecommended" +} + // @public export enum KnownType { BackupProtectedItemCountSummary = "BackupProtectedItemCountSummary", @@ -2433,6 +2494,7 @@ export enum KnownWorkloadItemType { SAPAseDatabase = "SAPAseDatabase", SAPAseSystem = "SAPAseSystem", SAPHanaDatabase = "SAPHanaDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance", SAPHanaSystem = "SAPHanaSystem", SQLDataBase = "SQLDataBase", SQLInstance = "SQLInstance" @@ -2449,6 +2511,7 @@ export enum KnownWorkloadType { Invalid = "Invalid", SAPAseDatabase = "SAPAseDatabase", SAPHanaDatabase = "SAPHanaDatabase", + SAPHanaDBInstance = "SAPHanaDBInstance", Sharepoint = "Sharepoint", SQLDataBase = "SQLDataBase", Sqldb = "SQLDB", @@ -2921,12 +2984,15 @@ export interface ProtectableContainersListOptionalParams extends coreClient.Oper // @public export type ProtectableContainersListResponse = ProtectableContainerResourceList; +// @public +export type ProtectableContainerType = "Invalid" | "Unknown" | "IaasVMContainer" | "IaasVMServiceContainer" | "DPMContainer" | "AzureBackupServerContainer" | "MABContainer" | "Cluster" | "AzureSqlContainer" | "Windows" | "VCenter" | "VMAppContainer" | "SQLAGWorkLoadContainer" | "StorageContainer" | "GenericContainer" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureWorkloadContainer"; + // @public (undocumented) export type ProtectableContainerUnion = ProtectableContainer | AzureStorageProtectableContainer | AzureVMAppContainerProtectableContainer; // @public export interface ProtectedItem { - backupManagementType?: BackupManagementType; + readonly backupManagementType?: BackupManagementType; backupSetName?: string; containerName?: string; createMode?: CreateMode; @@ -2939,10 +3005,11 @@ export interface ProtectedItem { lastRecoveryPoint?: Date; policyId?: string; policyName?: string; - protectedItemType: "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem"; + protectedItemType: "AzureFileShareProtectedItem" | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "Microsoft.Sql/servers/databases" | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem"; resourceGuardOperationRequests?: string[]; + softDeleteRetentionPeriod?: number; sourceResourceId?: string; - workloadType?: DataSourceType; + readonly workloadType?: DataSourceType; } // @public @@ -3420,6 +3487,8 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { // (undocumented) bMSPrepareDataMoveOperationResult: BMSPrepareDataMoveOperationResult; // (undocumented) + deletedProtectionContainers: DeletedProtectionContainers; + // (undocumented) exportJobsOperationResults: ExportJobsOperationResults; // (undocumented) featureSupport: FeatureSupport; @@ -3763,6 +3832,9 @@ export interface SubProtectionPolicy { policyType?: PolicyType; retentionPolicy?: RetentionPolicyUnion; schedulePolicy?: SchedulePolicyUnion; + tieringPolicy?: { + [propertyName: string]: TieringPolicy; + }; } // @public @@ -3782,6 +3854,16 @@ export interface TargetRestoreInfo { targetDirectoryForFileRestore?: string; } +// @public +export type TieringMode = string; + +// @public +export interface TieringPolicy { + duration?: number; + durationType?: RetentionDurationType; + tieringMode?: TieringMode; +} + // @public export interface TokenInformation { expiryTimeInUtcTicks?: number; @@ -3979,7 +4061,7 @@ export type WorkloadItemUnion = WorkloadItem | AzureVmWorkloadItemUnion; export interface WorkloadProtectableItem { backupManagementType?: string; friendlyName?: string; - protectableItemType: "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; + protectableItemType: "AzureFileShare" | "IaaSVMProtectableItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines" | "AzureVmWorkloadProtectableItem" | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" | "SAPHanaDBInstance" | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; protectionState?: ProtectionStatus; workloadType?: string; } diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index 5db8bb2933d6..9d6b17ff3555 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -123,6 +123,7 @@ export type AzureVmWorkloadProtectedItemUnion = | AzureVmWorkloadProtectedItem | AzureVmWorkloadSAPAseDatabaseProtectedItem | AzureVmWorkloadSAPHanaDatabaseProtectedItem + | AzureVmWorkloadSAPHanaDBInstanceProtectedItem | AzureVmWorkloadSQLDatabaseProtectedItem; export type AzureWorkloadRecoveryPointUnion = | AzureWorkloadRecoveryPoint @@ -166,6 +167,8 @@ export type AzureVmWorkloadProtectableItemUnion = | AzureVmWorkloadSAPAseSystemProtectableItem | AzureVmWorkloadSAPHanaDatabaseProtectableItem | AzureVmWorkloadSAPHanaSystemProtectableItem + | AzureVmWorkloadSAPHanaDBInstance + | AzureVmWorkloadSAPHanaHSR | AzureVmWorkloadSQLAvailabilityGroupProtectableItem | AzureVmWorkloadSQLDatabaseProtectableItem | AzureVmWorkloadSQLInstanceProtectableItem; @@ -652,14 +655,21 @@ export interface ProtectedItem { | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" + | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase" | "DPMProtectedItem" | "GenericProtectedItem" | "MabFileFolderProtectedItem"; - /** Type of backup management for the backed up item. */ - backupManagementType?: BackupManagementType; - /** Type of workload this item represents. */ - workloadType?: DataSourceType; + /** + * Type of backup management for the backed up item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly backupManagementType?: BackupManagementType; + /** + * Type of workload this item represents. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workloadType?: DataSourceType; /** Unique name of container */ containerName?: string; /** ARM ID of the resource to be backed up. */ @@ -688,6 +698,8 @@ export interface ProtectedItem { isArchiveEnabled?: boolean; /** Name of the policy used for protection */ policyName?: string; + /** Soft delete retention period in days */ + softDeleteRetentionPeriod?: number; } /** Base class for backup copies. Workload-specific backup copies are derived from this class. */ @@ -961,6 +973,8 @@ export interface WorkloadProtectableItem { | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" + | "SAPHanaDBInstance" + | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; @@ -1122,6 +1136,12 @@ export interface SubProtectionPolicy { schedulePolicy?: SchedulePolicyUnion; /** Retention policy with the details on backup copy retention ranges. */ retentionPolicy?: RetentionPolicyUnion; + /** + * Tiering policy to automatically move RPs to another tier. + * Key is Target Tier, defined in RecoveryPointTierType enum. + * Tiering policy specifies the criteria to move RP to the target tier. + */ + tieringPolicy?: { [propertyName: string]: TieringPolicy }; } /** Base class for backup schedule. */ @@ -1140,10 +1160,40 @@ export interface RetentionPolicy { retentionPolicyType: "LongTermRetentionPolicy" | "SimpleRetentionPolicy"; } +/** + * Tiering Policy for a target tier. + * If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that tier + */ +export interface TieringPolicy { + /** + * Tiering Mode to control automatic tiering of recovery points. Supported values are: + * 1. TierRecommended: Tier all recovery points recommended to be tiered + * 2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below. + * 3. DoNotTier: Do not tier any recovery points + */ + tieringMode?: TieringMode; + /** + * Number of days/weeks/months/years to retain backups in current tier before tiering. + * Used only if TieringMode is set to TierAfter + */ + duration?: number; + /** + * Retention duration type: days/weeks/months/years + * Used only if TieringMode is set to TierAfter + */ + durationType?: RetentionDurationType; +} + /** Additional information on Azure IaaS VM specific backup item. */ export interface AzureIaaSVMProtectedItemExtendedInfo { - /** The oldest backup copy available for this backup item. */ + /** The oldest backup copy available for this backup item across all tiers. */ oldestRecoveryPoint?: Date; + /** The oldest backup copy available for this backup item in vault tier */ + oldestRecoveryPointInVault?: Date; + /** The oldest backup copy available for this backup item in archive tier */ + oldestRecoveryPointInArchive?: Date; + /** The latest backup copy available for this backup item in archive tier */ + newestRecoveryPointInArchive?: Date; /** Number of backup copies available for this backup item. */ recoveryPointCount?: number; /** Specifies if backup policy associated with the backup item is inconsistent. */ @@ -1273,8 +1323,14 @@ export interface AzureStorageJobTaskDetails { /** Additional information on Azure Workload for SQL specific backup item. */ export interface AzureVmWorkloadProtectedItemExtendedInfo { - /** The oldest backup copy available for this backup item. */ + /** The oldest backup copy available for this backup item across all tiers. */ oldestRecoveryPoint?: Date; + /** The oldest backup copy available for this backup item in vault tier */ + oldestRecoveryPointInVault?: Date; + /** The oldest backup copy available for this backup item in archive tier */ + oldestRecoveryPointInArchive?: Date; + /** The latest backup copy available for this backup item in archive tier */ + newestRecoveryPointInArchive?: Date; /** Number of backup copies available for this backup item. */ recoveryPointCount?: number; /** Indicates consistency of policy object and policy applied to this backup item. */ @@ -2324,26 +2380,41 @@ export interface AzureIaaSVMProtectedItem extends ProtectedItem { | "AzureIaaSVMProtectedItem" | "Microsoft.ClassicCompute/virtualMachines" | "Microsoft.Compute/virtualMachines"; - /** Friendly name of the VM represented by this backup item. */ - friendlyName?: string; - /** Fully qualified ARM ID of the virtual machine represented by this item. */ - virtualMachineId?: string; + /** + * Friendly name of the VM represented by this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly friendlyName?: string; + /** + * Fully qualified ARM ID of the virtual machine represented by this item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly virtualMachineId?: string; /** Backup status of this backup item. */ protectionStatus?: string; /** Backup state of this backup item. */ protectionState?: ProtectionState; - /** Health status of protected item. */ - healthStatus?: HealthStatus; + /** + * Health status of protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly healthStatus?: HealthStatus; /** Health details on this backup item. */ healthDetails?: AzureIaaSVMHealthDetails[]; /** Health details of different KPIs */ kpisHealths?: { [propertyName: string]: KPIResourceHealthDetails }; /** Last backup operation status. */ lastBackupStatus?: string; - /** Timestamp of the last backup operation on this backup item. */ - lastBackupTime?: Date; - /** Data ID of the protected item. */ - protectedItemDataId?: string; + /** + * Timestamp of the last backup operation on this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastBackupTime?: Date; + /** + * Data ID of the protected item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectedItemDataId?: string; /** Additional information for this backup item. */ extendedInfo?: AzureIaaSVMProtectedItemExtendedInfo; /** Extended Properties for Azure IaasVM Backup. */ @@ -2369,17 +2440,24 @@ export interface AzureVmWorkloadProtectedItem extends ProtectedItem { | "AzureVmWorkloadProtectedItem" | "AzureVmWorkloadSAPAseDatabase" | "AzureVmWorkloadSAPHanaDatabase" + | "AzureVmWorkloadSAPHanaDBInstance" | "AzureVmWorkloadSQLDatabase"; - /** Friendly name of the DB represented by this backup item. */ - friendlyName?: string; + /** + * Friendly name of the DB represented by this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly friendlyName?: string; /** Host/Cluster Name for instance or AG */ serverName?: string; /** Parent name of the DB such as Instance or Availability Group. */ parentName?: string; /** Parent type of protected item, example: for a DB, standalone server or distributed */ parentType?: string; - /** Backup status of this backup item. */ - protectionStatus?: string; + /** + * Backup status of this backup item. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly protectionStatus?: string; /** Backup state of this backup item. */ protectionState?: ProtectionState; /** Last backup operation status. Possible values: Healthy, Unhealthy. */ @@ -2591,7 +2669,7 @@ export interface AzureWorkloadRestoreRequest extends RestoreRequest { export interface IaasVMRestoreRequest extends RestoreRequest { /** Polymorphic discriminator, which specifies the different types this object can be */ objectType: "IaasVMRestoreRequest" | "IaasVMRestoreWithRehydrationRequest"; - /** ID of the backup copy to be recovered. */ + /** Recovery Point ID Name of the backup copy to be recovered. */ recoveryPointId?: string; /** Type of this recovery. */ recoveryType?: RecoveryType; @@ -2689,11 +2767,16 @@ export interface AzureIaaSVMProtectionPolicy extends ProtectionPolicy { schedulePolicy?: SchedulePolicyUnion; /** Retention policy with the details on backup copy retention ranges. */ retentionPolicy?: RetentionPolicyUnion; + /** + * Tiering policy to automatically move RPs to another tier + * Key is Target Tier, defined in RecoveryPointTierType enum. + * Tiering policy specifies the criteria to move RP to the target tier. + */ + tieringPolicy?: { [propertyName: string]: TieringPolicy }; /** Instant RP retention policy range in days */ instantRpRetentionRangeInDays?: number; /** TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time". */ timeZone?: string; - /** Type of backup policy type */ policyType?: IaasvmPolicyType; } @@ -3141,6 +3224,8 @@ export interface AzureVmWorkloadProtectableItem | "SAPAseSystem" | "SAPHanaDatabase" | "SAPHanaSystem" + | "SAPHanaDBInstance" + | "SAPHanaHSR" | "SQLAvailabilityGroupContainer" | "SQLDataBase" | "SQLInstance"; @@ -3275,6 +3360,13 @@ export interface AzureVmWorkloadSAPHanaDatabaseProtectedItem protectedItemType: "AzureVmWorkloadSAPHanaDatabase"; } +/** Azure VM workload-specific protected item representing SAP HANA DBInstance. */ +export interface AzureVmWorkloadSAPHanaDBInstanceProtectedItem + extends AzureVmWorkloadProtectedItem { + /** Polymorphic discriminator, which specifies the different types this object can be */ + protectedItemType: "AzureVmWorkloadSAPHanaDBInstance"; +} + /** Azure VM workload-specific protected item representing SQL Database. */ export interface AzureVmWorkloadSQLDatabaseProtectedItem extends AzureVmWorkloadProtectedItem { @@ -3479,6 +3571,20 @@ export interface AzureVmWorkloadSAPHanaSystemProtectableItem protectableItemType: "SAPHanaSystem"; } +/** Azure VM workload-specific protectable item representing SAP HANA Dbinstance. */ +export interface AzureVmWorkloadSAPHanaDBInstance + extends AzureVmWorkloadProtectableItem { + /** Polymorphic discriminator, which specifies the different types this object can be */ + protectableItemType: "SAPHanaDBInstance"; +} + +/** Azure VM workload-specific protectable item representing SAP HANA Dbinstance. */ +export interface AzureVmWorkloadSAPHanaHSR + extends AzureVmWorkloadProtectableItem { + /** Polymorphic discriminator, which specifies the different types this object can be */ + protectableItemType: "SAPHanaHSR"; +} + /** Azure VM workload-specific protectable item representing SQL Availability Group. */ export interface AzureVmWorkloadSQLAvailabilityGroupProtectableItem extends AzureVmWorkloadProtectableItem { @@ -3704,7 +3810,9 @@ export enum KnownDataSourceType { /** SAPHanaDatabase */ SAPHanaDatabase = "SAPHanaDatabase", /** SAPAseDatabase */ - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + /** SAPHanaDBInstance */ + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -3726,7 +3834,8 @@ export enum KnownDataSourceType { * **SQLDataBase** \ * **AzureFileShare** \ * **SAPHanaDatabase** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type DataSourceType = string; @@ -4180,72 +4289,6 @@ export enum KnownBackupEngineType { */ export type BackupEngineType = string; -/** Known values of {@link ContainerType} that the service accepts. */ -export enum KnownContainerType { - /** Invalid */ - Invalid = "Invalid", - /** Unknown */ - Unknown = "Unknown", - /** IaasVMContainer */ - IaasVMContainer = "IaasVMContainer", - /** IaasVMServiceContainer */ - IaasVMServiceContainer = "IaasVMServiceContainer", - /** DPMContainer */ - DPMContainer = "DPMContainer", - /** AzureBackupServerContainer */ - AzureBackupServerContainer = "AzureBackupServerContainer", - /** MABContainer */ - MABContainer = "MABContainer", - /** Cluster */ - Cluster = "Cluster", - /** AzureSqlContainer */ - AzureSqlContainer = "AzureSqlContainer", - /** Windows */ - Windows = "Windows", - /** VCenter */ - VCenter = "VCenter", - /** VMAppContainer */ - VMAppContainer = "VMAppContainer", - /** SqlagWorkLoadContainer */ - SqlagWorkLoadContainer = "SQLAGWorkLoadContainer", - /** StorageContainer */ - StorageContainer = "StorageContainer", - /** GenericContainer */ - GenericContainer = "GenericContainer", - /** MicrosoftClassicComputeVirtualMachines */ - MicrosoftClassicComputeVirtualMachines = "Microsoft.ClassicCompute/virtualMachines", - /** MicrosoftComputeVirtualMachines */ - MicrosoftComputeVirtualMachines = "Microsoft.Compute/virtualMachines", - /** AzureWorkloadContainer */ - AzureWorkloadContainer = "AzureWorkloadContainer" -} - -/** - * Defines values for ContainerType. \ - * {@link KnownContainerType} can be used interchangeably with ContainerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Invalid** \ - * **Unknown** \ - * **IaasVMContainer** \ - * **IaasVMServiceContainer** \ - * **DPMContainer** \ - * **AzureBackupServerContainer** \ - * **MABContainer** \ - * **Cluster** \ - * **AzureSqlContainer** \ - * **Windows** \ - * **VCenter** \ - * **VMAppContainer** \ - * **SQLAGWorkLoadContainer** \ - * **StorageContainer** \ - * **GenericContainer** \ - * **Microsoft.ClassicCompute\/virtualMachines** \ - * **Microsoft.Compute\/virtualMachines** \ - * **AzureWorkloadContainer** - */ -export type ContainerType = string; - /** Known values of {@link ProtectionState} that the service accepts. */ export enum KnownProtectionState { /** Invalid */ @@ -4412,7 +4455,9 @@ export enum KnownWorkloadType { /** SAPHanaDatabase */ SAPHanaDatabase = "SAPHanaDatabase", /** SAPAseDatabase */ - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + /** SAPHanaDBInstance */ + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -4434,7 +4479,8 @@ export enum KnownWorkloadType { * **SQLDataBase** \ * **AzureFileShare** \ * **SAPHanaDatabase** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type WorkloadType = string; @@ -4451,7 +4497,11 @@ export enum KnownPolicyType { /** CopyOnlyFull */ CopyOnlyFull = "CopyOnlyFull", /** Incremental */ - Incremental = "Incremental" + Incremental = "Incremental", + /** SnapshotFull */ + SnapshotFull = "SnapshotFull", + /** SnapshotCopyOnlyFull */ + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4464,10 +4514,63 @@ export enum KnownPolicyType { * **Differential** \ * **Log** \ * **CopyOnlyFull** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type PolicyType = string; +/** Known values of {@link TieringMode} that the service accepts. */ +export enum KnownTieringMode { + /** Invalid */ + Invalid = "Invalid", + /** TierRecommended */ + TierRecommended = "TierRecommended", + /** TierAfter */ + TierAfter = "TierAfter", + /** DoNotTier */ + DoNotTier = "DoNotTier" +} + +/** + * Defines values for TieringMode. \ + * {@link KnownTieringMode} can be used interchangeably with TieringMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **TierRecommended** \ + * **TierAfter** \ + * **DoNotTier** + */ +export type TieringMode = string; + +/** Known values of {@link RetentionDurationType} that the service accepts. */ +export enum KnownRetentionDurationType { + /** Invalid */ + Invalid = "Invalid", + /** Days */ + Days = "Days", + /** Weeks */ + Weeks = "Weeks", + /** Months */ + Months = "Months", + /** Years */ + Years = "Years" +} + +/** + * Defines values for RetentionDurationType. \ + * {@link KnownRetentionDurationType} can be used interchangeably with RetentionDurationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Days** \ + * **Weeks** \ + * **Months** \ + * **Years** + */ +export type RetentionDurationType = string; + /** Known values of {@link HealthStatus} that the service accepts. */ export enum KnownHealthStatus { /** Passed */ @@ -4605,7 +4708,11 @@ export enum KnownRestorePointType { /** Differential */ Differential = "Differential", /** Incremental */ - Incremental = "Incremental" + Incremental = "Incremental", + /** SnapshotFull */ + SnapshotFull = "SnapshotFull", + /** SnapshotCopyOnlyFull */ + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4617,7 +4724,9 @@ export enum KnownRestorePointType { * **Full** \ * **Log** \ * **Differential** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type RestorePointType = string; @@ -4699,7 +4808,11 @@ export enum KnownRestorePointQueryType { /** All */ All = "All", /** Incremental */ - Incremental = "Incremental" + Incremental = "Incremental", + /** SnapshotFull */ + SnapshotFull = "SnapshotFull", + /** SnapshotCopyOnlyFull */ + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -4713,37 +4826,12 @@ export enum KnownRestorePointQueryType { * **Differential** \ * **FullAndDifferential** \ * **All** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type RestorePointQueryType = string; -/** Known values of {@link RetentionDurationType} that the service accepts. */ -export enum KnownRetentionDurationType { - /** Invalid */ - Invalid = "Invalid", - /** Days */ - Days = "Days", - /** Weeks */ - Weeks = "Weeks", - /** Months */ - Months = "Months", - /** Years */ - Years = "Years" -} - -/** - * Defines values for RetentionDurationType. \ - * {@link KnownRetentionDurationType} can be used interchangeably with RetentionDurationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Invalid** \ - * **Days** \ - * **Weeks** \ - * **Months** \ - * **Years** - */ -export type RetentionDurationType = string; - /** Known values of {@link JobStatus} that the service accepts. */ export enum KnownJobStatus { /** Invalid */ @@ -5042,7 +5130,11 @@ export enum KnownBackupType { /** CopyOnlyFull */ CopyOnlyFull = "CopyOnlyFull", /** Incremental */ - Incremental = "Incremental" + Incremental = "Incremental", + /** SnapshotFull */ + SnapshotFull = "SnapshotFull", + /** SnapshotCopyOnlyFull */ + SnapshotCopyOnlyFull = "SnapshotCopyOnlyFull" } /** @@ -5055,7 +5147,9 @@ export enum KnownBackupType { * **Differential** \ * **Log** \ * **CopyOnlyFull** \ - * **Incremental** + * **Incremental** \ + * **SnapshotFull** \ + * **SnapshotCopyOnlyFull** */ export type BackupType = string; @@ -5074,7 +5168,9 @@ export enum KnownWorkloadItemType { /** SAPAseSystem */ SAPAseSystem = "SAPAseSystem", /** SAPAseDatabase */ - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + /** SAPHanaDBInstance */ + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -5088,7 +5184,8 @@ export enum KnownWorkloadItemType { * **SAPHanaSystem** \ * **SAPHanaDatabase** \ * **SAPAseSystem** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type WorkloadItemType = string; @@ -5134,6 +5231,66 @@ export enum KnownIntentItemType { */ export type IntentItemType = string; +/** Known values of {@link ContainerType} that the service accepts. */ +export enum KnownContainerType { + /** Invalid */ + Invalid = "Invalid", + /** Unknown */ + Unknown = "Unknown", + /** IaasVMContainer */ + IaasVMContainer = "IaasVMContainer", + /** IaasVMServiceContainer */ + IaasVMServiceContainer = "IaasVMServiceContainer", + /** DPMContainer */ + DPMContainer = "DPMContainer", + /** AzureBackupServerContainer */ + AzureBackupServerContainer = "AzureBackupServerContainer", + /** MABContainer */ + MABContainer = "MABContainer", + /** Cluster */ + Cluster = "Cluster", + /** AzureSqlContainer */ + AzureSqlContainer = "AzureSqlContainer", + /** Windows */ + Windows = "Windows", + /** VCenter */ + VCenter = "VCenter", + /** VMAppContainer */ + VMAppContainer = "VMAppContainer", + /** SqlagWorkLoadContainer */ + SqlagWorkLoadContainer = "SQLAGWorkLoadContainer", + /** StorageContainer */ + StorageContainer = "StorageContainer", + /** GenericContainer */ + GenericContainer = "GenericContainer", + /** HanaHSRContainer */ + HanaHSRContainer = "HanaHSRContainer" +} + +/** + * Defines values for ContainerType. \ + * {@link KnownContainerType} can be used interchangeably with ContainerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Unknown** \ + * **IaasVMContainer** \ + * **IaasVMServiceContainer** \ + * **DPMContainer** \ + * **AzureBackupServerContainer** \ + * **MABContainer** \ + * **Cluster** \ + * **AzureSqlContainer** \ + * **Windows** \ + * **VCenter** \ + * **VMAppContainer** \ + * **SQLAGWorkLoadContainer** \ + * **StorageContainer** \ + * **GenericContainer** \ + * **HanaHSRContainer** + */ +export type ContainerType = string; + /** Known values of {@link BackupItemType} that the service accepts. */ export enum KnownBackupItemType { /** Invalid */ @@ -5165,7 +5322,9 @@ export enum KnownBackupItemType { /** SAPHanaDatabase */ SAPHanaDatabase = "SAPHanaDatabase", /** SAPAseDatabase */ - SAPAseDatabase = "SAPAseDatabase" + SAPAseDatabase = "SAPAseDatabase", + /** SAPHanaDBInstance */ + SAPHanaDBInstance = "SAPHanaDBInstance" } /** @@ -5187,7 +5346,8 @@ export enum KnownBackupItemType { * **SQLDataBase** \ * **AzureFileShare** \ * **SAPHanaDatabase** \ - * **SAPAseDatabase** + * **SAPAseDatabase** \ + * **SAPHanaDBInstance** */ export type BackupItemType = string; @@ -5257,6 +5417,26 @@ export type HttpStatusCode = | "ServiceUnavailable" | "GatewayTimeout" | "HttpVersionNotSupported"; +/** Defines values for ProtectableContainerType. */ +export type ProtectableContainerType = + | "Invalid" + | "Unknown" + | "IaasVMContainer" + | "IaasVMServiceContainer" + | "DPMContainer" + | "AzureBackupServerContainer" + | "MABContainer" + | "Cluster" + | "AzureSqlContainer" + | "Windows" + | "VCenter" + | "VMAppContainer" + | "SQLAGWorkLoadContainer" + | "StorageContainer" + | "GenericContainer" + | "Microsoft.ClassicCompute/virtualMachines" + | "Microsoft.Compute/virtualMachines" + | "AzureWorkloadContainer"; /** Defines values for RecoveryPointTierType. */ export type RecoveryPointTierType = | "Invalid" @@ -5902,6 +6082,23 @@ export interface BackupProtectionContainersListNextOptionalParams /** Contains response data for the listNext operation. */ export type BackupProtectionContainersListNextResponse = ProtectionContainerResourceList; +/** Optional parameters. */ +export interface DeletedProtectionContainersListOptionalParams + extends coreClient.OperationOptions { + /** OData filter options. */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type DeletedProtectionContainersListResponse = ProtectionContainerResourceList; + +/** Optional parameters. */ +export interface DeletedProtectionContainersListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DeletedProtectionContainersListNextResponse = ProtectionContainerResourceList; + /** Optional parameters. */ export interface SecurityPINsGetOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts index 6dbeaccbbfd8..7edda15bbf50 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts @@ -1189,12 +1189,14 @@ export const ProtectedItem: coreClient.CompositeMapper = { }, backupManagementType: { serializedName: "backupManagementType", + readOnly: true, type: { name: "String" } }, workloadType: { serializedName: "workloadType", + readOnly: true, type: { name: "String" } @@ -1287,6 +1289,12 @@ export const ProtectedItem: coreClient.CompositeMapper = { type: { name: "String" } + }, + softDeleteRetentionPeriod: { + serializedName: "softDeleteRetentionPeriod", + type: { + name: "Number" + } } } } @@ -1799,7 +1807,27 @@ export const ProtectableContainer: coreClient.CompositeMapper = { serializedName: "protectableContainerType", required: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Invalid", + "Unknown", + "IaasVMContainer", + "IaasVMServiceContainer", + "DPMContainer", + "AzureBackupServerContainer", + "MABContainer", + "Cluster", + "AzureSqlContainer", + "Windows", + "VCenter", + "VMAppContainer", + "SQLAGWorkLoadContainer", + "StorageContainer", + "GenericContainer", + "Microsoft.ClassicCompute/virtualMachines", + "Microsoft.Compute/virtualMachines", + "AzureWorkloadContainer" + ] } }, healthStatus: { @@ -1856,7 +1884,27 @@ export const ProtectionContainer: coreClient.CompositeMapper = { serializedName: "containerType", required: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Invalid", + "Unknown", + "IaasVMContainer", + "IaasVMServiceContainer", + "DPMContainer", + "AzureBackupServerContainer", + "MABContainer", + "Cluster", + "AzureSqlContainer", + "Windows", + "VCenter", + "VMAppContainer", + "SQLAGWorkLoadContainer", + "StorageContainer", + "GenericContainer", + "Microsoft.ClassicCompute/virtualMachines", + "Microsoft.Compute/virtualMachines", + "AzureWorkloadContainer" + ] } }, protectableObjectType: { @@ -2413,6 +2461,13 @@ export const SubProtectionPolicy: coreClient.CompositeMapper = { name: "Composite", className: "RetentionPolicy" } + }, + tieringPolicy: { + serializedName: "tieringPolicy", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "TieringPolicy" } } + } } } } @@ -2460,6 +2515,33 @@ export const RetentionPolicy: coreClient.CompositeMapper = { } }; +export const TieringPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TieringPolicy", + modelProperties: { + tieringMode: { + serializedName: "tieringMode", + type: { + name: "String" + } + }, + duration: { + serializedName: "duration", + type: { + name: "Number" + } + }, + durationType: { + serializedName: "durationType", + type: { + name: "String" + } + } + } + } +}; + export const AzureIaaSVMProtectedItemExtendedInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2471,6 +2553,24 @@ export const AzureIaaSVMProtectedItemExtendedInfo: coreClient.CompositeMapper = name: "DateTime" } }, + oldestRecoveryPointInVault: { + serializedName: "oldestRecoveryPointInVault", + type: { + name: "DateTime" + } + }, + oldestRecoveryPointInArchive: { + serializedName: "oldestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, + newestRecoveryPointInArchive: { + serializedName: "newestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, recoveryPointCount: { serializedName: "recoveryPointCount", type: { @@ -2833,6 +2933,24 @@ export const AzureVmWorkloadProtectedItemExtendedInfo: coreClient.CompositeMappe name: "DateTime" } }, + oldestRecoveryPointInVault: { + serializedName: "oldestRecoveryPointInVault", + type: { + name: "DateTime" + } + }, + oldestRecoveryPointInArchive: { + serializedName: "oldestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, + newestRecoveryPointInArchive: { + serializedName: "newestRecoveryPointInArchive", + type: { + name: "DateTime" + } + }, recoveryPointCount: { serializedName: "recoveryPointCount", type: { @@ -5865,12 +5983,14 @@ export const AzureIaaSVMProtectedItem: coreClient.CompositeMapper = { ...ProtectedItem.type.modelProperties, friendlyName: { serializedName: "friendlyName", + readOnly: true, type: { name: "String" } }, virtualMachineId: { serializedName: "virtualMachineId", + readOnly: true, type: { name: "String" } @@ -5889,6 +6009,7 @@ export const AzureIaaSVMProtectedItem: coreClient.CompositeMapper = { }, healthStatus: { serializedName: "healthStatus", + readOnly: true, type: { name: "String" } @@ -5922,12 +6043,14 @@ export const AzureIaaSVMProtectedItem: coreClient.CompositeMapper = { }, lastBackupTime: { serializedName: "lastBackupTime", + readOnly: true, type: { name: "DateTime" } }, protectedItemDataId: { serializedName: "protectedItemDataId", + readOnly: true, type: { name: "String" } @@ -5996,6 +6119,7 @@ export const AzureVmWorkloadProtectedItem: coreClient.CompositeMapper = { ...ProtectedItem.type.modelProperties, friendlyName: { serializedName: "friendlyName", + readOnly: true, type: { name: "String" } @@ -6020,6 +6144,7 @@ export const AzureVmWorkloadProtectedItem: coreClient.CompositeMapper = { }, protectionStatus: { serializedName: "protectionStatus", + readOnly: true, type: { name: "String" } @@ -6845,6 +6970,13 @@ export const AzureIaaSVMProtectionPolicy: coreClient.CompositeMapper = { className: "RetentionPolicy" } }, + tieringPolicy: { + serializedName: "tieringPolicy", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "TieringPolicy" } } + } + }, instantRpRetentionRangeInDays: { serializedName: "instantRpRetentionRangeInDays", type: { @@ -8445,6 +8577,20 @@ export const AzureVmWorkloadSAPHanaDatabaseProtectedItem: coreClient.CompositeMa } }; +export const AzureVmWorkloadSAPHanaDBInstanceProtectedItem: coreClient.CompositeMapper = { + serializedName: "AzureVmWorkloadSAPHanaDBInstance", + type: { + name: "Composite", + className: "AzureVmWorkloadSAPHanaDBInstanceProtectedItem", + uberParent: "AzureVmWorkloadProtectedItem", + polymorphicDiscriminator: + AzureVmWorkloadProtectedItem.type.polymorphicDiscriminator, + modelProperties: { + ...AzureVmWorkloadProtectedItem.type.modelProperties + } + } +}; + export const AzureVmWorkloadSQLDatabaseProtectedItem: coreClient.CompositeMapper = { serializedName: "AzureVmWorkloadSQLDatabase", type: { @@ -8862,6 +9008,34 @@ export const AzureVmWorkloadSAPHanaSystemProtectableItem: coreClient.CompositeMa } }; +export const AzureVmWorkloadSAPHanaDBInstance: coreClient.CompositeMapper = { + serializedName: "SAPHanaDBInstance", + type: { + name: "Composite", + className: "AzureVmWorkloadSAPHanaDBInstance", + uberParent: "AzureVmWorkloadProtectableItem", + polymorphicDiscriminator: + AzureVmWorkloadProtectableItem.type.polymorphicDiscriminator, + modelProperties: { + ...AzureVmWorkloadProtectableItem.type.modelProperties + } + } +}; + +export const AzureVmWorkloadSAPHanaHSR: coreClient.CompositeMapper = { + serializedName: "SAPHanaHSR", + type: { + name: "Composite", + className: "AzureVmWorkloadSAPHanaHSR", + uberParent: "AzureVmWorkloadProtectableItem", + polymorphicDiscriminator: + AzureVmWorkloadProtectableItem.type.polymorphicDiscriminator, + modelProperties: { + ...AzureVmWorkloadProtectableItem.type.modelProperties + } + } +}; + export const AzureVmWorkloadSQLAvailabilityGroupProtectableItem: coreClient.CompositeMapper = { serializedName: "SQLAvailabilityGroupContainer", type: { @@ -9185,6 +9359,7 @@ export let discriminators = { "AzureIaaSVMProtectedItem.Microsoft.Compute/virtualMachines": AzureIaaSComputeVMProtectedItem, "AzureVmWorkloadProtectedItem.AzureVmWorkloadSAPAseDatabase": AzureVmWorkloadSAPAseDatabaseProtectedItem, "AzureVmWorkloadProtectedItem.AzureVmWorkloadSAPHanaDatabase": AzureVmWorkloadSAPHanaDatabaseProtectedItem, + "AzureVmWorkloadProtectedItem.AzureVmWorkloadSAPHanaDBInstance": AzureVmWorkloadSAPHanaDBInstanceProtectedItem, "AzureVmWorkloadProtectedItem.AzureVmWorkloadSQLDatabase": AzureVmWorkloadSQLDatabaseProtectedItem, "AzureWorkloadRecoveryPoint.AzureWorkloadPointInTimeRecoveryPoint": AzureWorkloadPointInTimeRecoveryPoint, "AzureWorkloadRecoveryPoint.AzureWorkloadSAPHanaRecoveryPoint": AzureWorkloadSAPHanaRecoveryPoint, @@ -9210,6 +9385,8 @@ export let discriminators = { "AzureVmWorkloadProtectableItem.SAPAseSystem": AzureVmWorkloadSAPAseSystemProtectableItem, "AzureVmWorkloadProtectableItem.SAPHanaDatabase": AzureVmWorkloadSAPHanaDatabaseProtectableItem, "AzureVmWorkloadProtectableItem.SAPHanaSystem": AzureVmWorkloadSAPHanaSystemProtectableItem, + "AzureVmWorkloadProtectableItem.SAPHanaDBInstance": AzureVmWorkloadSAPHanaDBInstance, + "AzureVmWorkloadProtectableItem.SAPHanaHSR": AzureVmWorkloadSAPHanaHSR, "AzureVmWorkloadProtectableItem.SQLAvailabilityGroupContainer": AzureVmWorkloadSQLAvailabilityGroupProtectableItem, "AzureVmWorkloadProtectableItem.SQLDataBase": AzureVmWorkloadSQLDatabaseProtectableItem, "AzureVmWorkloadProtectableItem.SQLInstance": AzureVmWorkloadSQLInstanceProtectableItem, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts index 605e2bd4ecf9..2b64130a41cb 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts @@ -63,7 +63,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-03-01", + defaultValue: "2022-10-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/deletedProtectionContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/deletedProtectionContainers.ts new file mode 100644 index 000000000000..96541518f1b6 --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/deletedProtectionContainers.ts @@ -0,0 +1,198 @@ +/* + * 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DeletedProtectionContainers } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient"; +import { + ProtectionContainerResource, + DeletedProtectionContainersListNextOptionalParams, + DeletedProtectionContainersListOptionalParams, + DeletedProtectionContainersListResponse, + DeletedProtectionContainersListNextResponse +} from "../models"; + +/// +/** Class containing DeletedProtectionContainers operations. */ +export class DeletedProtectionContainersImpl + implements DeletedProtectionContainers { + private readonly client: RecoveryServicesBackupClient; + + /** + * Initialize a new instance of the class DeletedProtectionContainers class. + * @param client Reference to the service client + */ + constructor(client: RecoveryServicesBackupClient) { + this.client = client; + } + + /** + * Lists the soft deleted containers registered to Recovery Services Vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + vaultName: string, + options?: DeletedProtectionContainersListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, vaultName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + vaultName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + vaultName: string, + options?: DeletedProtectionContainersListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DeletedProtectionContainersListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, vaultName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + vaultName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + vaultName: string, + options?: DeletedProtectionContainersListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + vaultName, + options + )) { + yield* page; + } + } + + /** + * Lists the soft deleted containers registered to Recovery Services Vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + vaultName: string, + options?: DeletedProtectionContainersListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + vaultName: string, + nextLink: string, + options?: DeletedProtectionContainersListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, vaultName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupDeletedProtectionContainers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProtectionContainerResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ProtectionContainerResourceList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + urlParameters: [ + Parameters.$host, + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts index 154cc42aeb56..2437070aadd2 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts @@ -50,6 +50,7 @@ export * from "./backupOperationStatuses"; export * from "./protectionPolicyOperationStatuses"; export * from "./backupProtectableItems"; export * from "./backupProtectionContainers"; +export * from "./deletedProtectionContainers"; export * from "./securityPINs"; export * from "./recoveryPointsRecommendedForMove"; export * from "./resourceGuardProxies"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/deletedProtectionContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/deletedProtectionContainers.ts new file mode 100644 index 000000000000..b68304bb20dc --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/deletedProtectionContainers.ts @@ -0,0 +1,30 @@ +/* + * 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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ProtectionContainerResource, + DeletedProtectionContainersListOptionalParams +} from "../models"; + +/// +/** Interface representing a DeletedProtectionContainers. */ +export interface DeletedProtectionContainers { + /** + * Lists the soft deleted containers registered to Recovery Services Vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param vaultName The name of the recovery services vault. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + vaultName: string, + options?: DeletedProtectionContainersListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/index.ts index 154cc42aeb56..2437070aadd2 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/index.ts @@ -50,6 +50,7 @@ export * from "./backupOperationStatuses"; export * from "./protectionPolicyOperationStatuses"; export * from "./backupProtectableItems"; export * from "./backupProtectionContainers"; +export * from "./deletedProtectionContainers"; export * from "./securityPINs"; export * from "./recoveryPointsRecommendedForMove"; export * from "./resourceGuardProxies"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index 775daa505228..e16595fbbefd 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -61,6 +61,7 @@ import { ProtectionPolicyOperationStatusesImpl, BackupProtectableItemsImpl, BackupProtectionContainersImpl, + DeletedProtectionContainersImpl, SecurityPINsImpl, RecoveryPointsRecommendedForMoveImpl, ResourceGuardProxiesImpl, @@ -111,6 +112,7 @@ import { ProtectionPolicyOperationStatuses, BackupProtectableItems, BackupProtectionContainers, + DeletedProtectionContainers, SecurityPINs, RecoveryPointsRecommendedForMove, ResourceGuardProxies, @@ -215,7 +217,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-03-01"; + this.apiVersion = options.apiVersion || "2022-10-01"; this.backupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRRImpl( this ); @@ -282,6 +284,9 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { ); this.backupProtectableItems = new BackupProtectableItemsImpl(this); this.backupProtectionContainers = new BackupProtectionContainersImpl(this); + this.deletedProtectionContainers = new DeletedProtectionContainersImpl( + this + ); this.securityPINs = new SecurityPINsImpl(this); this.recoveryPointsRecommendedForMove = new RecoveryPointsRecommendedForMoveImpl( this @@ -679,6 +684,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { protectionPolicyOperationStatuses: ProtectionPolicyOperationStatuses; backupProtectableItems: BackupProtectableItems; backupProtectionContainers: BackupProtectionContainers; + deletedProtectionContainers: DeletedProtectionContainers; securityPINs: SecurityPINs; recoveryPointsRecommendedForMove: RecoveryPointsRecommendedForMove; resourceGuardProxies: ResourceGuardProxies; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json index a7e9eaf1a49b..3e6ae96443f3 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-recoveryservicesbackup": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"